Samplinglib
Lean gate not recorded for this source state main · 9bb7a7394ab0

SPHMC Wasserstein-to-phase-state second moment

Fan Chen, Sinho Chewi, Jianfeng Lu and Matthew S. Zhang. Samplinglib expands the standard coupling/integrability step; this is not the authors' wording or a complete Lemma D.4 claim.

arXiv:2609.06906v1 · Lemma D.4 proof, PDF page 56; equation (D.3) and Lemma 4.16 · faithful paraphrase

Complete source statement (Samplinglib restatement)

A quadratic Wasserstein estimate transfers reference phase-coordinate second moments to the incoming law; the current compiled adapter uses the ordinary product metric and keeps the paper's M_kappa comparison open.

  • Lipschitz observable with an integrable reference second moment.
  • Finite ordinary squared Wasserstein radius stated using Samplinglib's ENNReal W2.
  • For the phase adapter, separate reference position and momentum moments.

Shared transfer

\[W_2^2(\mu,\nu)\le r^2\Rightarrow \mathbb E_\mu\|g\|^2\le2\mathbb E_\nu\|g\|^2+2\operatorname{Lip}(g)^2r^2.\]

Phase adapter

\[\mathbb E[\|X-x_\star\|^2+\|P\|^2]\le2(M_X+M_P)+4r^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

Wasserstein distance transfers a Lipschitz observable's second moment

AutoSamplingTheory.TechnicalLemmas.Measure.WassersteinLipschitzMoment.of_wassersteinDistance_sq_le · theorem · Teaching coverage

Read this first

Mathematical statement

The observable remains square-integrable under μ, and its μ second moment is bounded by twice its reference second moment plus 2b²r².

\[W_2^2(\mu,\nu)\le r^2\Longrightarrow \int\|g\|^2d\mu\le 2\int\|g\|^2d\nu+2b^2r^2.\]
Lean statement · of_wassersteinDistance_sq_le

The statement explicitly returns Integrable before its real-valued integral 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.

theorem of_wassersteinDistance_sq_le {mu nu : Measure E}
    {g : E → F} {b : ℝ≥0} {r : ℝ} (hg : LipschitzWith b g)
    (hi : Integrable (fun x => ‖g x‖ ^ 2) nu)
    (hw : WassersteinSpace.wassersteinDistance mu nu ^ 2 ≤ ENNReal.ofReal (r ^ 2)) :
    Integrable (fun x => ‖g x‖ ^ 2) mu ∧
      (∫ x, ‖g x‖ ^ 2 ∂mu) ≤
        2 * (∫ x, ‖g x‖ ^ 2 ∂nu) + 2 * (b : ℝ) ^ 2 * r ^ 2

Exact module and namespace context

Proof roadmap

  1. 1Choose an almost-optimal coupling

    For every s>r², the definition of transport cost supplies a coupling whose quadratic cost is below s. Optimal-plan existence is unnecessary.

  2. 2Dominate the transported observable

    Lipschitz continuity and the quadratic two-term inequality control the first-coordinate observable by an integrable reference term plus coupling displacement.

  3. 3Use the exact marginals

    The coordinate projections of γ preserve μ and ν, so the two coupling integrals are exactly the desired marginal moments.

  4. 4Remove the excess cost

    The bound holds for every s>r². Applying it at a controlled positive excess and letting that excess be arbitrary gives the closed r² bound.

Full assumptions and notation

All objects and hypotheses

  • E is a second-countable Borel normed additive group and F is a normed additive group.
  • g:E→F is b-Lipschitz and its squared norm is integrable under the reference law ν.
  • The squared extended-real Wasserstein distance from μ to ν is at most ofReal(r²).

Mathematical proof

1. Choose an almost-optimal coupling

For every s>r², the definition of transport cost supplies a coupling whose quadratic cost is below s. Optimal-plan existence is unnecessary.

\[\exists\gamma\in\Gamma(\mu,\nu):\int\|x-y\|^2d\gamma\le s.\]
Corresponding Lean step

wassersteinDistance_sq and exists_isCoupling_lintegral_lt_of_transportCost_lt.

2. Dominate the transported observable

Lipschitz continuity and the quadratic two-term inequality control the first-coordinate observable by an integrable reference term plus coupling displacement.

\[\|g(x)\|^2\le2\|g(y)\|^2+2b^2\|x-y\|^2.\]
Corresponding Lean step

The private pointwise bound and Integrable.mono' establish integrability before integral comparison.

3. Use the exact marginals

The coordinate projections of γ preserve μ and ν, so the two coupling integrals are exactly the desired marginal moments.

\[(\mathrm{fst})_\#\gamma=\mu,\quad(\mathrm{snd})_\#\gamma=\nu.\]
Corresponding Lean step

CouplingQuadraticIntegrability.measurePreserving_fst/snd_of_isCoupling.

4. Remove the excess cost

The bound holds for every s>r². Applying it at a controlled positive excess and letting that excess be arbitrary gives the closed r² bound.

\[\forall\varepsilon>0,\ I_\mu\le2I_\nu+2b^2r^2+\varepsilon.\]
Corresponding Lean step

le_of_forall_pos_le_add and real algebra close the infimum argument.

Lean verification

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

Lean proof · of_wassersteinDistance_sq_le

Approximate coupling, pointwise quadratic domination, marginal pushforward identities, then an epsilon closure argument.

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 of_wassersteinDistance_sq_le {mu nu : Measure E}
    {g : E → F} {b : ℝ≥0} {r : ℝ} (hg : LipschitzWith b g)
    (hi : Integrable (fun x => ‖g x‖ ^ 2) nu)
    (hw : WassersteinSpace.wassersteinDistance mu nu ^ 2 ≤ ENNReal.ofReal (r ^ 2)) :
    Integrable (fun x => ‖g x‖ ^ 2) mu ∧
      (∫ x, ‖g x‖ ^ 2 ∂mu) ≤
        2 * (∫ x, ‖g x‖ ^ 2 ∂nu) + 2 * (b : ℝ) ^ 2 * r ^ 2 := by
  have hall (s : ℝ) (hs : r ^ 2 < s) :
      Integrable (fun x => ‖g x‖ ^ 2) mu ∧
        (∫ x, ‖g x‖ ^ 2 ∂mu) ≤
          2 * (∫ x, ‖g x‖ ^ 2 ∂nu) + 2 * (b : ℝ) ^ 2 * s := by
    have hs0 : 0 < s := (sq_nonneg r).trans_lt hs
    have hcost : Transport.transportCost
        (WassersteinSpace.quadraticCost (E := E)) mu nu < ENNReal.ofReal s := by
      rw [← WassersteinSpace.wassersteinDistance_sq]
      exact hw.trans_lt ((ENNReal.ofReal_lt_ofReal_iff hs0).2 hs)
    obtain ⟨gamma, hgamma, hgammaCost⟩ :=
      Transport.exists_isCoupling_lintegral_lt_of_transportCost_lt
        (WassersteinSpace.quadraticCost (E := E)) mu nu hcost
    exact of_isCoupling hg hi hgamma hs0.le hgammaCost.le
  refine ⟨(hall (r ^ 2 + 1) (by linarith)).1, ?_⟩
  apply le_of_forall_pos_le_add
  intro epsilon hepsilon
  have hden : 0 < 2 * (b : ℝ) ^ 2 + 1 := by positivity
  have hdelta : 0 < epsilon / (2 * (b : ℝ) ^ 2 + 1) := div_pos hepsilon hden
  have hbound := (hall (r ^ 2 + epsilon / (2 * (b : ℝ) ^ 2 + 1)) (by linarith)).2
  have heq := div_mul_cancel₀ epsilon hden.ne'
  nlinarith

end

end AutoSamplingTheory.TechnicalLemmas.Measure.WassersteinLipschitzMoment

Exact module and namespace context

Source assumptions versus formal assumptions

SourceActual LeanDifference kindWhy it matters
Lemma D.4 uses Wasserstein control to infer second moments without isolating a theorem.The observable is explicitly b-Lipschitz and square-integrable under the reference measure; integrability under the transported measure is a conclusion.source-implicitReal integral inequalities require the involved moments to be integrable.
The paper can appeal to optimal couplings in finite-dimensional Euclidean space.The proof uses arbitrarily near-optimal couplings and therefore does not assume attainment.generalizationThis weakens the proof infrastructure without changing the bound.

Ordinary quadratic W2 and one observable only; no optimal coupling, twisted metric or SPHMC history.

Encoder–denoiser: source-reviewed · equivalent-after-elaboration

Detected semantic differences

  • domains: The theorem covers arbitrary measures; expectation notation on the site must be read as an unnormalised integral outside probability measures. — Independent source review classification: domain-clarification; nonblocking.
  • quantifiers: The real parameter r may be negative, but only r squared occurs. — Independent source review classification: notation-resolution; nonblocking.
  • scopes: This theorem does not establish the paper's M_kappa metric comparison. — Independent source review classification: scope-boundary; nonblocking.

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
  • Ordinary quadratic Wasserstein cost only. No optimal coupling, twisted metric, probability normalization, phase history or SPHMC convergence theorem is asserted.
Sources, dependencies, and reuse

Source and reuse

Samplinglib parents called

Mathlib API called (external library)

  • MeasureTheory.integrable_toReal_of_lintegral_ne_top
  • MeasureTheory.integral_map
  • MeasureTheory.integral_mono

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

Ordinary-Wasserstein control gives an SPHMC phase-state moment

AutoSamplingTheory.ExampleCases.SmoothedPicardHMC.PhaseStateMoment.phase_state_second_moment_of_wasserstein · theorem · Teaching coverage

Read this first

Mathematical statement

The incoming phase energy is integrable and at most 2(Mx+Mp)+4r².

\[\mathbb E_\nu[\|X-x_\star\|^2+\|P\|^2]\le2(M_X+M_P)+4r^2.\]
Lean statement · phase_state_second_moment_of_wasserstein

The metric and every reference moment premise are visible; no stationary-law or history premise is hidden.

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 phase_state_second_moment_of_wasserstein
    (nu reference : Measure (E × E)) (xstar : E) {r Mx Mp : ℝ}
    (hX : Integrable (fun z : E × E => ‖z.1 - xstar‖ ^ 2) reference)
    (hP : Integrable (fun z : E × E => ‖z.2‖ ^ 2) reference)
    (hXbound : (∫ z : E × E, ‖z.1 - xstar‖ ^ 2 ∂reference) ≤ Mx)
    (hPbound : (∫ z : E × E, ‖z.2‖ ^ 2 ∂reference) ≤ Mp)
    (hW : WassersteinSpace.wassersteinDistance nu reference ^ 2 ≤
      ENNReal.ofReal (r ^ 2)) :
    Integrable (fun z : E × E => ‖z.1 - xstar‖ ^ 2 + ‖z.2‖ ^ 2) nu ∧
      (∫ z : E × E, ‖z.1 - xstar‖ ^ 2 + ‖z.2‖ ^ 2 ∂nu) ≤
        2 * (Mx + Mp) + 4 * r ^ 2

Exact module and namespace context

Proof roadmap

  1. 1Position is a one-Lipschitz observable

    For the max product metric, projecting to position and subtracting xstar cannot increase distance.

  2. 2Momentum is a one-Lipschitz observable

    The second product projection is one-Lipschitz for the same metric.

  3. 3Transfer both moments

    Apply the shared theorem independently to position and momentum, preserving both integrability conclusions.

  4. 4Add only after integrability

    Bochner integral additivity is now legal; adding the bounds gives the combined phase energy.

Full assumptions and notation

All objects and hypotheses

  • The reference phase law has integrable position and momentum squares, bounded respectively by Mx and Mp.
  • The incoming law is within ordinary squared W2 radius r² of the reference law.
  • The state space is finite-dimensional real inner-product Borel; completeness is not needed by this theorem.

Mathematical proof

1. Position is a one-Lipschitz observable

For the max product metric, projecting to position and subtracting xstar cannot increase distance.

\[g_X(x,p)=x-x_\star,\quad\operatorname{Lip}(g_X)\le1.\]
Corresponding Lean step

LipschitzWith.of_dist_le_mul and Prod.dist_eq.

2. Momentum is a one-Lipschitz observable

The second product projection is one-Lipschitz for the same metric.

\[g_P(x,p)=p,\quad\operatorname{Lip}(g_P)\le1.\]
Corresponding Lean step

LipschitzWith.prod_snd.

3. Transfer both moments

Apply the shared theorem independently to position and momentum, preserving both integrability conclusions.

\[I_X\le2M_X+2r^2,\qquad I_P\le2M_P+2r^2.\]
Corresponding Lean step

Two calls to of_wassersteinDistance_sq_le.

4. Add only after integrability

Bochner integral additivity is now legal; adding the bounds gives the combined phase energy.

\[I_X+I_P\le2(M_X+M_P)+4r^2.\]
Corresponding Lean step

Integrable.add, integral_add, and linear arithmetic.

Lean verification

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

Lean proof · phase_state_second_moment_of_wasserstein

Instantiate the shared observable theorem with the two phase projections and add the resulting integrable moments.

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 phase_state_second_moment_of_wasserstein
    (nu reference : Measure (E × E)) (xstar : E) {r Mx Mp : ℝ}
    (hX : Integrable (fun z : E × E => ‖z.1 - xstar‖ ^ 2) reference)
    (hP : Integrable (fun z : E × E => ‖z.2‖ ^ 2) reference)
    (hXbound : (∫ z : E × E, ‖z.1 - xstar‖ ^ 2 ∂reference) ≤ Mx)
    (hPbound : (∫ z : E × E, ‖z.2‖ ^ 2 ∂reference) ≤ Mp)
    (hW : WassersteinSpace.wassersteinDistance nu reference ^ 2 ≤
      ENNReal.ofReal (r ^ 2)) :
    Integrable (fun z : E × E => ‖z.1 - xstar‖ ^ 2 + ‖z.2‖ ^ 2) nu ∧
      (∫ z : E × E, ‖z.1 - xstar‖ ^ 2 + ‖z.2‖ ^ 2 ∂nu) ≤
        2 * (Mx + Mp) + 4 * r ^ 2 := by
  have hXlip : LipschitzWith 1 (fun z : E × E => z.1 - xstar) := by
    refine LipschitzWith.of_dist_le_mul ?_
    intro a b
    rw [NNReal.coe_one, one_mul, Prod.dist_eq]
    simpa only [dist_eq_norm, sub_sub_sub_cancel_right] using
      (le_max_left (dist a.1 b.1) (dist a.2 b.2))
  have hPlip : LipschitzWith 1 (fun z : E × E => z.2) :=
    LipschitzWith.prod_snd
  have hXt := WassersteinLipschitzMoment.of_wassersteinDistance_sq_le hXlip hX hW
  have hPt := WassersteinLipschitzMoment.of_wassersteinDistance_sq_le hPlip hP hW
  refine ⟨hXt.1.add hPt.1, ?_⟩
  rw [integral_add hXt.1 hPt.1]
  norm_num at hXt hPt
  linarith

end

end AutoSamplingTheory.ExampleCases.SmoothedPicardHMC.PhaseStateMoment

Exact module and namespace context

Source assumptions versus formal assumptions

SourceActual LeanDifference kindWhy it matters
The paper controls W_{2,M_kappa} and invokes uniform equivalence with Euclidean phase energy.The current theorem assumes Samplinglib's ordinary product-metric W2 bound.unresolvedLean's product norm is max norm; the explicit M_kappa linear metric and comparison constants are the next separate theorem.
The stationary phase law and Lemma 4.16 supply its moments in the paper.Reference position/momentum integrability and bounds Mx,Mp are explicit premises.source-implicitConstructing the smoothed stationary phase law and proving its moments remain independent inputs.

Ordinary product max metric only. No M_kappa comparison, (D.3), run history, complete D.7, D.8 or main theorem.

Encoder–denoiser: source-reviewed · equivalent-after-elaboration

Detected semantic differences

  • domains: The ordinary max-product Wasserstein premise is not the paper's M_kappa premise. — Independent source review classification: scope-boundary; nonblocking.
  • quantifiers: A single arbitrary incoming law is not the constructed phase history or its uniform supremum. — Independent source review classification: scope-boundary; nonblocking.
  • assumptions: Reference-law moment facts are explicit inputs rather than conclusions of this adapter. — Independent source review classification: explicit-elaboration; nonblocking.
  • constant_dependencies: The coefficient 4 belongs to the ordinary-metric adapter and is not claimed as the full paper-level constant. — Independent source review classification: constant-clarification; nonblocking.

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 premise uses Lean's ordinary product max metric, not the paper's M_kappa metric. The theorem does not prove (D.3), a run-history invariant, layer-center moments, (D.7) or (D.8).
Sources, dependencies, and reuse

Source and reuse

Samplinglib parents called

Mathlib API called (external library)

  • LipschitzWith.prod_snd
  • Prod.dist_eq
  • MeasureTheory.integral_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?

  • TODO — not closed by these contributions W2 transfer for Lipschitz observable second moments
  • TODO — not closed by these contributions Ordinary product-metric phase-state moment
  • TODO — not closed by these contributions M_kappa metric definition and norm comparison (remaining)
  • TODO — not closed by these contributions Uniform phase-history law bound from (D.3) (remaining)
  • TODO — not closed by these contributions All actual Picard query-center gradient moments (remaining)