Samplinglib
Lean gate not recorded for this source state main · ed709a7f320d
Chapter 1 · Book pp. 3–47 · August 9, 2026 edition

The Langevin Diffusion in Continuous Time

Build the analytic language that turns Langevin dynamics into quantitative convergence estimates.

Begin with 1.1 Open this chapter in the canonical August 9 source ↗
Formal topologyOpen this chapter's Lean branches↗

Chapter route

This chapter develops Markov semigroup, infinitesimal generator, Dirichlet form, Poincaré and log-Sobolev inequalities. Its main destination is to connect the definitions below to the results that later chapters consume.

Core definitions

  • A Markov semigroup evolves observables by conditional expectation.
  • The infinitesimal generator is a time-zero semigroup derivative on its stated domain.
  • The overdamped Langevin SDE has drift minus the potential gradient and isotropic Brownian noise.
  • The Wasserstein gradient-flow viewpoint identifies the Fokker-Planck evolution with entropy dissipation.

Main results

  • Itô's formula yields the formal Langevin generator.
  • The weighted integration-by-parts calculation predicts the Gibbs stationary density.
  • Poincaré and log-Sobolev inequalities turn dissipation identities into exponential convergence.
  • Strong convexity supplies the condition-number-dependent convergence scale summarized at the end of the chapter.

Contents

  1. 1.1A Primer on Stochastic CalculusBook p. 3
  2. 1.2Markov Semigroup TheoryBook p. 10
  3. 1.3The Geometry of Optimal TransportBook p. 19
  4. 1.4The Langevin SDE as a Wasserstein Gradient FlowBook p. 31
  5. 1.5Overview of the Convergence ResultsBook p. 36
  6. 1.bibBibliographical NotesBook p. 40
  7. 1.exExercisesBook p. 41
Why is this chapter route valid?

Analytic contracts

  • The weighted integration-by-parts identity first needs compactly supported test functions or a justified cutoff limit.
  • Pointwise exhaustion of a cutoff does not imply convergence of its gradient term under an integral.
  • A totalized Fréchet derivative equal to zero outside a support set does not assert differentiability there.
  • The score-weighted source field must be integrable before dominated convergence can be applied.
  • Formal symmetry, a closed generator on a stated domain, stationarity, and invariance are separate claims.

Open boundaries

  • Concrete Langevin Markov semigroup construction (external/upstream dependency)
  • Semigroup-stable generator-domain extension beyond the compiled C_c^2 core
  • Full invariant Gibbs law and measure-determining extension
View Lean formalization

These mappings are evidence links, not a claim that the entire chapter is formalized.

Theorem 1.1.8

Every progressive process with finite probability-time L2 energy has an Ito integral that is an adapted continuous martingale, is characterized at each deterministic time by the restricted terminal L2 completion, and satisfies the Ito isometry.

Displayed identity (1.1.9)

At every deterministic time, the second moment of the Ito integral equals the probability-time L2 energy accumulated by the integrand up to that time.

Displayed identity (1.1.5)

The expected square of an elementary stochastic integral expands to the sum of its diagonal increment terms because distinct adapted Brownian increments are orthogonal.

Displayed identity (1.1.6)

The second moment of the elementary Ito integral equals the expected time integral of the squared elementary integrand.

Displayed identity (1.1.10)

Localization permits progressive integrands whose squared time integral is finite almost surely, without requiring its expectation to be finite.

Displayed identity (1.1.7)

The squared L2 norm of an integrand on the product probability-time space is the expectation of its squared time integral, and admissible integrands have finite value.

Displayed identity (1.1.2)

An elementary adapted process is a finite sum of bounded left-endpoint measurable coefficients on half-open time intervals.

Displayed identity (1.1.3)

The Ito integral of an elementary process is defined by the finite sum of its adapted coefficients times Brownian increments stopped at the terminal time.

Definition 1.3.26

A functional is alpha-geodesically convex when its value along each geodesic lies below endpoint interpolation minus the alpha quadratic distance correction.

Displayed identity (1.4.7)

Geodesic alpha-convexity implies the first-order lower bound at the initial endpoint, with the derivative pairing and alpha times squared distance correction.

Theorem 1.2.14

For a stationary reversible generator, the two negative-generator pairings equal each other and the integrated carre du champ.

Definition 1.3.6

The dual optimal transport value is the supremum of the two potential integrals over feasible integrable potential pairs.

Displayed identity (1.3.7)

The dual value is the supremum of integral f dmu plus integral g dnu over dual-feasible potentials.

Definition 1.2.19

A Markov process satisfies a Poincare inequality when variance is bounded by a constant times its generator Dirichlet energy.

Definition 1.2.25

A Markov process satisfies an LSI when density entropy is bounded by C/2 times the Dirichlet form of the density and its logarithm.

Definition 1.1.1

Standard Brownian motion starts at zero, has independent centered Gaussian increments with covariance proportional to elapsed time, and has almost surely continuous paths.

Definition 1.1.12

A localizing sequence is an increasing stopping-time sequence whose stopped integrands have finite L2 norm and which converges almost surely to the terminal time.

Definition 1.1.15

A local martingale is adapted and admits increasing stopping times tending almost surely to infinity for which every centered stopped process is a martingale.

Definition 1.2.1

The Markov operator sends an observable to its conditional expectation after elapsed time t, given the initial state.

Definition 1.3.4

The 2-Wasserstein distance is the positive square root of the optimal quadratic coupling cost.

Displayed identity (1.3.5)

The square of W2 equals the infimum of integrated squared distance over all couplings.

Lemma 1.2.2

Identity and Chapman-Kolmogorov transition-kernel laws induce the zero-time, composition, and commutation laws of Markov operators.

Definition 1.2.3

The infinitesimal generator is the right derivative at zero of the semigroup orbit on its convergence domain.

Proposition 1.2.5

The right derivative of P_t f is P_t Lf, and P_t f remains in the generator domain with generator P_t Lf.

Definition 1.1.4

A martingale is an adapted integrable process whose conditional expectation at an earlier time equals its earlier value.

Definition 1.1.11

A stopping time is a random time whose occurrence by time t is measurable using the information available at time t.

Definition 1.2.10

A Markov semigroup is reversible when every time operator is symmetric in the L2 inner product of its stationary law.

Displayed identity (1.2.11)

A Markov semigroup satisfies the pointwise Jensen inequality: the square of P_t f is bounded by P_t applied to the square of f.

Definition 1.2.12

The carre du champ is the bilinear defect between applying the generator after multiplication and multiplying after applying the generator.

Example 1.2.17

For the Langevin differential operator, the carre du champ is the gradient inner product, and on the diagonal it is the squared gradient norm.

Definition 1.2.28

The iterated carre du champ applies the generator to Gamma and subtracts the two mixed generator terms.

Definition 1.2.29

The Bakry-Emery curvature-dimension condition requires positive alpha and the pointwise inequality Gamma_2(f) at least alpha Gamma(f).

Lemma 1.2.20

A differentiable scalar curve satisfying g'(t) at most c times g(t) is bounded by g(0) exp(ct) on the same finite interval.

Definition 1.3.25

The Wasserstein geodesic between two P2,ac laws is the law of the affine interpolation of an optimally coupled endpoint pair; it is also called displacement or McCann interpolation.

Definition 1.3.1

The Kantorovich transport cost is the infimum of expected cost over all joint probability laws with the prescribed marginals.

Displayed identity (1.3.2)

The transport value expands as the infimum of the coupling lintegrals of the cost.

Proposition 1.1.13

The pathwise local-square-integrability condition admits an increasing canonical sequence of stopping times approaching the horizon such that each stopped integrand has finite global L2 energy.

Displayed identity (1.1.14)

Each canonical energy truncation is globally square-integrable, so its Ito integral is an adapted continuous martingale with the deterministic-time restriction representation used in the localization proof.

Proposition 1.1.16

The Ito integral of a progressive locally square-integrable integrand has a continuous version that is a local martingale.

The scalar endpoint step in Bakry–Émery interpolation

Mathlib supplies the one-sided scalar comparison; Samplinglib packages the endpoint orientation used by Bakry–Émery semigroup interpolation.

mathlib commit db584cd6d46c92f209a44c0f1c829460d327499d · le_gronwallBound_of_liminf_deriv_right_le and gronwallBound_ε0 · faithful paraphrase

Complete source statement (Samplinglib restatement)

A continuous scalar interpolation satisfying the exact right-derivative lower bound Φ'≥rΦ obeys Φ(s)≤Φ(t)e^{-r(t-s)} for every s≤t.

  • The interpolation is real-valued and continuous.
  • Its exact right derivative is supplied at every time.
  • The lower differential inequality holds at every time.
  • The endpoints are ordered; no sign condition on the rate or interpolation is needed.

interpolation growth

