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

SPHMC M-kappa phase metric and moment adapter

Fan Chen, Sinho Chewi, Jianfeng Lu and Matthew S. Zhang. ASTIS supplies explicit comparison constants and the omitted near-optimal-coupling details.

arXiv:2609.06906v1 · M-kappa display before Theorem 4.5; Lemma D.4 proof · faithful paraphrase

Complete source statement (Samplinglib restatement)

The paper's exact twisted phase transport cost controls ordinary phase transport and therefore transfers reference position/momentum moments to an incoming law.

  • Real inner-product phase space.
  • kappa>=1.
  • Explicit reference second moments for the final adapter.

Twisted form

\[q_\kappa(x,p)=(\frac1{2\kappa}+\frac12)\|x\|^2+\langle x,p\rangle+\|p\|^2.\]

Transport comparison

\[W_2^2\le6 W_{2,M_\kappa}^2.\]

Moment adapter

\[\mathbb E[\|X-x_\star\|^2+\|P\|^2]\le2(M_X+M_P)+24r^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 exact SPHMC M-kappa phase cost

AutoSamplingTheory.ExampleCases.SmoothedPicardHMC.PhaseMetric.phaseCost · def · Teaching coverage

Read this first

Mathematical statement

The cost between two phase points is the nonnegative-real embedding of their M-kappa quadratic displacement.

\[c_\kappa(z,z')=\operatorname{ofReal}\!\left[(\frac1{2\kappa}+\frac12)\|\Delta x\|^2+\langle\Delta x,\Delta p\rangle+\|\Delta p\|^2\right].\]
Lean statement · phaseCost

The definition is total for all real kappa; later comparison theorems assume kappa>=1.

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 phaseCost (kappa : ℝ) : (E × E) × (E × E) → ℝ≥0∞

Exact module and namespace context

Proof roadmap

  1. 1Expand the block matrix

    The two off-diagonal one-half blocks combine into one real inner product.

Full assumptions and notation

All objects and hypotheses

  • E is a real inner-product normed additive group.
  • kappa is a real parameter; positivity is imposed by later theorems.

Construction and meaning

1. Expand the block matrix

The two off-diagonal one-half blocks combine into one real inner product.

\[2(\tfrac12)\langle\Delta x,\Delta p\rangle=\langle\Delta x,\Delta p\rangle.\]
Corresponding Lean step

The private real quadratic form is embedded with ENNReal.ofReal.

Lean verification

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

Lean construction · phaseCost

Definitional expansion of the paper matrix.

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 phaseCost (kappa : ℝ) : (E × E) × (E × E) → ℝ≥0∞ :=
  fun z => ENNReal.ofReal (phaseQuadraticForm kappa (z.1 - z.2))

Exact module and namespace context

Source assumptions versus formal assumptions

SourceActual LeanDifference kindWhy it matters
The paper gives a positive matrix for kappa>=1.The definition is total; positivity is proved only under kappa>=1 in the consumer module proof.sameSeparating a total definition from its valid parameter domain avoids hidden partiality.

Point cost only.

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
  • A pointwise extended-nonnegative cost only; no metric-space instance, contraction or transport estimate is asserted.
Sources, dependencies, and reuse

Source and reuse

Samplinglib parents called

    Mathlib API called (external library)

    • ENNReal.ofReal
    • inner

    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

    Squared Wasserstein cost in the M-kappa geometry

    AutoSamplingTheory.ExampleCases.SmoothedPicardHMC.PhaseMetric.phaseWassersteinSq · def · Teaching coverage

    Read this first

    Mathematical statement

    Take the infimum of the exact M-kappa cost over all couplings.

    \[W_{2,M_\kappa}^2(\mu,\nu)=\inf_{\gamma\in\Gamma(\mu,\nu)}\int c_\kappa\,d\gamma.\]
    Lean statement · phaseWassersteinSq

    The value is ENNReal and therefore retains infinite costs.

    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 phaseWassersteinSq [MeasurableSpace E] (kappa : ℝ)
        (mu nu : Measure (E × E)) : ℝ≥0∞

    Exact module and namespace context

    Proof roadmap

    1. 1Reuse the canonical transport infimum

      No second Wasserstein implementation is introduced.

    Full assumptions and notation

    All objects and hypotheses

    • The phase space carries the product measurable structure.

    Construction and meaning

    1. Reuse the canonical transport infimum

    No second Wasserstein implementation is introduced.

    \[W_{2,M_\kappa}^2=\mathsf{transportCost}(c_\kappa).\]
    Corresponding Lean step

    Transport.transportCost.

    Lean verification

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

    Lean construction · phaseWassersteinSq

    Definition by the shared Kantorovich API.

    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 phaseWassersteinSq [MeasurableSpace E] (kappa : ℝ)
        (mu nu : Measure (E × E)) : ℝ≥0∞ :=
      Transport.transportCost (phaseCost (E := E) kappa) mu nu

    Exact module and namespace context

    Source assumptions versus formal assumptions

    SourceActual LeanDifference kindWhy it matters
    The paper writes W_{2,M_kappa}.ASTIS stores its square directly as an ENNReal Kantorovich value.sameThe paper consumers use the squared quantity; ENNReal preserves infinite costs.

    Raw squared transport infimum; no optimizer.

    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
    • Raw Kantorovich infimum; optimizer existence is not included.
    Sources, dependencies, and reuse

    Source and reuse

    Samplinglib parents called

    Mathlib API called (external library)

    No direct Mathlib call recorded; see the Samplinglib parents.

    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

    M-kappa transport controls ordinary phase transport

    AutoSamplingTheory.ExampleCases.SmoothedPicardHMC.PhaseMetric.wassersteinDistance_sq_le_phaseWassersteinSq · theorem · Teaching coverage

    Read this first

    Mathematical statement

    Ordinary squared Wasserstein distance is at most six times the M-kappa squared transport value.

    \[W_2^2(\mu,\nu)\le6W_{2,M_\kappa}^2(\mu,\nu).\]
    Lean statement · wassersteinDistance_sq_le_phaseWassersteinSq

    The ENNReal conclusion includes infinite-cost laws without a separate branch in the statement.

    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 wassersteinDistance_sq_le_phaseWassersteinSq
        [MeasurableSpace E] [BorelSpace E] [SecondCountableTopology E]
        {kappa : ℝ} (hkappa : 1 ≤ kappa) (mu nu : Measure (E × E)) :
        WassersteinSpace.wassersteinDistance mu nu ^ 2 ≤
          ENNReal.ofReal 6 * phaseWassersteinSq kappa mu nu

    Exact module and namespace context

    Proof roadmap

    1. 1Lower-bound the twisted form

      Cauchy--Schwarz and a completed square absorb the cross term without losing kappa.

    2. 2Compare each coupling

      The product max norm is bounded by the Euclidean sum of coordinate squares.

    3. 3Remove near-optimal excess

      Choose a twisted coupling within delta of the infimum and let delta vanish; no optimizer is assumed.

    Full assumptions and notation

    All objects and hypotheses

    • kappa≥1.
    • The two laws are arbitrary measures on phase space.

    Mathematical proof

    1. Lower-bound the twisted form

    Cauchy--Schwarz and a completed square absorb the cross term without losing kappa.

    \[q_\kappa(x,p)\ge\frac16(\|x\|^2+\|p\|^2).\]
    Corresponding Lean step

    Private ordinary_energy_le_phaseQuadraticForm.

    2. Compare each coupling

    The product max norm is bounded by the Euclidean sum of coordinate squares.

    \[\|z-z'\|_{\max}^2\le6q_\kappa(z-z').\]
    Corresponding Lean step

    lintegral_mono and lintegral_const_mul.

    3. Remove near-optimal excess

    Choose a twisted coupling within delta of the infimum and let delta vanish; no optimizer is assumed.

    \[\forall\varepsilon>0,\ W_2^2\le6W_{2,M_\kappa}^2+\varepsilon.\]
    Corresponding Lean step

    exists_isCoupling_lintegral_lt_of_transportCost_lt and ENNReal.le_of_forall_pos_le_add.

    Lean verification

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

    Lean proof · wassersteinDistance_sq_le_phaseWassersteinSq

    Pointwise quadratic comparison, monotone integration, near-optimal coupling, epsilon closure.

    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 wassersteinDistance_sq_le_phaseWassersteinSq
        [MeasurableSpace E] [BorelSpace E] [SecondCountableTopology E]
        {kappa : ℝ} (hkappa : 1 ≤ kappa) (mu nu : Measure (E × E)) :
        WassersteinSpace.wassersteinDistance mu nu ^ 2 ≤
          ENNReal.ofReal 6 * phaseWassersteinSq kappa mu nu := by
      rw [WassersteinSpace.wassersteinDistance_sq]
      apply ENNReal.le_of_forall_pos_le_add
      intro epsilon hepsilon hfinite
      let A : ℝ≥0∞ := ENNReal.ofReal 6
      let C : ℝ≥0∞ := phaseWassersteinSq kappa mu nu
      have hA0 : A ≠ 0 := by
        simp [A]
      have hAtop : A ≠ ⊤ := ENNReal.ofReal_ne_top
      have hCtop : C < ⊤ := by
        rcases ENNReal.mul_lt_top_iff.mp hfinite with h | h | h
        · exact h.2
        · exact (hA0 h).elim
        · simpa [C, h]
      let delta : ℝ≥0∞ := (epsilon : ℝ≥0∞) / A
      have hdelta0 : delta ≠ 0 := by
        have hepsilon0 : (epsilon : ℝ≥0∞) ≠ 0 := by exact_mod_cast hepsilon.ne'
        exact (ENNReal.div_pos hepsilon0 hAtop).ne'
      have hstrict : C < C + delta :=
        ENNReal.lt_add_right hCtop.ne hdelta0
      obtain ⟨gamma, hgamma, hgammaCost⟩ :=
        Transport.exists_isCoupling_lintegral_lt_of_transportCost_lt
          (phaseCost (E := E) kappa) mu nu hstrict
      have hphaseMeas : Measurable (phaseCost (E := E) kappa) := by
        unfold phaseCost phaseQuadraticForm
        fun_prop
      calc
        Transport.transportCost (WassersteinSpace.quadraticCost (E := E × E)) mu nu ≤
            ∫⁻ z, WassersteinSpace.quadraticCost (E := E × E) z ∂gamma :=
          Transport.transportCost_le_lintegral_of_isCoupling _ mu nu gamma hgamma
        _ ≤ ∫⁻ z, A * phaseCost (E := E) kappa z ∂gamma := by
          apply lintegral_mono
          intro z
          exact quadraticCost_le_phaseCost hkappa z
        _ = A * ∫⁻ z, phaseCost (E := E) kappa z ∂gamma := by
          exact lintegral_const_mul _ hphaseMeas
        _ ≤ A * (C + delta) := by
          gcongr
        _ = A * C + (epsilon : ℝ≥0∞) := by
          rw [mul_add, show A * delta = (epsilon : ℝ≥0∞) by
            exact ENNReal.mul_div_cancel hA0 hAtop]
        _ = ENNReal.ofReal 6 * phaseWassersteinSq kappa mu nu +
            (epsilon : ℝ≥0∞) := rfl

    Exact module and namespace context

    Source assumptions versus formal assumptions

    SourceActual LeanDifference kindWhy it matters
    The paper says the norms are uniformly equivalent.ASTIS proves the explicit kappa-uniform one-way constant 6 needed by Lemma D.4.source-implicitThe constant follows from the displayed matrix by Cauchy--Schwarz and a completed square.
    Finite-dimensional Euclidean optimal couplings are available.The proof uses near-optimal couplings and arbitrary measures.generalizationAttainment is unnecessary for the inequality.

    One-way explicit comparison only; no D.3.

    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
    • One-way comparison with explicit kappa-uniform factor 6; no contraction or (D.3).
    Sources, dependencies, and reuse

    Source and reuse

    Samplinglib parents called

    Mathlib API called (external library)

    • abs_real_inner_le_norm
    • ENNReal.le_of_forall_pos_le_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.

    Samplinglib mathematical lesson

    Twisted SPHMC transport gives the phase-state second moment

    AutoSamplingTheory.ExampleCases.SmoothedPicardHMC.PhaseMetric.phase_state_second_moment_of_phaseWasserstein · theorem · Teaching coverage

    Read this first

    Mathematical statement

    The incoming phase energy is integrable and bounded by 2(Mx+Mp)+24r^2.

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

    All reference integrability and moment assumptions remain visible.

    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_phaseWasserstein
        [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E]
        (nu reference : Measure (E × E)) (xstar : E) {kappa r Mx Mp : ℝ}
        (hkappa : 1 ≤ kappa)
        (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 : phaseWassersteinSq kappa nu reference ≤ 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) + 24 * r ^ 2

    Exact module and namespace context

    Proof roadmap

    1. 1Convert the radius

      The uniform metric comparison gives the ordinary radius sqrt(6)|r|.

    2. 2Reuse the compiled coordinate theorem

      The earlier theorem proves both integrability and the ordinary-Wasserstein moment estimate.

    3. 3Normalize the constant

      Expand the square to obtain the explicit final factor.

    Full assumptions and notation

    All objects and hypotheses

    • kappa≥1.
    • Reference position and momentum squares are integrable and bounded by Mx,Mp.
    • The incoming law has M-kappa squared transport radius at most r^2.

    Mathematical proof

    1. Convert the radius

    The uniform metric comparison gives the ordinary radius sqrt(6)|r|.

    \[W_2^2\le6r^2=(\sqrt6\,r)^2.\]
    Corresponding Lean step

    wassersteinDistance_sq_le_phaseWassersteinSq and Real.sq_sqrt.

    2. Reuse the compiled coordinate theorem

    The earlier theorem proves both integrability and the ordinary-Wasserstein moment estimate.

    \[I\le2(M_X+M_P)+4(\sqrt6r)^2.\]
    Corresponding Lean step

    PhaseStateMoment.phase_state_second_moment_of_wasserstein.

    3. Normalize the constant

    Expand the square to obtain the explicit final factor.

    \[4(\sqrt6r)^2=24r^2.\]
    Corresponding Lean step

    Real.sq_sqrt and ring.

    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_phaseWasserstein

    Metric comparison followed by the already audited general moment adapter.

    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_phaseWasserstein
        [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E]
        (nu reference : Measure (E × E)) (xstar : E) {kappa r Mx Mp : ℝ}
        (hkappa : 1 ≤ kappa)
        (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 : phaseWassersteinSq kappa nu reference ≤ 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) + 24 * r ^ 2 := by
      have hsqrt : Real.sqrt 6 ^ 2 = 6 := Real.sq_sqrt (by norm_num)
      have hordinary : WassersteinSpace.wassersteinDistance nu reference ^ 2 ≤
          ENNReal.ofReal ((Real.sqrt 6 * r) ^ 2) := by
        refine (wassersteinDistance_sq_le_phaseWassersteinSq hkappa nu reference).trans ?_
        calc
          ENNReal.ofReal 6 * phaseWassersteinSq kappa nu reference ≤
              ENNReal.ofReal 6 * ENNReal.ofReal (r ^ 2) := by gcongr
          _ = ENNReal.ofReal ((Real.sqrt 6 * r) ^ 2) := by
            rw [← ENNReal.ofReal_mul (by norm_num : (0 : ℝ) ≤ 6)]
            congr 1
            rw [mul_pow, hsqrt]
      have h := PhaseStateMoment.phase_state_second_moment_of_wasserstein
        nu reference xstar hX hP hXbound hPbound hordinary
      refine ⟨h.1, h.2.trans_eq ?_⟩
      rw [mul_pow, hsqrt]
      ring
    
    end
    
    end AutoSamplingTheory.ExampleCases.SmoothedPicardHMC.PhaseMetric

    Exact module and namespace context

    Source assumptions versus formal assumptions

    SourceActual LeanDifference kindWhy it matters
    The stationary phase law and Lemma 4.16 supply moments in the paper.Reference integrability and bounds Mx,Mp are explicit premises.source-implicitThis theorem isolates the metric step from stationary-law construction.

    Metric/moment adapter only; D.3, history, D.7, D.8 and main theorems remain open.

    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
    • Consumes a twisted transport bound; does not prove the paper's (D.3), history estimate, D.7 or D.8.
    Sources, dependencies, and reuse

    Source and reuse

    Samplinglib parents called

    Mathlib API called (external library)

    • Real.sq_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.

    Which proof obligations and prerequisites are covered?

    • TODO — not closed by these contributions Exact M-kappa point cost
    • TODO — not closed by these contributions Twisted Kantorovich value
    • TODO — not closed by these contributions Explicit ordinary/twisted transport comparison
    • TODO — not closed by these contributions Twisted-transport phase-state moment
    • TODO — not closed by these contributions Equation (D.3) actual phase history (remaining)
    • TODO — not closed by these contributions All actual query-center moments (remaining)
    • TODO — not closed by these contributions Total expected gradient cost (remaining)