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

PhaseMetric: mathematical reading route

Read the statements and derivations in source order. Every result has its own optional Lean statement and proof. Source assumptions, library reuse and unproved boundaries are kept explicit.

  1. For every real kappa and phase point, define the exact source block-matrix quadratic form Q_kappa
  2. The exact SPHMC M-kappa phase cost
  3. Squared Wasserstein cost in the M-kappa geometry
  4. For every real inner-product E, kappa>=1 and phase point z, the true coordinate energy is bounded by6 times the exact source Q
  5. For every real inner-product E, kappa>=1 and phase point z, the exact source Q is bounded by3/2 times the true coordinate energy
  6. M-kappa transport controls ordinary phase transport
  7. Twisted SPHMC transport gives the phase-state second moment
Samplinglib mathematical lesson

For every real kappa and phase point, define the exact source block-matrix quadratic form Q_kappa

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

Read this first

Mathematical statement

For every real kappa and phase point, define the exact source block-matrix quadratic form Q_kappa. Valid norm use is restricted to kappa≥1 by the compiled comparisons.

\[Q_\kappa(x,p)=\left(\frac1{2\kappa}+\frac12\right)\|x\|^2+\langle x,p\rangle+\|p\|^2.\]
Lean statement · phaseQuadraticForm

For every real kappa and phase point, define the exact source block-matrix quadratic form Q_kappa. Valid norm use is restricted to kappa>=1 by the compiled comparisons.

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 phaseQuadraticForm (kappa : ℝ) (z : E × E) : ℝ

Exact module and namespace context

Proof roadmap

  1. 1Evaluate the source block matrix

    Both off-diagonal entries are1/2, so their sum is the cross inner product. This reuses the existing definition unchanged; public visibility enables the actual numerical contraction consumer.

Full assumptions and notation

All objects and hypotheses

  • Arbitrary real inner-product E, with no finite-dimension or measurability premise. Kappa≥1 for the comparisons; the total definition accepts every real kappa.

Construction and meaning

1. Evaluate the source block matrix

Both off-diagonal entries are1/2, so their sum is the cross inner product. This reuses the existing definition unchanged; public visibility enables the actual numerical contraction consumer.

\[\tfrac12\langle x,p\rangle+\tfrac12\langle p,x\rangle=\langle x,p\rangle.\]
Corresponding Lean step

phaseQuadraticForm

Lean verification

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

Lean construction · phaseQuadraticForm

Exact source form and compiled parent composition, with all source domains/constant absorption and zero cases explicit. Existing Q/comparison proofs unchanged.

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 phaseQuadraticForm (kappa : ℝ) (z : E × E) : ℝ :=
  (1 / (2 * kappa) + 1 / 2) * ‖z.1‖ ^ 2 + inner ℝ z.1 z.2 + ‖z.2‖ ^ 2

Exact module and namespace context