\[\Phi'(u)\ge r\Phi(u)\]

endpoint contraction

\[\Phi(s)\le\Phi(t)e^{-r(t-s)}\]

Read the formalized proofs

Each statement and proof below has its own closed Lean disclosure. Samplinglib parents, Mathlib calls and external mathematical sources are distinguished in each proof.

Samplinglib mathematical lesson

Backward interpolation turns growth into contraction

AutoSamplingTheory.TechnicalLemmas.FunctionalInequalities.SemigroupDecay.backward_interpolation_contraction_of_growth · theorem · Teaching coverage

Read this first

Mathematical statement

Let Φ be a continuous scalar interpolation with an exact right derivative. If Φ'(u)≥rΦ(u) at every time, then reading the interpolation from s to t gives Φ(s)≤Φ(t)e^{-r(t-s)} for every s≤t.

\[\Phi'(u)\ge r\Phi(u)\Longrightarrow \Phi(s)\le \Phi(t)e^{-r(t-s)}\]
Lean statement · backward_interpolation_contraction_of_growth

Lean records the interpolation, its derivative function, the rate, and both endpoint times explicitly.

Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

theorem backward_interpolation_contraction_of_growth
    {interpolation interpolation' : ℝ → ℝ} {rate s t : ℝ}
    (hcontinuous : Continuous interpolation)
    (hderiv : ∀ u : ℝ,
      HasDerivWithinAt interpolation (interpolation' u) (Ici u) u)
    (hgrowth : ∀ u : ℝ,
      rate * interpolation u ≤ interpolation' u)
    (hst : s ≤ t) :
    interpolation s ≤
      interpolation t * Real.exp (-rate * (t - s))

Exact module and namespace context

Proof roadmap

  1. 1Reverse the inequality by negating the curve

    For g=-Φ, the lower growth bound becomes the upper differential inequality g'≤rg required by one-sided Grönwall.

  2. 2Apply one-sided Grönwall between the two endpoints

    The comparison theorem gives -Φ(t)≤-Φ(s)e^{r(t-s)}, equivalently Φ(s)e^{r(t-s)}≤Φ(t).

  3. 3Move the exponential to the terminal side

    Multiply by the positive inverse exponential and use e^{rΔ}e^{-rΔ}=1.

Full assumptions and notation

All objects and hypotheses

  • Φ and its supplied derivative are real-valued on the whole real line.
  • Φ is continuous.
  • At every u, the right derivative within [u,∞) is exactly Φ'(u).
  • The lower differential inequality rΦ(u)≤Φ'(u) holds at every real u.
  • The endpoints satisfy s≤t.
  • No sign condition on Φ or r is required.

Mathematical proof

1. Reverse the inequality by negating the curve

For g=-Φ, the lower growth bound becomes the upper differential inequality g'≤rg required by one-sided Grönwall.

\[g=-\Phi,\qquad g'=-\Phi'\le-r\Phi=rg\]
Corresponding Lean step

Negate hgrowth; HasDerivWithinAt.neg supplies the exact right derivative of g.

2. Apply one-sided Grönwall between the two endpoints

The comparison theorem gives -Φ(t)≤-Φ(s)e^{r(t-s)}, equivalently Φ(s)e^{r(t-s)}≤Φ(t).

\[\Phi(s)e^{r(t-s)}\le\Phi(t)\]
Corresponding Lean step

Use le_gronwallBound_of_liminf_deriv_right_le, then gronwallBound_ε0.

3. Move the exponential to the terminal side

Multiply by the positive inverse exponential and use e^{rΔ}e^{-rΔ}=1.

\[\Phi(s)\le\Phi(t)e^{-r(t-s)}\]
Corresponding Lean step

Use Real.exp_nonneg, Real.exp_add, and exact ring normalization of the exponents.

Lean verification

The exact proof begins folded immediately after the mathematical argument; the statement is folded beside the claim above.

Lean proof · backward_interpolation_contraction_of_growth

The proof applies Mathlib's one-sided Grönwall theorem to the negated interpolation and then cancels the positive exponential exactly.

Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

Download module (.lean)
theorem backward_interpolation_contraction_of_growth
    {interpolation interpolation' : ℝ → ℝ} {rate s t : ℝ}
    (hcontinuous : Continuous interpolation)
    (hderiv : ∀ u : ℝ,
      HasDerivWithinAt interpolation (interpolation' u) (Ici u) u)
    (hgrowth : ∀ u : ℝ,
      rate * interpolation u ≤ interpolation' u)
    (hst : s ≤ t) :
    interpolation s ≤
      interpolation t * Real.exp (-rate * (t - s)) := by
  have hbound : ∀ x ∈ Ico s t,
      -interpolation' x ≤ rate * (-interpolation x) + 0 := by
    intro x _hx
    have hneg := neg_le_neg (hgrowth x)
    simpa [neg_mul] using hneg
  have hgronwall :=
    le_gronwallBound_of_liminf_deriv_right_le
      (f := fun x => -interpolation x)
      (f' := fun x => -interpolation' x)
      (δ := -interpolation s)
      (K := rate)
      (ε := 0)
      (a := s)
      (b := t)
      hcontinuous.neg.continuousOn
      (fun x _hx r hr => by
        simpa [slope] using ((hderiv x).neg.liminf_right_slope_le hr))
      le_rfl
      hbound
      t
      ⟨hst, le_rfl⟩
  rw [gronwallBound_ε0] at hgronwall
  have hexponential_growth :
      interpolation s * Real.exp (rate * (t - s)) ≤ interpolation t := by
    linarith
  have hscaled := mul_le_mul_of_nonneg_right hexponential_growth
    (Real.exp_nonneg (-rate * (t - s)))
  have hinverse :
      Real.exp (rate * (t - s)) * Real.exp (-rate * (t - s)) = 1 := by
    rw [← Real.exp_add]
    have hzero : rate * (t - s) + -rate * (t - s) = 0 := by ring
    rw [hzero, Real.exp_zero]
  calc
    interpolation s =
        (interpolation s * Real.exp (rate * (t - s))) *
          Real.exp (-rate * (t - s)) := by
      rw [mul_assoc, hinverse, mul_one]
    _ ≤ interpolation t * Real.exp (-rate * (t - s)) := hscaled

Exact module and namespace context

Source assumptions versus formal assumptions

SourceActual LeanDifference kindWhy it matters
Mathlib gives an upper right-slope Grönwall comparison for a continuous scalar function on an interval.Samplinglib assumes a globally continuous interpolation with an exact right derivative and a global lower differential bound, then applies Mathlib to its negation between arbitrary ordered endpoints.source-implicitNegation changes the lower growth inequality into Mathlib's upper comparison. Global hypotheses match the reusable API, while the proof consumes them only on [s,t].

Concrete semigroup order preservation, the derivative identity for P_s Γ(P_{t-s}f), the Γ₂ curvature inequality, and generator-domain closure remain separate analytic prerequisites.

Encoder–denoiser: accepted · exact

A generalization is not a source correction. Proposed missing conditions require separate independent repair review. No proposed repair silently changes the original theorem.

Scope and omitted-condition boundaries
  • The theorem is only the scalar endpoint comparison. It does not build a Markov semigroup, identify Φ with P_s Γ(P_{t-s}f), prove its derivative formula, or derive Γ₂≥κΓ for a concrete generator.
Sources, dependencies, and reuse

Source and reuse

Samplinglib parents called

    Mathlib API called (external library)

    • le_gronwallBound_of_liminf_deriv_right_le
    • HasDerivWithinAt.neg
    • HasDerivWithinAt.liminf_right_slope_le
    • gronwallBound_ε0
    • Real.exp_add

    Mathematical sources

    Samplinglib prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

    Which proof obligations and prerequisites are covered?

    • Independently verified prerequisite Convert the interpolation derivative lower bound into the exact endpoint contraction factor

    The algebraic curvature step in Bakry–Émery interpolation

    Sinho Chewi defines Γ₂ and CD(α,∞); Samplinglib records their immediate pointwise algebraic consequence.

    Chewi, An Introduction to Sampling, edition 2026-08-09 · Definitions 1.2.28–1.2.29, book pp. 18–19 / PDF pp. 30–31 · faithful paraphrase

    Complete source statement (Samplinglib restatement)

    For a linear generator satisfying CD(α,∞), the expression LΓ(f)−2Γ(f,Lf) is pointwise at least 2αΓ(f).

    • An arbitrary state type and a real-linear generator on real-valued observables.
    • A certificate of CD(α,∞), including α>0 and the pointwise inequality αΓ(f)≤Γ₂(f).
    • An arbitrary observable f and state x.

    curvature condition

    \[\alpha\Gamma(f)(x)\le\Gamma_2(f)(x)\]

    expanded interpolation bound

    \[2\alpha\Gamma(f)(x)\le L\Gamma(f)(x)-2\Gamma(f,Lf)(x)\]

    Read the formalized proofs

    Each statement and proof below has its own closed Lean disclosure. Samplinglib parents, Mathlib calls and external mathematical sources are distinguished in each proof.

    Samplinglib mathematical lesson

    Curvature controls the interpolation derivative expression

    AutoSamplingTheory.TechnicalLemmas.StochasticProcesses.interpolationDerivative_lower_bound_of_expandedBakryEmery · theorem · Teaching coverage

    Read this first

    Mathematical statement

    Let L be a real-linear generator and suppose it satisfies CD(α,∞): αΓ(f)≤Γ₂(f). Expanding Γ₂ gives the pointwise lower bound LΓ(f)−2Γ(f,Lf)≥2αΓ(f).

    \[\Gamma_2(f)\ge\alpha\Gamma(f)\Longrightarrow L\Gamma(f)-2\Gamma(f,Lf)\ge2\alpha\Gamma(f)\]
    Lean statement · interpolationDerivative_lower_bound_of_expandedBakryEmery

    Lean exposes the arbitrary type X, linear generator, α>0, every curvature quantifier, the one-half normalization, the observable f, and the point x directly in the theorem signature.

    Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

    theorem interpolationDerivative_lower_bound_of_expandedBakryEmery
        (generator : (X → ℝ) →ₗ[ℝ] (X → ℝ))
        {alpha : ℝ} (_halpha : 0 < alpha)
        (hcurvature : ∀ (g : X → ℝ) (y : X),
          alpha * carreDuChamp generator g g y ≤
            (2 : ℝ)⁻¹ *
              (generator (carreDuChamp generator g g) y -
                carreDuChamp generator g (generator g) y -
                carreDuChamp generator g (generator g) y))
        (f : X → ℝ) (x : X) :
        2 * alpha * carreDuChamp generator f f x ≤
          generator (carreDuChamp generator f f) x -
            2 * carreDuChamp generator f (generator f) x

    Exact module and namespace context

    Proof roadmap

    1. 1Specialize the expanded curvature premise

      At the chosen observable and point, the globally quantified hypothesis gives the exact one-half normalized inequality.

    2. 2Combine the repeated mixed terms

      The two identical subtractions are exactly twice the mixed carré-du-champ term.

    3. 3Clear the factor one half

      Multiply the specialized inequality by two and normalize the real arithmetic.

    Full assumptions and notation

    All objects and hypotheses

    • The state space X is arbitrary.
    • L is a real-linear map from real-valued observables on X to real-valued observables on X.
    • The curvature parameter α is strictly positive.
    • For every observable g and point y, the exact expanded inequality αΓ(g,g)(y)≤(1/2)(LΓ(g,g)(y)−Γ(g,Lg)(y)−Γ(g,Lg)(y)) holds.
    • No semigroup or differentiability assumption is present.

    Mathematical proof

    1. Specialize the expanded curvature premise

    At the chosen observable and point, the globally quantified hypothesis gives the exact one-half normalized inequality.

    \[\alpha\Gamma(f)(x)\le\tfrac12(L\Gamma(f)(x)-\Gamma(f,Lf)(x)-\Gamma(f,Lf)(x))\]
    Corresponding Lean step

    Specialize hcurvature to f and x.

    2. Combine the repeated mixed terms

    The two identical subtractions are exactly twice the mixed carré-du-champ term.

    \[\Gamma(f,Lf)+\Gamma(f,Lf)=2\Gamma(f,Lf)\]
    Corresponding Lean step

    Real-ring normalization identifies the repeated terms.

    3. Clear the factor one half

    Multiply the specialized inequality by two and normalize the real arithmetic.

    \[2\alpha\Gamma(f)\le L\Gamma(f)-2\Gamma(f,Lf)\]
    Corresponding Lean step

    nlinarith closes the scalar real inequality.

    Lean verification

    The exact proof begins folded immediately after the mathematical argument; the statement is folded beside the claim above.

    Lean proof · interpolationDerivative_lower_bound_of_expandedBakryEmery

    The proof specializes the fully expanded curvature hypothesis and discharges the exact real-arithmetic consequence; no hidden definition is unfolded.

    Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

    Download module (.lean)
    theorem interpolationDerivative_lower_bound_of_expandedBakryEmery
        (generator : (X → ℝ) →ₗ[ℝ] (X → ℝ))
        {alpha : ℝ} (_halpha : 0 < alpha)
        (hcurvature : ∀ (g : X → ℝ) (y : X),
          alpha * carreDuChamp generator g g y ≤
            (2 : ℝ)⁻¹ *
              (generator (carreDuChamp generator g g) y -
                carreDuChamp generator g (generator g) y -
                carreDuChamp generator g (generator g) y))
        (f : X → ℝ) (x : X) :
        2 * alpha * carreDuChamp generator f f x ≤
          generator (carreDuChamp generator f f) x -
            2 * carreDuChamp generator f (generator f) x := by
      have h := hcurvature f x
      nlinarith
    
    end StochasticProcesses
    end TechnicalLemmas
    end AutoSamplingTheory

    Exact module and namespace context

    Source assumptions versus formal assumptions

    SourceActual LeanDifference kindWhy it matters
    Chewi Definitions 1.2.28–1.2.29 state Γ₂ and CD(α,∞).Samplinglib writes α>0, every function/point quantifier, the one-half normalization, and both mixed terms directly in the audited theorem signature.source-implicitThe conclusion is the exact algebraic consequence obtained by specializing the fully expanded curvature inequality and multiplying it by two.

    No semigroup construction, derivative identity, order preservation, analytic domain closure, or concrete diffusion curvature verification is asserted.

    Encoder–denoiser: accepted · exact

    A generalization is not a source correction. Proposed missing conditions require separate independent repair review. No proposed repair silently changes the original theorem.

    Scope and omitted-condition boundaries
    • This is the algebraic curvature-to-derivative-expression step only. It does not construct a Markov semigroup, prove order preservation, establish the identity d/ds[P_s Γ(P_{t-s}f)]=2P_s Γ₂(P_{t-s}f), or justify generator-domain closure.
    Sources, dependencies, and reuse

    Source and reuse

    Samplinglib parents called

    Mathlib API called (external library)

    • nlinarith

    Mathematical sources

    Samplinglib prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

    Which proof obligations and prerequisites are covered?

    • Independently verified prerequisite Expand Γ₂ and derive the exact lower bound used in backward interpolation

    An abstract Bakry–Émery gradient-contraction adapter

    Samplinglib-authored abstract composition of Chewi's carré-du-champ curvature setup with positive linear evolution and scalar Grönwall.

    Chewi, An Introduction to Sampling, edition 2026-08-09 · Definitions 1.2.28–1.2.29 and the standard backward-interpolation argument · licensed original

    Complete source statement (Samplinglib restatement)

    A positive linear evolution satisfying the standard backward interpolation derivative identity contracts the carré-du-champ interpolation at rate 2α under the fully expanded CD(α,∞) inequality.

    • The fully expanded curvature inequality with α>0.
    • A real-linear pointwise-order-preserving evolution at every real time.
    • Continuity and the exact right derivative identity for the selected interpolation.
    • Ordered endpoints s≤t.

    derivative growth

    \[\Phi'(u)\ge2\alpha\Phi(u)\]

    endpoint contraction

    \[\Phi(s)\le\Phi(t)e^{-2\alpha(t-s)}\]

    Read the formalized proofs

    Each statement and proof below has its own closed Lean disclosure. Samplinglib parents, Mathlib calls and external mathematical sources are distinguished in each proof.

    Samplinglib mathematical lesson

    Backward interpolation yields gradient contraction

    AutoSamplingTheory.TechnicalLemmas.StochasticProcesses.backwardInterpolation_contraction_of_expandedBakryEmery · theorem · Teaching coverage

    Read this first

    Mathematical statement

    Let P_u be positive real-linear evolution operators and q_u a family of observables. If α>0, the expanded CD(α,∞) inequality holds, Φ(u)=P_uΓ(q_u) is continuous, and its exact right derivative is P_u(LΓ(q_u)−2Γ(q_u,Lq_u)), then Φ(s)≤Φ(t)e^{-2α(t-s)} for s≤t.

    \[\Phi'(u)=P_u(L\Gamma(q_u)-2\Gamma(q_u,Lq_u))\ge2\alpha\Phi(u)\Longrightarrow\Phi(s)\le\Phi(t)e^{-2\alpha(t-s)}\]
    Lean statement · backwardInterpolation_contraction_of_expandedBakryEmery

    Every curvature, positivity, continuity, derivative, and endpoint premise is explicit. The evolution and orbit are arbitrary functions of real time; no semigroup law is inferred.

    Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

    theorem backwardInterpolation_contraction_of_expandedBakryEmery
        (generator : (X → ℝ) →ₗ[ℝ] (X → ℝ))
        {alpha : ℝ} (halpha : 0 < alpha)
        (hcurvature : ∀ (g : X → ℝ) (y : X),
          alpha * carreDuChamp generator g g y ≤
            (2 : ℝ)⁻¹ *
              (generator (carreDuChamp generator g g) y -
                carreDuChamp generator g (generator g) y -
                carreDuChamp generator g (generator g) y))
        (evolution : ℝ → (X → ℝ) →ₗ[ℝ] (X → ℝ))
        (orbit : ℝ → X → ℝ) (x : X)
        (hpositive : ∀ u : ℝ, ∀ {f g : X → ℝ},
          (∀ y, f y ≤ g y) → ∀ z, evolution u f z ≤ evolution u g z)
        (hcontinuous : Continuous (fun u =>
          evolution u (carreDuChamp generator (orbit u) (orbit u)) x))
        (hderiv : ∀ u : ℝ,
          HasDerivWithinAt
            (fun v => evolution v
              (carreDuChamp generator (orbit v) (orbit v)) x)
            (evolution u
              (generator (carreDuChamp generator (orbit u) (orbit u)) -
                (2 : ℝ) • carreDuChamp generator (orbit u) (generator (orbit u))) x)
            (Ici u) u)
        {s t : ℝ} (hst : s ≤ t) :
        evolution s (carreDuChamp generator (orbit s) (orbit s)) x ≤
          evolution t (carreDuChamp generator (orbit t) (orbit t)) x *
            Real.exp (-(2 * alpha) * (t - s))

    Exact module and namespace context

    Proof roadmap

    1. 1Turn curvature into a pointwise generator bound

      The expanded CD inequality gives LΓ(q_u)−2Γ(q_u,Lq_u)≥2αΓ(q_u) at every state.

    2. 2Push the inequality through the positive linear evolution

      Order preservation maps the pointwise bound through P_u; linearity pulls out 2α. The supplied derivative identity then gives Φ'(u)≥2αΦ(u).

    3. 3Read the backward interpolation endpoints

      The scalar comparison theorem converts the derivative lower bound into exponential contraction from t back to s.

    Full assumptions and notation

    All objects and hypotheses

    • X is arbitrary and L is real-linear on real-valued observables.
    • The curvature parameter α is strictly positive and the fully expanded diagonal CD inequality holds for every observable and point.
    • Each P_u is real-linear and preserves pointwise order.
    • The scalar interpolation Φ(u)=P_uΓ(q_u)(x) is continuous.
    • At every u, its exact right derivative within [u,∞) is P_u(LΓ(q_u)−2Γ(q_u,Lq_u))(x).
    • The endpoints satisfy s≤t.

    Mathematical proof

    1. Turn curvature into a pointwise generator bound

    The expanded CD inequality gives LΓ(q_u)−2Γ(q_u,Lq_u)≥2αΓ(q_u) at every state.

    \[L\Gamma(q_u)-2\Gamma(q_u,Lq_u)\ge2\alpha\Gamma(q_u)\]
    Corresponding Lean step

    Apply interpolationDerivative_lower_bound_of_expandedBakryEmery to q_u.

    2. Push the inequality through the positive linear evolution

    Order preservation maps the pointwise bound through P_u; linearity pulls out 2α. The supplied derivative identity then gives Φ'(u)≥2αΦ(u).

    \[\Phi'(u)\ge2\alpha\Phi(u)\]
    Corresponding Lean step

    Use hpositive, then simplify with the linear-map laws.

    3. Read the backward interpolation endpoints

    The scalar comparison theorem converts the derivative lower bound into exponential contraction from t back to s.

    \[\Phi(s)\le\Phi(t)e^{-2\alpha(t-s)}\]
    Corresponding Lean step

    Apply backward_interpolation_contraction_of_growth with rate 2α.

    Lean verification

    The exact proof begins folded immediately after the mathematical argument; the statement is folded beside the claim above.

    Lean proof · backwardInterpolation_contraction_of_expandedBakryEmery

    The proof derives the pointwise curvature bound, transfers it through each positive linear operator, and invokes the independently verified scalar backward interpolation theorem.

    Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

    Download module (.lean)
    theorem backwardInterpolation_contraction_of_expandedBakryEmery
        (generator : (X → ℝ) →ₗ[ℝ] (X → ℝ))
        {alpha : ℝ} (halpha : 0 < alpha)
        (hcurvature : ∀ (g : X → ℝ) (y : X),
          alpha * carreDuChamp generator g g y ≤
            (2 : ℝ)⁻¹ *
              (generator (carreDuChamp generator g g) y -
                carreDuChamp generator g (generator g) y -
                carreDuChamp generator g (generator g) y))
        (evolution : ℝ → (X → ℝ) →ₗ[ℝ] (X → ℝ))
        (orbit : ℝ → X → ℝ) (x : X)
        (hpositive : ∀ u : ℝ, ∀ {f g : X → ℝ},
          (∀ y, f y ≤ g y) → ∀ z, evolution u f z ≤ evolution u g z)
        (hcontinuous : Continuous (fun u =>
          evolution u (carreDuChamp generator (orbit u) (orbit u)) x))
        (hderiv : ∀ u : ℝ,
          HasDerivWithinAt
            (fun v => evolution v
              (carreDuChamp generator (orbit v) (orbit v)) x)
            (evolution u
              (generator (carreDuChamp generator (orbit u) (orbit u)) -
                (2 : ℝ) • carreDuChamp generator (orbit u) (generator (orbit u))) x)
            (Ici u) u)
        {s t : ℝ} (hst : s ≤ t) :
        evolution s (carreDuChamp generator (orbit s) (orbit s)) x ≤
          evolution t (carreDuChamp generator (orbit t) (orbit t)) x *
            Real.exp (-(2 * alpha) * (t - s)) := by
      apply backward_interpolation_contraction_of_growth hcontinuous hderiv ?_ hst
      intro u
      let gamma : X → ℝ := carreDuChamp generator (orbit u) (orbit u)
      let mixed : X → ℝ :=
        carreDuChamp generator (orbit u) (generator (orbit u))
      have hpointwise : ∀ y,
          ((2 * alpha) • gamma) y ≤
            (generator gamma - (2 : ℝ) • mixed) y := by
        intro y
        simpa [gamma, mixed] using
          interpolationDerivative_lower_bound_of_expandedBakryEmery
            generator halpha hcurvature (orbit u) y
      have hmapped := hpositive u hpointwise x
      simpa [gamma, mixed] using hmapped
    
    end
    
    end StochasticProcesses
    end TechnicalLemmas
    end AutoSamplingTheory

    Exact module and namespace context

    Source assumptions versus formal assumptions

    SourceActual LeanDifference kindWhy it matters
    The textbook method uses a concrete Markov semigroup and its backward interpolation.Samplinglib abstracts only the properties consumed by the proof: real-linearity, pointwise order preservation, continuity, and the exact one-sided derivative identity.source-implicitThe abstraction exposes the analytic interface without claiming construction of a concrete semigroup.

    A concrete semigroup must still prove positivity, continuity, its interpolation derivative identity, and generator-domain closure.

    Encoder–denoiser: accepted · exact

    A generalization is not a source correction. Proposed missing conditions require separate independent repair review. No proposed repair silently changes the original theorem.

    Scope and omitted-condition boundaries
    • The theorem assumes rather than proves the exact derivative identity, positivity, continuity, and domain closure for a concrete semigroup. It does not construct a diffusion or identify a concrete generator.
    Sources, dependencies, and reuse

    Source and reuse

    Samplinglib parents called

    Mathlib API called (external library)

    • LinearMap.map_smul
    • HasDerivWithinAt
    • Continuous
    • Real.exp

    Mathematical sources

    Samplinglib prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

    Which proof obligations and prerequisites are covered?

    • Independently verified prerequisite Compose curvature, positivity, the exact derivative identity, and scalar comparison

    Interval-scoped backward Bakry–Émery contraction

    Mathlib supplies monotonicity from a nonnegative derivative; Samplinglib applies it to the exact exponential weight used by backward Bakry–Émery interpolation.

    Mathlib v4.33.0 dependency snapshot · monotoneOn_of_deriv_nonneg · faithful paraphrase

    Complete source statement (Samplinglib restatement)

    If Φ has derivative Φ' on [s,t] and Φ'(u)≥rΦ(u) for s<u<t, then Φ(s)≤Φ(t)exp(-r(t-s)).

    • The endpoints satisfy s≤t.
    • The supplied derivative is a genuine HasDerivAt statement at every point of the closed interval.
    • The growth inequality is required only in the open interval.
    • No sign condition on the interpolation or rate is required, and a degenerate interval is allowed.

    local growth

    \[\Phi'(u)\ge r\Phi(u)\quad(s<u<t)\]

    endpoint contraction

    \[\Phi(s)\le\Phi(t)e^{-r(t-s)}\]

    Read the formalized proofs

    Each statement and proof below has its own closed Lean disclosure. Samplinglib parents, Mathlib calls and external mathematical sources are distinguished in each proof.

    Samplinglib mathematical lesson

    Interval Bakry–Émery growth gives backward contraction

    AutoSamplingTheory.TechnicalLemmas.FunctionalInequalities.SemigroupDecay.backward_endpoint_contraction_of_growth_on_Icc · theorem · Teaching coverage

    Read this first

    Mathematical statement

    On an ordered interval [s,t], a differentiable scalar interpolation whose derivative dominates r times its value satisfies the exact backward endpoint contraction.

    \[r\Phi(u)\le\Phi'(u)\ (s<u<t)\Longrightarrow\Phi(s)\le\Phi(t)e^{-r(t-s)}\]
    Lean statement · backward_endpoint_contraction_of_growth_on_Icc

    The closed and open interval scopes, exact derivative witnesses, endpoint order, and constants are explicit.

    Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

    theorem backward_endpoint_contraction_of_growth_on_Icc
        {interpolation interpolation' : ℝ → ℝ} {rate s t : ℝ}
        (hst : s ≤ t)
        (hinterpolation : ∀ u ∈ Icc s t,
          HasDerivAt interpolation (interpolation' u) u)
        (hgrowth : ∀ u ∈ Ioo s t,
          rate * interpolation u ≤ interpolation' u) :
        interpolation s ≤
          interpolation t * Real.exp (-rate * (t - s))

    Exact module and namespace context

    Proof roadmap

    1. 1Attach the inverse exponential weight

      Multiply the interpolation by the factor that cancels growth at rate r.

    2. 2Show the weighted derivative is nonnegative

      The derivative bound makes both factors in W' nonnegative.

    3. 3Compare the endpoints

      Derivative monotonicity gives W(s)≤W(t); evaluating the exponential weight yields the desired contraction.

    Full assumptions and notation

    All objects and hypotheses

    • s≤t.
    • Φ has the supplied genuine two-sided derivative Φ' at every point of [s,t].
    • rΦ(u)≤Φ'(u) for every u in (s,t).
    • No sign condition on Φ or r is required; s=t is allowed.

    Mathematical proof

    1. Attach the inverse exponential weight

    Multiply the interpolation by the factor that cancels growth at rate r.

    \[W(u)=\Phi(u)e^{-r(u-s)}\]
    Corresponding Lean step

    Differentiate the product using Real.hasDerivAt_exp.

    2. Show the weighted derivative is nonnegative

    The derivative bound makes both factors in W' nonnegative.

    \[W'(u)=(\Phi'(u)-r\Phi(u))e^{-r(u-s)}\ge0\]
    Corresponding Lean step

    Use sub_nonneg and positivity of Real.exp.

    3. Compare the endpoints

    Derivative monotonicity gives W(s)≤W(t); evaluating the exponential weight yields the desired contraction.

    \[\Phi(s)\le\Phi(t)e^{-r(t-s)}\]
    Corresponding Lean step

    Apply monotoneOn_of_deriv_nonneg on Icc s t and simplify both endpoints.

    Lean verification

    The exact proof begins folded immediately after the mathematical argument; the statement is folded beside the claim above.

    Lean proof · backward_endpoint_contraction_of_growth_on_Icc

    The proof makes the exponentially weighted interpolation monotone and evaluates it at the two endpoints.

    Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

    Download module (.lean)
    theorem backward_endpoint_contraction_of_growth_on_Icc
        {interpolation interpolation' : ℝ → ℝ} {rate s t : ℝ}
        (hst : s ≤ t)
        (hinterpolation : ∀ u ∈ Icc s t,
          HasDerivAt interpolation (interpolation' u) u)
        (hgrowth : ∀ u ∈ Ioo s t,
          rate * interpolation u ≤ interpolation' u) :
        interpolation s ≤
          interpolation t * Real.exp (-rate * (t - s)) := by
      let weighted : ℝ → ℝ := fun u =>
        interpolation u * Real.exp (-rate * (u - s))
      have hweighted : ∀ u ∈ Icc s t,
          HasDerivAt weighted
            ((interpolation' u - rate * interpolation u) *
              Real.exp (-rate * (u - s))) u := by
        intro u hu
        have hinner :
            HasDerivAt (fun v : ℝ => -rate * (v - s)) (-rate) u := by
          simpa using ((hasDerivAt_id u).sub_const s).const_mul (-rate)
        have hexp := (Real.hasDerivAt_exp (-rate * (u - s))).comp u hinner
        have hmul := (hinterpolation u hu).mul hexp
        change HasDerivAt
          (fun v => interpolation v * Real.exp (-rate * (v - s)))
          ((interpolation' u - rate * interpolation u) *
            Real.exp (-rate * (u - s))) u
        exact hmul.congr_deriv (by
          simp only [Function.comp_apply]
          ring)
      have hmono : MonotoneOn weighted (Icc s t) := by
        apply monotoneOn_of_deriv_nonneg (convex_Icc s t)
        · exact continuousOn_of_forall_continuousAt fun u hu =>
            (hweighted u hu).continuousAt
        · intro u hu
          exact (hweighted u (interior_subset hu)).differentiableAt.differentiableWithinAt
        · intro u hu
          rw [(hweighted u (interior_subset hu)).deriv]
          exact mul_nonneg (sub_nonneg.mpr
            (hgrowth u (by simpa only [interior_Icc] using hu)))
            (Real.exp_nonneg _)
      have hend := hmono ⟨le_rfl, hst⟩ ⟨hst, le_rfl⟩ hst
      simpa only [weighted, sub_self, mul_zero, Real.exp_zero, mul_one] using hend
    
    end
    
    end SemigroupDecay
    end FunctionalInequalities
    end TechnicalLemmas
    end AutoSamplingTheory

    Exact module and namespace context

    Source assumptions versus formal assumptions

    SourceActual LeanDifference kindWhy it matters
    The standard proof assumes differentiability on the interpolation interval and a derivative lower bound in its interior.Lean exposes genuine HasDerivAt witnesses on the closed interval and the growth bound only on its open interior.sameThe Lean statement exposes the closed-interval derivative witnesses and open-interval growth hypothesis exactly; endpoint derivatives supply the continuity needed by the monotonicity theorem without extending the differential inequality.

    Concrete semigroup construction, the interpolation derivative identity, the Γ₂ curvature estimate, and terminal-energy identification remain separate prerequisites.

    Encoder–denoiser: accepted · equivalent-after-elaboration

    A generalization is not a source correction. Proposed missing conditions require separate independent repair review. No proposed repair silently changes the original theorem.

    Scope and omitted-condition boundaries
    • This scalar theorem does not build a Markov semigroup or prove its carré-du-champ derivative, Γ₂ curvature bound, or terminal energy identity.
    Sources, dependencies, and reuse

    Source and reuse

    Samplinglib parents called

      Mathlib API called (external library)

      • monotoneOn_of_deriv_nonneg
      • Real.hasDerivAt_exp
      • interior_Icc

      Mathematical sources

      Samplinglib prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

      Which proof obligations and prerequisites are covered?

      • Independently verified prerequisite Convert interval-local derivative growth into the exact backward endpoint factor

      Integrability and centering of a completed Ito process at bounded stopping times

      Samplinglib packages the standard bounded stopped-Ito integrability and zero-mean consequences of its constructed completed process.

      Samplinglib main, commit 2fdbd600d7fe4731458dc7cde2184fd4fdaf7e02, with pinned Mathlib 4.33.0 · RandomStoppingGeneralIto.itoIntegralTerminal_stop_ae and ItoIntegralProcess martingale interface (historical source) · faithful paraphrase

      Complete source statement (Samplinglib restatement)

      For a progressive square-integrable real integrand on a positive finite horizon, evaluating its completed continuous Ito process at a nonnegative stopping time bounded pointwise by the horizon gives an integrable random variable of expectation zero.

      • A progressive L2 integrand on a positive NNReal horizon T.
      • A Brownian motion relative to the filtration and ambient measure, and the usual filtration conditions.
      • An NNReal-valued stopping time tau with tau(omega)≤T for every omega.
      • An ambient finite-measure instance, already entailed by the Brownian probability contract and used by the completed-process API.

      stopped-integrand identity

      \[\int_0^T\eta_s\mathbf 1_{s\le\tau}\,dB_s=\int_0^\tau\eta_s\,dB_s\quad\text{a.s.}\]

      integrability and centering

      \[I_\tau\in L^1,\qquad \mathbb E[I_\tau]=0\]

      Read the formalized proofs

      Each statement and proof below has its own closed Lean disclosure. Samplinglib parents, Mathlib calls and external mathematical sources are distinguished in each proof.

      Samplinglib mathematical lesson

      A completed Ito process is integrable at a bounded stopping time

      AutoSamplingTheory.TechnicalLemmas.StochasticProcesses.BoundedStoppedItoMean.itoIntegralProcess_at_boundedStopping_integrable · theorem · Teaching coverage

      Read this first

      Mathematical statement

      Let eta be progressive and square-integrable on a positive finite horizon T, and let tau be a nonnegative stopping time with tau at most T pointwise. The completed Ito process I(eta) evaluated at tau is integrable.

      \[I_t=\int_0^t\eta_s\,dB_s,\qquad \tau\le T\Longrightarrow I_\tau\in L^1.\]
      Lean statement · itoIntegralProcess_at_boundedStopping_integrable

      The theorem returns literal Bochner integrability of omega ↦ itoIntegralProcess eta ... (tau omega) omega under the ambient measure, with an explicit finite-measure typeclass already entailed by the Brownian contract.

      Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

      theorem itoIntegralProcess_at_boundedStopping_integrable
          [IsFiniteMeasure mu]
          (eta : ProgressiveL2Integrand filtration mu T) (hT : 0 < T)
          (tau : Omega → ℝ≥0)
          (htau : IsChewiStoppingTime filtration
            (fun omega => (tau omega : WithTop ℝ≥0)))
          (htauT : ∀ omega, tau omega ≤ T)
          (hB : IsBrownianMotionWithFiltration B filtration mu)
          (hUsual : SatisfiesUsualConditions filtration mu) :
          Integrable
            (fun omega => itoIntegralProcess eta hT hB hUsual (tau omega) omega) mu

      Exact module and namespace context

      Proof roadmap

      1. 1Stop the integrand

        Form the closed stopped integrand eta times the indicator of s≤tau. It remains progressive and L2 on the same horizon.

      2. 2Use terminal L2 integrability

        The terminal representative of the completed Ito integral of the stopped integrand belongs to L2, hence to L1 on the finite measure space.

      3. 3Identify random evaluation

        The completed bounded random-stopping theorem identifies that terminal representative almost everywhere with the original continuous Ito process evaluated at tau. Integrability transfers across almost-everywhere equality.

      Full assumptions and notation

      All objects and hypotheses

      • eta is a Samplinglib ProgressiveL2Integrand on a positive NNReal horizon T.
      • B is Brownian with respect to the filtration and measure; this contract implies that the measure is a probability measure.
      • The filtration satisfies Samplinglib's usual conditions.
      • tau is an NNReal-valued Chewi stopping time and tau(omega)≤T for every omega.
      • Lean requests an ambient finite-measure instance to elaborate the completed process; this is logically redundant because the Brownian contract supplies a probability measure.

      Mathematical proof

      1. Stop the integrand

      Form the closed stopped integrand eta times the indicator of s≤tau. It remains progressive and L2 on the same horizon.

      \[\eta^\tau_s=\eta_s\mathbf 1_{s\le\tau}.\]
      Corresponding Lean step

      Use ProgressiveL2Stopping.stop.

      2. Use terminal L2 integrability

      The terminal representative of the completed Ito integral of the stopped integrand belongs to L2, hence to L1 on the finite measure space.

      \[\int_0^T\eta^\tau_s\,dB_s\in L^2\subseteq L^1.\]
      Corresponding Lean step

      Use ItoIntegralProcess.terminalRepresentative_integrable.

      3. Identify random evaluation

      The completed bounded random-stopping theorem identifies that terminal representative almost everywhere with the original continuous Ito process evaluated at tau. Integrability transfers across almost-everywhere equality.

      \[\int_0^T\eta^\tau_s\,dB_s=I_\tau\quad\text{a.s.}\]
      Corresponding Lean step

      Use RandomStoppingGeneralIto.itoIntegralTerminal_stop_ae and Integrable.congr.

      Lean verification

      The exact proof begins folded immediately after the mathematical argument; the statement is folded beside the claim above.

      Lean proof · itoIntegralProcess_at_boundedStopping_integrable

      The proof transfers the existing L1 property of the stopped terminal representative through the library's completed random-stopping almost-everywhere identity.

      Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

      Download module (.lean)
      theorem itoIntegralProcess_at_boundedStopping_integrable
          [IsFiniteMeasure mu]
          (eta : ProgressiveL2Integrand filtration mu T) (hT : 0 < T)
          (tau : Omega → ℝ≥0)
          (htau : IsChewiStoppingTime filtration
            (fun omega => (tau omega : WithTop ℝ≥0)))
          (htauT : ∀ omega, tau omega ≤ T)
          (hB : IsBrownianMotionWithFiltration B filtration mu)
          (hUsual : SatisfiesUsualConditions filtration mu) :
          Integrable
            (fun omega => itoIntegralProcess eta hT hB hUsual (tau omega) omega) mu := by
        let _ : IsProbabilityMeasure mu := hB.isProbabilityMeasure
        let stoppedEta := stop eta (fun omega => (tau omega : WithTop ℝ≥0)) htau
        have hterminal :
            terminalRepresentative stoppedEta hT hB =ᵐ[mu]
              (fun omega => itoIntegralProcess eta hT hB hUsual (tau omega) omega) := by
          exact (itoIntegralTerminal_stop_ae eta hT tau htau htauT hB hUsual)
        exact (terminalRepresentative_integrable stoppedEta hT hB).congr hterminal

      Exact module and namespace context

      Source assumptions versus formal assumptions

      SourceActual LeanDifference kindWhy it matters
      The completed bounded random-stopping identity identifies the stopped terminal integral with process evaluation at tau.The Lean theorem combines that identity with terminalRepresentative_integrable, retaining the positive horizon, pointwise tau≤T, Chewi stopping-time, Brownian, and usual-condition interfaces; the explicit finite-measure instance is redundant with the probability normalization carried by hB.sameEvery condition used by the completed construction and a.e. identification remains explicit; the conclusion adds only the L1 consequence.

      No unbounded stopping, local-L2 localization, vector stochastic integral, general optional sampling, quadratic variation, or Ito formula is asserted.

      Encoder–denoiser: accepted · equivalent-after-elaboration

      A generalization is not a source correction. Proposed missing conditions require separate independent repair review. No proposed repair silently changes the original theorem.

      Scope and omitted-condition boundaries
      • The theorem requires a positive finite construction horizon and a pointwise bounded NNReal stopping time. It does not cover unbounded stopping, local-L2 integrands before localization, vector stochastic integrals, or any Ito formula.
      Sources, dependencies, and reuse

      Source and reuse

      Samplinglib parents called

      Mathlib API called (external library)

      • MeasureTheory.Integrable.congr

      Mathematical sources

      Samplinglib prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

      Samplinglib mathematical lesson

      A completed Ito process has mean zero at a bounded stopping time

      AutoSamplingTheory.TechnicalLemmas.StochasticProcesses.BoundedStoppedItoMean.integral_itoIntegralProcess_at_boundedStopping_eq_zero · theorem · Teaching coverage

      Read this first

      Mathematical statement

      Under the same global L2, Brownian, usual-filtration, stopping-time, and pointwise horizon-bound assumptions, the integral of the completed Ito process evaluated at tau is zero.

      \[\mathbb E\left[\int_0^\tau\eta_s\,dB_s\right]=0.\]
      Lean statement · integral_itoIntegralProcess_at_boundedStopping_eq_zero

      The conclusion is the literal Bochner integral equality for random-time evaluation of the constructed completed Ito process.

      Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

      theorem integral_itoIntegralProcess_at_boundedStopping_eq_zero
          [IsFiniteMeasure mu]
          (eta : ProgressiveL2Integrand filtration mu T) (hT : 0 < T)
          (tau : Omega → ℝ≥0)
          (htau : IsChewiStoppingTime filtration
            (fun omega => (tau omega : WithTop ℝ≥0)))
          (htauT : ∀ omega, tau omega ≤ T)
          (hB : IsBrownianMotionWithFiltration B filtration mu)
          (hUsual : SatisfiesUsualConditions filtration mu) :
          ∫ omega, itoIntegralProcess eta hT hB hUsual (tau omega) omega ∂mu = 0

      Exact module and namespace context

      Proof roadmap

      1. 1Use the stopped-integrand martingale

        The completed Ito process of the stopped integrand is a martingale and starts exactly at zero, including on the patched exceptional set.

      2. 2Compare deterministic times zero and T

        The martingale set-integral identity on the whole sample space makes the expectation at T equal the expectation at zero, hence zero.

      3. 3Transfer to the bounded stopping time

        The terminal representative agrees almost everywhere both with J_T and with the original completed process I evaluated at tau. Integral congruence transfers the zero expectation.

      Full assumptions and notation

      All objects and hypotheses

      • eta is a Samplinglib ProgressiveL2Integrand on a positive NNReal horizon T.
      • B is Brownian with respect to the filtration and measure, and the filtration satisfies the usual conditions.
      • tau is an NNReal-valued stopping time with tau(omega)≤T for every omega.
      • The theorem concerns the library's actual completed continuous Ito process, not an arbitrary process supplied together with a martingale premise.

      Mathematical proof

      1. Use the stopped-integrand martingale

      The completed Ito process of the stopped integrand is a martingale and starts exactly at zero, including on the patched exceptional set.

      \[J_t=\int_0^t\eta_s\mathbf 1_{s\le\tau}\,dB_s,\qquad J_0=0.\]
      Corresponding Lean step

      Use itoIntegralProcess_martingale and itoIntegralProcess_at_zero.

      2. Compare deterministic times zero and T

      The martingale set-integral identity on the whole sample space makes the expectation at T equal the expectation at zero, hence zero.

      \[\mathbb E[J_T]=\mathbb E[J_0]=0.\]
      Corresponding Lean step

      Use Martingale.setIntegral_eq with the universal measurable set.

      3. Transfer to the bounded stopping time

      The terminal representative agrees almost everywhere both with J_T and with the original completed process I evaluated at tau. Integral congruence transfers the zero expectation.

      \[J_T=\int_0^T\eta_s\mathbf 1_{s\le\tau}\,dB_s=I_\tau\quad\text{a.s.}\]
      Corresponding Lean step

      Use terminalRepresentative_ae_eq_actual, itoIntegralTerminal_stop_ae, and integral_congr_ae.

      Lean verification

      The exact proof begins folded immediately after the mathematical argument; the statement is folded beside the claim above.

      Lean proof · integral_itoIntegralProcess_at_boundedStopping_eq_zero

      The proof applies deterministic-time preservation of martingale expectation to the stopped integrand and then rewrites the terminal value using the two existing almost-everywhere consistency theorems.

      Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

      Download module (.lean)
      theorem integral_itoIntegralProcess_at_boundedStopping_eq_zero
          [IsFiniteMeasure mu]
          (eta : ProgressiveL2Integrand filtration mu T) (hT : 0 < T)
          (tau : Omega → ℝ≥0)
          (htau : IsChewiStoppingTime filtration
            (fun omega => (tau omega : WithTop ℝ≥0)))
          (htauT : ∀ omega, tau omega ≤ T)
          (hB : IsBrownianMotionWithFiltration B filtration mu)
          (hUsual : SatisfiesUsualConditions filtration mu) :
          ∫ omega, itoIntegralProcess eta hT hB hUsual (tau omega) omega ∂mu = 0 := by
        let _ : IsProbabilityMeasure mu := hB.isProbabilityMeasure
        let stoppedEta := stop eta (fun omega => (tau omega : WithTop ℝ≥0)) htau
        have hmartingale :
            Martingale (itoIntegralProcess stoppedEta hT hB hUsual) filtration mu :=
          itoIntegralProcess_martingale stoppedEta hT hB hUsual
        have hterminalMean :
            ∫ omega, terminalRepresentative stoppedEta hT hB omega ∂mu = 0 := by
          have hmean := hmartingale.setIntegral_eq (show (0 : ℝ≥0) ≤ T from bot_le)
            (MeasurableSet.univ : MeasurableSet[filtration 0] Set.univ)
          have hprocessMean :
              ∫ omega, itoIntegralProcess stoppedEta hT hB hUsual T omega ∂mu = 0 := by
            simpa only [Measure.restrict_univ, itoIntegralProcess_at_zero,
              Pi.zero_apply, integral_zero] using hmean.symm
          exact integral_congr_ae
            (terminalRepresentative_ae_eq_actual stoppedEta hT hB hUsual) |>.trans hprocessMean
        calc
          ∫ omega, itoIntegralProcess eta hT hB hUsual (tau omega) omega ∂mu =
              ∫ omega, terminalRepresentative stoppedEta hT hB omega ∂mu := by
                apply integral_congr_ae
                exact (itoIntegralTerminal_stop_ae eta hT tau htau htauT hB hUsual).symm
          _ = 0 := hterminalMean
      
      end BoundedStoppedItoMean
      end StochasticProcesses
      end TechnicalLemmas
      end AutoSamplingTheory

      Exact module and namespace context

      Source assumptions versus formal assumptions

      SourceActual LeanDifference kindWhy it matters
      A square-integrable Ito integral stopped before its finite horizon is a centered martingale value.The Lean theorem applies Martingale.setIntegral_eq to the completed process of the stopped integrand at deterministic times 0 and T, then uses the existing completed random-stopping identity.sameThe construction exposes the progressive-L2, Brownian, usual-condition, stopping-time, and horizon-bound hypotheses needed for the standard argument.

      The conclusion concerns only the constructed real completed Ito process at a pointwise bounded NNReal stopping time. It is not a general optional-sampling or Ito-formula theorem.

      Encoder–denoiser: accepted · equivalent-after-elaboration

      A generalization is not a source correction. Proposed missing conditions require separate independent repair review. No proposed repair silently changes the original theorem.

      Scope and omitted-condition boundaries
      • This is not a general optional-sampling theorem and does not cover unbounded stopping times, local martingales without localization, vector stochastic integrals, quadratic variation, or Ito's formula.
      Sources, dependencies, and reuse

      Source and reuse

      Samplinglib parents called

      Mathlib API called (external library)

      • MeasureTheory.Martingale.setIntegral_eq
      • MeasureTheory.integral_congr_ae

      Mathematical sources

      Samplinglib prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

      Which proof obligations and prerequisites are covered?

      • Independently verified prerequisite Transfer terminal L2 integrability to bounded random-time evaluation
      • Formalized proof edge; source adapter/review separate Derive zero expectation from the stopped-integrand martingale and random-stopping identity

      Dyadic Brownian quadratic variation in L²

      Samplinglib formalizes the canonical dyadic mean-square limit used in the quadratic-variation argument.

      Sinho Chewi, Log-Concave Sampling, 2026-08-09 · Section 3.1, Quadratic Variation · faithful paraphrase

      Complete source statement (Samplinglib restatement)

      For a real pre-Brownian process and any nonnegative horizon T, the expected square of the compensated scalar quadratic-variation error on the canonical dyadic partition of [0,T] converges to zero.

      • B is a real pre-Brownian process with centered Gaussian increments and independent increments.
      • T is any nonnegative real horizon, including T=0.
      • The level-m grid is the deterministic regular grid with 2^m cells of length T/2^m; no filtration or usual-conditions hypothesis is assumed.

      dyadic compensated error

      \[Q_m=\sum_{i=0}^{2^m-1}\left((B_{(i+1)T/2^m}-B_{iT/2^m})^2-T/2^m\right)\]

      mean-square limit

      \[\lim_{m\to\infty}\mathbb E[Q_m^2]=0\]

      finite-level identity

      \[\mathbb E[Q_m^2]=2T\,(T/2^m)\]

      Read the formalized proofs

      Each statement and proof below has its own closed Lean disclosure. Samplinglib parents, Mathlib calls and external mathematical sources are distinguished in each proof.

      Samplinglib mathematical lesson

      Dyadic scalar Brownian quadratic variation converges in mean square

      AutoSamplingTheory.TechnicalLemmas.StochasticProcesses.BrownianQuadraticVariationL2.tendsto_integral_dyadic_quadraticVariationError_sq · theorem · Teaching coverage

      Read this first

      Mathematical statement

      Let B be a real pre-Brownian process and T≥0. On the regular partition of [0,T] into 2^m equal cells, the expected square of the sum of squared increments minus their cell lengths tends to zero as m tends to infinity.

      \[\lim_{m\to\infty}\mathbb E\left[\left(\sum_{i=0}^{2^m-1}((B_{(i+1)T/2^m}-B_{iT/2^m})^2-T/2^m)\right)^2\right]=0\]
      Lean statement · tendsto_integral_dyadic_quadraticVariationError_sq

      The theorem quantifies over every nonnegative horizon and uses the canonical regular grid with 2^level cells, keeping IsPreBrownianReal explicit.

      Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

      theorem tendsto_integral_dyadic_quadraticVariationError_sq
          (hB : IsPreBrownianReal B mu) (T : ℝ≥0) :
          Tendsto
            (fun level =>
              ∫ omega,
                (quadraticVariationError B
                  (regularGridTimes (dyadicMesh T level) (2 ^ level)) omega) ^ 2 ∂mu)
            atTop (nhds 0)

      Exact module and namespace context

      Proof roadmap

      1. 1Specialize the finite-grid identity

        Apply the exact finite-grid L² theorem to the regular grid with 2^m cells and mesh δ_m=T/2^m.

      2. 2Evaluate equal cell lengths

        Every adjacent difference in the regular grid is exactly δ_m. The sum of 2^m equal squared lengths simplifies to Tδ_m.

      3. 3Let the dyadic mesh vanish

        The canonical dyadic mesh tends to zero. Multiplication by the fixed nonnegative scalar 2T preserves the limit, so the exact error moment tends to zero.

      Full assumptions and notation

      All objects and hypotheses

      • B satisfies Samplinglib's real pre-Brownian contract under μ.
      • T is an arbitrary nonnegative real horizon; the theorem includes T=0.
      • The grids are canonical deterministic dyadic regular grids. No filtration, adaptedness, usual conditions, or positive-horizon assumption is required.

      Mathematical proof

      1. Specialize the finite-grid identity

      Apply the exact finite-grid L² theorem to the regular grid with 2^m cells and mesh δ_m=T/2^m.

      \[\mathbb E[Q_m^2]=2\sum_{i=0}^{2^m-1}\delta_m^2\]
      Corresponding Lean step

      Use integral_quadraticVariationError_sq with regularGridTimes_monotone.

      2. Evaluate equal cell lengths

      Every adjacent difference in the regular grid is exactly δ_m. The sum of 2^m equal squared lengths simplifies to Tδ_m.

      \[\sum_{i=0}^{2^m-1}\delta_m^2=T\delta_m\]
      Corresponding Lean step

      Use regularGridTimes_cellLength and sum_dyadic_cellLengths_sq.

      3. Let the dyadic mesh vanish

      The canonical dyadic mesh tends to zero. Multiplication by the fixed nonnegative scalar 2T preserves the limit, so the exact error moment tends to zero.

      \[2T\delta_m\longrightarrow 0\]
      Corresponding Lean step

      Apply FiniteTimeGrid.dyadicMesh_tendsto_zero T and Tendsto.const_mul.

      Lean verification

      The exact proof begins folded immediately after the mathematical argument; the statement is folded beside the claim above.

      Lean proof · tendsto_integral_dyadic_quadraticVariationError_sq

      The proof rewrites the exact finite-grid second moment as 2T times the dyadic mesh and passes to the known zero-mesh limit.

      Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

      Download module (.lean)
      theorem tendsto_integral_dyadic_quadraticVariationError_sq
          (hB : IsPreBrownianReal B mu) (T : ℝ≥0) :
          Tendsto
            (fun level =>
              ∫ omega,
                (quadraticVariationError B
                  (regularGridTimes (dyadicMesh T level) (2 ^ level)) omega) ^ 2 ∂mu)
            atTop (nhds 0) := by
        have hexact : ∀ level : ℕ,
            (∫ omega,
                (quadraticVariationError B
                  (regularGridTimes (dyadicMesh T level) (2 ^ level)) omega) ^ 2 ∂mu) =
              2 * (T : ℝ) * ((dyadicMesh T level : ℝ≥0) : ℝ) := by
          intro level
          rw [integral_quadraticVariationError_sq hB
            (regularGridTimes_monotone
              (dyadicMesh T level) (2 ^ level))]
          rw [sum_dyadic_cellLengths_sq]
          ring
        have hlimit := (FiniteTimeGrid.dyadicMesh_tendsto_zero T).const_mul (2 * (T : ℝ))
        have hfun :
            (fun level =>
              ∫ omega,
                (quadraticVariationError B
                  (regularGridTimes (dyadicMesh T level) (2 ^ level)) omega) ^ 2 ∂mu) =
              fun level => 2 * (T : ℝ) * ((dyadicMesh T level : ℝ≥0) : ℝ) := by
          funext level
          exact hexact level
        rw [hfun]
        simpa using hlimit
      
      end BrownianQuadraticVariationL2
      end StochasticProcesses
      end TechnicalLemmas
      end AutoSamplingTheory

      Exact module and namespace context

      Source assumptions versus formal assumptions

      SourceActual LeanDifference kindWhy it matters
      The quadratic-variation argument uses dyadic partitions, centered Gaussian increments, and independence over disjoint deterministic cells.The Lean theorem assumes IsPreBrownianReal, allows every T≥0, and specializes the canonical regular grid to 2^level cells of dyadic length.sameThe process law, dyadic grid, normalization, and mean-square limit agree; including T=0 adds the degenerate zero-horizon case.

      The theorem proves scalar L² convergence on the canonical deterministic dyadic grids. It does not prove almost-sure or ucp convergence, predictable-weight estimates, vector cross-variation, stochastic integration, Taylor localization, or Ito's formula.

      Encoder–denoiser: accepted · equivalent-after-elaboration

      A generalization is not a source correction. Proposed missing conditions require separate independent repair review. No proposed repair silently changes the original theorem.

      Scope and omitted-condition boundaries
      • This is scalar mean-square convergence on deterministic dyadic grids only. Almost-sure or ucp convergence, predictable weights, vector cross-variation, stochastic integration, Taylor localization, and a complete Ito formula remain separate obligations.
      Sources, dependencies, and reuse

      Source and reuse

      Samplinglib parents called

      Mathlib API called (external library)

      • Filter.Tendsto
      • Finset.sum_const
      • NNReal.coe_div

      Mathematical sources

      Samplinglib prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

      Which proof obligations and prerequisites are covered?

      • Formalized proof edge; source adapter/review separate Prove scalar Brownian quadratic variation on dyadic partitions converges in mean square

      Finite-grid Brownian quadratic-variation error in L²

      Samplinglib formalizes the exact finite-grid mean-square identity that precedes a quadratic-variation limit argument.

      Sinho Chewi, Log-Concave Sampling, 2026-08-09 · Section 3.1, Quadratic Variation · faithful paraphrase

      Complete source statement (Samplinglib restatement)

      For a real pre-Brownian process on a deterministic monotone finite grid, the expected square of the compensated sum of squared increments is twice the sum of the squared time-step lengths.

      • B is a real pre-Brownian process with its Gaussian increment law and independent increments.
      • The grid is a deterministic monotone map from Fin (n+1) to nonnegative real time.
      • Repeated grid points and the empty grid are allowed; no strict positivity or usual filtration conditions are assumed.
      • The scalar dyadic mean-square consumer is formalized separately; predictable weights, vector cross-variation, stochastic integration, and Ito's formula remain outside this finite-grid result.

      compensated finite-grid error

      \[Q_π=\sum_{i=0}^{n-1}\big((B_{t_{i+1}}-B_{t_i})^2-(t_{i+1}-t_i)\big)\]

      exact mean-square identity

      \[\mathbb E[Q_π^2]=2\sum_{i=0}^{n-1}(t_{i+1}-t_i)^2\]

      Read the formalized proofs

      Each statement and proof below has its own closed Lean disclosure. Samplinglib parents, Mathlib calls and external mathematical sources are distinguished in each proof.

      Samplinglib mathematical lesson

      The compensated finite-grid quadratic-variation error has an exact L² norm

      AutoSamplingTheory.TechnicalLemmas.StochasticProcesses.BrownianQuadraticVariationL2.integral_quadraticVariationError_sq · theorem · Teaching coverage

      Read this first

      Mathematical statement

      Let B be a real pre-Brownian process and t₀≤⋯≤tₙ a deterministic grid. If Q is the sum over cells of the squared Brownian increment minus the cell length, then E[Q²] is exactly twice the sum of the squared cell lengths.

      \[\mathbb E\left[\left(\sum_{i=0}^{n-1}((B_{t_{i+1}}-B_{t_i})^2-(t_{i+1}-t_i))\right)^2\right]=2\sum_{i=0}^{n-1}(t_{i+1}-t_i)^2\]
      Lean statement · integral_quadraticVariationError_sq

      The theorem quantifies over every finite monotone NNReal-time grid and keeps the IsPreBrownianReal process assumption explicit.

      Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

      theorem integral_quadraticVariationError_sq
          (hB : IsPreBrownianReal B mu)
          {n : ℕ} {times : Fin (n + 1) → ℝ≥0}
          (hmono : Monotone times) :
          ∫ omega, (quadraticVariationError B times omega) ^ 2 ∂mu =
            2 * ∑ i : Fin n,
              (((times i.succ - times i.castSucc : ℝ≥0) : ℝ) ^ 2)

      Exact module and namespace context

      Proof roadmap

      1. 1Center one squared increment

        The Gaussian second and fourth moments give mean zero and second moment 2Δt² for each squared increment after subtracting its time length.

      2. 2Use independence across grid cells

        Independent Brownian increments remain independent after applying the measurable centered-square map, so distinct centered summands are orthogonal in L².

      3. 3Add the cell variances

        Because every summand is square-integrable and centered, the variance of their finite sum is the sum of their variances. Substituting the one-cell identity produces the exact factor 2.

      Full assumptions and notation

      All objects and hypotheses

      • B satisfies Samplinglib's real pre-Brownian contract under the measure μ.
      • The deterministic grid has n cells and is monotone in nonnegative real time.
      • No strict time inequalities, positive horizon, filtration usual conditions, or pathwise boundedness are required.

      Mathematical proof

      1. Center one squared increment

      The Gaussian second and fourth moments give mean zero and second moment 2Δt² for each squared increment after subtracting its time length.

      \[\mathbb E[((\Delta B_i)^2-\Delta t_i)^2]=2(\Delta t_i)^2\]
      Corresponding Lean step

      Reuse integral_centered_increment_sq_eq_zero, centered_increment_sq_memLp_two, and integral_centered_increment_sq_sq.

      2. Use independence across grid cells

      Independent Brownian increments remain independent after applying the measurable centered-square map, so distinct centered summands are orthogonal in L².

      \[i\ne j\Longrightarrow \mathbb E[Y_iY_j]=0\]
      Corresponding Lean step

      Use iIndepFun_centeredSquaredIncrement and the finite-sum variance theorem.

      3. Add the cell variances

      Because every summand is square-integrable and centered, the variance of their finite sum is the sum of their variances. Substituting the one-cell identity produces the exact factor 2.

      \[\operatorname{Var}(\sum_iY_i)=\sum_i\operatorname{Var}(Y_i)=2\sum_i(\Delta t_i)^2\]
      Corresponding Lean step

      Apply ProbabilityTheory.IndepFun.variance_sum, rewrite variance by the zero mean, and simplify the finite sum.

      Lean verification

      The exact proof begins folded immediately after the mathematical argument; the statement is folded beside the claim above.

      Lean proof · integral_quadraticVariationError_sq

      The proof packages the Gaussian fourth-moment calculation into a one-cell variance, transports independence through the centered-square map, and invokes finite-sum variance additivity.

      Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

      Download module (.lean)
      theorem integral_quadraticVariationError_sq
          (hB : IsPreBrownianReal B mu)
          {n : ℕ} {times : Fin (n + 1) → ℝ≥0}
          (hmono : Monotone times) :
          ∫ omega, (quadraticVariationError B times omega) ^ 2 ∂mu =
            2 * ∑ i : Fin n,
              (((times i.succ - times i.castSucc : ℝ≥0) : ℝ) ^ 2) := by
        let _ : IsProbabilityMeasure mu := hB.isGaussianProcess.isProbabilityMeasure
        let Y : Fin n → Omega → ℝ := fun i => centeredSquaredIncrement B times i
        have hYmem : ∀ i, MemLp (Y i) 2 mu := fun i => by
          change MemLp
            (fun omega =>
              (B (times i.succ) omega - B (times i.castSucc) omega) ^ 2 -
                ((times i.succ - times i.castSucc : ℝ≥0) : ℝ)) 2 mu
          simpa only using
            centered_increment_sq_memLp_two hB _ _
        have hYind : Set.Pairwise (↑(Finset.univ : Finset (Fin n)) : Set (Fin n))
            (fun i j => Y i ⟂ᵢ[mu] Y j) := by
          intro i _ j _ hij
          exact (iIndepFun_centeredSquaredIncrement hB hmono).indepFun hij
        have hvar := ProbabilityTheory.IndepFun.variance_sum
          (s := Finset.univ) (X := Y) (fun i _ => hYmem i) hYind
        have hsumMem : MemLp (∑ i : Fin n, Y i) 2 mu :=
          memLp_finsetSum' Finset.univ (fun i _ => hYmem i)
        have hmean : ∫ omega, (∑ i : Fin n, Y i) omega ∂mu = 0 := by
          calc
            ∫ omega, (∑ i : Fin n, Y i) omega ∂mu =
                ∫ omega, ∑ i ∈ (Finset.univ : Finset (Fin n)), Y i omega ∂mu := by
                  congr 1
                  funext omega
                  simp only [Finset.sum_apply]
            _ = ∑ i ∈ (Finset.univ : Finset (Fin n)), ∫ omega, Y i omega ∂mu := by
              rw [integral_finsetSum]
              intro i _
              exact (hYmem i).integrable (by norm_num)
            _ = 0 := by
              apply Finset.sum_eq_zero
              intro i _
              simpa [Y, centeredSquaredIncrement] using
                integral_centered_increment_sq_eq_zero hB (grid_cell_le hmono i)
        rw [variance_of_integral_eq_zero hsumMem.aemeasurable hmean] at hvar
        change ∫ omega, (∑ i : Fin n, centeredSquaredIncrement B times i omega) ^ 2 ∂mu = _
        change ∫ omega, (∑ i : Fin n, Y i omega) ^ 2 ∂mu = _
        rw [show (∫ omega, (∑ i : Fin n, Y i omega) ^ 2 ∂mu) =
            ∑ i : Fin n, Var[Y i; mu] by
          simpa only [Finset.sum_apply] using hvar]
        rw [Finset.mul_sum]
        apply Finset.sum_congr rfl
        intro i _
        have hYiMean : ∫ omega, Y i omega ∂mu = 0 := by
          simpa [Y, centeredSquaredIncrement] using
            integral_centered_increment_sq_eq_zero hB (grid_cell_le hmono i)
        rw [variance_of_integral_eq_zero (hYmem i).aemeasurable hYiMean]
        simpa [Y, centeredSquaredIncrement] using
          integral_centered_increment_sq_sq hB (grid_cell_le hmono i)

      Exact module and namespace context

      Source assumptions versus formal assumptions

      SourceActual LeanDifference kindWhy it matters
      The quadratic-variation calculation uses centered Gaussian increments and independence over disjoint deterministic time cells.The Lean theorem assumes IsPreBrownianReal and a monotone nonnegative-time grid, then proves the same finite-grid second-moment identity, including degenerate cells.sameThe process law, deterministic-grid condition, and exact constant agree; allowing repeated times only includes zero-length cells.

      This theorem proves only the exact identity on each finite deterministic monotone grid. Its scalar dyadic L² consumer is formalized separately; predictable weights, vector cross-variation, stochastic integration, Taylor localization, and Ito's formula remain outside this theorem.

      Encoder–denoiser: accepted · equivalent-after-elaboration

      A generalization is not a source correction. Proposed missing conditions require separate independent repair review. No proposed repair silently changes the original theorem.

      Scope and omitted-condition boundaries
      • This theorem is the finite-grid identity only. Its scalar dyadic Tendsto consumer is formalized separately; bounded predictable weights, vector cross-variation, Taylor localization, stochastic integration, and a complete Ito formula remain separate obligations.
      Sources, dependencies, and reuse

      Source and reuse

      Samplinglib parents called

      Mathlib API called (external library)

      • ProbabilityTheory.IndepFun.variance_sum
      • variance_of_integral_eq_zero
      • integral_finsetSum
      • memLp_finsetSum'

      Mathematical sources

      Samplinglib prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

      Which proof obligations and prerequisites are covered?

      • Formalized proof edge; source adapter/review separate Prove the exact L² identity for the compensated squared-increment sum

      Canonical LSI to finite KL--Fisher bridge

      Sinho Chewi; ASTIS supplies the RN/KL and generator-domain formal details. No author endorsement implied.

      current public PDF · Definition 1.2.25 and the standard canonical-density specialization · faithful paraphrase

      Complete source statement (Samplinglib restatement)

      An established density-form generator LSI, applied to the admissible canonical RN density and combined with the canonical Dirichlet--Fisher identity, gives finite Mathlib KL and KL ≤ (C/2) FI.

      • Canonical density entropy is integrable and normalized.
      • The canonical score is genuinely differentiable almost everywhere with integrable squared norm.
      • Generator integration-by-parts, symmetry and carré-du-champ/score identities hold for this pair.
      • For the Lee--Shen--Tian curvature rate lambda, substitute C=lambda^{-1}.

      finite canonical KL and Fisher control

      \[\mathrm{KL}(\mu\|\pi)<\infty,\quad \mathrm{KL}(\mu\|\pi)\le\frac{C}{2}\mathrm{FI}(\mu\|\pi)\]

      Read the formalized proofs

      Each statement and proof below has its own closed Lean disclosure. Samplinglib parents, Mathlib calls and external mathematical sources are distinguished in each proof.

      Samplinglib mathematical lesson

      A canonical generator LSI gives finite KL and a Fisher bound

      AutoSamplingTheory.TechnicalLemmas.FunctionalInequalities.CanonicalLogSobolev.finite_klDiv_and_toReal_le_half_mul_information · theorem · Teaching coverage

      Read this first

      Mathematical statement

      Let mu be a probability law and pi a reference law on finite-dimensional Euclidean space. Assume pi satisfies the density-form generator log-Sobolev inequality with constant C. If the canonical density dmu/dpi is admissible, its canonical log-ratio has a finite smooth score, and the generator integration-by-parts and carré-du-champ identities identify its Dirichlet form with Fisher information, then KL(mu||pi) is finite and KL(mu||pi) ≤ (C/2) FI(mu||pi).

      \[\mathrm{KL}(\mu\|\pi)<\infty,\qquad \mathrm{KL}(\mu\|\pi)\le \frac{C}{2}\,\mathrm{FI}(\mu\|\pi).\]
      Lean statement · finite_klDiv_and_toReal_le_half_mul_information

      The Lean theorem returns klDiv mu pi != infinity together with the toReal inequality. It keeps density admissibility, canonical score regularity, generator-domain integration by parts and the gamma/score identity as separate hypotheses.

      Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

      theorem finite_klDiv_and_toReal_le_half_mul_information
          (mu pi : Measure (EuclideanSpace ℝ ι)) [IsProbabilityMeasure mu]
          [SigmaFinite mu] [Measure.HaveLebesgueDecomposition mu pi]
          (generator :
            (EuclideanSpace ℝ ι → ℝ) →ₗ[ℝ] (EuclideanSpace ℝ ι → ℝ))
          {C : ℝ}
          (hLSI : Generator.SatisfiesLogSobolev pi generator C)
          (hAdmissible : Generator.LogSobolevAdmissible pi generator
            (InformationTheory.RNLogRatio.density mu pi))
          (hScore :
            InformationTheory.CanonicalRelativeFisher.SmoothFiniteScoreDomain mu pi)
          (hPair :
            InformationTheory.CanonicalDirichletFisher.DirichletPairDomain
              mu pi generator)
          (hGamma :
            InformationTheory.CanonicalDirichletFisher.HasCanonicalFisherGamma
              mu pi generator) :
          _root_.InformationTheory.klDiv mu pi ≠ ∞ ∧
            (_root_.InformationTheory.klDiv mu pi).toReal ≤
              (C / 2) *
                InformationTheory.CanonicalRelativeFisher.information mu pi hScore

      Exact module and namespace context

      Proof roadmap

      1. 1Extract genuine KL finiteness

        Entropy admissibility gives integrability of rho log rho under pi. Mathlib transports this to integrability of the canonical log-likelihood ratio under mu, which together with absolute continuity proves that the ENNReal KL divergence is not infinity.

      2. 2Apply LSI to the canonical density

        The supplied LSI is specialized to rho=dmu/dpi. Its entropy side is a genuine finite integral because admissibility was stated before applying the inequality.

      3. 3Identify entropy with canonical KL

        The Radon--Nikodym change-of-measure identity rewrites the density entropy as the integral of Mathlib's canonical log-ratio under mu, hence as klDiv.toReal.

      4. 4Identify Dirichlet energy with Fisher information

        The already verified integration-by-parts and carré-du-champ bridge turns the generator Dirichlet form into the canonical squared-score integral.

      Full assumptions and notation

      All objects and hypotheses

      • mu is a probability measure; hLSI supplies that pi is a probability measure and C>0.
      • The canonical Radon--Nikodym density is nonnegative, normalized and integrable, with integrable rho log rho and rho L(log rho).
      • mu is absolutely continuous with respect to pi; the canonical log-ratio is differentiable mu-almost everywhere and its squared score is integrable.
      • The density/log-density pair lies in the generator integration-by-parts domain and its carré-du-champ is rho times the squared score.
      • Chewi uses C. SALD and Lee--Shen--Tian use the reciprocal rate c_LSI=lambda=C^{-1}.

      Mathematical proof

      1. Extract genuine KL finiteness

      Entropy admissibility gives integrability of rho log rho under pi. Mathlib transports this to integrability of the canonical log-likelihood ratio under mu, which together with absolute continuity proves that the ENNReal KL divergence is not infinity.

      \[\rho\log\rho\in L^1(\pi)\Longrightarrow \log(d\mu/d\pi)\in L^1(\mu)\Longrightarrow \mathrm{KL}(\mu\|\pi)<\infty.\]
      Corresponding Lean step

      integrable_rnDeriv_mul_log_iff; InformationTheory.klDiv_ne_top

      2. Apply LSI to the canonical density

      The supplied LSI is specialized to rho=dmu/dpi. Its entropy side is a genuine finite integral because admissibility was stated before applying the inequality.

      \[\operatorname{Ent}_{\pi}(\rho)\le \frac C2\,\mathcal E_{\pi}(\rho,\log\rho).\]
      Corresponding Lean step

      Generator.SatisfiesLogSobolev; Generator.LogSobolevAdmissible

      3. Identify entropy with canonical KL

      The Radon--Nikodym change-of-measure identity rewrites the density entropy as the integral of Mathlib's canonical log-ratio under mu, hence as klDiv.toReal.

      \[\int \rho\log\rho\,d\pi=\int\log(d\mu/d\pi)\,d\mu=\mathrm{KL}(\mu\|\pi).\]
      Corresponding Lean step

      integral_rnDeriv_mul_log; RNLogRatio.toReal_klDiv_eq_integral_logRatio_of_probability

      4. Identify Dirichlet energy with Fisher information

      The already verified integration-by-parts and carré-du-champ bridge turns the generator Dirichlet form into the canonical squared-score integral.

      \[\mathcal E_{\pi}(\rho,\log\rho)=\int\|\nabla\log(d\mu/d\pi)\|^2\,d\mu=\mathrm{FI}(\mu\|\pi).\]
      Corresponding Lean step

      CanonicalDirichletFisher.dirichletForm_density_logRatio_eq_information

      Lean verification

      The exact proof begins folded immediately after the mathematical argument; the statement is folded beside the claim above.

      Lean proof · finite_klDiv_and_toReal_le_half_mul_information

      The proof first derives integrability of the canonical llr from the admissible RN entropy integrand. It then applies the generator LSI to the canonical density and rewrites its two sides using Mathlib's RN/KL theorem and ASTIS's compiled Dirichlet--Fisher theorem.

      Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

      Download module (.lean)
      theorem finite_klDiv_and_toReal_le_half_mul_information
          (mu pi : Measure (EuclideanSpace ℝ ι)) [IsProbabilityMeasure mu]
          [SigmaFinite mu] [Measure.HaveLebesgueDecomposition mu pi]
          (generator :
            (EuclideanSpace ℝ ι → ℝ) →ₗ[ℝ] (EuclideanSpace ℝ ι → ℝ))
          {C : ℝ}
          (hLSI : Generator.SatisfiesLogSobolev pi generator C)
          (hAdmissible : Generator.LogSobolevAdmissible pi generator
            (InformationTheory.RNLogRatio.density mu pi))
          (hScore :
            InformationTheory.CanonicalRelativeFisher.SmoothFiniteScoreDomain mu pi)
          (hPair :
            InformationTheory.CanonicalDirichletFisher.DirichletPairDomain
              mu pi generator)
          (hGamma :
            InformationTheory.CanonicalDirichletFisher.HasCanonicalFisherGamma
              mu pi generator) :
          _root_.InformationTheory.klDiv mu pi ≠ ∞ ∧
            (_root_.InformationTheory.klDiv mu pi).toReal ≤
              (C / 2) *
                InformationTheory.CanonicalRelativeFisher.information mu pi hScore := by
        let _ : IsProbabilityMeasure pi := hLSI.1
        have hLogRatioIntegrable : Integrable (MeasureTheory.llr mu pi) mu := by
          rw [← MeasureTheory.integrable_rnDeriv_mul_log_iff
            hScore.absolutelyContinuous]
          simpa [InformationTheory.RNLogRatio.density] using
            hAdmissible.2.2.2.1
        have hFinite : _root_.InformationTheory.klDiv mu pi ≠ ∞ :=
          _root_.InformationTheory.klDiv_ne_top
            hScore.absolutelyContinuous hLogRatioIntegrable
        refine ⟨hFinite, ?_⟩
        have hApplied := hLSI.2.2
          (InformationTheory.RNLogRatio.density mu pi) hAdmissible
        have hEntropy :
            Generator.densityEntropy pi
                (InformationTheory.RNLogRatio.density mu pi) =
              (_root_.InformationTheory.klDiv mu pi).toReal := by
          unfold Generator.densityEntropy
          change
            (∫ x, (mu.rnDeriv pi x).toReal *
              Real.log (mu.rnDeriv pi x).toReal ∂pi) =
              (_root_.InformationTheory.klDiv mu pi).toReal
          rw [MeasureTheory.integral_rnDeriv_mul_log
            hScore.absolutelyContinuous]
          simpa [InformationTheory.RNLogRatio.logRatio] using
            (InformationTheory.RNLogRatio.toReal_klDiv_eq_integral_logRatio_of_probability
              mu pi hScore.absolutelyContinuous).symm
        have hDirichlet :
            Generator.dirichletForm pi generator
                (InformationTheory.RNLogRatio.density mu pi)
                (fun x => Real.log
                  (InformationTheory.RNLogRatio.density mu pi x)) =
              InformationTheory.CanonicalRelativeFisher.information mu pi hScore := by
          rw [show
            (fun x => Real.log (InformationTheory.RNLogRatio.density mu pi x)) =
              InformationTheory.RNLogRatio.logRatio mu pi by
            funext x
            exact (InformationTheory.RNLogRatio.logRatio_apply mu pi x).symm]
          exact
            InformationTheory.CanonicalDirichletFisher.dirichletForm_density_logRatio_eq_information
              mu pi generator hScore hPair hGamma
        rw [hEntropy, hDirichlet] at hApplied
        exact hApplied
      
      end
      
      end CanonicalLogSobolev
      end FunctionalInequalities
      end TechnicalLemmas
      end AutoSamplingTheory

      Exact module and namespace context

      Source assumptions versus formal assumptions

      SourceActual LeanDifference kindWhy it matters
      Paper prose applies LSI to a density ratio.Nonnegativity, normalization, entropy and generator-energy integrability are explicit in LogSobolevAdmissible.mathematically-necessaryThey make the entropy and Dirichlet expressions genuine finite integrals.
      SALD/LST write a positive rate c_LSI or lambda.Generator.SatisfiesLogSobolev uses a multiplier C.sameThe source specialization must state C=1/c_LSI or C=1/lambda.
      The restricted-Gaussian argument also invokes strong convexity and Talagrand T2.Neither is concluded here.unresolvedConcrete strong-convex Gibbs LSI and T2 remain independent analytic red nodes.

      Conditional canonical bridge only; no Gibbs LSI, Bakry--Emery, T2 or W2 result.

      Encoder–denoiser: accepted · equivalent-after-elaboration

      A generalization is not a source correction. Proposed missing conditions require separate independent repair review. No proposed repair silently changes the original theorem.

      Scope and omitted-condition boundaries
      • This theorem does not prove that any concrete Gibbs measure satisfies LSI.
      • It does not prove Bakry--Emery, Talagrand T2, Wasserstein contraction or an SPHMC/PBPS main theorem.
      • It does not derive canonical score differentiability from almost-everywhere agreement with an explicit representative.
      • KL finiteness comes from hAdmissible and is returned explicitly; toReal of infinity is never accepted as evidence.
      Sources, dependencies, and reuse

      Source and reuse

      Samplinglib parents called

      Mathlib API called (external library)

      • MeasureTheory.integrable_rnDeriv_mul_log_iff
      • MeasureTheory.integral_rnDeriv_mul_log
      • InformationTheory.klDiv_ne_top

      Mathematical sources

      Samplinglib prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

      Which proof obligations and prerequisites are covered?

      • Formalized proof edge; source adapter/review separate Apply generator LSI to the canonical density without losing entropy finiteness or score domains

      Rank-one empirical covariance preprocessing and moment identities

      Samplinglib isolates the deterministic rank-one decomposition, bounded symmetric summand conditions, and the unit-vector covariance moment calculation used before applying a self-adjoint matrix concentration theorem.

      Tropp, An Introduction to Matrix Concentration Inequalities, 2015 · matrix Bernstein setup and sample-covariance applications · faithful paraphrase

      Complete source statement (Samplinglib restatement)

      A bounded finite sample yields bounded symmetric centered rank-one summands. For an integrable unit-vector random variable with population second moment C, the population operator is self-adjoint with norm at most one, the centered operator second moment is exactly C-C², and its norm is at most 2‖C‖.

      • A real inner-product space and a nonempty finite sample index.
      • A nonnegative radius B bounding every sample vector.
      • A symmetric population continuous linear operator with norm at most B².
      • For the expectation-level result: a complete real inner-product space, a probability measure, an everywhere unit-norm random vector, Bochner integrability of its rank-one operator, and an explicit identity identifying its expectation with C.

      empirical second moment

      \[\widehat\Sigma=|I|^{-1}\sum_i x_i\otimes x_i\]

      centered decomposition and summand bound

      \[\widehat\Sigma-\Sigma=|I|^{-1}\sum_i(x_i\otimes x_i-\Sigma),\qquad\|x_i\otimes x_i-\Sigma\|\le2B^2\]

      unit-vector covariance moment package

      \[C=\mathbb E[X\otimes X],\quad C^*=C,\quad \|C\|\le1,\quad \mathbb E[(X\otimes X-C)^2]=C-C^2,\quad \|C-C^2\|\le2\|C\|\]

      Read the formalized proofs

      Each statement and proof below has its own closed Lean disclosure. Samplinglib parents, Mathlib calls and external mathematical sources are distinguished in each proof.

      Samplinglib mathematical lesson

      The empirical second moment is an average of rank-one operators

      AutoSamplingTheory.TechnicalLemmas.Probability.EmpiricalCovariance.empiricalSecondMoment · def · Teaching coverage

      Read this first

      Mathematical statement

      For a finite sample x_i in a real inner-product space, the empirical second-moment operator is the inverse sample size times the sum of y ↦ ⟪x_i,y⟫x_i. The empty-sample convention is zero; concentration consumers use a nonempty index type.

      \[\widehat\Sigma=|I|^{-1}\sum_{i\in I}x_i\otimes x_i\]
      Lean statement · empiricalSecondMoment

      Lean keeps the real inner-product space, finite sample index, and empty-sample inverse-cardinality convention explicit.

      Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

      def empiricalSecondMoment (sample : κ → E) : E →L[ℝ] E

      Exact module and namespace context

      Proof roadmap

      1. 1Turn each vector into a rank-one operator

        The Mathlib rank-one operator sends y to the inner product with x_i multiplied by x_i.

      2. 2Average the finite family

        Sum the continuous linear maps and scale by the inverse real cardinality.

      Full assumptions and notation

      All objects and hypotheses

      • E is a real inner-product space and I is a finite type.
      • The sample is an arbitrary function I→E.
      • No probability law, independence, centering, or boundedness is assumed by the definition.

      Construction and meaning

      1. Turn each vector into a rank-one operator

      The Mathlib rank-one operator sends y to the inner product with x_i multiplied by x_i.

      \[(x_i\otimes x_i)y=\langle x_i,y\rangle x_i\]
      Corresponding Lean step

      Use InnerProductSpace.rankOne ℝ (sample i) (sample i).

      2. Average the finite family

      Sum the continuous linear maps and scale by the inverse real cardinality.

      \[\widehat\Sigma=|I|^{-1}\sum_i x_i\otimes x_i\]
      Corresponding Lean step

      Continuous linear maps carry finite sums and real scalar multiplication.

      Lean verification

      The exact proof begins folded immediately after the mathematical argument; the statement is folded beside the claim above.

      Lean construction · empiricalSecondMoment

      This is a transparent definition; no theorem or probabilistic premise is hidden in it.

      Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

      Download module (.lean)
      def empiricalSecondMoment (sample : κ → E) : E →L[ℝ] E :=
        (Fintype.card κ : ℝ)⁻¹ •
          ∑ i, InnerProductSpace.rankOne ℝ (sample i) (sample i)

      Exact module and namespace context

      Source assumptions versus formal assumptions

      SourceActual LeanDifference kindWhy it matters
      Sample-covariance arguments average rank-one outer products.Samplinglib defines the finite-type normalized second-moment operator with an explicit empty-sample inverse-cardinality convention.API-limitationThe downstream theorem assumes a nonempty index; the total definition remains meaningful on every finite type.

      Definition only; no probability law, centering convention, independence, or concentration is asserted.

      Encoder–denoiser: accepted · exact

      A generalization is not a source correction. Proposed missing conditions require separate independent repair review. No proposed repair silently changes the original theorem.

      Scope and omitted-condition boundaries
      • This definition is an empirical second moment. Calling it a covariance requires an appropriate centering convention, supplied separately by the consumer.
      Sources, dependencies, and reuse

      Source and reuse

      Samplinglib parents called

        Mathlib API called (external library)

        • InnerProductSpace.rankOne
        • Fintype.card

        Mathematical sources

        Samplinglib prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

        Samplinglib mathematical lesson

        A self outer product has operator norm equal to the squared vector norm

        AutoSamplingTheory.TechnicalLemmas.Probability.EmpiricalCovariance.norm_rankOne_self_eq_sq · theorem · Teaching coverage

        Read this first

        Mathematical statement

        For every vector x in a real inner-product space, the continuous rank-one operator y ↦ ⟪x,y⟫x has operator norm exactly ‖x‖².

        \[\|x\otimes x\|_{\mathrm{op}}=\|x\|^2\]
        Lean statement · norm_rankOne_self_eq_sq

        The equality is stated directly for Mathlib's continuous rank-one operator.

        Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

        theorem norm_rankOne_self_eq_sq (x : E) :
            ‖InnerProductSpace.rankOne ℝ x x‖ = ‖x‖ ^ 2

        Exact module and namespace context

        Proof roadmap

        1. 1Use the rank-one norm identity

          Mathlib computes the norm of u⊗v as ‖u‖‖v‖.

        2. 2Rewrite the product as a square

          The identical norm factors are exactly ‖x‖².

        Full assumptions and notation

        All objects and hypotheses

        • E is a real inner-product space.
        • x is arbitrary; finite dimensionality and completeness are not assumed.

        Mathematical proof

        1. Use the rank-one norm identity

        Mathlib computes the norm of u⊗v as ‖u‖‖v‖.

        \[\|x\otimes x\|=\|x\|\,\|x\|\]
        Corresponding Lean step

        Simplify InnerProductSpace.rankOne with its norm theorem.

        2. Rewrite the product as a square

        The identical norm factors are exactly ‖x‖².

        \[\|x\|\,\|x\|=\|x\|^2\]
        Corresponding Lean step

        simp [pow_two] closes the equality.

        Lean verification

        The exact proof begins folded immediately after the mathematical argument; the statement is folded beside the claim above.

        Lean proof · norm_rankOne_self_eq_sq

        The proof uses the library norm formula and the definition of a square.

        Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

        Download module (.lean)
        theorem norm_rankOne_self_eq_sq (x : E) :
            ‖InnerProductSpace.rankOne ℝ x x‖ = ‖x‖ ^ 2 := by
          simp [pow_two]

        Exact module and namespace context

        Source assumptions versus formal assumptions

        SourceActual LeanDifference kindWhy it matters
        A self outer product has operator norm ‖x‖².The theorem proves the same identity for Mathlib's continuous rank-one operator on an arbitrary real inner-product space.sameThe domains and constant are unchanged.

        Deterministic operator norm identity only; no random-matrix statement is inferred.

        Encoder–denoiser: accepted · exact

        A generalization is not a source correction. Proposed missing conditions require separate independent repair review. No proposed repair silently changes the original theorem.

        Scope and omitted-condition boundaries
        • This is deterministic Hilbert-space operator algebra; it contains no concentration claim.
        Sources, dependencies, and reuse

        Source and reuse

        Samplinglib parents called

          Mathlib API called (external library)

          • InnerProductSpace.rankOne
          • ContinuousLinearMap.norm_rankOne

          Mathematical sources

          Samplinglib prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

          Samplinglib mathematical lesson

          Empirical covariance is reduced to bounded symmetric centered summands

          AutoSamplingTheory.TechnicalLemmas.Probability.EmpiricalCovariance.empiricalSecondMoment_preconcentration · theorem · Teaching coverage

          Read this first

          Mathematical statement

          For a nonempty finite sample with ‖x_i‖≤B, a symmetric population operator Σ with ‖Σ‖≤B², and B≥0, the empirical error is the average of x_i⊗x_i−Σ; every summand is symmetric and has operator norm at most 2B².

          \[\widehat\Sigma-\Sigma=|I|^{-1}\sum_i(x_i\otimes x_i-\Sigma),\qquad (x_i\otimes x_i-\Sigma)^*=x_i\otimes x_i-\Sigma,\qquad \|x_i\otimes x_i-\Sigma\|\le2B^2\]
          Lean statement · empiricalSecondMoment_preconcentration

          All boundedness, symmetry, nonemptiness, and normalization assumptions are explicit, and the conclusion is a three-part conjunction.

          Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

          theorem empiricalSecondMoment_preconcentration
              [Nonempty κ]
              (population : E →L[ℝ] E) (sample : κ → E) (B : ℝ)
              (hB : 0 ≤ B)
              (hpopulationSymmetric : LinearMap.IsSymmetric (population : E →ₗ[ℝ] E))
              (hpopulationNorm : ‖population‖ ≤ B ^ 2)
              (hsampleNorm : ∀ i, ‖sample i‖ ≤ B) :
              (empiricalSecondMoment sample - population =
                (Fintype.card κ : ℝ)⁻¹ •
                  ∑ i, (InnerProductSpace.rankOne ℝ (sample i) (sample i) - population)) ∧
              (∀ i, LinearMap.IsSymmetric
                ((InnerProductSpace.rankOne ℝ (sample i) (sample i) - population : E →L[ℝ] E) :
                  E →ₗ[ℝ] E)) ∧
              (∀ i,
                ‖InnerProductSpace.rankOne ℝ (sample i) (sample i) - population‖ ≤
                  2 * B ^ 2)

          Exact module and namespace context

          Proof roadmap

          1. 1Expand the centered finite sum

            Distribute the finite sum over subtraction. Nonemptiness makes the sample cardinality nonzero, so inverse scaling cancels the repeated population term.

          2. 2Preserve symmetry under centering

            Each x_i⊗x_i is symmetric, and the difference of symmetric operators is symmetric.

          3. 3Bound each centered summand

            The triangle inequality, the exact rank-one norm, ‖x_i‖≤B, and ‖Σ‖≤B² yield the standard 2B² bound.

          Full assumptions and notation

          All objects and hypotheses

          • E is a real inner-product space and I is a nonempty finite type.
          • B is nonnegative and every sample vector has norm at most B.
          • The supplied population continuous linear operator is symmetric and has norm at most B².
          • No independence, expectation, variance proxy, tail theorem, or dimension bound is assumed.

          Mathematical proof

          1. Expand the centered finite sum

          Distribute the finite sum over subtraction. Nonemptiness makes the sample cardinality nonzero, so inverse scaling cancels the repeated population term.

          \[|I|^{-1}\sum_i(A_i-\Sigma)=|I|^{-1}\sum_iA_i-\Sigma\]
          Corresponding Lean step

          Use Finset.sum_sub_distrib, Finset.sum_const, and inv_smul_smul₀.

          2. Preserve symmetry under centering

          Each x_i⊗x_i is symmetric, and the difference of symmetric operators is symmetric.

          \[(x_i\otimes x_i-\Sigma)^*=x_i\otimes x_i-\Sigma\]
          Corresponding Lean step

          Combine isSymmetric_rankOne_self with LinearMap.IsSymmetric.sub.

          3. Bound each centered summand

          The triangle inequality, the exact rank-one norm, ‖x_i‖≤B, and ‖Σ‖≤B² yield the standard 2B² bound.

          \[\|x_i\otimes x_i-\Sigma\|\le\|x_i\|^2+\|\Sigma\|\le2B^2\]
          Corresponding Lean step

          Use norm_sub_le, norm_rankOne_self_eq_sq, monotonicity of squaring on nonnegative reals, and ring normalization.

          Lean verification

          The exact proof begins folded immediately after the mathematical argument; the statement is folded beside the claim above.

          Lean proof · empiricalSecondMoment_preconcentration

          The proof performs the exact finite-sum cancellation, transports symmetry through subtraction, and combines the triangle inequality with the exact rank-one norm.

          Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

          Download module (.lean)
          theorem empiricalSecondMoment_preconcentration
              [Nonempty κ]
              (population : E →L[ℝ] E) (sample : κ → E) (B : ℝ)
              (hB : 0 ≤ B)
              (hpopulationSymmetric : LinearMap.IsSymmetric (population : E →ₗ[ℝ] E))
              (hpopulationNorm : ‖population‖ ≤ B ^ 2)
              (hsampleNorm : ∀ i, ‖sample i‖ ≤ B) :
              (empiricalSecondMoment sample - population =
                (Fintype.card κ : ℝ)⁻¹ •
                  ∑ i, (InnerProductSpace.rankOne ℝ (sample i) (sample i) - population)) ∧
              (∀ i, LinearMap.IsSymmetric
                ((InnerProductSpace.rankOne ℝ (sample i) (sample i) - population : E →L[ℝ] E) :
                  E →ₗ[ℝ] E)) ∧
              (∀ i,
                ‖InnerProductSpace.rankOne ℝ (sample i) (sample i) - population‖ ≤
                  2 * B ^ 2) := by
            have hcard : (Fintype.card κ : ℝ) ≠ 0 := by
              exact_mod_cast Fintype.card_ne_zero
            constructor
            · rw [Finset.sum_sub_distrib]
              unfold empiricalSecondMoment
              rw [smul_sub]
              congr 1
              rw [Finset.sum_const, ← Nat.cast_smul_eq_nsmul ℝ]
              exact (inv_smul_smul₀ hcard population).symm
            constructor
            · intro i
              exact (InnerProductSpace.isSymmetric_rankOne_self (sample i)).sub
                hpopulationSymmetric
            · intro i
              have hsample_sq : ‖sample i‖ ^ 2 ≤ B ^ 2 :=
                (sq_le_sq₀ (norm_nonneg (sample i)) hB).2 (hsampleNorm i)
              calc
                ‖InnerProductSpace.rankOne ℝ (sample i) (sample i) - population‖
                    ≤ ‖InnerProductSpace.rankOne ℝ (sample i) (sample i)‖ + ‖population‖ :=
                  norm_sub_le _ _
                _ = ‖sample i‖ ^ 2 + ‖population‖ := by
                  rw [norm_rankOne_self_eq_sq]
                _ ≤ B ^ 2 + B ^ 2 := add_le_add hsample_sq hpopulationNorm
                _ = 2 * B ^ 2 := by ring

          Exact module and namespace context

          Source assumptions versus formal assumptions

          SourceActual LeanDifference kindWhy it matters
          Matrix Bernstein applications first express the empirical error as a sum of centered self-adjoint random matrices and bound each summand.The theorem assumes a nonempty finite deterministic sample, symmetry and norm control of the supplied population operator, and proves exactly the decomposition, symmetry, and 2B² summand bound.sameThe probabilistic concentration step is deliberately outside this deterministic prerequisite.

          No independence, expectation identity, matrix variance proxy, noncommutative concentration theorem, probability tail, or sample-complexity conclusion is asserted.

          Encoder–denoiser: accepted · exact

          A generalization is not a source correction. Proposed missing conditions require separate independent repair review. No proposed repair silently changes the original theorem.

          Scope and omitted-condition boundaries
          • This theorem prepares a matrix-concentration input. It does not prove matrix Bernstein, choose a variance proxy, establish independence, or derive a probability tail or sample complexity.
          Sources, dependencies, and reuse

          Source and reuse

          Samplinglib parents called

          Mathlib API called (external library)

          • Finset.sum_sub_distrib
          • InnerProductSpace.isSymmetric_rankOne_self
          • LinearMap.IsSymmetric.sub
          • norm_sub_le
          • inv_smul_smul₀

          Mathematical sources

          Samplinglib prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

          Samplinglib mathematical lesson

          A unit-vector covariance has an exact centered operator second moment

          AutoSamplingTheory.TechnicalLemmas.Probability.EmpiricalCovariance.unitRankOneCovariance_momentPackage · theorem · Teaching coverage

          Read this first

          Mathematical statement

          Let X be a unit-vector-valued map such that X⊗X is Bochner integrable, and let C be the Bochner expectation of X⊗X. Then C is self-adjoint, ‖C‖≤1, E[(X⊗X-C)²]=C-C², and ‖C-C²‖≤2‖C‖.

          \[C=\mathbb E[X\otimes X],\quad C^*=C,\quad \|C\|\le1,\quad \mathbb E[(X\otimes X-C)^2]=C-C^2,\quad \|C-C^2\|\le2\|C\|\]
          Lean statement · unitRankOneCovariance_momentPackage

          The conclusion is a four-part conjunction and all probability, integrability, unit-norm, and population-identification assumptions occur explicitly in the signature.

          Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

          theorem unitRankOneCovariance_momentPackage
              [CompleteSpace E]
              {Omega : Type*} [MeasurableSpace Omega]
              {mu : Measure Omega} [IsProbabilityMeasure mu]
              (sample : Omega → E) (population : E →L[ℝ] E)
              (hsampleUnit : ∀ omega, ‖sample omega‖ = 1)
              (hRankOneIntegrable :
                Integrable (fun omega =>
                  InnerProductSpace.rankOne ℝ (sample omega) (sample omega)) mu)
              (hPopulation :
                ∫ omega, InnerProductSpace.rankOne ℝ (sample omega) (sample omega) ∂mu =
                  population) :
              IsSelfAdjoint population ∧
                ‖population‖ ≤ 1 ∧
                (∫ omega,
                    (InnerProductSpace.rankOne ℝ (sample omega) (sample omega) -
                      population) ^ (2 : ℕ) ∂mu =
                  population - population ^ (2 : ℕ)) ∧
                ‖population - population ^ (2 : ℕ)‖ ≤ 2 * ‖population‖

          Exact module and namespace context

          Proof roadmap

          1. 1Integrate rank-one symmetry

            Every self outer product is symmetric. Evaluation and the real inner product commute with the Bochner integral, so the expectation C is self-adjoint.

          2. 2Bound the population operator

            The Bochner integral norm is at most the integral of the pointwise operator norm. Unit norm makes ‖X⊗X‖=1, and a probability measure gives total mass one.

          3. 3Expand the centered square

            A unit-vector outer product is an idempotent projection. Expanding the noncommutative square and commuting left and right multiplication with integration turns both cross terms into C².

          4. 4Control the variance operator

            Submultiplicativity gives ‖C²‖≤‖C‖². Since ‖C‖≤1, the triangle inequality yields ‖C-C²‖≤2‖C‖.

          Full assumptions and notation

          All objects and hypotheses

          • E is a complete real inner-product space and μ is a probability measure.
          • X has norm exactly one at every point; no almost-everywhere weakening is hidden.
          • The rank-one operator X⊗X is Bochner integrable and its integral is the supplied population operator C.
          • No independent sample family, dimension, matrix exponential, or concentration theorem is assumed.

          Mathematical proof

          1. Integrate rank-one symmetry

          Every self outer product is symmetric. Evaluation and the real inner product commute with the Bochner integral, so the expectation C is self-adjoint.

          \[(X\otimes X)^*=X\otimes X\Longrightarrow C^*=C\]
          Corresponding Lean step

          Use isSymmetric_rankOne_self, ContinuousLinearMap.integral_apply, integral_inner, and isSelfAdjoint_iff_isSymmetric.

          2. Bound the population operator

          The Bochner integral norm is at most the integral of the pointwise operator norm. Unit norm makes ‖X⊗X‖=1, and a probability measure gives total mass one.

          \[\|C\|\le\mathbb E\|X\otimes X\|=1\]
          Corresponding Lean step

          Apply norm_integral_le_of_norm_le_const and norm_rankOne_self_eq_sq.

          3. Expand the centered square

          A unit-vector outer product is an idempotent projection. Expanding the noncommutative square and commuting left and right multiplication with integration turns both cross terms into C².

          \[(X\otimes X-C)^2=X\otimes X-(X\otimes X)C-C(X\otimes X)+C^2\]
          Corresponding Lean step

          Use isStarProjection_rankOne_self, noncomm_ring, integral_sub/add, and ContinuousLinearMap.integral_comp_comm.

          4. Control the variance operator

          Submultiplicativity gives ‖C²‖≤‖C‖². Since ‖C‖≤1, the triangle inequality yields ‖C-C²‖≤2‖C‖.

          \[\|C-C^2\|\le\|C\|+\|C\|^2\le2\|C\|\]
          Corresponding Lean step

          Use norm_sub_le, norm_pow_le', hNorm, and real arithmetic.

          Lean verification

          The exact proof begins folded immediately after the mathematical argument; the statement is folded beside the claim above.

          Lean proof · unitRankOneCovariance_momentPackage

          The proof integrates pointwise rank-one symmetry, applies the Bochner norm bound, expands the noncommutative centered square using rank-one idempotence, commutes multiplication through the integral, and finishes with the operator-norm triangle inequality.

          Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

          Download module (.lean)
          theorem unitRankOneCovariance_momentPackage
              [CompleteSpace E]
              {Omega : Type*} [MeasurableSpace Omega]
              {mu : Measure Omega} [IsProbabilityMeasure mu]
              (sample : Omega → E) (population : E →L[ℝ] E)
              (hsampleUnit : ∀ omega, ‖sample omega‖ = 1)
              (hRankOneIntegrable :
                Integrable (fun omega =>
                  InnerProductSpace.rankOne ℝ (sample omega) (sample omega)) mu)
              (hPopulation :
                ∫ omega, InnerProductSpace.rankOne ℝ (sample omega) (sample omega) ∂mu =
                  population) :
              IsSelfAdjoint population ∧
                ‖population‖ ≤ 1 ∧
                (∫ omega,
                    (InnerProductSpace.rankOne ℝ (sample omega) (sample omega) -
                      population) ^ (2 : ℕ) ∂mu =
                  population - population ^ (2 : ℕ)) ∧
                ‖population - population ^ (2 : ℕ)‖ ≤ 2 * ‖population‖ := by
            let A := E →L[ℝ] E
            have hSelfAdjoint : IsSelfAdjoint population := by
              rw [ContinuousLinearMap.isSelfAdjoint_iff_isSymmetric]
              intro x y
              have hx : Integrable
                  (fun omega =>
                    (InnerProductSpace.rankOne ℝ (sample omega) (sample omega)) x) mu :=
                (ContinuousLinearMap.apply ℝ E x).integrable_comp hRankOneIntegrable
              have hy : Integrable
                  (fun omega =>
                    (InnerProductSpace.rankOne ℝ (sample omega) (sample omega)) y) mu :=
                (ContinuousLinearMap.apply ℝ E y).integrable_comp hRankOneIntegrable
              rw [← hPopulation]
              calc
                inner ℝ ((∫ omega,
                    InnerProductSpace.rankOne ℝ (sample omega) (sample omega) ∂mu) x) y =
                    inner ℝ (∫ omega,
                      (InnerProductSpace.rankOne ℝ (sample omega) (sample omega)) x ∂mu) y := by
                  rw [ContinuousLinearMap.integral_apply hRankOneIntegrable]
                _ = inner ℝ y (∫ omega,
                      (InnerProductSpace.rankOne ℝ (sample omega) (sample omega)) x ∂mu) :=
                  real_inner_comm _ _
                _ = ∫ omega,
                      inner ℝ y
                        ((InnerProductSpace.rankOne ℝ (sample omega) (sample omega)) x) ∂mu :=
                  (integral_inner hx y).symm
                _ = ∫ omega,
                      inner ℝ x
                        ((InnerProductSpace.rankOne ℝ (sample omega) (sample omega)) y) ∂mu := by
                  apply integral_congr_ae
                  filter_upwards with omega
                  calc
                    inner ℝ y
                        ((InnerProductSpace.rankOne ℝ (sample omega) (sample omega)) x) =
                        inner ℝ
                          ((InnerProductSpace.rankOne ℝ (sample omega) (sample omega)) x) y :=
                      real_inner_comm _ _
                    _ = inner ℝ x
                          ((InnerProductSpace.rankOne ℝ (sample omega) (sample omega)) y) :=
                      (InnerProductSpace.isSymmetric_rankOne_self
                        (𝕜 := ℝ) (sample omega)) x y
                _ = inner ℝ x (∫ omega,
                      (InnerProductSpace.rankOne ℝ (sample omega) (sample omega)) y ∂mu) :=
                  integral_inner hy x
                _ = inner ℝ x ((∫ omega,
                    InnerProductSpace.rankOne ℝ (sample omega) (sample omega) ∂mu) y) := by
                  rw [ContinuousLinearMap.integral_apply hRankOneIntegrable]
            have hNorm : ‖population‖ ≤ 1 := by
              rw [← hPopulation]
              calc
                ‖∫ omega,
                    InnerProductSpace.rankOne ℝ (sample omega) (sample omega) ∂mu‖ ≤
                    1 * mu.real Set.univ := by
                  apply norm_integral_le_of_norm_le_const
                  filter_upwards with omega
                  rw [norm_rankOne_self_eq_sq, hsampleUnit omega]
                  norm_num
                _ = 1 := by simp
            have hright : Integrable
                (fun omega =>
                  InnerProductSpace.rankOne ℝ (sample omega) (sample omega) * population) mu :=
              ((ContinuousLinearMap.mul ℝ A).flip population).integrable_comp
                hRankOneIntegrable
            have hleft : Integrable
                (fun omega =>
                  population * InnerProductSpace.rankOne ℝ (sample omega) (sample omega)) mu :=
              (ContinuousLinearMap.mul ℝ A population).integrable_comp
                hRankOneIntegrable
            have hconst : Integrable (fun _ : Omega => population ^ (2 : ℕ)) mu :=
              integrable_const _
            have hSecondMoment :
                ∫ omega,
                    (InnerProductSpace.rankOne ℝ (sample omega) (sample omega) -
                      population) ^ (2 : ℕ) ∂mu =
                  population - population ^ (2 : ℕ) := by
              calc
                (∫ omega,
                    (InnerProductSpace.rankOne ℝ (sample omega) (sample omega) -
                      population) ^ (2 : ℕ) ∂mu) =
                    ∫ omega,
                      InnerProductSpace.rankOne ℝ (sample omega) (sample omega) -
                        InnerProductSpace.rankOne ℝ (sample omega) (sample omega) * population -
                        population * InnerProductSpace.rankOne ℝ (sample omega) (sample omega) +
                        population ^ (2 : ℕ) ∂mu := by
                  apply integral_congr_ae
                  filter_upwards with omega
                  have hp := rankOne_self_sq_of_norm_one (sample omega) (hsampleUnit omega)
                  calc
                    (InnerProductSpace.rankOne ℝ (sample omega) (sample omega) -
                        population) ^ (2 : ℕ) =
                        (InnerProductSpace.rankOne ℝ (sample omega) (sample omega)) ^ (2 : ℕ) -
                          InnerProductSpace.rankOne ℝ (sample omega) (sample omega) * population -
                          population * InnerProductSpace.rankOne ℝ (sample omega) (sample omega) +
                          population ^ (2 : ℕ) := by
                      noncomm_ring
                    _ = _ := by rw [hp]
                _ = (∫ omega,
                      InnerProductSpace.rankOne ℝ (sample omega) (sample omega) ∂mu) -
                      (∫ omega,
                        InnerProductSpace.rankOne ℝ (sample omega) (sample omega) * population ∂mu) -
                      (∫ omega,
                        population * InnerProductSpace.rankOne ℝ (sample omega) (sample omega) ∂mu) +
                      (∫ _ : Omega, population ^ (2 : ℕ) ∂mu) := by
                  have hthree :
                      (∫ omega,
                        InnerProductSpace.rankOne ℝ (sample omega) (sample omega) -
                          InnerProductSpace.rankOne ℝ (sample omega) (sample omega) * population -
                          population * InnerProductSpace.rankOne ℝ (sample omega) (sample omega) ∂mu) =
                        (∫ omega,
                          InnerProductSpace.rankOne ℝ (sample omega) (sample omega) ∂mu) -
                        (∫ omega,
                          InnerProductSpace.rankOne ℝ (sample omega) (sample omega) * population ∂mu) -
                        (∫ omega,
                          population * InnerProductSpace.rankOne ℝ (sample omega) (sample omega) ∂mu) := by
                    have houter := integral_sub (hRankOneIntegrable.sub hright) hleft
                    have hinner := integral_sub hRankOneIntegrable hright
                    calc
                      (∫ omega,
                          InnerProductSpace.rankOne ℝ (sample omega) (sample omega) -
                            InnerProductSpace.rankOne ℝ (sample omega) (sample omega) * population -
                            population * InnerProductSpace.rankOne ℝ (sample omega) (sample omega) ∂mu) =
                          (∫ omega,
                            InnerProductSpace.rankOne ℝ (sample omega) (sample omega) -
                              InnerProductSpace.rankOne ℝ (sample omega) (sample omega) * population ∂mu) -
                          (∫ omega,
                            population * InnerProductSpace.rankOne ℝ (sample omega) (sample omega) ∂mu) := by
                        simpa only [Pi.sub_apply] using houter
                      _ = _ := by rw [hinner]
                  have hadd := integral_add
                    (hRankOneIntegrable.sub hright |>.sub hleft) hconst
                  calc
                    (∫ omega,
                        InnerProductSpace.rankOne ℝ (sample omega) (sample omega) -
                          InnerProductSpace.rankOne ℝ (sample omega) (sample omega) * population -
                          population * InnerProductSpace.rankOne ℝ (sample omega) (sample omega) +
                          population ^ (2 : ℕ) ∂mu) =
                        (∫ omega,
                          InnerProductSpace.rankOne ℝ (sample omega) (sample omega) -
                            InnerProductSpace.rankOne ℝ (sample omega) (sample omega) * population -
                            population * InnerProductSpace.rankOne ℝ (sample omega) (sample omega) ∂mu) +
                        (∫ _ : Omega, population ^ (2 : ℕ) ∂mu) := by
                      simpa only [Pi.add_apply, Pi.sub_apply] using hadd
                    _ = _ := by rw [hthree]
                _ = population - population ^ (2 : ℕ) := by
                  have hrightInt :
                      (∫ omega,
                        InnerProductSpace.rankOne ℝ (sample omega) (sample omega) * population ∂mu) =
                        (∫ omega,
                          InnerProductSpace.rankOne ℝ (sample omega) (sample omega) ∂mu) *
                          population := by
                    simpa [A, mul_apply_eq_comp] using
                      ContinuousLinearMap.integral_comp_comm
                        ((ContinuousLinearMap.mul ℝ A).flip population)
                        hRankOneIntegrable
                  have hleftInt :
                      (∫ omega,
                        population * InnerProductSpace.rankOne ℝ (sample omega) (sample omega) ∂mu) =
                        population *
                          (∫ omega,
                            InnerProductSpace.rankOne ℝ (sample omega) (sample omega) ∂mu) := by
                    simpa [A, mul_apply_eq_comp] using
                      ContinuousLinearMap.integral_comp_comm
                        (ContinuousLinearMap.mul ℝ A population) hRankOneIntegrable
                  rw [hPopulation, hrightInt, hleftInt]
                  simp [hPopulation]
                  noncomm_ring
            have hVariance :
                ‖population - population ^ (2 : ℕ)‖ ≤ 2 * ‖population‖ := by
              calc
                ‖population - population ^ (2 : ℕ)‖ ≤
                    ‖population‖ + ‖population ^ (2 : ℕ)‖ := norm_sub_le _ _
                _ ≤ ‖population‖ + ‖population‖ ^ (2 : ℕ) := by
                  gcongr
                  exact norm_pow_le' _ (by norm_num)
                _ ≤ 2 * ‖population‖ := by
                  nlinarith [norm_nonneg population]
            exact ⟨hSelfAdjoint, hNorm, hSecondMoment, hVariance⟩
          
          end EmpiricalCovariance
          end Probability
          end TechnicalLemmas
          end AutoSamplingTheory

          Exact module and namespace context

          Source assumptions versus formal assumptions

          SourceActual LeanDifference kindWhy it matters
          For a unit-vector random variable X with C=E[X⊗X], matrix Bernstein variance calculations use E[(X⊗X-C)²]=C-C² together with self-adjointness and operator-norm control.The theorem assumes a complete real inner-product space, a probability measure, pointwise unit norm, Bochner integrability of X⊗X, and the explicit Bochner expectation identity defining C; it proves the four operator conclusions as one conjunction.sameCompleteness and Bochner integrability make the operator-valued expectation literal in Mathlib. The theorem neither adds a concentration premise nor concludes a tail bound.

          No independence across samples, noncommutative moment-generating-function argument, matrix Bernstein theorem, probability tail, dimension factor, or sample-complexity conclusion is asserted.

          Encoder–denoiser: accepted · exact

          A generalization is not a source correction. Proposed missing conditions require separate independent repair review. No proposed repair silently changes the original theorem.

          Scope and omitted-condition boundaries
          • This is the expectation-level moment calculation immediately before matrix Bernstein. It does not establish independence, an operator MGF bound, a trace inequality, a tail estimate, or sample complexity.
          Sources, dependencies, and reuse

          Source and reuse

          Samplinglib parents called

          Mathlib API called (external library)

          • InnerProductSpace.isStarProjection_rankOne_self
          • InnerProductSpace.isSymmetric_rankOne_self
          • ContinuousLinearMap.integral_apply
          • ContinuousLinearMap.integral_comp_comm
          • integral_inner
          • norm_integral_le_of_norm_le_const

          Mathematical sources

          Samplinglib prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

          Which proof obligations and prerequisites are covered?

          • Independently verified prerequisite Define the normalized finite-sample rank-one operator average
          • Independently verified prerequisite Identify the exact operator norm of a self outer product
          • Independently verified prerequisite Prove the exact centered decomposition, summand symmetry, and 2B² bound
          • Independently verified prerequisite Derive self-adjointness, contraction, exact centered second moment, and its norm bound from a unit-vector rank-one expectation

          Endpoint integration of a backward exponential kernel

          Mathlib supplies monotonicity from a nonnegative derivative; Samplinglib packages the exact exponential convolution used in semigroup interpolation.

          Mathlib v4.33.0 dependency snapshot · monotoneOn_of_deriv_nonneg · faithful paraphrase

          Complete source statement (Samplinglib restatement)

          If H starts at zero and its derivative on (0,t) is bounded by a backward exponential kernel, then H(t) is bounded by the exact integrated kernel.

          • The decay rate is strictly positive and t is nonnegative.
          • H has the supplied derivative H' throughout the closed interval [0,t].
          • H(0)=0 and H'(s) is bounded above by source·exp(-rate(t-s))·energy on the open interval.
          • No separate sign condition on source or energy is required.

          derivative bound

          \[H'(s)\le q e^{-r(t-s)}E\]

          endpoint bound

          \[H(t)\le \frac{q}{r}(1-e^{-rt})E\]

          Read the formalized proofs

          Each statement and proof below has its own closed Lean disclosure. Samplinglib parents, Mathlib calls and external mathematical sources are distinguished in each proof.

          Samplinglib mathematical lesson

          Integrating a backward exponential derivative bound

          AutoSamplingTheory.TechnicalLemmas.FunctionalInequalities.endpoint_le_of_deriv_le_exponential_kernel · theorem · Teaching coverage

          Read this first

          Mathematical statement

          A scalar interpolation starting at zero inherits the exact endpoint bound obtained by integrating its backward exponential derivative majorant.

          \[H'(s)\le q e^{-r(t-s)}E,\ H(0)=0\Longrightarrow H(t)\le\frac{q}{r}(1-e^{-rt})E\]
          Lean statement · endpoint_le_of_deriv_le_exponential_kernel

          All scalar quantities, interval scopes, and endpoint hypotheses are explicit.

          Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

          theorem endpoint_le_of_deriv_le_exponential_kernel
              {H H' : ℝ → ℝ} {rate source t energy : ℝ}
              (hrate : 0 < rate) (ht : 0 ≤ t)
              (hH : ∀ s ∈ Icc (0 : ℝ) t, HasDerivAt H (H' s) s)
              (hzero : H 0 = 0)
              (hderiv : ∀ s ∈ Ioo (0 : ℝ) t,
                H' s ≤ source * Real.exp (-rate * (t - s)) * energy) :
              H t ≤ (source / rate) * (1 - Real.exp (-rate * t)) * energy

          Exact module and namespace context

          Proof roadmap

          1. 1Build the exact comparison primitive

            Define B(s) from the integrated exponential kernel so that B(0)=0 and B'(s)=q e^{-r(t-s)}E.

          2. 2Compare derivatives

            The assumed bound gives (B-H)'≥0, hence B-H is monotone on [0,t].

          3. 3Evaluate both endpoints

            At zero both functions vanish; evaluating B at t gives the exact convolution factor.

          Full assumptions and notation

          All objects and hypotheses

          • r>0 and t≥0.
          • H has derivative H' at every point of [0,t].
          • The displayed upper derivative bound holds for 0<s<t.
          • q and E are arbitrary real scalars; their required order information is already encoded in the derivative inequality.

          Mathematical proof

          1. Build the exact comparison primitive

          Define B(s) from the integrated exponential kernel so that B(0)=0 and B'(s)=q e^{-r(t-s)}E.

          \[B(s)=\frac qr(e^{-r(t-s)}-e^{-rt})E\]
          Corresponding Lean step

          Differentiate Real.exp and cancel r using r>0.

          2. Compare derivatives

          The assumed bound gives (B-H)'≥0, hence B-H is monotone on [0,t].

          \[B'(s)-H'(s)\ge0\]
          Corresponding Lean step

          Apply monotoneOn_of_deriv_nonneg on Icc 0 t.

          3. Evaluate both endpoints

          At zero both functions vanish; evaluating B at t gives the exact convolution factor.

          \[B(t)=\frac qr(1-e^{-rt})E\]
          Corresponding Lean step

          Use Real.exp_zero and normalize the endpoint algebra.

          Lean verification

          The exact proof begins folded immediately after the mathematical argument; the statement is folded beside the claim above.

          Lean proof · endpoint_le_of_deriv_le_exponential_kernel

          The proof differentiates the exact comparison primitive and applies Mathlib's derivative monotonicity theorem.

          Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

          Download module (.lean)
          theorem endpoint_le_of_deriv_le_exponential_kernel
              {H H' : ℝ → ℝ} {rate source t energy : ℝ}
              (hrate : 0 < rate) (ht : 0 ≤ t)
              (hH : ∀ s ∈ Icc (0 : ℝ) t, HasDerivAt H (H' s) s)
              (hzero : H 0 = 0)
              (hderiv : ∀ s ∈ Ioo (0 : ℝ) t,
                H' s ≤ source * Real.exp (-rate * (t - s)) * energy) :
              H t ≤ (source / rate) * (1 - Real.exp (-rate * t)) * energy := by
            let B : ℝ → ℝ := fun s =>
              (source / rate) *
                (Real.exp (-rate * (t - s)) - Real.exp (-rate * t)) * energy
            have hB : ∀ s : ℝ,
                HasDerivAt B
                  (source * Real.exp (-rate * (t - s)) * energy) s := by
              intro s
              have hinner : HasDerivAt (fun u : ℝ => -rate * (t - u)) rate s := by
                have hcoeff : -(-rate) = rate := by ring
                simpa only [Pi.sub_apply, id_eq, zero_sub, mul_neg, mul_one, hcoeff] using
                  (((hasDerivAt_const s t).sub (hasDerivAt_id s)).const_mul (-rate))
              have hexp := (Real.hasDerivAt_exp (-rate * (t - s))).comp s hinner
              have hsub := hexp.sub_const (Real.exp (-rate * t))
              have hmul := (hsub.const_mul (source / rate)).mul_const energy
              convert hmul using 1 <;> try rfl
              field_simp [ne_of_gt hrate]
            have hmono : MonotoneOn (fun s => B s - H s) (Icc (0 : ℝ) t) := by
              apply monotoneOn_of_deriv_nonneg (convex_Icc (0 : ℝ) t)
              · exact continuousOn_of_forall_continuousAt fun s hs =>
                  ((hB s).sub (hH s hs)).continuousAt
              · intro s hs
                exact ((hB s).sub (hH s (interior_subset hs))).differentiableAt.differentiableWithinAt
              · intro s hs
                change 0 ≤ deriv (B - H) s
                rw [((hB s).sub (hH s (interior_subset hs))).deriv]
                exact sub_nonneg.mpr (hderiv s (by simpa only [interior_Icc] using hs))
            have hend := hmono ⟨le_rfl, ht⟩ ⟨ht, le_rfl⟩ ht
            dsimp [B] at hend
            have hBzero :
                (source / rate) *
                  (Real.exp (-rate * (t - 0)) - Real.exp (-rate * t)) * energy = 0 := by
              ring_nf
            rw [hBzero, hzero] at hend
            have hBt :
                (source / rate) *
                  (Real.exp (-rate * (t - t)) - Real.exp (-rate * t)) * energy =
                (source / rate) * (1 - Real.exp (-rate * t)) * energy := by
              rw [sub_self, mul_zero, Real.exp_zero]
            rw [hBt] at hend
            exact sub_nonneg.mp (by simpa only [sub_self] using hend)
          
          end
          
          end AutoSamplingTheory.TechnicalLemmas.FunctionalInequalities

          Exact module and namespace context

          Source assumptions versus formal assumptions

          SourceActual LeanDifference kindWhy it matters
          The fundamental-theorem argument is usually stated under continuous differentiability.Lean asks only for an exact derivative at each point of [0,t] and uses monotonicity of an explicit comparison primitive.generalizationThe pointwise HasDerivAt hypotheses provide all continuity and differentiability consumed by the proof.

          The theorem integrates a supplied scalar derivative estimate; it does not construct a semigroup or prove an entropy derivative or gradient-contraction identity.

          Encoder–denoiser: accepted · equivalent-after-elaboration

          A generalization is not a source correction. Proposed missing conditions require separate independent repair review. No proposed repair silently changes the original theorem.

          Scope and omitted-condition boundaries
          • This is the real-analysis leaf after a semigroup has supplied its entropy-production and gradient-contraction estimates.
          Sources, dependencies, and reuse

          Source and reuse

          Samplinglib parents called

            Mathlib API called (external library)

            • monotoneOn_of_deriv_nonneg
            • Real.hasDerivAt_exp

            Mathematical sources

            Samplinglib prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

            Which proof obligations and prerequisites are covered?

            • Independently verified prerequisite Integrate the backward exponential derivative bound exactly

            Library supplement: ambient Gaussian polynomial feature differentiation

            An original reusable mathematics supplement placed by subject. It is not a theorem claim about the primary textbook or a complete stochastic/statistical model.

            Samplinglib original feature differentiation and transport supplement v1, 2026-10-21 · Complete authored units 0,1 and their formula proof steps in the immutable declaration lesson (historical source) · licensed original

            Complete source statement and conditions

            The adjacent complete statements, assumptions and formula proofs describe the exact generic results; the optional Lean is initially folded.

            • E has real inner-product normed, finite-dimensional and Borel structures; no positive dimension is required.
            • The only mathematical data are E with its finite-dimensional real inner-product and Borel structures, and a finite real polynomial p.
            • The returned operator estimates apply to the same derivative field in the ambient derivative conclusion; both endpoint weights in the difference estimate satisfy norm at most one.
            • p is any finite real polynomial, including zero, constant and non-even polynomials. The weight w ranges over all of E.

            A Gaussian polynomial feature has its actual ambient L² derivative

            \[D\Phi(w)[v]=[x\mapsto p\prime(\langle w,x\rangle)\langle v,x\rangle]_{L^2(\gamma)},\qquad \frac{\|\Phi(w+h)-\Phi(w)-D\Phi(w)[h]\|_2}{\|h\|}\longrightarrow0.\]

            The same Gaussian derivative is bounded and Lipschitz on the closed unit ball

            \[\|D(w)\|_{\mathrm{op}}\le M_1,\qquad \|D(u)-D(w)\|_{\mathrm{op}}\le M_2\|u-w\|,\quad \|w\|,\|u\|\le1.\]

            Read the formalized proofs

            Each statement and proof below has its own closed Lean disclosure. Samplinglib parents, Mathlib calls and external mathematical sources are distinguished in each proof.

            Samplinglib mathematical lesson

            A Gaussian polynomial feature has its actual ambient L² derivative

            Read this first

            Mathematical statement

            Let E be a finite-dimensional real inner-product normed space with its Borel measurable structure, let γ be its centered standard Gaussian law with identity covariance, and let p be any finite real polynomial. For every ambient w and every direction v, both f_w(x)=p(⟨w,x⟩) and d_{w,v}(x)=p′(⟨w,x⟩)⟨v,x⟩ belong to L²(γ). There exist simultaneous membership witnesses and a field D(w):E→L²(γ) of continuous real linear maps such that D(w)v is exactly the class of d_{w,v}. The actual feature-class map Φ(w)=[f_w] is fully Fréchet differentiable at every ambient w, with derivative D(w). No feature membership, derivative membership, domination, differentiability or operator bound is an input.

            \[D\Phi(w)[v]=[x\mapsto p\prime(\langle w,x\rangle)\langle v,x\rangle]_{L^2(\gamma)},\qquad \frac{\|\Phi(w+h)-\Phi(w)-D\Phi(w)[h]\|_2}{\|h\|}\longrightarrow0.\]
            Lean statement · actual_gaussian_polynomial_ridge_L2_frechet_derivative

            Let E be a finite-dimensional real inner-product normed space with its Borel measurable structure, let γ be its centered standard Gaussian law with identity covariance, and let p be any finite real polynomial. For every ambient w and every direction v, both f_w(x)=p(⟨w,x⟩) and d_{w,v}(x)=p′(⟨w,x⟩)⟨v,x⟩ belong to L²(γ). There exist simultaneous membership witnesses and a field D(w):E→L²(γ) of continuous real linear maps such that D(w)v is exactly the class of d_{w,v}. The actual feature-class map Φ(w)=[f_w] is fully Fréchet differentiable at every ambient w, with derivative D(w). No feature membership, derivative membership, domination, differentiability or operator bound is an input.

            Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

            theorem actual_gaussian_polynomial_ridge_L2_frechet_derivative
                {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E]
                [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E]
                (p : Polynomial ℝ) :
                let γ := ProbabilityTheory.stdGaussian E
                let f : E → E → ℝ := fun w x => p.eval ⟪w,x⟫_ℝ
                let df : E → E → E → ℝ := fun w v x => p.derivative.eval ⟪w,x⟫_ℝ * ⟪v,x⟫_ℝ
                ∃ hf : ∀ w, MemLp (f w) 2 γ,
                ∃ hdf : ∀ w v, MemLp (df w v) 2 γ,
                ∃ D : E → E →L[ℝ] Lp ℝ 2 γ,
                  (∀ w v, D w v = (hdf w v).toLp (df w v)) ∧
                  ∀ w, HasFDerivAt (fun u => (hf u).toLp (f u)) (D w) w

            Exact module and namespace context

            Read the complete claim and its hypotheses first, then open the numbered mathematical proof steps. Each step has an optional fold containing literal Lean implementation excerpts; the full theorem and module context remain available below.

            Full assumptions and notation

            All objects and hypotheses

            • E has real inner-product normed, finite-dimensional and Borel structures; no positive dimension is required.
            • p is any finite real polynomial, including zero, constant and non-even polynomials. The weight w ranges over all of E.

            Mathematical proof

            Open a step to read its argument and formula.

            1. Produce Gaussian radial domination

            Finite Gaussian norm moments and polynomial induction give L² radial envelopes on each bounded weight ball. Applying them to p and p′ times one radial factor produces the actual feature and directional-derivative memberships.

            \[|p(\langle u,x\rangle)|\le B_0(x),\quad |p\prime(\langle u,x\rangle)|\,\|x\|\le B_1(x),\qquad B_0,B_1\in L^2(\gamma).\]
            Corresponding Lean step
            private theorem polynomial_radial_envelope
                {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E]
                [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E]
                (p : Polynomial ℝ) (R : ℝ) (hR : 0 ≤ R) (k : ℕ) :
                ∃ B : E → ℝ, MemLp B 2 (stdGaussian E) ∧ (∀ x, 0 ≤ B x) ∧
                  ∀ (w : E), ‖w‖ ≤ R → ∀ x,
                    ‖p.eval ⟪w,x⟫_ℝ‖ * ‖x‖^k ≤ B x := by
              classical
              letI : CompleteSpace E := FiniteDimensional.complete ℝ E
              letI : SecondCountableTopology E := inferInstance
              let μ := stdGaussian E
              have hpow (n : ℕ) : MemLp (fun x : E => ‖x‖^n) 2 μ := by
                apply (memLp_two_iff_integrable_sq (by fun_prop)).2
                have hi := (IsGaussian.memLp_id μ ((2*n : ℕ) : ℝ≥0∞)
                  (ENNReal.natCast_ne_top (2*n))).integrable_norm_pow' (p := 2*n)
                convert hi using 1
                funext x
                simp only [id_eq, ← pow_mul, Nat.mul_comm n 2]
              induction p using Polynomial.induction_on' with
              | add p q hp hq =>
                obtain ⟨B,hB,hB0,hBp⟩ := hp
                obtain ⟨C,hC,hC0,hCq⟩ := hq
                refine ⟨B+C,hB.add hC,fun x => add_nonneg (hB0 x) (hC0 x),?_⟩
                intro w hw x
                calc
                  ‖(p+q).eval ⟪w,x⟫_ℝ‖ * ‖x‖^k ≤
                      (‖p.eval ⟪w,x⟫_ℝ‖+‖q.eval ⟪w,x⟫_ℝ‖) * ‖x‖^k := by
                    rw [Polynomial.eval_add]
                    exact mul_le_mul_of_nonneg_right (norm_add_le _ _) (pow_nonneg (norm_nonneg _) _)
                  _ = ‖p.eval ⟪w,x⟫_ℝ‖ * ‖x‖^k + ‖q.eval ⟪w,x⟫_ℝ‖ * ‖x‖^k := by ring
                  _ ≤ (B+C) x := add_le_add (hBp w hw x) (hCq w hw x)
              | monomial n a =>
                refine ⟨fun x => (‖a‖*R^n)*‖x‖^(n+k),
                  (hpow (n+k)).const_mul (‖a‖*R^n),fun x => by positivity,?_⟩
                intro w hw x
                have hi : ‖⟪w,x⟫_ℝ‖ ≤ R*‖x‖ :=
                  (norm_inner_le_norm (𝕜 := ℝ) w x).trans (mul_le_mul_of_nonneg_right hw (norm_nonneg _))
                simp only [Polynomial.eval_monomial,norm_mul,norm_pow]
                calc
                  ‖a‖ * ‖⟪w,x⟫_ℝ‖^n * ‖x‖^k ≤ ‖a‖ * (R*‖x‖)^n * ‖x‖^k := by
                    gcongr
                  _ = (‖a‖*R^n)*‖x‖^(n+k) := by rw [pow_add,mul_pow];ring
            
            private theorem ambient_feature_and_derivative_memLp
                {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E]
                [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E]
                (p : Polynomial ℝ) :
                (∀ w : E, MemLp (fun x : E => p.eval ⟪w,x⟫_ℝ) 2 (stdGaussian E)) ∧
                  ∀ w v : E, MemLp (fun x : E =>
                    p.derivative.eval ⟪w,x⟫_ℝ * ⟪v,x⟫_ℝ) 2 (stdGaussian E) := by
              constructor
              · intro w
                obtain ⟨B,hB,hB0,hBound⟩ :=
                  polynomial_radial_envelope (E := E) p ‖w‖ (norm_nonneg _) 0
                apply hB.mono' (by fun_prop)
                exact ae_of_all _ fun x => by simpa using hBound w le_rfl x
              · intro w v
                obtain ⟨B,hB,hB0,hBound⟩ :=
                  polynomial_radial_envelope (E := E) p.derivative ‖w‖ (norm_nonneg _) 1
                apply (hB.const_mul ‖v‖).mono' (by fun_prop)
                apply ae_of_all _
                intro x
                calc
                  ‖p.derivative.eval ⟪w,x⟫_ℝ * ⟪v,x⟫_ℝ‖ =
                      ‖p.derivative.eval ⟪w,x⟫_ℝ‖ * ‖⟪v,x⟫_ℝ‖ := norm_mul _ _
                  _ ≤ ‖p.derivative.eval ⟪w,x⟫_ℝ‖ * (‖v‖*‖x‖) :=
                    mul_le_mul_of_nonneg_left (norm_inner_le_norm (𝕜 := ℝ) v x) (norm_nonneg _)
                  _ = ‖v‖ * (‖p.derivative.eval ⟪w,x⟫_ℝ‖ * ‖x‖) := by ring
                  _ ≤ ‖v‖ * B x := mul_le_mul_of_nonneg_left
                    (by simpa using hBound w le_rfl x) (norm_nonneg _)
            

            Literal implementation excerpt from AutoSamplingTheory/TechnicalLemmas/Probability/GaussianPolynomialDifferentiation.lean. Local names retain their surrounding theorem context; the complete theorem and exact module context are folded below. These excerpts are presentation, not extra theorem premises.

            2. Build the represented bounded linear map

            The directional scalar formula is linear in v. Its L² norm is bounded by an envelope norm times ‖v‖, so it extends directly to a continuous linear map with the required actual-class identity.

            \[\|[p\prime(\langle w,\cdot\rangle)\langle v,\cdot\rangle]\|_2\le\|B_1\|_2\|v\|.\]
            Corresponding Lean step
            private theorem represented_derivative_clm
                {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E]
                [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E]
                (p : Polynomial ℝ)
                (hdf : ∀ w v : E, MemLp (fun x : E =>
                  p.derivative.eval ⟪w,x⟫_ℝ * ⟪v,x⟫_ℝ) 2 (stdGaussian E)) :
                ∃ D : E → E →L[ℝ] Lp ℝ 2 (stdGaussian E),
                  ∀ w v, D w v = (hdf w v).toLp
                    (fun x : E => p.derivative.eval ⟪w,x⟫_ℝ * ⟪v,x⟫_ℝ) := by
              classical
              have hD (w : E) : ∃ D : E →L[ℝ] Lp ℝ 2 (stdGaussian E),
                  ∀ v, D v = (hdf w v).toLp
                    (fun x : E => p.derivative.eval ⟪w,x⟫_ℝ * ⟪v,x⟫_ℝ) := by
                let df := fun (v x : E) => p.derivative.eval ⟪w,x⟫_ℝ * ⟪v,x⟫_ℝ
                let L : E →ₗ[ℝ] Lp ℝ 2 (stdGaussian E) := {
                  toFun := fun v => (hdf w v).toLp (df v)
                  map_add' := by
                    intro v u
                    apply Lp.ext
                    filter_upwards [(hdf w (v+u)).coeFn_toLp,
                      Lp.coeFn_add ((hdf w v).toLp (df v)) ((hdf w u).toLp (df u)),
                      (hdf w v).coeFn_toLp,(hdf w u).coeFn_toLp] with x hsum hadd hv hu
                    simp only [Pi.add_apply] at hadd
                    rw [hsum,hadd,hv,hu]
                    simp [df,inner_add_left,mul_add]
                  map_smul' := by
                    intro c v
                    apply Lp.ext
                    filter_upwards [(hdf w (c • v)).coeFn_toLp,
                      Lp.coeFn_smul c ((hdf w v).toLp (df v)),(hdf w v).coeFn_toLp] with x hcv hsmul hv
                    simp only [Pi.smul_apply,smul_eq_mul] at hsmul
                    simp only [RingHom.id_apply]
                    rw [hcv,hsmul,hv]
                    simp [df,real_inner_smul_left]
                    ring }
                obtain ⟨B,hB,hB0,hBound⟩ :=
                  polynomial_radial_envelope (E := E) p.derivative ‖w‖ (norm_nonneg _) 1
                let b := hB.toLp B
                have hnorm (v : E) : ‖L v‖ ≤ ‖v‖ * ‖b‖ := by
                  apply Lp.norm_le_mul_norm_of_ae_le_mul
                  filter_upwards [(hdf w v).coeFn_toLp,hB.coeFn_toLp] with x hv hBx
                  change ‖(hdf w v).toLp (df v) x‖ ≤ ‖v‖ * ‖b x‖
                  rw [hv]
                  change ‖df v x‖ ≤ ‖v‖ * ‖hB.toLp B x‖
                  rw [hBx,Real.norm_of_nonneg (hB0 x)]
                  calc
                    ‖df v x‖ = ‖p.derivative.eval ⟪w,x⟫_ℝ‖ * ‖⟪v,x⟫_ℝ‖ := norm_mul _ _
                    _ ≤ ‖p.derivative.eval ⟪w,x⟫_ℝ‖ * (‖v‖*‖x‖) :=
                      mul_le_mul_of_nonneg_left (norm_inner_le_norm (𝕜 := ℝ) v x) (norm_nonneg _)
                    _ = ‖v‖ * (‖p.derivative.eval ⟪w,x⟫_ℝ‖ * ‖x‖) := by ring
                    _ ≤ ‖v‖ * B x := mul_le_mul_of_nonneg_left
                      (by simpa using hBound w le_rfl x) (norm_nonneg _)
                refine ⟨L.mkContinuous ‖b‖ (fun v => by simpa [mul_comm] using hnorm v),?_⟩
                intro v
                rfl
              choose D hD using hD
              exact ⟨D,hD⟩
            

            Literal implementation excerpt from AutoSamplingTheory/TechnicalLemmas/Probability/GaussianPolynomialDifferentiation.lean. Local names retain their surrounding theorem context; the complete theorem and exact module context are folded below. These excerpts are presentation, not extra theorem premises.

            3. Differentiate the pointwise polynomial

            Polynomial differentiation composed with the inner-product functional yields the genuine scalar derivative for every x and every direction.

            \[D_w[p(\langle w,x\rangle)]v=p\prime(\langle w,x\rangle)\langle v,x\rangle.\]
            Corresponding Lean step
            private theorem pointwise_ridge_hasFDerivAt
                {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E]
                (p : Polynomial ℝ) (w x : E) :
                HasFDerivAt (fun u : E => p.eval ⟪u,x⟫_ℝ)
                  (p.derivative.eval ⟪w,x⟫_ℝ • innerSL ℝ x) w := by
              have h := (p.hasDerivAt ⟪x,w⟫_ℝ).comp_hasFDerivAt w (innerSL ℝ x).hasFDerivAt
              simpa only [Function.comp_def,innerSL_apply_apply,real_inner_comm x] using h
            

            Literal implementation excerpt from AutoSamplingTheory/TechnicalLemmas/Probability/GaussianPolynomialDifferentiation.lean. Local names retain their surrounding theorem context; the complete theorem and exact module context are folded below. These excerpts are presentation, not extra theorem premises.

            4. Control the normalized remainder locally

            A local scalar mean-value bound and the directional bound dominate the normalized scalar remainder by twice one L² envelope. At u=w define the inverse-norm normalization by the usual totalized value zero.

            \[r_u(x)=p(\langle u,x\rangle)-p(\langle w,x\rangle)-p\prime(\langle w,x\rangle)\langle u-w,x\rangle,\quad q_u(x)=\|u-w\|^{-1}|r_u(x)|\le2B(x).\]
            Corresponding Lean step
            private theorem local_increment_bounds
                {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E]
                [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E]
                (p : Polynomial ℝ) (w : E) :
                ∃ B : E → ℝ, MemLp B 2 (stdGaussian E) ∧ (∀ x, 0 ≤ B x) ∧
                  (∀ u : E, ‖u-w‖ ≤ 1 → ∀ x,
                    ‖p.eval ⟪u,x⟫_ℝ - p.eval ⟪w,x⟫_ℝ‖ ≤ B x * ‖u-w‖) ∧
                  ∀ (v x : E), ‖p.derivative.eval ⟪w,x⟫_ℝ * ⟪v,x⟫_ℝ‖ ≤ B x * ‖v‖ := by
              obtain ⟨B,hB,hB0,hBound⟩ := polynomial_radial_envelope
                (E := E) p.derivative (‖w‖+1) (by positivity) 1
              have hwNorm : ‖w‖ ≤ ‖w‖+1 := by linarith
              refine ⟨B,hB,hB0,?_,?_⟩
              · intro u hu x
                have huNorm : ‖u‖ ≤ ‖w‖+1 := by
                  calc
                    ‖u‖ = ‖(u-w)+w‖ := by rw [sub_add_cancel]
                    _ ≤ ‖u-w‖+‖w‖ := norm_add_le _ _
                    _ ≤ ‖w‖+1 := by linarith
                have hwMem : w ∈ Metric.closedBall (0 : E) (‖w‖+1) := by
                  simpa [Metric.mem_closedBall,dist_zero_right] using hwNorm
                have huMem : u ∈ Metric.closedBall (0 : E) (‖w‖+1) := by
                  simpa [Metric.mem_closedBall,dist_zero_right] using huNorm
                apply (convex_closedBall (0 : E) (‖w‖+1)).norm_image_sub_le_of_norm_hasFDerivWithin_le
                  (fun z hz => (pointwise_ridge_hasFDerivAt p z x).hasFDerivWithinAt) ?_ hwMem huMem
                intro z hz
                rw [norm_smul,innerSL_apply_norm]
                have hzNorm : ‖z‖ ≤ ‖w‖+1 := by
                  simpa [Metric.mem_closedBall,dist_zero_right] using hz
                simpa only [pow_one] using hBound z hzNorm x
              · intro v x
                calc
                  ‖p.derivative.eval ⟪w,x⟫_ℝ * ⟪v,x⟫_ℝ‖ =
                      ‖p.derivative.eval ⟪w,x⟫_ℝ‖ * ‖⟪v,x⟫_ℝ‖ := norm_mul _ _
                  _ ≤ ‖p.derivative.eval ⟪w,x⟫_ℝ‖ * (‖v‖*‖x‖) :=
                    mul_le_mul_of_nonneg_left (norm_inner_le_norm (𝕜 := ℝ) v x) (norm_nonneg _)
                  _ = (‖p.derivative.eval ⟪w,x⟫_ℝ‖ * ‖x‖) * ‖v‖ := by ring
                  _ ≤ B x * ‖v‖ := mul_le_mul_of_nonneg_right
                    (by simpa only [pow_one] using hBound w hwNorm x) (norm_nonneg _)
            
              let r := fun (u x : E) => p.eval ⟪u,x⟫_ℝ - p.eval ⟪w,x⟫_ℝ -
                p.derivative.eval ⟪w,x⟫_ℝ * ⟪u-w,x⟫_ℝ
              let q := fun (u x : E) => ‖u-w‖⁻¹ * ‖r u x‖
              obtain ⟨B,hB,hB0,hInc,hDir⟩ := local_increment_bounds p w
              have hR (u : E) (hu : ‖u-w‖ ≤ 1) (x : E) :
                  ‖r u x‖ ≤ (2 * B x) * ‖u-w‖ := by
                exact (norm_sub_le _ _).trans ((add_le_add (hInc u hu x) (hDir (u-w) x)).trans_eq (by ring))
              have hq (u : E) (hu : ‖u-w‖ ≤ 1) (x : E) : q u x ≤ 2 * B x := by
                by_cases h : u = w
                · subst u
                  simpa [q] using hB0 x
                · have hn : 0 < ‖u-w‖ := norm_pos_iff.mpr (sub_ne_zero.mpr h)
                  calc
                    q u x ≤ ‖u-w‖⁻¹ * ((2 * B x) * ‖u-w‖) :=
                      mul_le_mul_of_nonneg_left (hR u hu x) (inv_nonneg.mpr (norm_nonneg _))
                    _ = 2 * B x := by field_simp
              have hq0 (x : E) : q w x = 0 := by simp [q]
            

            Literal implementation excerpt from AutoSamplingTheory/TechnicalLemmas/Probability/GaussianPolynomialDifferentiation.lean. Local names retain their surrounding theorem context; the complete theorem and exact module context are folded below. These excerpts are presentation, not extra theorem premises.

            5. Use dominated convergence on the squared remainder

            Pointwise Fréchet differentiability gives q_u(x)→0, and 4B² is integrable. Dominated convergence therefore controls the whole L² remainder, not just each fixed directional limit.

            \[\int q_u(x)^2\,d\gamma(x)\longrightarrow0,\qquad q_u(x)^2\le4B(x)^2.\]
            Corresponding Lean step
              have hqcont (x : E) : ContinuousAt (fun u : E => q u x) w := by
                rw [ContinuousAt,hq0]
                have ht := (hasFDerivAt_iff_tendsto.mp (pointwise_ridge_hasFDerivAt p w x))
                simpa only [q,r,ContinuousLinearMap.smul_apply,innerSL_apply_apply,
                  smul_eq_mul,real_inner_comm x] using ht
              have hBsq : Integrable (fun x => 4 * (B x)^2) μ :=
                ((memLp_two_iff_integrable_sq hB.1).1 hB).const_mul 4
              have hc : ContinuousAt (fun u : E => ∫ x, (q u x)^2 ∂μ) w := by
                apply continuousAt_of_dominated (bound := fun x => 4 * (B x)^2)
                · exact Eventually.of_forall fun u => by dsimp [q,r]; fun_prop
                · filter_upwards [Metric.closedBall_mem_nhds w (by norm_num : (0:ℝ)<1)] with u hu
                  have hu' : ‖u-w‖ ≤ 1 := by simpa [Metric.mem_closedBall,dist_eq_norm] using hu
                  exact ae_of_all _ fun x => by
                    rw [Real.norm_eq_abs,abs_of_nonneg (sq_nonneg _)]
                    have hnon : 0 ≤ q u x := mul_nonneg (inv_nonneg.mpr (norm_nonneg _)) (norm_nonneg _)
                    have h := (sq_le_sq₀ hnon (mul_nonneg (by norm_num : (0:ℝ) ≤ 2) (hB0 x))).2 (hq u hu' x)
                    nlinarith
                · exact hBsq
                · exact ae_of_all _ fun x => (hqcont x).pow 2
            

            Literal implementation excerpt from AutoSamplingTheory/TechnicalLemmas/Probability/GaussianPolynomialDifferentiation.lean. Local names retain their surrounding theorem context; the complete theorem and exact module context are folded below. These excerpts are presentation, not extra theorem premises.

            6. Identify the actual quotient norm

            Almost-everywhere identities for subtraction, scalar multiplication and toLp identify the displayed integral with the squared norm of the normalized genuine class remainder. Taking its square root proves the full ambient Fréchet limit.

            \[\|\|u-w\|^{-1}(\Phi(u)-\Phi(w)-D(w)(u-w))\|_2^2=\int q_u^2\,d\gamma\longrightarrow0.\]
            Corresponding Lean step
              let R := fun u : E => F u - F w - D w (u-w)
              let G := fun u : E => ‖u-w‖⁻¹ • R u
              have hnorm (u : E) : ‖G u‖^2 = ∫ x, (q u x)^2 ∂μ := by
                rw [← real_inner_self_eq_norm_sq,L2.inner_def]
                apply integral_congr_ae
                have hd := (hdf w (u-w)).coeFn_toLp
                rw [← hD w (u-w)] at hd
                filter_upwards [Lp.coeFn_smul ‖u-w‖⁻¹ (R u),
                  Lp.coeFn_sub (F u - F w) (D w (u-w)),
                  Lp.coeFn_sub (F u) (F w),(hf u).coeFn_toLp,(hf w).coeFn_toLp,hd]
                  with x hsm hsub hsub' hfu hfw hdx
                change inner ℝ (G u x) (G u x) = _
                have hval : G u x = ‖u-w‖⁻¹ * r u x := by
                  change (‖u-w‖⁻¹ • R u) x = _
                  rw [hsm]
                  simp only [Pi.smul_apply,smul_eq_mul]
                  change ‖u-w‖⁻¹ * (F u - F w - D w (u-w)) x = _
                  rw [hsub]
                  simp only [Pi.sub_apply]
                  rw [hsub']
                  simp only [Pi.sub_apply]
                  change ‖u-w‖⁻¹ * ((hf u).toLp _ x - (hf w).toLp _ x - D w (u-w) x) = _
                  rw [hfu,hfw,hdx]
                rw [hval]
                simp [q,real_inner_self_eq_norm_sq,norm_mul,Real.norm_of_nonneg (inv_nonneg.mpr (norm_nonneg (u-w))),mul_pow]
              have ht : Tendsto (fun u : E => ‖G u‖) (𝓝 w) (𝓝 0) := by
                have hsq : ContinuousAt (fun u : E => ‖G u‖^2) w := by simpa only [← hnorm] using hc
                have hz : G w = 0 := by simp [G]
                have h := (Real.continuous_sqrt.continuousAt.comp hsq).tendsto
                simpa only [Function.comp_def,Real.sqrt_sq (norm_nonneg _),hz,norm_zero,zero_pow (by decide : 2 ≠ 0),Real.sqrt_zero] using h
              apply hasFDerivAt_iff_tendsto.mpr
              simpa only [G,norm_smul,Real.norm_of_nonneg (inv_nonneg.mpr (norm_nonneg (_-w))),R,F] using ht
            

            Literal implementation excerpt from AutoSamplingTheory/TechnicalLemmas/Probability/GaussianPolynomialDifferentiation.lean. Local names retain their surrounding theorem context; the complete theorem and exact module context are folded below. These excerpts are presentation, not extra theorem premises.

            Lean verification

            Lean proof · actual_gaussian_polynomial_ridge_L2_frechet_derivative

            The displayed formula proof explains the mathematical route; the exact Lean is folded adjacent.

            Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

            Download module (.lean)
            theorem actual_gaussian_polynomial_ridge_L2_frechet_derivative
                {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E]
                [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E]
                (p : Polynomial ℝ) :
                let γ := ProbabilityTheory.stdGaussian E
                let f : E → E → ℝ := fun w x => p.eval ⟪w,x⟫_ℝ
                let df : E → E → E → ℝ := fun w v x => p.derivative.eval ⟪w,x⟫_ℝ * ⟪v,x⟫_ℝ
                ∃ hf : ∀ w, MemLp (f w) 2 γ,
                ∃ hdf : ∀ w v, MemLp (df w v) 2 γ,
                ∃ D : E → E →L[ℝ] Lp ℝ 2 γ,
                  (∀ w v, D w v = (hdf w v).toLp (df w v)) ∧
                  ∀ w, HasFDerivAt (fun u => (hf u).toLp (f u)) (D w) w := by
              dsimp only
              obtain ⟨hf,hdf⟩ := ambient_feature_and_derivative_memLp (E := E) p
              obtain ⟨D,hD⟩ := represented_derivative_clm p hdf
              exact ⟨hf,hdf,D,hD,fun w => actual_L2_hasFDerivAt p hf hdf D hD w⟩

            Exact module and namespace context

            Source correspondence and review

            Source assumptions versus formal assumptions

            SourceActual LeanDifference kindWhy it matters
            Let E be a finite-dimensional real inner-product normed space with its Borel measurable structure, let γ be its centered standard Gaussian law with identity covariance, and let p be any finite real polynomial. For every ambient w and every direction v, both f_w(x)=p(⟨w,x⟩) and d_{w,v}(x)=p′(⟨w,x⟩)⟨v,x⟩ belong to L²(γ). There exist simultaneous membership witnesses and a field D(w):E→L²(γ) of continuous real linear maps such that D(w)v is exactly the class of d_{w,v}. The actual feature-class map Φ(w)=[f_w] is fully Fréchet differentiable at every ambient w, with derivative D(w). No feature membership, derivative membership, domination, differentiability or operator bound is an input.The exact adjacent signature preserves all displayed structures, generic inputs, actual function classes, measures, derivative and cost scopes.sameFor Gaussian features, moments and derivatives are produced. For generic tangent and transport interfaces the exact analytic and feature/cost premises remain explicit; no model instance or unspecified gradient/Wasserstein identification is claimed.

            This is a full ambient derivative, not merely a derivative along the unit sphere or along one fixed direction.; The theorem does not assert continuity of the derivative field, a second Fréchet derivative, a risk-potential identity or a manifold gradient.

            Encoder–denoiser: accepted · equivalent-after-elaboration

            A generalization is not a source correction. Proposed missing conditions require separate independent repair review. No proposed repair silently changes the original theorem.

            Scope and omitted-condition boundaries
            • This is a full ambient derivative, not merely a derivative along the unit sphere or along one fixed direction.
            • The theorem does not assert continuity of the derivative field, a second Fréchet derivative, a risk-potential identity or a manifold gradient.
            Sources, dependencies, and reuse

            Source and reuse

            Samplinglib parents called

              Mathlib API called (external library)

              • Pinned Mathlib Gaussian norm moments and actual L² quotient calculus

              Mathematical sources

              Samplinglib prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

              Samplinglib mathematical lesson

              The same Gaussian derivative is bounded and Lipschitz on the closed unit ball

              Read this first

              Mathematical statement

              Let E be a finite-dimensional real inner-product normed space with its Borel measurable structure, let γ be its centered standard Gaussian law with identity covariance, and let p be any finite real polynomial. For every ambient weight w and direction v, the actual functions f_w(x)=p(⟨w,x⟩) and d_{w,v}(x)=p′(⟨w,x⟩)⟨v,x⟩ belong to L²(γ). There exist simultaneous membership witnesses and a field of continuous real linear maps D(w):E→L²(γ), with D(w)v=[d_{w,v}], such that the actual feature-class map Φ(w)=[f_w] is fully Fréchet differentiable with derivative D(w) at every ambient w. There also exist strictly positive real constants M₁,M₂ such that ‖D(w)‖op≤M₁ for every ‖w‖≤1 and ‖D(u)−D(w)‖op≤M₂‖u−w‖ whenever both weights lie in the closed unit ball. The constants may depend on p and the ambient space; no dimension-independent rate is asserted. All memberships, derivatives and bounds are produced.

              \[\|D(w)\|_{\mathrm{op}}\le M_1,\qquad \|D(u)-D(w)\|_{\mathrm{op}}\le M_2\|u-w\|,\quad \|w\|,\|u\|\le1.\]
              Lean statement · actual_gaussian_polynomial_ridge_L2_derivative_bounds

              Let E be a finite-dimensional real inner-product normed space with its Borel measurable structure, let γ be its centered standard Gaussian law with identity covariance, and let p be any finite real polynomial. For every ambient weight w and direction v, the actual functions f_w(x)=p(⟨w,x⟩) and d_{w,v}(x)=p′(⟨w,x⟩)⟨v,x⟩ belong to L²(γ). There exist simultaneous membership witnesses and a field of continuous real linear maps D(w):E→L²(γ), with D(w)v=[d_{w,v}], such that the actual feature-class map Φ(w)=[f_w] is fully Fréchet differentiable with derivative D(w) at every ambient w. There also exist strictly positive real constants M₁,M₂ such that ‖D(w)‖op≤M₁ for every ‖w‖≤1 and ‖D(u)−D(w)‖op≤M₂‖u−w‖ whenever both weights lie in the closed unit ball. The constants may depend on p and the ambient space; no dimension-independent rate is asserted. All memberships, derivatives and bounds are produced.

              Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

              theorem actual_gaussian_polynomial_ridge_L2_derivative_bounds
                  {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E]
                  [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E]
                  (p : Polynomial ℝ) :
                  let γ := ProbabilityTheory.stdGaussian E
                  let f : E → E → ℝ := fun w x => p.eval ⟪w,x⟫_ℝ
                  let df : E → E → E → ℝ := fun w v x => p.derivative.eval ⟪w,x⟫_ℝ * ⟪v,x⟫_ℝ
                  ∃ hf : ∀ w, MemLp (f w) 2 γ,
                  ∃ hdf : ∀ w v, MemLp (df w v) 2 γ,
                  ∃ D : E → E →L[ℝ] Lp ℝ 2 γ,
                    (∀ w v, D w v = (hdf w v).toLp (df w v)) ∧
                    (∀ w, HasFDerivAt (fun u => (hf u).toLp (f u)) (D w) w) ∧
                    ∃ M₁ M₂ : ℝ, 0 < M₁ ∧ 0 < M₂ ∧
                      (∀ w : E, ‖w‖ ≤ 1 → ‖D w‖ ≤ M₁) ∧
                      ∀ w u : E, ‖w‖ ≤ 1 → ‖u‖ ≤ 1 → ‖D u - D w‖ ≤ M₂ * ‖u-w‖

              Exact module and namespace context

              Read the complete claim and its hypotheses first, then open the numbered mathematical proof steps. Each step has an optional fold containing literal Lean implementation excerpts; the full theorem and module context remain available below.

              Full assumptions and notation

              All objects and hypotheses

              • The only mathematical data are E with its finite-dimensional real inner-product and Borel structures, and a finite real polynomial p.
              • The returned operator estimates apply to the same derivative field in the ambient derivative conclusion; both endpoint weights in the difference estimate satisfy norm at most one.

              Mathematical proof

              Open a step to read its argument and formula.

              1. Reuse the actual ambient derivative

              Call the preceding producer to obtain feature memberships, derivative memberships, representation and full Fréchet differentiability together. The following bounds concern this same D.

              \[D(w)v=[p\prime(\langle w,\cdot\rangle)\langle v,\cdot\rangle].\]
              Corresponding Lean step
                dsimp only
                obtain ⟨hf,hdf,D,hD,hDiff⟩ := actual_gaussian_polynomial_ridge_L2_frechet_derivative (E := E) p
                exact ⟨hf,hdf,D,hD,hDiff,produced_operator_bounds p hdf D hD⟩
              

              Literal implementation excerpt from AutoSamplingTheory/TechnicalLemmas/Probability/GaussianPolynomialDifferentiation.lean. Local names retain their surrounding theorem context; the complete theorem and exact module context are folded below. These excerpts are presentation, not extra theorem premises.

              2. Produce first and second polynomial envelopes

              Gaussian radial moments supply B,C∈L² uniformly on the closed unit ball, with radial factors of orders one and two respectively.

              \[|p\prime(\langle w,x\rangle)|\,\|x\|\le B(x),\qquad |p^{\prime\prime}(\langle w,x\rangle)|\,\|x\|^2\le C(x).\]
              Corresponding Lean step
                obtain ⟨B,hB,hB0,hBound⟩ := polynomial_radial_envelope (E := E) p.derivative 1 (by norm_num) 1
                obtain ⟨C,hC,hC0,hBound2⟩ := polynomial_radial_envelope (E := E) p.derivative.derivative 1 (by norm_num) 2
                let b := hB.toLp B
                let c := hC.toLp C
              

              Literal implementation excerpt from AutoSamplingTheory/TechnicalLemmas/Probability/GaussianPolynomialDifferentiation.lean. Local names retain their surrounding theorem context; the complete theorem and exact module context are folded below. These excerpts are presentation, not extra theorem premises.

              3. Bound every directional operator value

              The first envelope and Cauchy–Schwarz for the scalar inner product give an almost-everywhere domination of D(w)v. The L² order estimate yields the operator norm bound.

              \[\|D(w)v\|_2\le\|B\|_2\|v\|,\qquad \|D(w)\|_{\mathrm{op}}\le\|B\|_2.\]
              Corresponding Lean step
                have hnorm (w : E) (hw : ‖w‖ ≤ 1) (v : E) : ‖D w v‖ ≤ ‖v‖ * ‖b‖ := by
                  apply Lp.norm_le_mul_norm_of_ae_le_mul
                  rw [hD w v]
                  filter_upwards [(hdf w v).coeFn_toLp,hB.coeFn_toLp] with x hv hBx
                  rw [hv]
                  change ‖p.derivative.eval ⟪w,x⟫_ℝ * ⟪v,x⟫_ℝ‖ ≤ ‖v‖ * ‖hB.toLp B x‖
                  rw [hBx,Real.norm_of_nonneg (hB0 x),norm_mul]
                  calc
                    ‖p.derivative.eval ⟪w,x⟫_ℝ‖ * ‖⟪v,x⟫_ℝ‖ ≤
                        ‖p.derivative.eval ⟪w,x⟫_ℝ‖ * (‖v‖*‖x‖) :=
                      mul_le_mul_of_nonneg_left (norm_inner_le_norm (𝕜 := ℝ) v x) (norm_nonneg _)
                    _ = ‖v‖ * (‖p.derivative.eval ⟪w,x⟫_ℝ‖ * ‖x‖) := by ring
                    _ ≤ ‖v‖ * B x := mul_le_mul_of_nonneg_left
                      (by simpa only [pow_one] using hBound w hw x) (norm_nonneg _)
              

              Literal implementation excerpt from AutoSamplingTheory/TechnicalLemmas/Probability/GaussianPolynomialDifferentiation.lean. Local names retain their surrounding theorem context; the complete theorem and exact module context are folded below. These excerpts are presentation, not extra theorem premises.

              4. Apply a scalar mean-value theorem inside the convex ball

              Differentiate the p′ directional expression. Convexity keeps the interpolation between u and w inside the same ball, so the second envelope controls its increment.

              \[|p\prime(\langle u,x\rangle)\langle v,x\rangle-p\prime(\langle w,x\rangle)\langle v,x\rangle|\le\|v\|C(x)\|u-w\|.\]
              Corresponding Lean step
                have hinc (w u : E) (hw : ‖w‖ ≤ 1) (hu : ‖u‖ ≤ 1) (v x : E) :
                    ‖p.derivative.eval ⟪u,x⟫_ℝ * ⟪v,x⟫_ℝ -
                      p.derivative.eval ⟪w,x⟫_ℝ * ⟪v,x⟫_ℝ‖ ≤ (‖v‖ * C x) * ‖u-w‖ := by
                  let d := fun z : E => ⟪v,x⟫_ℝ • (p.derivative.derivative.eval ⟪z,x⟫_ℝ • innerSL ℝ x)
                  have hd (z : E) : HasFDerivAt (fun q : E =>
                      p.derivative.eval ⟪q,x⟫_ℝ * ⟪v,x⟫_ℝ) (d z) z := by
                    convert (pointwise_ridge_hasFDerivAt p.derivative z x).const_smul ⟪v,x⟫_ℝ using 1 <;>
                      (first | rfl | (ext q; simp [d,Pi.smul_apply,smul_eq_mul,mul_comm]))
                  apply (convex_closedBall (0 : E) 1).norm_image_sub_le_of_norm_hasFDerivWithin_le
                    (fun z _ => (hd z).hasFDerivWithinAt) ?_
                    (by simpa [Metric.mem_closedBall,dist_zero_right] using hw)
                    (by simpa [Metric.mem_closedBall,dist_zero_right] using hu)
                  intro z hz
                  have hz' : ‖z‖ ≤ 1 := by simpa [Metric.mem_closedBall,dist_zero_right] using hz
                  dsimp only [d]
                  rw [norm_smul,norm_smul,innerSL_apply_norm]
                  calc
                    ‖⟪v,x⟫_ℝ‖ * (‖p.derivative.derivative.eval ⟪z,x⟫_ℝ‖ * ‖x‖) ≤
                        (‖v‖ * ‖x‖) * (‖p.derivative.derivative.eval ⟪z,x⟫_ℝ‖ * ‖x‖) :=
                      mul_le_mul_of_nonneg_right (norm_inner_le_norm (𝕜 := ℝ) v x) (by positivity)
                    _ = ‖v‖ * (‖p.derivative.derivative.eval ⟪z,x⟫_ℝ‖ * ‖x‖^2) := by ring
                    _ ≤ ‖v‖ * C x := mul_le_mul_of_nonneg_left (hBound2 z hz' x) (norm_nonneg _)
              

              Literal implementation excerpt from AutoSamplingTheory/TechnicalLemmas/Probability/GaussianPolynomialDifferentiation.lean. Local names retain their surrounding theorem context; the complete theorem and exact module context are folded below. These excerpts are presentation, not extra theorem premises.

              5. Pass to operator norms with positive witnesses

              Actual-class subtraction and L² domination give the difference bound for every v. Take the operator norm and choose M₁=‖[B]‖₂+1 and M₂=‖[C]‖₂+1 to retain strict positivity even for constant or zero p.

              \[\|(D(u)-D(w))v\|_2\le\|C\|_2\|u-w\|\|v\|,\qquad M_1,M_2>0.\]
              Corresponding Lean step
                have hdiff (w u : E) (hw : ‖w‖ ≤ 1) (hu : ‖u‖ ≤ 1) (v : E) :
                    ‖(D u-D w) v‖ ≤ (‖u-w‖*‖v‖) * ‖c‖ := by
                  apply Lp.norm_le_mul_norm_of_ae_le_mul
                  have hdu := (hdf u v).coeFn_toLp
                  have hdw := (hdf w v).coeFn_toLp
                  rw [← hD u v] at hdu
                  rw [← hD w v] at hdw
                  filter_upwards [Lp.coeFn_sub (D u v) (D w v),hdu,hdw,hC.coeFn_toLp]
                    with x hsub hux hwx hCx
                  change ‖(D u v - D w v) x‖ ≤ (‖u-w‖*‖v‖) * ‖hC.toLp C x‖
                  rw [hsub]
                  simp only [Pi.sub_apply]
                  rw [hux,hwx,hCx,Real.norm_of_nonneg (hC0 x)]
                  exact (hinc w u hw hu v x).trans_eq (by ring)
                have hOp (w : E) (hw : ‖w‖ ≤ 1) : ‖D w‖ ≤ ‖b‖ := by
                  apply ContinuousLinearMap.opNorm_le_bound _ (norm_nonneg _)
                  intro v
                  simpa only [mul_comm] using hnorm w hw v
                have hOpDiff (w u : E) (hw : ‖w‖ ≤ 1) (hu : ‖u‖ ≤ 1) :
                    ‖D u-D w‖ ≤ ‖c‖ * ‖u-w‖ := by
                  apply ContinuousLinearMap.opNorm_le_bound _ (by positivity)
                  intro v
                  exact (hdiff w u hw hu v).trans_eq (by ring)
                refine ⟨‖b‖+1,‖c‖+1,by positivity,by positivity,?_,?_⟩
                · intro w hw
                  exact (hOp w hw).trans (by linarith)
                · intro w u hw hu
                  exact (hOpDiff w u hw hu).trans
                    (mul_le_mul_of_nonneg_right (by linarith : ‖c‖ ≤ ‖c‖+1) (norm_nonneg _))
              

              Literal implementation excerpt from AutoSamplingTheory/TechnicalLemmas/Probability/GaussianPolynomialDifferentiation.lean. Local names retain their surrounding theorem context; the complete theorem and exact module context are folded below. These excerpts are presentation, not extra theorem premises.

              Lean verification

              Lean proof · actual_gaussian_polynomial_ridge_L2_derivative_bounds

              The displayed formula proof explains the mathematical route; the exact Lean is folded adjacent.

              Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

              Download module (.lean)
              theorem actual_gaussian_polynomial_ridge_L2_derivative_bounds
                  {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E]
                  [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E]
                  (p : Polynomial ℝ) :
                  let γ := ProbabilityTheory.stdGaussian E
                  let f : E → E → ℝ := fun w x => p.eval ⟪w,x⟫_ℝ
                  let df : E → E → E → ℝ := fun w v x => p.derivative.eval ⟪w,x⟫_ℝ * ⟪v,x⟫_ℝ
                  ∃ hf : ∀ w, MemLp (f w) 2 γ,
                  ∃ hdf : ∀ w v, MemLp (df w v) 2 γ,
                  ∃ D : E → E →L[ℝ] Lp ℝ 2 γ,
                    (∀ w v, D w v = (hdf w v).toLp (df w v)) ∧
                    (∀ w, HasFDerivAt (fun u => (hf u).toLp (f u)) (D w) w) ∧
                    ∃ M₁ M₂ : ℝ, 0 < M₁ ∧ 0 < M₂ ∧
                      (∀ w : E, ‖w‖ ≤ 1 → ‖D w‖ ≤ M₁) ∧
                      ∀ w u : E, ‖w‖ ≤ 1 → ‖u‖ ≤ 1 → ‖D u - D w‖ ≤ M₂ * ‖u-w‖ := by
                dsimp only
                obtain ⟨hf,hdf,D,hD,hDiff⟩ := actual_gaussian_polynomial_ridge_L2_frechet_derivative (E := E) p
                exact ⟨hf,hdf,D,hD,hDiff,produced_operator_bounds p hdf D hD⟩
              
              
              end AutoSamplingTheory.TechnicalLemmas.Probability.GaussianPolynomialDifferentiation

              Exact module and namespace context

              Source correspondence and review

              Source assumptions versus formal assumptions

              SourceActual LeanDifference kindWhy it matters
              Let E be a finite-dimensional real inner-product normed space with its Borel measurable structure, let γ be its centered standard Gaussian law with identity covariance, and let p be any finite real polynomial. For every ambient weight w and direction v, the actual functions f_w(x)=p(⟨w,x⟩) and d_{w,v}(x)=p′(⟨w,x⟩)⟨v,x⟩ belong to L²(γ). There exist simultaneous membership witnesses and a field of continuous real linear maps D(w):E→L²(γ), with D(w)v=[d_{w,v}], such that the actual feature-class map Φ(w)=[f_w] is fully Fréchet differentiable with derivative D(w) at every ambient w. There also exist strictly positive real constants M₁,M₂ such that ‖D(w)‖op≤M₁ for every ‖w‖≤1 and ‖D(u)−D(w)‖op≤M₂‖u−w‖ whenever both weights lie in the closed unit ball. The constants may depend on p and the ambient space; no dimension-independent rate is asserted. All memberships, derivatives and bounds are produced.The exact adjacent signature preserves all displayed structures, generic inputs, actual function classes, measures, derivative and cost scopes.sameFor Gaussian features, moments and derivatives are produced. For generic tangent and transport interfaces the exact analytic and feature/cost premises remain explicit; no model instance or unspecified gradient/Wasserstein identification is claimed.

              The p′′ envelope is a proved estimate, not an assumed bound on a second feature derivative.; This theorem makes no global-in-weight uniform bound, sharp constant, dimension-independent estimate, second Fréchet derivative or manifold-gradient assertion.

              Encoder–denoiser: accepted · equivalent-after-elaboration

              A generalization is not a source correction. Proposed missing conditions require separate independent repair review. No proposed repair silently changes the original theorem.

              Scope and omitted-condition boundaries
              • The p′′ envelope is a proved estimate, not an assumed bound on a second feature derivative.
              • This theorem makes no global-in-weight uniform bound, sharp constant, dimension-independent estimate, second Fréchet derivative or manifold-gradient assertion.
              Sources, dependencies, and reuse

              Source and reuse

              Samplinglib parents called

              Mathlib API called (external library)

              • Pinned Mathlib Gaussian norm moments and actual L² quotient calculus

              Mathematical sources

              Samplinglib prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

              Which proof obligations and prerequisites are covered?

              • Formalized proof edge; source adapter/review separate A Gaussian polynomial feature has its actual ambient L² derivative
              • Formalized proof edge; source adapter/review separate The same Gaussian derivative is bounded and Lipschitz on the closed unit ball

              Library supplement: all-coupling control of bounded feature means

              An original reusable mathematics supplement placed by subject. It is not a theorem claim about the primary textbook or a complete stochastic/statistical model.

              Samplinglib original feature differentiation and transport supplement v1, 2026-10-21 · Complete authored units 3 and their formula proof steps in the immutable declaration lesson (historical source) · licensed original

              Complete source statement and conditions

              The adjacent complete statements, assumptions and formula proofs describe the exact generic results; the optional Lean is initially folded.

              • K is strongly measurable and bounded by the nonnegative B. c is jointly measurable, nonnegative and bounded by nonnegative C.
              • L≥0 and the displayed feature increment bound holds for every pair; symmetry, a triangle inequality and an optimal coupling are not assumptions.
              • U is measurable; H is a complete real normed vector space. μ and ν are actual probability measures.

              Actual Bochner means are controlled by the all-coupling quadratic cost

              \[Q=\inf_{\pi\in\Pi(\mu,\nu)}\int c(u,v)^2\,d\pi,\qquad \left\|\int K\,d\mu-\int K\,d\nu\right\|\le LQ^{1/2}<\infty.\]

              Read the formalized proofs

              Each statement and proof below has its own closed Lean disclosure. Samplinglib parents, Mathlib calls and external mathematical sources are distinguished in each proof.

              Samplinglib mathematical lesson

              Actual Bochner means are controlled by the all-coupling quadratic cost

              Read this first

              Mathematical statement

              Let U be any measurable space and H a complete real normed vector space. Let K:U→H be strongly measurable with ‖K(u)‖≤B. Let c:U×U→ℝ be measurable with 0≤c(z)≤C, and suppose ‖K(u)−K(v)‖≤L c(u,v), where B,C,L≥0. For any two probability measures μ,ν on U, define Q as the infimum, over all actual couplings π with these two marginals, of ∫c² dπ, interpreted as an extended nonnegative integral; set W=Q^(1/2). Then K is genuinely Bochner integrable under each law, Q is finite, and ‖∫K dμ−∫K dν‖≤L W.toReal. For every y∈H both residual norms are at most B+‖y‖. No optimizer, chosen-plan bound, finite-cost assumption or mean-identity premise is supplied. U need not carry a vector-space structure, and c need not be a metric.

              \[Q=\inf_{\pi\in\Pi(\mu,\nu)}\int c(u,v)^2\,d\pi,\qquad \left\|\int K\,d\mu-\int K\,d\nu\right\|\le LQ^{1/2}<\infty.\]
              Lean statement · bounded_bochner_mean_quadratic_transport_control

              Let U be any measurable space and H a complete real normed vector space. Let K:U→H be strongly measurable with ‖K(u)‖≤B. Let c:U×U→ℝ be measurable with 0≤c(z)≤C, and suppose ‖K(u)−K(v)‖≤L c(u,v), where B,C,L≥0. For any two probability measures μ,ν on U, define Q as the infimum, over all actual couplings π with these two marginals, of ∫c² dπ, interpreted as an extended nonnegative integral; set W=Q^(1/2). Then K is genuinely Bochner integrable under each law, Q is finite, and ‖∫K dμ−∫K dν‖≤L W.toReal. For every y∈H both residual norms are at most B+‖y‖. No optimizer, chosen-plan bound, finite-cost assumption or mean-identity premise is supplied. U need not carry a vector-space structure, and c need not be a metric.

              Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

              theorem bounded_bochner_mean_quadratic_transport_control
                  {U H : Type*} [MeasurableSpace U]
                  [NormedAddCommGroup H] [NormedSpace ℝ H] [CompleteSpace H]
                  (K : U → H) (hK : StronglyMeasurable K)
                  (B C L : ℝ) (hB : 0 ≤ B) (hC : 0 ≤ C) (hL : 0 ≤ L)
                  (hBound : ∀ u, ‖K u‖ ≤ B)
                  (c : U × U → ℝ) (hc : Measurable c)
                  (hc0 : ∀ z, 0 ≤ c z) (hcBound : ∀ z, c z ≤ C)
                  (hLip : ∀ u v, ‖K u-K v‖ ≤ L * c (u,v))
                  (μ ν : Measure U) [IsProbabilityMeasure μ] [IsProbabilityMeasure ν] :
                  let cost : U × U → ℝ≥0∞ := fun z => ENNReal.ofReal ((c z)^2)
                  let Q := AutoSamplingTheory.TechnicalLemmas.Measure.Transport.transportCost cost μ ν
                  let W := Q ^ (1 / 2 : ℝ)
                  Integrable K μ ∧ Integrable K ν ∧ Q ≠ ∞ ∧
                    ‖(∫ u, K u ∂μ) - (∫ v, K v ∂ν)‖ ≤ L * W.toReal ∧
                    ∀ y : H, ‖(∫ u, K u ∂μ)-y‖ ≤ B+‖y‖ ∧
                      ‖(∫ v, K v ∂ν)-y‖ ≤ B+‖y‖

              Exact module and namespace context

              Read the complete claim and its hypotheses first, then open the numbered mathematical proof steps. Each step has an optional fold containing literal Lean implementation excerpts; the full theorem and module context remain available below.

              Full assumptions and notation

              All objects and hypotheses

              • U is measurable; H is a complete real normed vector space. μ and ν are actual probability measures.
              • K is strongly measurable and bounded by the nonnegative B. c is jointly measurable, nonnegative and bounded by nonnegative C.
              • L≥0 and the displayed feature increment bound holds for every pair; symmetry, a triangle inequality and an optimal coupling are not assumptions.

              Mathematical proof

              Open a step to read its argument and formula.

              1. Produce integrability and finite transport cost

              Strong measurability and the global norm bound give both Bochner integrals. The actual product probability μ⊗ν is a feasible coupling and has cost at most C², so Q is finite before toReal is used.

              \[\int\|K\|\,d\mu,\int\|K\|\,d\nu\le B,\qquad Q\le\int c^2\,d(\mu\otimes\nu)\le C^2.\]
              Corresponding Lean step
              private theorem bounded_feature_integrable
                  {U H : Type*} [MeasurableSpace U]
                  [NormedAddCommGroup H] [NormedSpace ℝ H] [CompleteSpace H]
                  (K : U → H) (hK : StronglyMeasurable K) (B : ℝ)
                  (hBound : ∀ u, ‖K u‖ ≤ B) (μ : Measure U) [IsProbabilityMeasure μ] :
                  Integrable K μ := by
                exact (integrable_const B).mono' hK.aestronglyMeasurable (ae_of_all _ hBound)
              
              private theorem bounded_cost_lintegral
                  {U : Type*} [MeasurableSpace U]
                  (c : U × U → ℝ) (C : ℝ) (hC : 0 ≤ C)
                  (hc0 : ∀ z, 0 ≤ c z) (hcBound : ∀ z, c z ≤ C)
                  (γ : Measure (U × U)) [IsProbabilityMeasure γ] :
                  (∫⁻ z, ENNReal.ofReal ((c z)^2) ∂γ) ≤ ENNReal.ofReal (C^2) := by
                calc
                  (∫⁻ z, ENNReal.ofReal ((c z)^2) ∂γ) ≤ ∫⁻ _ : U × U, ENNReal.ofReal (C^2) ∂γ := by
                    apply lintegral_mono
                    intro z
                    exact ENNReal.ofReal_le_ofReal ((sq_le_sq₀ (hc0 z) hC).2 (hcBound z))
                  _ = ENNReal.ofReal (C^2) := by simp
              
              private theorem actual_transport_cost_finite
                  {U : Type*} [MeasurableSpace U]
                  (c : U × U → ℝ) (C : ℝ) (hC : 0 ≤ C)
                  (hc0 : ∀ z, 0 ≤ c z) (hcBound : ∀ z, c z ≤ C)
                  (μ ν : Measure U) [IsProbabilityMeasure μ] [IsProbabilityMeasure ν] :
                  AutoSamplingTheory.TechnicalLemmas.Measure.Transport.transportCost
                    (fun z => ENNReal.ofReal ((c z)^2)) μ ν ≠ ∞ := by
                have h := AutoSamplingTheory.TechnicalLemmas.Measure.Transport.transportCost_le_lintegral_of_isCoupling
                  (fun z => ENNReal.ofReal ((c z)^2)) μ ν (μ.prod ν)
                  (AutoSamplingTheory.TechnicalLemmas.Measure.Transport.isCoupling_prod μ ν)
                exact ne_of_lt (lt_of_le_of_lt (h.trans (bounded_cost_lintegral c C hC hc0 hcBound _))
                  ENNReal.ofReal_lt_top)
              

              Literal implementation excerpt from AutoSamplingTheory/TechnicalLemmas/Measure/BochnerMeanTransport.lean. Local names retain their surrounding theorem context; the complete theorem and exact module context are folded below. These excerpts are presentation, not extra theorem premises.

              2. Use the actual marginals for every coupling

              Every feasible coupling is a probability. Marginal pushforward identities and Bochner subtraction express the actual mean difference as one integral of feature increments.

              \[\int K\,d\mu-\int K\,d\nu=\int(K(u)-K(v))\,d\pi(u,v).\]
              Corresponding Lean step
              private theorem actual_coupling_mean_difference
                  {U H : Type*} [MeasurableSpace U]
                  [NormedAddCommGroup H] [NormedSpace ℝ H] [CompleteSpace H]
                  (K : U → H) (hK : StronglyMeasurable K) (B : ℝ)
                  (hBound : ∀ u, ‖K u‖ ≤ B)
                  (μ ν : Measure U) [IsProbabilityMeasure μ] [IsProbabilityMeasure ν]
                  (γ : Measure (U × U))
                  (hγ : AutoSamplingTheory.TechnicalLemmas.Measure.Transport.IsCoupling γ μ ν) :
                  (∫ u, K u ∂μ) - (∫ v, K v ∂ν) = ∫ z, (K z.1-K z.2) ∂γ := by
                letI : IsProbabilityMeasure γ :=
                  AutoSamplingTheory.TechnicalLemmas.Measure.Transport.isProbabilityMeasure_of_isCoupling_left hγ
                have hleft : Integrable (fun z : U × U => K z.1) γ :=
                  bounded_feature_integrable _ (hK.comp_measurable measurable_fst) B
                    (fun z => hBound z.1) γ
                have hright : Integrable (fun z : U × U => K z.2) γ :=
                  bounded_feature_integrable _ (hK.comp_measurable measurable_snd) B
                    (fun z => hBound z.2) γ
                have hfst : (∫ u, K u ∂μ) = ∫ z, K z.1 ∂γ := by
                  rw [← hγ.1]
                  exact integral_map_of_stronglyMeasurable measurable_fst hK
                have hsnd : (∫ v, K v ∂ν) = ∫ z, K z.2 ∂γ := by
                  rw [← hγ.2]
                  exact integral_map_of_stronglyMeasurable measurable_snd hK
                rw [integral_sub hleft hright,← hfst,← hsnd]
              

              Literal implementation excerpt from AutoSamplingTheory/TechnicalLemmas/Measure/BochnerMeanTransport.lean. Local names retain their surrounding theorem context; the complete theorem and exact module context are folded below. These excerpts are presentation, not extra theorem premises.

              3. Square the integral bound

              The feature increment hypothesis first bounds the mean norm by L∫c dπ. Nonnegativity of ∫(c−∫c)² gives the probability square-integral inequality, without an assumed cost estimate.

              \[\left(\int c\,d\pi\right)^2\le\int c^2\,d\pi,\qquad A^2\le L^2\int c^2\,d\pi,\quad A=\left\|\int K\,d\mu-\int K\,d\nu\right\|.\]
              Corresponding Lean step
              private theorem probability_square_integral_le
                  {α : Type*} [MeasurableSpace α] (γ : Measure α) [IsProbabilityMeasure γ]
                  (f : α → ℝ) (hf : MemLp f 2 γ) :
                  (∫ x, f x ∂γ)^2 ≤ ∫ x, (f x)^2 ∂γ := by
                let m := ∫ x, f x ∂γ
                have hi : Integrable f γ := hf.integrable (by norm_num)
                have hs : Integrable (fun x => (f x)^2) γ := (memLp_two_iff_integrable_sq hf.1).1 hf
                have hm : Integrable (fun x => 2 * f x * m) γ := (hi.const_mul 2).mul_const m
                have hn : 0 ≤ ∫ x, (f x-m)^2 ∂γ := integral_nonneg fun x => sq_nonneg _
                have he : (∫ x, (f x-m)^2 ∂γ) = (∫ x, (f x)^2 ∂γ)-m^2 := by
                  simp_rw [sub_sq]
                  have hsub : Integrable (fun x => (f x)^2-2*f x*m) γ := hs.sub hm
                  rw [integral_add hsub (integrable_const (m^2)),integral_sub hs hm]
                  simp only [integral_mul_const,integral_const_mul,integral_const,probReal_univ,one_smul]
                  change (∫ x, (f x)^2 ∂γ) - 2*m*m + m^2 = _
                  ring
                rw [he] at hn
                change m^2 ≤ _
                linarith
              
              private theorem actual_coupling_squared_mean_bound
                  {U H : Type*} [MeasurableSpace U]
                  [NormedAddCommGroup H] [NormedSpace ℝ H] [CompleteSpace H]
                  (K : U → H) (hK : StronglyMeasurable K) (B C L : ℝ)
                  (hC : 0 ≤ C) (hL : 0 ≤ L) (hBound : ∀ u, ‖K u‖ ≤ B)
                  (c : U × U → ℝ) (hc : Measurable c)
                  (hc0 : ∀ z, 0 ≤ c z) (hcBound : ∀ z, c z ≤ C)
                  (hLip : ∀ u v, ‖K u-K v‖ ≤ L*c (u,v))
                  (μ ν : Measure U) [IsProbabilityMeasure μ] [IsProbabilityMeasure ν]
                  (γ : Measure (U × U))
                  (hγ : AutoSamplingTheory.TechnicalLemmas.Measure.Transport.IsCoupling γ μ ν) :
                  ‖(∫ u, K u ∂μ)-(∫ v, K v ∂ν)‖^2 ≤ L^2 * ∫ z, (c z)^2 ∂γ := by
                letI : IsProbabilityMeasure γ :=
                  AutoSamplingTheory.TechnicalLemmas.Measure.Transport.isProbabilityMeasure_of_isCoupling_left hγ
                have hcLp : MemLp c 2 γ := (memLp_const C).mono' hc.aestronglyMeasurable
                  (ae_of_all _ fun z => by simpa only [Real.norm_of_nonneg (hc0 z)] using hcBound z)
                have hcInt : Integrable c γ := hcLp.integrable (by norm_num)
                have hleft : Integrable (fun z : U × U => K z.1) γ := bounded_feature_integrable _
                  (hK.comp_measurable measurable_fst) B (fun z => hBound z.1) γ
                have hright : Integrable (fun z : U × U => K z.2) γ := bounded_feature_integrable _
                  (hK.comp_measurable measurable_snd) B (fun z => hBound z.2) γ
                have hnorm : ‖(∫ u, K u ∂μ)-(∫ v, K v ∂ν)‖ ≤ L * ∫ z, c z ∂γ := by
                  rw [actual_coupling_mean_difference K hK B hBound μ ν γ hγ]
                  calc
                    ‖∫ z, (K z.1-K z.2) ∂γ‖ ≤ ∫ z, ‖K z.1-K z.2‖ ∂γ := norm_integral_le_integral_norm _
                    _ ≤ ∫ z, L*c z ∂γ := integral_mono (hleft.sub hright).norm
                      (hcInt.const_mul L) (fun z => hLip z.1 z.2)
                    _ = L * ∫ z, c z ∂γ := integral_const_mul _ _
                have hm0 : 0 ≤ ∫ z, c z ∂γ := integral_nonneg hc0
                have hs := (sq_le_sq₀ (norm_nonneg _) (mul_nonneg hL hm0)).2 hnorm
                calc
                  ‖(∫ u, K u ∂μ)-(∫ v, K v ∂ν)‖^2 ≤ (L * ∫ z, c z ∂γ)^2 := hs
                  _ = L^2 * (∫ z, c z ∂γ)^2 := mul_pow _ _ _
                  _ ≤ L^2 * ∫ z, (c z)^2 ∂γ := mul_le_mul_of_nonneg_left
                    (probability_square_integral_le γ c hcLp) (sq_nonneg _)
              

              Literal implementation excerpt from AutoSamplingTheory/TechnicalLemmas/Measure/BochnerMeanTransport.lean. Local names retain their surrounding theorem context; the complete theorem and exact module context are folded below. These excerpts are presentation, not extra theorem premises.

              4. Take the infimum over all feasible costs

              For L>0, the same lower bound (A/L)² lies below every actual coupling cost. The order characterization of the extended-real infimum therefore places it below Q; no attainment or optimizer is used.

              \[(A/L)^2\le\inf_{\pi\in\Pi(\mu,\nu)}\int c^2\,d\pi=Q.\]
              Corresponding Lean step
                  · have hLp : 0 < L := lt_of_le_of_ne hL (Ne.symm hL0)
                    have hLow : ENNReal.ofReal ((A/L)^2) ≤ Q := by
                      apply le_sInf
                      rintro q ⟨γ,hγ,rfl⟩
                      letI : IsProbabilityMeasure γ :=
                        AutoSamplingTheory.TechnicalLemmas.Measure.Transport.isProbabilityMeasure_of_isCoupling_left hγ
                      have hcLp : MemLp c 2 γ := (memLp_const C).mono' hc.aestronglyMeasurable
                        (ae_of_all _ fun z => by simpa only [Real.norm_of_nonneg (hc0 z)] using hcBound z)
                      have hcSq : Integrable (fun z => (c z)^2) γ := (memLp_two_iff_integrable_sq hcLp.1).1 hcLp
                      change ENNReal.ofReal ((A/L)^2) ≤ ∫⁻ z, ENNReal.ofReal ((c z)^2) ∂γ
                      rw [← ofReal_integral_eq_lintegral_ofReal hcSq (ae_of_all _ fun z => sq_nonneg _)]
                      apply ENNReal.ofReal_le_ofReal
                      rw [div_pow]
                      apply (div_le_iff₀ (sq_pos_of_pos hLp)).2
                      simpa only [mul_comm] using hs γ hγ
              

              Literal implementation excerpt from AutoSamplingTheory/TechnicalLemmas/Measure/BochnerMeanTransport.lean. Local names retain their surrounding theorem context; the complete theorem and exact module context are folded below. These excerpts are presentation, not extra theorem premises.

              5. Handle the square root and the zero constant

              Finiteness justifies the real conversion and the square-root identity. If L=0, the product-coupling squared bound already gives A=0 and no division is performed.

              \[((Q^{1/2}).\mathrm{toReal})^2=Q.\mathrm{toReal},\qquad A\le L(Q^{1/2}).\mathrm{toReal}.\]
              Corresponding Lean step
                  · have h := hs (μ.prod ν)
                      (AutoSamplingTheory.TechnicalLemmas.Measure.Transport.isCoupling_prod μ ν)
                    rw [hL0] at *
                    simp only [zero_mul,zero_pow (by decide : 2 ≠ 0)] at *
                    change A^2 ≤ 0 at h
                    nlinarith [norm_nonneg ((∫ u, K u ∂μ)-(∫ v, K v ∂ν))]
              
                    have hReal := ENNReal.toReal_mono hQ hLow
                    rw [ENNReal.toReal_ofReal (sq_nonneg _)] at hReal
                    have he : (Q ^ (1 / 2 : ℝ))^2 = Q := by
                      rw [← ENNReal.rpow_two,← ENNReal.rpow_mul]
                      norm_num
                    have heReal : ((Q ^ (1 / 2 : ℝ)).toReal)^2 = Q.toReal := by
                      rw [← ENNReal.toReal_pow,he]
                    have hr : A/L ≤ (Q ^ (1 / 2 : ℝ)).toReal := by
                      have ha : 0 ≤ A/L := div_nonneg (norm_nonneg _) hL
                      have hb := ENNReal.toReal_nonneg (a := Q ^ (1 / 2 : ℝ))
                      nlinarith
                    calc
                      A = L * (A/L) := by field_simp
                      _ ≤ L * (Q ^ (1 / 2 : ℝ)).toReal := mul_le_mul_of_nonneg_left hr hL
              

              Literal implementation excerpt from AutoSamplingTheory/TechnicalLemmas/Measure/BochnerMeanTransport.lean. Local names retain their surrounding theorem context; the complete theorem and exact module context are folded below. These excerpts are presentation, not extra theorem premises.

              6. Bound both residuals

              The norm of each actual mean is at most B. The triangle inequality gives the two bounds for the same arbitrary fixed y.

              \[\left\|\int K\,d\mu-y\right\|,\left\|\int K\,d\nu-y\right\|\le B+\|y\|.\]
              Corresponding Lean step
                · have hmμ : ‖∫ u, K u ∂μ‖ ≤ B := by
                    simpa only [probReal_univ,mul_one] using
                      (norm_integral_le_of_norm_le_const (μ := μ) (ae_of_all _ hBound))
                  have hmν : ‖∫ v, K v ∂ν‖ ≤ B := by
                    simpa only [probReal_univ,mul_one] using
                      (norm_integral_le_of_norm_le_const (μ := ν) (ae_of_all _ hBound))
                  intro y
                  exact ⟨(norm_sub_le _ _).trans (add_le_add hmμ le_rfl),
                    (norm_sub_le _ _).trans (add_le_add hmν le_rfl)⟩
              

              Literal implementation excerpt from AutoSamplingTheory/TechnicalLemmas/Measure/BochnerMeanTransport.lean. Local names retain their surrounding theorem context; the complete theorem and exact module context are folded below. These excerpts are presentation, not extra theorem premises.

              Lean verification

              Lean proof · bounded_bochner_mean_quadratic_transport_control

              The displayed formula proof explains the mathematical route; the exact Lean is folded adjacent.

              Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

              Download module (.lean)
              theorem bounded_bochner_mean_quadratic_transport_control
                  {U H : Type*} [MeasurableSpace U]
                  [NormedAddCommGroup H] [NormedSpace ℝ H] [CompleteSpace H]
                  (K : U → H) (hK : StronglyMeasurable K)
                  (B C L : ℝ) (hB : 0 ≤ B) (hC : 0 ≤ C) (hL : 0 ≤ L)
                  (hBound : ∀ u, ‖K u‖ ≤ B)
                  (c : U × U → ℝ) (hc : Measurable c)
                  (hc0 : ∀ z, 0 ≤ c z) (hcBound : ∀ z, c z ≤ C)
                  (hLip : ∀ u v, ‖K u-K v‖ ≤ L * c (u,v))
                  (μ ν : Measure U) [IsProbabilityMeasure μ] [IsProbabilityMeasure ν] :
                  let cost : U × U → ℝ≥0∞ := fun z => ENNReal.ofReal ((c z)^2)
                  let Q := AutoSamplingTheory.TechnicalLemmas.Measure.Transport.transportCost cost μ ν
                  let W := Q ^ (1 / 2 : ℝ)
                  Integrable K μ ∧ Integrable K ν ∧ Q ≠ ∞ ∧
                    ‖(∫ u, K u ∂μ) - (∫ v, K v ∂ν)‖ ≤ L * W.toReal ∧
                    ∀ y : H, ‖(∫ u, K u ∂μ)-y‖ ≤ B+‖y‖ ∧
                      ‖(∫ v, K v ∂ν)-y‖ ≤ B+‖y‖ := by
                dsimp only
                let cost : U × U → ℝ≥0∞ := fun z => ENNReal.ofReal ((c z)^2)
                let Q := AutoSamplingTheory.TechnicalLemmas.Measure.Transport.transportCost cost μ ν
                have hQ : Q ≠ ∞ := actual_transport_cost_finite c C hC hc0 hcBound μ ν
                have hμ : Integrable K μ := bounded_feature_integrable K hK B hBound μ
                have hν : Integrable K ν := bounded_feature_integrable K hK B hBound ν
                have hs (γ : Measure (U × U))
                    (hγ : AutoSamplingTheory.TechnicalLemmas.Measure.Transport.IsCoupling γ μ ν) :
                    ‖(∫ u, K u ∂μ)-(∫ v, K v ∂ν)‖^2 ≤ L^2 * ∫ z, (c z)^2 ∂γ :=
                  actual_coupling_squared_mean_bound K hK B C L hC hL hBound c hc hc0 hcBound hLip μ ν γ hγ
                refine ⟨hμ,hν,hQ,?_,?_⟩
                · let A := ‖(∫ u, K u ∂μ)-(∫ v, K v ∂ν)‖
                  change A ≤ L * (Q ^ (1 / 2 : ℝ)).toReal
                  by_cases hL0 : L = 0
                  · have h := hs (μ.prod ν)
                      (AutoSamplingTheory.TechnicalLemmas.Measure.Transport.isCoupling_prod μ ν)
                    rw [hL0] at *
                    simp only [zero_mul,zero_pow (by decide : 2 ≠ 0)] at *
                    change A^2 ≤ 0 at h
                    nlinarith [norm_nonneg ((∫ u, K u ∂μ)-(∫ v, K v ∂ν))]
                  · have hLp : 0 < L := lt_of_le_of_ne hL (Ne.symm hL0)
                    have hLow : ENNReal.ofReal ((A/L)^2) ≤ Q := by
                      apply le_sInf
                      rintro q ⟨γ,hγ,rfl⟩
                      letI : IsProbabilityMeasure γ :=
                        AutoSamplingTheory.TechnicalLemmas.Measure.Transport.isProbabilityMeasure_of_isCoupling_left hγ
                      have hcLp : MemLp c 2 γ := (memLp_const C).mono' hc.aestronglyMeasurable
                        (ae_of_all _ fun z => by simpa only [Real.norm_of_nonneg (hc0 z)] using hcBound z)
                      have hcSq : Integrable (fun z => (c z)^2) γ := (memLp_two_iff_integrable_sq hcLp.1).1 hcLp
                      change ENNReal.ofReal ((A/L)^2) ≤ ∫⁻ z, ENNReal.ofReal ((c z)^2) ∂γ
                      rw [← ofReal_integral_eq_lintegral_ofReal hcSq (ae_of_all _ fun z => sq_nonneg _)]
                      apply ENNReal.ofReal_le_ofReal
                      rw [div_pow]
                      apply (div_le_iff₀ (sq_pos_of_pos hLp)).2
                      simpa only [mul_comm] using hs γ hγ
                    have hReal := ENNReal.toReal_mono hQ hLow
                    rw [ENNReal.toReal_ofReal (sq_nonneg _)] at hReal
                    have he : (Q ^ (1 / 2 : ℝ))^2 = Q := by
                      rw [← ENNReal.rpow_two,← ENNReal.rpow_mul]
                      norm_num
                    have heReal : ((Q ^ (1 / 2 : ℝ)).toReal)^2 = Q.toReal := by
                      rw [← ENNReal.toReal_pow,he]
                    have hr : A/L ≤ (Q ^ (1 / 2 : ℝ)).toReal := by
                      have ha : 0 ≤ A/L := div_nonneg (norm_nonneg _) hL
                      have hb := ENNReal.toReal_nonneg (a := Q ^ (1 / 2 : ℝ))
                      nlinarith
                    calc
                      A = L * (A/L) := by field_simp
                      _ ≤ L * (Q ^ (1 / 2 : ℝ)).toReal := mul_le_mul_of_nonneg_left hr hL
                · have hmμ : ‖∫ u, K u ∂μ‖ ≤ B := by
                    simpa only [probReal_univ,mul_one] using
                      (norm_integral_le_of_norm_le_const (μ := μ) (ae_of_all _ hBound))
                  have hmν : ‖∫ v, K v ∂ν‖ ≤ B := by
                    simpa only [probReal_univ,mul_one] using
                      (norm_integral_le_of_norm_le_const (μ := ν) (ae_of_all _ hBound))
                  intro y
                  exact ⟨(norm_sub_le _ _).trans (add_le_add hmμ le_rfl),
                    (norm_sub_le _ _).trans (add_le_add hmν le_rfl)⟩
              
              end AutoSamplingTheory.TechnicalLemmas.Measure.BochnerMeanTransport

              Exact module and namespace context

              Source correspondence and review

              Source assumptions versus formal assumptions

              SourceActual LeanDifference kindWhy it matters
              Let U be any measurable space and H a complete real normed vector space. Let K:U→H be strongly measurable with ‖K(u)‖≤B. Let c:U×U→ℝ be measurable with 0≤c(z)≤C, and suppose ‖K(u)−K(v)‖≤L c(u,v), where B,C,L≥0. For any two probability measures μ,ν on U, define Q as the infimum, over all actual couplings π with these two marginals, of ∫c² dπ, interpreted as an extended nonnegative integral; set W=Q^(1/2). Then K is genuinely Bochner integrable under each law, Q is finite, and ‖∫K dμ−∫K dν‖≤L W.toReal. For every y∈H both residual norms are at most B+‖y‖. No optimizer, chosen-plan bound, finite-cost assumption or mean-identity premise is supplied. U need not carry a vector-space structure, and c need not be a metric.The exact adjacent signature preserves all displayed structures, generic inputs, actual function classes, measures, derivative and cost scopes.sameFor Gaussian features, moments and derivatives are produced. For generic tangent and transport interfaces the exact analytic and feature/cost premises remain explicit; no model instance or unspecified gradient/Wasserstein identification is claimed.

              The all-coupling infimum is literal extended nonnegative transportCost; real conversion occurs after finite cost is proved. No optimal coupling or attainment is assumed.; This is a generic bounded-cost theorem. A round-geodesic metric identification, a concrete Gaussian feature Lipschitz estimate, and their particular Wasserstein instance must be established separately.

              Encoder–denoiser: accepted · equivalent-after-elaboration

              A generalization is not a source correction. Proposed missing conditions require separate independent repair review. No proposed repair silently changes the original theorem.

              Scope and omitted-condition boundaries
              • The all-coupling infimum is literal extended nonnegative transportCost; real conversion occurs after finite cost is proved. No optimal coupling or attainment is assumed.
              • This is a generic bounded-cost theorem. A round-geodesic metric identification, a concrete Gaussian feature Lipschitz estimate, and their particular Wasserstein instance must be established separately.
              Sources, dependencies, and reuse

              Source and reuse

              Samplinglib parents called

              Mathlib API called (external library)

              • Pinned Mathlib Bochner integration, marginal maps and extended-real order

              Mathematical sources

              Samplinglib prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

              Which proof obligations and prerequisites are covered?

              • Formalized proof edge; source adapter/review separate Actual Bochner means are controlled by the all-coupling quadratic cost

              Forced dissipation and the exponential steady-state envelope

              Mathlib supplies the one-sided Grönwall comparison; Samplinglib packages the forced energy-dissipation specialization used by semigroup and optimization arguments.

              mathlib commit db584cd6d46c92f209a44c0f1c829460d327499d · gronwallBound and le_gronwallBound_of_liminf_deriv_right_le · faithful paraphrase

              Complete source statement (Samplinglib restatement)

              For a continuous scalar energy with exact right derivative E'=-qD, a positive rate r and the inequality rE≤qD+b imply the sharp exponential interpolation E(t)≤E(s)e^{-r(t-s)}+(b/r)(1-e^{-r(t-s)}) for s≤t.

              • The energy is continuous and has the supplied exact right derivative at every time.
              • The decay rate is strictly positive.
              • The forced coercivity inequality holds at every time.
              • The two endpoint times are ordered.

              forced differential inequality

              \[E'(u)\le-rE(u)+b\]

              exponential forcing envelope

              \[E(t)\le E(s)e^{-r(t-s)}+\frac{b}{r}\bigl(1-e^{-r(t-s)}\bigr)\]

              Read the formalized proofs

              Each statement and proof below has its own closed Lean disclosure. Samplinglib parents, Mathlib calls and external mathematical sources are distinguished in each proof.

              Samplinglib mathematical lesson

              Dissipation with forcing converges to a floor

              AutoSamplingTheory.TechnicalLemmas.FunctionalInequalities.SemigroupDecay.forced_exponential_decay_of_scaled_dissipation_from · theorem · Teaching coverage

              Read this first

              Mathematical statement

              Let an energy curve have the exact right derivative E'(u)=-qD(u). If r>0 and rE(u)≤qD(u)+b at every time, then between any s≤t the energy is bounded by the exponential interpolation between E(s) and the forcing floor b/r.

              \[E(t)\le E(s)e^{-r(t-s)}+\frac{b}{r}\bigl(1-e^{-r(t-s)}\bigr)\]
              Lean statement · forced_exponential_decay_of_scaled_dissipation_from

              Lean keeps the dissipation scale q, decay rate r, forcing b, curve, and both endpoint times explicit.

              Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

              theorem forced_exponential_decay_of_scaled_dissipation_from
                  {scale rate forcing : ℝ} (hrate : 0 < rate)
                  (curve : DissipationCurve scale)
                  (hcoercive : ∀ u : ℝ,
                    rate * curve.energy u ≤ scale * curve.dissipation u + forcing)
                  {s t : ℝ} (hst : s ≤ t) :
                  curve.energy t ≤
                    curve.energy s * Real.exp (-rate * (t - s)) +
                      (forcing / rate) * (1 - Real.exp (-rate * (t - s)))

              Exact module and namespace context

              Proof roadmap

              1. 1Convert coercivity into a differential inequality

                Negating the forced coercivity inequality and using the derivative identity gives E'(u)≤-rE(u)+b.

              2. 2Apply one-sided Grönwall

                Mathlib's right-slope Grönwall theorem applies directly because the curve is continuous and the exact right derivative controls every right slope.

              3. 3Expose the forcing floor

                Since r is nonzero, unfold the closed Grönwall expression and rewrite b/(-r)(e^{-rΔ}-1) as (b/r)(1-e^{-rΔ}).

              Full assumptions and notation

              All objects and hypotheses

              • The energy curve is continuous on the real line.
              • At each time u, its right derivative within [u,∞) is exactly -qD(u).
              • The decay rate r is strictly positive.
              • The forced coercivity inequality rE(u)≤qD(u)+b holds for every real u.
              • The terminal time satisfies s≤t.

              Mathematical proof

              1. Convert coercivity into a differential inequality

              Negating the forced coercivity inequality and using the derivative identity gives E'(u)≤-rE(u)+b.

              \[E'(u)=-qD(u)\le-rE(u)+b\]
              Corresponding Lean step

              The proof combines neg_le_neg (hcoercive u) with linear arithmetic.

              2. Apply one-sided Grönwall

              Mathlib's right-slope Grönwall theorem applies directly because the curve is continuous and the exact right derivative controls every right slope.

              \[E(t)\le\operatorname{gronwallBound}(E(s),-r,b,t-s)\]
              Corresponding Lean step

              Use le_gronwallBound_of_liminf_deriv_right_le with K=-r and ε=b.

              3. Expose the forcing floor

              Since r is nonzero, unfold the closed Grönwall expression and rewrite b/(-r)(e^{-rΔ}-1) as (b/r)(1-e^{-rΔ}).

              \[\frac{b}{-r}(e^{-r\Delta}-1)=\frac{b}{r}(1-e^{-r\Delta})\]
              Corresponding Lean step

              Unfold gronwallBound; field_simp and ring verify the scalar identity.

              Lean verification

              The exact proof begins folded immediately after the mathematical argument; the statement is folded beside the claim above.

              Lean proof · forced_exponential_decay_of_scaled_dissipation_from

              The proof is a direct specialization of Mathlib's one-sided Grönwall theorem, followed by exact field algebra.

              Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

              Download module (.lean)
              theorem forced_exponential_decay_of_scaled_dissipation_from
                  {scale rate forcing : ℝ} (hrate : 0 < rate)
                  (curve : DissipationCurve scale)
                  (hcoercive : ∀ u : ℝ,
                    rate * curve.energy u ≤ scale * curve.dissipation u + forcing)
                  {s t : ℝ} (hst : s ≤ t) :
                  curve.energy t ≤
                    curve.energy s * Real.exp (-rate * (t - s)) +
                      (forcing / rate) * (1 - Real.exp (-rate * (t - s))) := by
                have hbound : ∀ x ∈ Ico s t,
                    -scale * curve.dissipation x ≤
                      (-rate) * curve.energy x + forcing := by
                  intro x _hx
                  have hneg := neg_le_neg (hcoercive x)
                  linarith
                have hgronwall :=
                  le_gronwallBound_of_liminf_deriv_right_le
                    (f := curve.energy)
                    (f' := fun x => -scale * curve.dissipation x)
                    (δ := curve.energy s)
                    (K := -rate)
                    (ε := forcing)
                    (a := s)
                    (b := t)
                    curve.energy_continuous.continuousOn
                    (fun x _hx r hr => by
                      simpa [slope] using
                        (curve.energy_hasDerivWithinAt x).liminf_right_slope_le hr)
                    le_rfl
                    hbound
                    t
                    ⟨hst, le_rfl⟩
                rw [gronwallBound] at hgronwall
                simp only [if_neg (neg_ne_zero.mpr hrate.ne')] at hgronwall
                calc
                  curve.energy t ≤
                      curve.energy s * Real.exp (-rate * (t - s)) +
                        forcing / -rate *
                          (Real.exp (-rate * (t - s)) - 1) := hgronwall
                  _ = curve.energy s * Real.exp (-rate * (t - s)) +
                        (forcing / rate) *
                          (1 - Real.exp (-rate * (t - s))) := by
                    field_simp [hrate.ne']
                    ring
              
              end
              
              end SemigroupDecay
              end FunctionalInequalities
              end TechnicalLemmas
              end AutoSamplingTheory

              Exact module and namespace context

              Source assumptions versus formal assumptions

              SourceActual LeanDifference kindWhy it matters
              Mathlib's comparison theorem is stated for a continuous function with a right-slope upper bound f'≤Kf+ε on an interval.Samplinglib assumes a globally continuous `DissipationCurve`, its exact one-sided derivative E'=-qD, a globally stated forced coercivity inequality, r>0, and ordered endpoints.source-implicitThe exact derivative and coercivity data are the semigroup-facing adapter that produces Mathlib's slope hypothesis; positivity of r is necessary to write the forcing floor b/r. Global data match the existing reusable `DissipationCurve` API, while the proof uses them only on [s,t].

              No concrete Markov semigroup, carré-du-champ derivative identity, curvature estimate, or generator-domain extension is asserted.

              Encoder–denoiser: accepted · exact

              A generalization is not a source correction. Proposed missing conditions require separate independent repair review. No proposed repair silently changes the original theorem.

              Scope and omitted-condition boundaries
              • The theorem does not construct a semigroup or prove a Bakry–Émery gradient identity. It consumes an exact right-derivative dissipation law and a forced coercivity inequality.
              Sources, dependencies, and reuse

              Source and reuse

              Samplinglib parents called

              Mathlib API called (external library)

              • le_gronwallBound_of_liminf_deriv_right_le
              • HasDerivWithinAt.liminf_right_slope_le
              • gronwallBound

              Mathematical sources

              Samplinglib prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

              Which proof obligations and prerequisites are covered?

              • Independently verified prerequisite Derive the exact exponential envelope from right-derivative dissipation and forced coercivity

              Library supplement: Gaussian polynomial feature averaging

              An original reusable mathematics supplement placed by subject. It is not a theorem claim about the primary textbook or a complete stochastic/statistical model.

              Samplinglib original mathematical supplement v1, 2026-10-20 · Complete authored units 2,3 and their formula proof steps in the immutable declaration lesson (historical source) · licensed original

              Complete source statement (Samplinglib restatement)

              The adjacent complete statements, assumptions and formula proofs describe the exact generic results; the optional Lean is initially folded.

              • E has finite-dimensional real inner-product and Borel structures.
              • E is a finite-dimensional real inner-product space with its Borel structure; p is any finite real polynomial.
              • p is any finite real polynomial, including zero, constant and non-even polynomials. Weights form the literal unit-norm subtype.
              • ρ is any probability measure on the literal unit-norm subtype. No domination, moment, Bochner integrability or averaging identity is assumed.

              Gaussian polynomial features vary continuously in L²

              \[w\longmapsto [x\mapsto p(\langle w,x\rangle)]\quad\text{is continuous into }L^2(\gamma).\]

              Scalar feature averages equal their Bochner L² means

              \[\left[x\mapsto\int p(\langle w,x\rangle)\,d\rho(w)\right]_{L^2(\gamma)}=\int\Phi(w)\,d\rho(w).\]

              Read the formalized proofs

              Each statement and proof below has its own closed Lean disclosure. Samplinglib parents, Mathlib calls and external mathematical sources are distinguished in each proof.

              Samplinglib mathematical lesson

              Gaussian polynomial features vary continuously in L²

              AutoSamplingTheory.TechnicalLemmas.Probability.GaussianPolynomialAveraging.continuous_gaussian_polynomial_ridge_L2 · theorem · Teaching coverage

              Read this first

              Mathematical statement

              Let E be a finite-dimensional real inner-product space with its Borel measurable structure, γ its centered standard Gaussian law with identity covariance, and p any finite real polynomial. For every unit vector w, the actual scalar function x↦p(⟨w,x⟩) belongs to L²(γ). These membership witnesses can be chosen together so that their actual almost-everywhere equivalence classes form a continuous map from the unit sphere, with its subspace topology, into L²(γ). No feature moment, uniform bound, dominating function, or continuity assumption is supplied.

              \[w\longmapsto [x\mapsto p(\langle w,x\rangle)]\quad\text{is continuous into }L^2(\gamma).\]
              Lean statement · continuous_gaussian_polynomial_ridge_L2

              Let E be a finite-dimensional real inner-product space with its Borel measurable structure, γ its centered standard Gaussian law with identity covariance, and p any finite real polynomial. For every unit vector w, the actual scalar function x↦p(⟨w,x⟩) belongs to L²(γ). These membership witnesses can be chosen together so that their actual almost-everywhere equivalence classes form a continuous map from the unit sphere, with its subspace topology, into L²(γ). No feature moment, uniform bound, dominating function, or continuity assumption is supplied.

              Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

              theorem continuous_gaussian_polynomial_ridge_L2
                  {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E]
                  [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E]
                  (p : Polynomial ℝ) :
                  ∃ hfeature : ∀ w : {w : E // ‖w‖ = 1},
                    MemLp (fun x : E => p.eval ⟪w.1, x⟫_ℝ) 2 (ProbabilityTheory.stdGaussian E),
                    Continuous (fun w : {w : E // ‖w‖ = 1} =>
                      (hfeature w).toLp (fun x : E => p.eval ⟪w.1, x⟫_ℝ))

              Exact module and namespace context

              Proof roadmap

              1. 1Construct an integrable radial envelope

                Finite Gaussian norm moments put every radial power in L². Polynomial induction produces a nonnegative B∈L² bounding every unit-weight feature, using |⟨w,x⟩|≤‖x‖.

              2. 2Use the genuine feature classes

                The actual Gaussian projection theorem supplies membership of each displayed feature. The target map takes its actual equivalence class, not an arbitrary substitute.

              3. 3Apply dominated convergence to the squared distance

                Pointwise polynomial continuity and the common envelope control every squared difference. The integral is exactly the squared norm of the genuine class difference.

              4. 4Recover norm continuity

                The dominated squared-distance integral tends to zero. Continuity of the square root gives convergence in the L² norm.

              Full assumptions and notation

              All objects and hypotheses

              • E has finite-dimensional real inner-product and Borel structures.
              • p is any finite real polynomial, including zero, constant and non-even polynomials. Weights form the literal unit-norm subtype.

              Mathematical proof

              1. Construct an integrable radial envelope

              Finite Gaussian norm moments put every radial power in L². Polynomial induction produces a nonnegative B∈L² bounding every unit-weight feature, using |⟨w,x⟩|≤‖x‖.

              \[|p(\langle w,x\rangle)|\le B(x),\qquad B\in L^2(\gamma).\]
              Corresponding Lean step

              The exact statement and proof are available in the adjacent initially folded Lean.

              2. Use the genuine feature classes

              The actual Gaussian projection theorem supplies membership of each displayed feature. The target map takes its actual equivalence class, not an arbitrary substitute.

              \[\Phi(w)=[p(\langle w,\cdot\rangle)]_{L^2(\gamma)}.\]
              Corresponding Lean step

              The exact statement and proof are available in the adjacent initially folded Lean.

              3. Apply dominated convergence to the squared distance

              Pointwise polynomial continuity and the common envelope control every squared difference. The integral is exactly the squared norm of the genuine class difference.

              \[\|\Phi(w)-\Phi(w_0)\|^2=\int|p(\langle w,x\rangle)-p(\langle w_0,x\rangle)|^2\,d\gamma(x),\quad |\cdots|^2\le4B(x)^2.\]
              Corresponding Lean step

              The exact statement and proof are available in the adjacent initially folded Lean.

              4. Recover norm continuity

              The dominated squared-distance integral tends to zero. Continuity of the square root gives convergence in the L² norm.

              \[\|\Phi(w)-\Phi(w_0)\|\longrightarrow0\quad(w\to w_0).\]
              Corresponding Lean step

              The exact statement and proof are available in the adjacent initially folded Lean.

              Lean verification

              The exact proof begins folded immediately after the mathematical argument; the statement is folded beside the claim above.

              Lean proof · continuous_gaussian_polynomial_ridge_L2

              The formula proof above explains the mathematical moves; the adjacent folded Lean gives their exact implementation.

              Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

              Download module (.lean)
              theorem continuous_gaussian_polynomial_ridge_L2
                  {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E]
                  [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E]
                  (p : Polynomial ℝ) :
                  ∃ hfeature : ∀ w : {w : E // ‖w‖ = 1},
                    MemLp (fun x : E => p.eval ⟪w.1, x⟫_ℝ) 2 (ProbabilityTheory.stdGaussian E),
                    Continuous (fun w : {w : E // ‖w‖ = 1} =>
                      (hfeature w).toLp (fun x : E => p.eval ⟪w.1, x⟫_ℝ)) := by
                classical
                letI : CompleteSpace E := FiniteDimensional.complete ℝ E
                letI : SecondCountableTopology E := inferInstance
                let μ := stdGaussian E
                obtain ⟨B,hB,hBpos,hBbound⟩ := polynomial_norm_envelope (E := E) p
                obtain ⟨hb, hbpos, hf, hnorm⟩ :=
                  AutoSamplingTheory.TechnicalLemmas.Probability.GaussianPolynomialRidge.standard_gaussian_polynomial_ridge_uniform_L2 (E := E) p
                refine ⟨hf, ?_⟩
                let F := fun w : {w : E // ‖w‖ = 1} => (hf w).toLp (fun x => p.eval ⟪w.1,x⟫_ℝ)
                change Continuous F
                apply continuous_iff_continuousAt.2
                intro w₀
                have hBsq : Integrable (fun x => 4 * (B x)^2) μ :=
                  ((memLp_two_iff_integrable_sq hB.1).1 hB).const_mul 4
                have hn (w) : ‖F w - F w₀‖^2 =
                    ∫ x, (p.eval ⟪w.1,x⟫_ℝ - p.eval ⟪w₀.1,x⟫_ℝ)^2 ∂μ := by
                  rw [← real_inner_self_eq_norm_sq, L2.inner_def]
                  apply integral_congr_ae
                  filter_upwards [Lp.coeFn_sub (F w) (F w₀), (hf w).coeFn_toLp, (hf w₀).coeFn_toLp] with x hx hw hw₀
                  simp only [hx, Pi.sub_apply, F] at *
                  rw [hw,hw₀]
                  simp [real_inner_self_eq_norm_sq, Real.norm_eq_abs, sq_abs]
                have hc : ContinuousAt (fun w : {w : E // ‖w‖ = 1} =>
                    ∫ x, (p.eval ⟪w.1,x⟫_ℝ - p.eval ⟪w₀.1,x⟫_ℝ)^2 ∂μ) w₀ := by
                  apply continuousAt_of_dominated (bound := fun x => 4 * (B x)^2)
                  · exact Eventually.of_forall fun w => by fun_prop
                  · exact Eventually.of_forall fun w => ae_of_all _ fun x => by
                      rw [Real.norm_eq_abs, abs_of_nonneg (sq_nonneg _)]
                      have h := (norm_sub_le (p.eval ⟪w.1,x⟫_ℝ) (p.eval ⟪w₀.1,x⟫_ℝ)).trans
                        (add_le_add (hBbound w x) (hBbound w₀ x))
                      have hs := (sq_le_sq₀ (norm_nonneg _) (add_nonneg (hBpos x) (hBpos x))).2 h
                      simpa only [Real.norm_eq_abs, sq_abs] using hs.trans_eq (by ring)
                  · exact hBsq
                  · exact ae_of_all _ fun x => by fun_prop
                have hsq : ContinuousAt (fun w => ‖F w - F w₀‖^2) w₀ := by
                  simpa only [← hn] using hc
                rw [ContinuousAt, tendsto_iff_dist_tendsto_zero]
                simpa only [Function.comp_def, Real.sqrt_sq (norm_nonneg _), sub_self, norm_zero, zero_pow (by decide : 2 ≠ 0),
                  Real.sqrt_zero, dist_eq_norm] using
                  (Real.continuous_sqrt.continuousAt.comp hsq).tendsto

              Exact module and namespace context

              Source assumptions versus formal assumptions

              SourceActual LeanDifference kindWhy it matters
              Let E be a finite-dimensional real inner-product space with its Borel measurable structure, γ its centered standard Gaussian law with identity covariance, and p any finite real polynomial. For every unit vector w, the actual scalar function x↦p(⟨w,x⟩) belongs to L²(γ). These membership witnesses can be chosen together so that their actual almost-everywhere equivalence classes form a continuous map from the unit sphere, with its subspace topology, into L²(γ). No feature moment, uniform bound, dominating function, or continuity assumption is supplied.The exact adjacent public signature preserves all displayed primitive structures and hypotheses, literal measures/functions, produced integrability and derivative scope.sameMoments, radial domination, representative identities and Fubini are proved inside their respective producer nodes; none is added as a convenience premise.

              This is a statement about actual standard Gaussian inputs, not every rotation-invariant or heavy-tailed law.; No parameter-law average, label, risk derivative, or spatial derivative is part of this continuity conclusion. The unit domain may be empty in dimension zero.

              Encoder–denoiser: accepted · equivalent-after-elaboration

              A generalization is not a source correction. Proposed missing conditions require separate independent repair review. No proposed repair silently changes the original theorem.

              Scope and omitted-condition boundaries
              • This is a statement about actual standard Gaussian inputs, not every rotation-invariant or heavy-tailed law.
              • No parameter-law average, label, risk derivative, or spatial derivative is part of this continuity conclusion. The unit domain may be empty in dimension zero.
              Sources, dependencies, and reuse

              Source and reuse

              Samplinglib parents called

              Mathlib API called (external library)

              • ProbabilityTheory.IsGaussian.memLp_id
              • MeasureTheory.MemLp.integrable_norm_pow'
              • Polynomial.induction_on'
              • MeasureTheory.continuousAt_of_dominated
              • MeasureTheory.L2.inner_def
              • Real.continuous_sqrt

              Mathematical sources

              Samplinglib prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

              Samplinglib mathematical lesson

              Scalar feature averages equal their Bochner L² means

              AutoSamplingTheory.TechnicalLemmas.Probability.GaussianPolynomialAveraging.gaussian_polynomial_parameter_average_L2 · theorem · Teaching coverage

              Read this first

              Mathematical statement

              Under the same finite-dimensional real inner-product, Borel and finite-polynomial assumptions, let Φ(w) be the actual L² class of x↦p(⟨w,x⟩) under the standard Gaussian γ. The feature membership witnesses are produced together with continuity of Φ. For every probability law ρ on the unit sphere, the scalar feature is genuinely integrable in w for every fixed x, and Φ is genuinely Bochner integrable under ρ. The literal scalar-average function x↦∫p(⟨w,x⟩) dρ(w) belongs to L²(γ), and its actual L² class equals ∫Φ dρ. All membership, measurability and integral-exchange obligations are conclusions of the theorem.

              \[\left[x\mapsto\int p(\langle w,x\rangle)\,d\rho(w)\right]_{L^2(\gamma)}=\int\Phi(w)\,d\rho(w).\]
              Lean statement · gaussian_polynomial_parameter_average_L2

              Under the same finite-dimensional real inner-product, Borel and finite-polynomial assumptions, let Φ(w) be the actual L² class of x↦p(⟨w,x⟩) under the standard Gaussian γ. The feature membership witnesses are produced together with continuity of Φ. For every probability law ρ on the unit sphere, the scalar feature is genuinely integrable in w for every fixed x, and Φ is genuinely Bochner integrable under ρ. The literal scalar-average function x↦∫p(⟨w,x⟩) dρ(w) belongs to L²(γ), and its actual L² class equals ∫Φ dρ. All membership, measurability and integral-exchange obligations are conclusions of the theorem.

              Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

              theorem gaussian_polynomial_parameter_average_L2
                  {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E]
                  [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E]
                  (p : Polynomial ℝ) :
                  ∃ hfeature : ∀ w : {w : E // ‖w‖ = 1},
                    MemLp (fun x : E => p.eval ⟪w.1, x⟫_ℝ) 2 (ProbabilityTheory.stdGaussian E),
                    Continuous (fun w : {w : E // ‖w‖ = 1} =>
                      (hfeature w).toLp (fun x : E => p.eval ⟪w.1, x⟫_ℝ)) ∧
                    ∀ rho : Measure {w : E // ‖w‖ = 1}, IsProbabilityMeasure rho →
                      (∀ x : E, Integrable (fun w : {w : E // ‖w‖ = 1} => p.eval ⟪w.1, x⟫_ℝ) rho) ∧
                      Integrable (fun w : {w : E // ‖w‖ = 1} =>
                        (hfeature w).toLp (fun x : E => p.eval ⟪w.1, x⟫_ℝ)) rho ∧
                      ∃ hmean : MemLp (fun x : E => ∫ w : {w : E // ‖w‖ = 1},
                          p.eval ⟪w.1, x⟫_ℝ ∂rho) 2 (ProbabilityTheory.stdGaussian E),
                        hmean.toLp (fun x : E => ∫ w : {w : E // ‖w‖ = 1}, p.eval ⟪w.1, x⟫_ℝ ∂rho) =
                          ∫ w : {w : E // ‖w‖ = 1},
                            (hfeature w).toLp (fun x : E => p.eval ⟪w.1, x⟫_ℝ) ∂rho

              Exact module and namespace context

              Proof roadmap

              1. 1Build the actual radial envelope

                Gaussian norm moments and finite polynomial induction supply a common nonnegative L² envelope for all unit-weight scalar features.

              2. 2Produce both forms of parameter integrability

                For fixed x the envelope is a finite constant on the parameter space. Continuity and the Gaussian ridge norm bound give Bochner integrability of the actual L² feature map under every probability law.

              3. 3Construct the scalar mean class first

                Joint continuity makes the actual scalar average measurable. Its norm is bounded by B, so it belongs to L² before any class identity is used.

              4. 4Justify Fubini for every L² test class

                For any genuine g∈L²(γ), Cauchy–Schwarz makes |g|B integrable. This dominates the actual product kernel, so Fubini interchanges its two genuine scalar integrals.

              5. 5Identify the two Hilbert-space elements

                Each inner integral is the inner product with Φ(w). Commuting a bounded linear functional with the Bochner mean and testing against every g proves equality of the two actual classes.

              Full assumptions and notation

              All objects and hypotheses

              • E is a finite-dimensional real inner-product space with its Borel structure; p is any finite real polynomial.
              • ρ is any probability measure on the literal unit-norm subtype. No domination, moment, Bochner integrability or averaging identity is assumed.

              Mathematical proof

              1. Build the actual radial envelope

              Gaussian norm moments and finite polynomial induction supply a common nonnegative L² envelope for all unit-weight scalar features.

              \[|p(\langle w,x\rangle)|\le B(x),\quad B\in L^2(\gamma).\]
              Corresponding Lean step

              The exact statement and proof are available in the adjacent initially folded Lean.

              2. Produce both forms of parameter integrability

              For fixed x the envelope is a finite constant on the parameter space. Continuity and the Gaussian ridge norm bound give Bochner integrability of the actual L² feature map under every probability law.

              \[\int|p(\langle w,x\rangle)|\,d\rho(w)\le B(x),\qquad \int\|\Phi(w)\|\,d\rho(w)<\infty.\]
              Corresponding Lean step

              The exact statement and proof are available in the adjacent initially folded Lean.

              3. Construct the scalar mean class first

              Joint continuity makes the actual scalar average measurable. Its norm is bounded by B, so it belongs to L² before any class identity is used.

              \[m_\rho(x)=\int p(\langle w,x\rangle)\,d\rho(w),\qquad |m_\rho(x)|\le B(x).\]
              Corresponding Lean step

              The exact statement and proof are available in the adjacent initially folded Lean.

              4. Justify Fubini for every L² test class

              For any genuine g∈L²(γ), Cauchy–Schwarz makes |g|B integrable. This dominates the actual product kernel, so Fubini interchanges its two genuine scalar integrals.

              \[\int g(x)m_\rho(x)\,d\gamma(x)=\int\!\int g(x)p(\langle w,x\rangle)\,d\gamma(x)\,d\rho(w).\]
              Corresponding Lean step

              The exact statement and proof are available in the adjacent initially folded Lean.

              5. Identify the two Hilbert-space elements

              Each inner integral is the inner product with Φ(w). Commuting a bounded linear functional with the Bochner mean and testing against every g proves equality of the two actual classes.

              \[\langle g,[m_\rho]\rangle=\left\langle g,\int\Phi\,d\rho\right\rangle\quad\text{for every }g\in L^2(\gamma).\]
              Corresponding Lean step

              The exact statement and proof are available in the adjacent initially folded Lean.

              Lean verification

              The exact proof begins folded immediately after the mathematical argument; the statement is folded beside the claim above.

              Lean proof · gaussian_polynomial_parameter_average_L2

              The formula proof above explains the mathematical moves; the adjacent folded Lean gives their exact implementation.

              Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

              Download module (.lean)
              theorem gaussian_polynomial_parameter_average_L2
                  {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E]
                  [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E]
                  (p : Polynomial ℝ) :
                  ∃ hfeature : ∀ w : {w : E // ‖w‖ = 1},
                    MemLp (fun x : E => p.eval ⟪w.1, x⟫_ℝ) 2 (ProbabilityTheory.stdGaussian E),
                    Continuous (fun w : {w : E // ‖w‖ = 1} =>
                      (hfeature w).toLp (fun x : E => p.eval ⟪w.1, x⟫_ℝ)) ∧
                    ∀ rho : Measure {w : E // ‖w‖ = 1}, IsProbabilityMeasure rho →
                      (∀ x : E, Integrable (fun w : {w : E // ‖w‖ = 1} => p.eval ⟪w.1, x⟫_ℝ) rho) ∧
                      Integrable (fun w : {w : E // ‖w‖ = 1} =>
                        (hfeature w).toLp (fun x : E => p.eval ⟪w.1, x⟫_ℝ)) rho ∧
                      ∃ hmean : MemLp (fun x : E => ∫ w : {w : E // ‖w‖ = 1},
                          p.eval ⟪w.1, x⟫_ℝ ∂rho) 2 (ProbabilityTheory.stdGaussian E),
                        hmean.toLp (fun x : E => ∫ w : {w : E // ‖w‖ = 1}, p.eval ⟪w.1, x⟫_ℝ ∂rho) =
                          ∫ w : {w : E // ‖w‖ = 1},
                            (hfeature w).toLp (fun x : E => p.eval ⟪w.1, x⟫_ℝ) ∂rho := by
                classical
                letI : CompleteSpace E := FiniteDimensional.complete ℝ E
                letI : SecondCountableTopology E := inferInstance
                let μ := stdGaussian E
                obtain ⟨B,hB,hBpos,hBbound⟩ := polynomial_norm_envelope (E := E) p
                obtain ⟨hf,hcont⟩ := AutoSamplingTheory.TechnicalLemmas.Probability.GaussianPolynomialAveraging.continuous_gaussian_polynomial_ridge_L2 (E := E) p
                obtain ⟨hb, hbpos, hf8, hnorm⟩ :=
                  AutoSamplingTheory.TechnicalLemmas.Probability.GaussianPolynomialRidge.standard_gaussian_polynomial_ridge_uniform_L2 (E := E) p
                let U := {w : E // ‖w‖ = 1}
                let K : U → E → ℝ := fun w x => p.eval ⟪w.1,x⟫_ℝ
                let F := fun w : U => (hf w).toLp (K w)
                have hFcont : Continuous F := hcont
                have hFbound (w : U) : ‖F w‖ ≤ ‖hb.toLp (fun z : ℝ => p.eval z)‖ + 1 :=
                  (hnorm w).2
                have hKcont : Continuous (fun z : U × E => K z.1 z.2) := by
                  change Continuous (fun z : {w : E // ‖w‖ = 1} × E => p.eval ⟪z.1.1,z.2⟫_ℝ)
                  fun_prop
                refine ⟨hf, hcont, ?_⟩
                intro rho hrho
                letI : IsProbabilityMeasure rho := hrho
                have hscalar (x : E) : Integrable (fun w : U => K w x) rho := by
                  apply (integrable_const (B x)).mono' (by fun_prop)
                  exact ae_of_all _ fun w => hBbound w x
                have hFint : Integrable F rho := by
                  apply (integrable_const (‖hb.toLp (fun z : ℝ => p.eval z)‖ + 1)).mono'
                    hFcont.aestronglyMeasurable
                  exact ae_of_all _ hFbound
                let mean : E → ℝ := fun x => ∫ w, K w x ∂rho
                have hmeanmeas : StronglyMeasurable mean :=
                  hKcont.stronglyMeasurable.integral_prod_left'
                have hmeanbound (x : E) : ‖mean x‖ ≤ B x := by
                  have h := norm_integral_le_of_norm_le_const (μ := rho) (f := fun w : U => K w x)
                    (ae_of_all _ fun w => hBbound w x)
                  simpa only [probReal_univ, mul_one] using h
                have hmean : MemLp mean 2 μ := hB.mono' hmeanmeas.aestronglyMeasurable
                  (ae_of_all _ hmeanbound)
                refine ⟨hscalar,hFint,hmean,?_⟩
                apply ext_inner_left ℝ
                intro g
                have hC : Integrable (fun x : E => ‖g x‖ * B x) μ :=
                  (Lp.memLp g).norm.integrable_mul hB
                have hHmeas : AEStronglyMeasurable (fun z : U × E => g z.2 * K z.1 z.2) (rho.prod μ) :=
                  (Lp.aestronglyMeasurable g).comp_snd.mul hKcont.aestronglyMeasurable
                have hHint : Integrable (fun z : U × E => g z.2 * K z.1 z.2) (rho.prod μ) := by
                  apply (hC.comp_snd rho).mono' hHmeas
                  exact ae_of_all _ fun z => by
                    rw [norm_mul]
                    exact mul_le_mul_of_nonneg_left (hBbound z.1 z.2) (norm_nonneg _)
                have hin (w : U) : ⟪g,F w⟫_ℝ = ∫ x, g x * K w x ∂μ := by
                  rw [L2.inner_def]
                  apply integral_congr_ae
                  filter_upwards [(hf w).coeFn_toLp] with x hx
                  change inner ℝ (g x) ((hf w).toLp (K w) x) = _
                  rw [hx]
                  simp only [RCLike.inner_apply, conj_trivial, K, mul_comm]
                calc
                  ⟪g,hmean.toLp mean⟫_ℝ = ∫ x, g x * mean x ∂μ := by
                    rw [L2.inner_def]
                    apply integral_congr_ae
                    filter_upwards [hmean.coeFn_toLp] with x hx
                    rw [hx]
                    simp only [RCLike.inner_apply, conj_trivial, K, mul_comm]
                  _ = ∫ x, ∫ w, g x * K w x ∂rho ∂μ := by
                    apply integral_congr_ae
                    exact ae_of_all _ fun x => (integral_const_mul (g x) (fun w : U => K w x)).symm
                  _ = ∫ w, ∫ x, g x * K w x ∂μ ∂rho := (integral_integral_swap hHint).symm
                  _ = ∫ w, ⟪g,F w⟫_ℝ ∂rho := integral_congr_ae (ae_of_all _ fun w => (hin w).symm)
                  _ = ⟪g,∫ w, F w ∂rho⟫_ℝ := integral_inner hFint g
              
              end AutoSamplingTheory.TechnicalLemmas.Probability.GaussianPolynomialAveraging

              Exact module and namespace context

              Source assumptions versus formal assumptions

              SourceActual LeanDifference kindWhy it matters
              Under the same finite-dimensional real inner-product, Borel and finite-polynomial assumptions, let Φ(w) be the actual L² class of x↦p(⟨w,x⟩) under the standard Gaussian γ. The feature membership witnesses are produced together with continuity of Φ. For every probability law ρ on the unit sphere, the scalar feature is genuinely integrable in w for every fixed x, and Φ is genuinely Bochner integrable under ρ. The literal scalar-average function x↦∫p(⟨w,x⟩) dρ(w) belongs to L²(γ), and its actual L² class equals ∫Φ dρ. All membership, measurability and integral-exchange obligations are conclusions of the theorem.The exact adjacent public signature preserves all displayed primitive structures and hypotheses, literal measures/functions, produced integrability and derivative scope.sameMoments, radial domination, representative identities and Fubini are proved inside their respective producer nodes; none is added as a convenience premise.

              Pointwise evaluation is not treated as a continuous functional on L². The proof uses scalar Fubini and actual test-class inner products.; This averaging theorem has no label or risk derivative conclusion. In dimension zero there is no probability law on the empty unit subtype.

              Encoder–denoiser: accepted · equivalent-after-elaboration

              A generalization is not a source correction. Proposed missing conditions require separate independent repair review. No proposed repair silently changes the original theorem.

              Scope and omitted-condition boundaries
              • Pointwise evaluation is not treated as a continuous functional on L². The proof uses scalar Fubini and actual test-class inner products.
              • This averaging theorem has no label or risk derivative conclusion. In dimension zero there is no probability law on the empty unit subtype.
              Sources, dependencies, and reuse

              Source and reuse

              Samplinglib parents called

              Mathlib API called (external library)

              • ProbabilityTheory.IsGaussian.memLp_id
              • Continuous.aestronglyMeasurable
              • MeasureTheory.MemLp.mono'
              • MeasureTheory.integral_integral_swap
              • integral_inner
              • ext_inner_left

              Mathematical sources

              Samplinglib prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

              Which proof obligations and prerequisites are covered?

              • Formalized proof edge; source adapter/review separate Gaussian polynomial features vary continuously in L²
              • Formalized proof edge; source adapter/review separate Scalar feature averages equal their Bochner L² means

              Library supplement: actual Gaussian polynomial ridge moments

              An original shared probability supplement placed beside Gaussian sampling foundations by mathematical topic; not a claim of a new theorem of the primary textbook or a process guarantee.

              Samplinglib original mathematical supplementv1, 2026-10-20 · One actual-law Gaussian polynomial ridge theorem and four mathematical proof steps (historical source) · licensed original

              Complete source statement (Samplinglib restatement)

              The adjacent complete theorem derives polynomial ridge L2 membership and an exact direction-independent norm from actual standard Gaussian and unit-weight inputs. The common positive bound depends on the polynomial alone.

              • E is a finite-dimensional real inner-product normed space; its measurable structure is Borel.
              • p is any finite real polynomial. The Gaussian measures are actual standard Gaussian laws, and feature weights range over the literal unit-norm subtype.

              actual Gaussian projection and ridge isometry

              \[\|\phi(\langle w,\cdot\rangle)\|_{L^2(\gamma_E)}=\|\phi\|_{L^2(\gamma_1)}<b:=\|\phi\|_{L^2(\gamma_1)}+1\quad(\|w\|=1).\]

              Read the formalized proofs

              Each statement and proof below has its own closed Lean disclosure. Samplinglib parents, Mathlib calls and external mathematical sources are distinguished in each proof.

              Samplinglib mathematical lesson

              Polynomial Gaussian ridges have one dimension-independent L2 norm

              AutoSamplingTheory.TechnicalLemmas.Probability.GaussianPolynomialRidge.standard_gaussian_polynomial_ridge_uniform_L2 · theorem · Teaching coverage

              Read this first

              Mathematical statement

              Let E be any finite-dimensional real inner-product normed space with its Borel measurable structure, and p any real polynomial. Put phi(z)=p(z), gamma1=N(0,1), gammaE=stdGaussian(E), and U={w in E: norm(w)=1}. Then phi genuinely belongs to L2(gamma1). Define b=norm(phi)_{L2(gamma1)}+1. One has b>0, and every actual ridge x↦phi(<w,x>) for w in U genuinely belongs to L2(gammaE), with norm exactly norm(phi)_{L2(gamma1)} and hence at most b. The one base norm and the same b serve every direction and dimension. Neither positive dimension, a nonzero polynomial nor evenness is required; the feature conclusions are vacuous when U is empty. No feature moment, covariance or uniform bound is assumed.

              \[\|\phi(\langle w,\cdot\rangle)\|_{L^2(\gamma_E)}=\|\phi\|_{L^2(\gamma_1)}<b:=\|\phi\|_{L^2(\gamma_1)}+1\quad(\|w\|=1).\]
              Lean statement · standard_gaussian_polynomial_ridge_uniform_L2

              Let E be any finite-dimensional real inner-product normed space with its Borel measurable structure, and p any real polynomial. Put phi(z)=p(z), gamma1=N(0,1), gammaE=stdGaussian(E), and U={w in E: norm(w)=1}. Then phi genuinely belongs to L2(gamma1). Define b=norm(phi)_{L2(gamma1)}+1. One has b>0, and every actual ridge x↦phi(<w,x>) for w in U genuinely belongs to L2(gammaE), with norm exactly norm(phi)_{L2(gamma1)} and hence at most b. The one base norm and the same b serve every direction and dimension. Neither positive dimension, a nonzero polynomial nor evenness is required; the feature conclusions are vacuous when U is empty. No feature moment, covariance or uniform bound is assumed.

              Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

              theorem standard_gaussian_polynomial_ridge_uniform_L2
                  {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E]
                  [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E]
                  (p : Polynomial ℝ) :
                  let phi : ℝ → ℝ := fun z => p.eval z
                  ∃ hbase : MemLp phi 2 (ProbabilityTheory.gaussianReal 0 1),
                    let b : ℝ := ‖hbase.toLp phi‖ + 1
                    (0 < b) ∧
                    ∃ hfeature : ∀ w : {w : E // ‖w‖ = 1},
                      MemLp (fun x : E => phi ⟪w.1, x⟫_ℝ) 2 (ProbabilityTheory.stdGaussian E),
                      ∀ w : {w : E // ‖w‖ = 1},
                        ‖(hfeature w).toLp (fun x : E => phi ⟪w.1, x⟫_ℝ)‖ = ‖hbase.toLp phi‖ ∧
                        ‖(hfeature w).toLp (fun x : E => phi ⟪w.1, x⟫_ℝ)‖ ≤ b

              Exact module and namespace context

              Proof roadmap

              1. 1Produce polynomial moments

                The actual scalar Gaussian has every finite moment. Thus z^n belongs to L2 since its squared absolute value is |z|^(2n). Finite polynomial induction, addition and coefficient scaling produce L2 membership of phi; no moment premise is introduced.

              2. 2Identify the actual projection law

                A continuous linear functional of the standard Gaussian is Gaussian with mean zero and variance equal to its squared dual norm. The inner-product functional at a unit vector has norm one, so the pushforward is exactly gamma1.

              3. 3Transport the genuine L2 class

                This measurable projection preserves the indicated measures. Pull back phi and its actual almost-everywhere class. The induced L2 pullback is an isometry, proving membership and equality of norms simultaneously.

              4. 4Choose one positive common bound

                A norm is nonnegative, so adding one makes b strictly positive. The exact isometry gives the same bound for every unit weight, with no dimension or direction in its definition.

              Full assumptions and notation

              All objects and hypotheses

              • E is a finite-dimensional real inner-product normed space; its measurable structure is Borel.
              • p is any finite real polynomial. The Gaussian measures are actual standard Gaussian laws, and feature weights range over the literal unit-norm subtype.

              Mathematical proof

              1. Produce polynomial moments

              The actual scalar Gaussian has every finite moment. Thus z^n belongs to L2 since its squared absolute value is |z|^(2n). Finite polynomial induction, addition and coefficient scaling produce L2 membership of phi; no moment premise is introduced.

              \[\int |z^n|^2\,d\gamma_1(z)=\int |z|^{2n}\,d\gamma_1(z)<\infty.\]
              Corresponding Lean step

              The adjacent initially folded Lean contains the exact statement and proof of this step.

              2. Identify the actual projection law

              A continuous linear functional of the standard Gaussian is Gaussian with mean zero and variance equal to its squared dual norm. The inner-product functional at a unit vector has norm one, so the pushforward is exactly gamma1.

              \[(x\mapsto\langle w,x\rangle)_\#\gamma_E=\gamma_1\quad(\|w\|=1).\]
              Corresponding Lean step

              The adjacent initially folded Lean contains the exact statement and proof of this step.

              3. Transport the genuine L2 class

              This measurable projection preserves the indicated measures. Pull back phi and its actual almost-everywhere class. The induced L2 pullback is an isometry, proving membership and equality of norms simultaneously.

              \[\|\phi(\langle w,\cdot\rangle)\|_{L^2(\gamma_E)}=\|\phi\|_{L^2(\gamma_1)}.\]
              Corresponding Lean step

              The adjacent initially folded Lean contains the exact statement and proof of this step.

              4. Choose one positive common bound

              A norm is nonnegative, so adding one makes b strictly positive. The exact isometry gives the same bound for every unit weight, with no dimension or direction in its definition.

              \[b=\|\phi\|_{L^2(\gamma_1)}+1\ge1>0.\]
              Corresponding Lean step

              The adjacent initially folded Lean contains the exact statement and proof of this step.

              Lean verification

              The exact proof begins folded immediately after the mathematical argument; the statement is folded beside the claim above.

              Lean proof · standard_gaussian_polynomial_ridge_uniform_L2

              See the adjacent exact Lean and the four mathematical proof steps.

              Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

              Download module (.lean)
              theorem standard_gaussian_polynomial_ridge_uniform_L2
                  {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E]
                  [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E]
                  (p : Polynomial ℝ) :
                  let phi : ℝ → ℝ := fun z => p.eval z
                  ∃ hbase : MemLp phi 2 (ProbabilityTheory.gaussianReal 0 1),
                    let b : ℝ := ‖hbase.toLp phi‖ + 1
                    (0 < b) ∧
                    ∃ hfeature : ∀ w : {w : E // ‖w‖ = 1},
                      MemLp (fun x : E => phi ⟪w.1, x⟫_ℝ) 2 (ProbabilityTheory.stdGaussian E),
                      ∀ w : {w : E // ‖w‖ = 1},
                        ‖(hfeature w).toLp (fun x : E => phi ⟪w.1, x⟫_ℝ)‖ = ‖hbase.toLp phi‖ ∧
                        ‖(hfeature w).toLp (fun x : E => phi ⟪w.1, x⟫_ℝ)‖ ≤ b := by
                let phi : ℝ → ℝ := fun z => p.eval z
                have hpow : ∀ n : ℕ,
                    MemLp (fun z : ℝ => z ^ n) 2 (gaussianReal 0 1) := by
                  intro n
                  apply (memLp_two_iff_integrable_sq (by fun_prop)).2
                  have hid : MemLp (id : ℝ → ℝ) (↑(2 * n) : ℝ≥0∞) (gaussianReal 0 1) :=
                    memLp_id_gaussianReal' (↑(2 * n) : ℝ≥0∞) (ENNReal.natCast_ne_top (2 * n))
                  have hi := hid.integrable_norm_pow' (p := 2 * n)
                  convert hi using 1
                  funext z
                  change (z ^ n) ^ 2 = ‖z‖ ^ (2 * n)
                  rw [Nat.mul_comm 2 n, pow_mul, ← norm_pow, Real.norm_eq_abs, sq_abs]
                have hbase : MemLp phi 2 (gaussianReal 0 1) := by
                  change MemLp (fun z : ℝ => p.eval z) 2 (gaussianReal 0 1)
                  induction p using Polynomial.induction_on' with
                  | add p q hp hq => simpa only [Polynomial.eval_add, Pi.add_def] using hp.add hq
                  | monomial n a => simpa only [Polynomial.eval_monomial] using (hpow n).const_mul a
                have hmap : ∀ w : {w : E // ‖w‖ = 1},
                    (stdGaussian E).map (fun x : E => ⟪w.1, x⟫_ℝ) = gaussianReal 0 1 := by
                  intro w
                  change (stdGaussian E).map (innerSL ℝ w.1) = _
                  rw [IsGaussian.map_eq_gaussianReal, integral_strongDual_stdGaussian,
                    variance_dual_stdGaussian, innerSL_apply_norm, w.2]
                  norm_num
                let mp : ∀ w : {w : E // ‖w‖ = 1},
                    MeasurePreserving (fun x : E => ⟪w.1, x⟫_ℝ) (stdGaussian E) (gaussianReal 0 1) :=
                  fun w => ⟨by fun_prop, hmap w⟩
                let hfeature : ∀ w : {w : E // ‖w‖ = 1},
                    MemLp (fun x : E => phi ⟪w.1, x⟫_ℝ) 2 (stdGaussian E) :=
                  fun w => hbase.comp_measurePreserving (mp w)
                refine ⟨hbase, ?_, hfeature, ?_⟩
                · exact add_pos_of_nonneg_of_pos (norm_nonneg _) zero_lt_one
                · intro w
                  have hn : ‖(hfeature w).toLp (fun x : E => phi ⟪w.1, x⟫_ℝ)‖ = ‖hbase.toLp phi‖ := by
                    change ‖Lp.compMeasurePreserving (fun x : E => ⟪w.1, x⟫_ℝ) (mp w)
                      (hbase.toLp phi)‖ = ‖hbase.toLp phi‖
                    exact Lp.norm_compMeasurePreserving _ _
                  exact ⟨hn, hn.trans_le (le_add_of_nonneg_right zero_le_one)⟩
              
              end AutoSamplingTheory.TechnicalLemmas.Probability.GaussianPolynomialRidge

              Exact module and namespace context

              Source assumptions versus formal assumptions

              SourceActual LeanDifference kindWhy it matters
              Let E be any finite-dimensional real inner-product normed space with its Borel measurable structure, and p any real polynomial. Put phi(z)=p(z), gamma1=N(0,1), gammaE=stdGaussian(E), and U={w in E: norm(w)=1}. Then phi genuinely belongs to L2(gamma1). Define b=norm(phi)_{L2(gamma1)}+1. One has b>0, and every actual ridge x↦phi(<w,x>) for w in U genuinely belongs to L2(gammaE), with norm exactly norm(phi)_{L2(gamma1)} and hence at most b. The one base norm and the same b serve every direction and dimension. Neither positive dimension, a nonzero polynomial nor evenness is required; the feature conclusions are vacuous when U is empty. No feature moment, covariance or uniform bound is assumed.The full adjacent signature has exactly the displayed actual Gaussian measures, finite-dimensional real Hilbert/Borel structure, finite polynomial and unit-weight subtype. L2 membership, equality and the bound are conclusions.sameNo feature moment or bound producer is turned into a premise. No nonzero polynomial or positive-dimension restriction is added.

              The Gaussian law and unit norm are essential. This is not a theorem for arbitrary rotation-invariant heavy-tailed laws or unbounded directions.; No pointwise feature bound is claimed. No label moment, averaging over arbitrary parameter laws, global risk first variation or stochastic convergence is supplied.

              Encoder–denoiser: accepted · equivalent-after-elaboration

              A generalization is not a source correction. Proposed missing conditions require separate independent repair review. No proposed repair silently changes the original theorem.

              Scope and omitted-condition boundaries
              • The Gaussian law and unit norm are essential. This is not a theorem for arbitrary rotation-invariant heavy-tailed laws or unbounded directions.
              • No pointwise feature bound is claimed. No label moment, averaging over arbitrary parameter laws, global risk first variation or stochastic convergence is supplied.
              Sources, dependencies, and reuse

              Source and reuse

              Samplinglib parents called

                Mathlib API called (external library)

                • memLp_id_gaussianReal'
                • MemLp.integrable_norm_pow'
                • Polynomial.induction_on'
                • IsGaussian.map_eq_gaussianReal
                • integral_strongDual_stdGaussian
                • variance_dual_stdGaussian
                • Lp.norm_compMeasurePreserving

                Mathematical sources

                Samplinglib prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

                Which proof obligations and prerequisites are covered?

                • Formalized proof edge; source adapter/review separate Polynomial Gaussian ridges have one dimension-independent L2 norm
                Research extensions using this background

                Reading-context links, not additional source-book results or proof dependencies.