Scope and omitted-condition boundaries
  • Existing source Q/API promotion with unchanged proof, no separate mathematical progress credit. Actual deterministic exact-gradient numerical phase contraction at the explicit normalized C2 curvature interface. Actual f=V_eta smoothing/C2/curvature producer remains independently open. No Khat/Kbar substitution, increment/logLambda/B2, invariant law/local errors/history/query work, PBPS, either full main theorem or actual-input expected-cost composition. TV proximity does not transfer unbounded expected cost.
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

    • SPHMC actual numerical contraction and M_kappa — Existing source Q/API promotion with unchanged proof, no separate mathematical progress credit. Actual deterministic exact-gradient numerical phase contraction at the explicit normalized C2 curvature interface. Actual f=V_eta smoothing/C2/curvature producer remains independently open. No Khat/Kbar substitution, increment/logLambda/B2, invariant law/local errors/history/query work, PBPS, either full main theorem or actual-input expected-cost composition. TV proximity does not transfer unbounded expected cost.

    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 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

    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

      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

      For every real inner-product E, kappa>=1 and phase point z, the true coordinate energy is bounded by6 times the exact source Q

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

      Read this first

      Mathematical statement

      For every real inner-product E, kappa≥1 and phase point z, the true coordinate energy is bounded by6 times the exact source Q.

      \[\|x\|^2+\|p\|^2\le6Q_\kappa(x,p).\]
      Lean statement · ordinary_energy_le_phaseQuadraticForm

      For every real inner-product E, kappa>=1 and phase point z, the true coordinate energy is bounded by6 times the exact source Q.

      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 ordinary_energy_le_phaseQuadraticForm {kappa : ℝ} (hkappa : 1 ≤ kappa)
          (z : E × E) :
          ‖z.1‖ ^ 2 + ‖z.2‖ ^ 2 ≤ 6 * phaseQuadraticForm kappa z

      Exact module and namespace context

      Proof roadmap

      1. 1Use the lower cross-term Cauchy bound

        inner(x,p)≥-||x||||p||. The coefficient1/(2kappa) is nonnegative; expand6Q-energy and use the square(2||x||-3||p||)². The unchanged existing proof gives the uniform constant6, including zero displacement and dimension.

      Full assumptions and notation

      All objects and hypotheses

      • Arbitrary real inner-product E, with no finite-dimension or measurability premise. Kappa≥1 for the comparisons; the total definition accepts every real kappa.

      Mathematical proof

      1. Use the lower cross-term Cauchy bound

      inner(x,p)≥-||x||||p||. The coefficient1/(2kappa) is nonnegative; expand6Q-energy and use the square(2||x||-3||p||)². The unchanged existing proof gives the uniform constant6, including zero displacement and dimension.

      \[\langle x,p\rangle\ge-\|x\|\|p\|,\quad(2\|x\|-3\|p\|)^2\ge0.\]
      Corresponding Lean step

      abs_real_inner_le_norm; sq_nonneg; nlinarith

      Lean verification

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

      Lean proof · ordinary_energy_le_phaseQuadraticForm

      Exact source form and compiled parent composition, with all source domains/constant absorption and zero cases explicit. Existing Q/comparison proofs unchanged.

      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 ordinary_energy_le_phaseQuadraticForm {kappa : ℝ} (hkappa : 1 ≤ kappa)
          (z : E × E) :
          ‖z.1‖ ^ 2 + ‖z.2‖ ^ 2 ≤ 6 * phaseQuadraticForm kappa z := by
        have hkappa0 : 0 < kappa := lt_of_lt_of_le zero_lt_one hkappa
        have hinner : -(‖z.1‖ * ‖z.2‖) ≤ inner ℝ z.1 z.2 :=
          (abs_le.mp (abs_real_inner_le_norm z.1 z.2)).1
        have hcoef0 : 0 ≤ 1 / (2 * kappa) := by positivity
        rw [phaseQuadraticForm]
        nlinarith [mul_nonneg hcoef0 (sq_nonneg ‖z.1‖),
          sq_nonneg (2 * ‖z.1‖ - 3 * ‖z.2‖)]

      Exact module and namespace context

      Scope and omitted-condition boundaries
      • Existing source Q/API promotion with unchanged proof, no separate mathematical progress credit. Actual deterministic exact-gradient numerical phase contraction at the explicit normalized C2 curvature interface. Actual f=V_eta smoothing/C2/curvature producer remains independently open. No Khat/Kbar substitution, increment/logLambda/B2, invariant law/local errors/history/query work, PBPS, either full main theorem or actual-input expected-cost composition. TV proximity does not transfer unbounded expected cost.
      Sources, dependencies, and reuse

      Source and reuse

      Samplinglib parents called

      Mathlib API called (external library)

      • abs_real_inner_le_norm
      • sq_nonneg
      • mul_nonneg

      Mathematical sources

      • SPHMC actual numerical contraction and M_kappa — Existing source Q/API promotion with unchanged proof, no separate mathematical progress credit. Actual deterministic exact-gradient numerical phase contraction at the explicit normalized C2 curvature interface. Actual f=V_eta smoothing/C2/curvature producer remains independently open. No Khat/Kbar substitution, increment/logLambda/B2, invariant law/local errors/history/query work, PBPS, either full main theorem or actual-input expected-cost composition. TV proximity does not transfer unbounded expected cost.

      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

      For every real inner-product E, kappa>=1 and phase point z, the exact source Q is bounded by3/2 times the true coordinate energy

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

      Read this first

      Mathematical statement

      For every real inner-product E, kappa≥1 and phase point z, the exact source Q is bounded by3/2 times the true coordinate energy.

      \[Q_\kappa(x,p)\le\tfrac32(\|x\|^2+\|p\|^2).\]
      Lean statement · phaseQuadraticForm_le_ordinary_energy

      For every real inner-product E, kappa>=1 and phase point z, the exact source Q is bounded by3/2 times the true coordinate energy.

      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 phaseQuadraticForm_le_ordinary_energy {kappa : ℝ} (hkappa : 1 ≤ kappa)
          (z : E × E) :
          phaseQuadraticForm kappa z ≤ (3 / 2 : ℝ) * (‖z.1‖ ^ 2 + ‖z.2‖ ^ 2)

      Exact module and namespace context

      Proof roadmap

      1. 1Use the upper cross-term Cauchy bound

        kappa≥1 implies1/(2kappa)+1/2≤1. Bound the cross term by||x||||p||≤(||x||²+||p||²)/2. This is the unchanged existing proof made callable by the actual numerical contraction and later increment consumers.

      Full assumptions and notation

      All objects and hypotheses

      • Arbitrary real inner-product E, with no finite-dimension or measurability premise. Kappa≥1 for the comparisons; the total definition accepts every real kappa.

      Mathematical proof

      1. Use the upper cross-term Cauchy bound

      kappa≥1 implies1/(2kappa)+1/2≤1. Bound the cross term by||x||||p||≤(||x||²+||p||²)/2. This is the unchanged existing proof made callable by the actual numerical contraction and later increment consumers.

      \[\langle x,p\rangle\le\tfrac12(\|x\|^2+\|p\|^2),\quad\tfrac1{2\kappa}+\tfrac12\le1.\]
      Corresponding Lean step

      real_inner_le_norm; sq_nonneg; nlinarith

      Lean verification

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

      Lean proof · phaseQuadraticForm_le_ordinary_energy

      Exact source form and compiled parent composition, with all source domains/constant absorption and zero cases explicit. Existing Q/comparison proofs unchanged.

      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 phaseQuadraticForm_le_ordinary_energy {kappa : ℝ} (hkappa : 1 ≤ kappa)
          (z : E × E) :
          phaseQuadraticForm kappa z ≤ (3 / 2 : ℝ) * (‖z.1‖ ^ 2 + ‖z.2‖ ^ 2) := by
        have hkappa0 : 0 < kappa := lt_of_lt_of_le zero_lt_one hkappa
        have hinv : 1 / kappa ≤ 1 := (div_le_one hkappa0).2 hkappa
        have hhalf : (1 / kappa) * (1 / 2 : ℝ) ≤ 1 / 2 := by
          simpa using mul_le_mul_of_nonneg_right hinv (by norm_num : (0 : ℝ) ≤ 1 / 2)
        have hcoef : 1 / (2 * kappa) + 1 / 2 ≤ (1 : ℝ) := by
          rw [one_div, mul_inv_rev, show (2 : ℝ)⁻¹ = 1 / 2 by norm_num]
          convert add_le_add_right hhalf (1 / 2) using 1 <;> norm_num <;> ring
        have hinner : inner ℝ z.1 z.2 ≤ ‖z.1‖ * ‖z.2‖ :=
          real_inner_le_norm z.1 z.2
        have hsquare : 2 * (‖z.1‖ * ‖z.2‖) ≤ ‖z.1‖ ^ 2 + ‖z.2‖ ^ 2 := by
          nlinarith [sq_nonneg (‖z.1‖ - ‖z.2‖)]
        rw [phaseQuadraticForm]
        nlinarith [mul_nonneg (sub_nonneg.mpr hcoef) (sq_nonneg ‖z.1‖),
          sq_nonneg ‖z.1‖, sq_nonneg ‖z.2‖]

      Exact module and namespace context

      Scope and omitted-condition boundaries
      • Existing source Q/API promotion with unchanged proof, no separate mathematical progress credit. Actual deterministic exact-gradient numerical phase contraction at the explicit normalized C2 curvature interface. Actual f=V_eta smoothing/C2/curvature producer remains independently open. No Khat/Kbar substitution, increment/logLambda/B2, invariant law/local errors/history/query work, PBPS, either full main theorem or actual-input expected-cost composition. TV proximity does not transfer unbounded expected cost.
      Sources, dependencies, and reuse

      Source and reuse

      Samplinglib parents called

      Mathlib API called (external library)

      • real_inner_le_norm
      • sq_nonneg
      • div_le_one

      Mathematical sources

      • SPHMC actual numerical contraction and M_kappa — Existing source Q/API promotion with unchanged proof, no separate mathematical progress credit. Actual deterministic exact-gradient numerical phase contraction at the explicit normalized C2 curvature interface. Actual f=V_eta smoothing/C2/curvature producer remains independently open. No Khat/Kbar substitution, increment/logLambda/B2, invariant law/local errors/history/query work, PBPS, either full main theorem or actual-input expected-cost composition. TV proximity does not transfer unbounded expected cost.

      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

      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

      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.