Samplinglib
Lean gate not recorded for this source state main · 0e31a3cda412

ApproximateInitialGradientMoment: 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. Actual approximate initialization gradient moments
ASTIS mathematical exposition

Actual approximate initialization gradient moments

AutoSamplingTheory.ExampleCases.SmoothedPicardHMC.ApproximateInitialGradientMoment.approximate_initial_gradient_moment · theorem · Teaching coverage

Statement

Seven conclusions: norm(grad U)^2 is integrable under nu; its nu expectation is at most M; for every y,z, grad F_yz(y)=grad U(y)-sqrt(tau)/(eta+tau)*z; the squared norm of this actual regularized gradient is integrable under nu.prod(G); its joint expectation equals the nu gradient-square expectation plus tau*d/(eta+tau)^2; hence it is at most M+tau*d/(eta+tau)^2; and if beta=1 and eta<=1/4 it is at most 5*(d+r^2+tau*d/(eta+tau)^2).

\[\mathbb E_\nu\|\nabla U\|^2\le M=4\beta d+4\beta^2\eta d+2\beta^2r^2,\qquad \mathbb E_{\nu\otimes G}\|\nabla F_{Y,Z}(Y)\|^2=\mathbb E_\nu\|\nabla U\|^2+\frac{\tau d}{(\eta+\tau)^2}.\]

All objects and hypotheses

  • E is a complete finite-dimensional real inner-product space with its Borel sigma-algebra and canonical Lebesgue volume; d=finrank(E), including dimension zero. U:E->R is C2.
  • alpha,beta are nonnegative reals with 0<alpha<=beta. The genuine Hessian at every x obeys alpha*norm(v)^2<=D2U(x)[v,v]<=beta*norm(v)^2 for every vector v. Thus this public theorem does not include beta=0.
  • eta>=0, tau>0 and r>=0. Define pi=volume.tilted(-U), rho_eta=gaussianSmoothing(pi,sqrt eta), and G=stdGaussian(E). Smoothing is the actual independent additive pushforward, not a supplied approximate law.
  • nu is an actual probability measure satisfying W2(nu,rho_eta)^2<=ENNReal.ofReal(r^2), where W2 is Samplinglib's actual infimum of quadratic coupling costs. This W2 guarantee is an input, not a conclusion about an implemented sampler.
  • Set M=4*beta*d+4*beta^2*eta*d+2*beta^2*r^2. For each fixed y,z define F_yz(x)=U(x)+norm(x-(y+sqrt(tau)*z))^2/(2*(eta+tau)); differentiate in x and then evaluate at x=y. The same pair (y,z) defines both the starting point and its random center.

Mathematical proof

1. Establish the actual Gibbs and Gaussian moments

Apply the previously proved Gibbs gradient-moment theorem to the genuine Hessian bounds. It proves probability normalization, gradient-square L1 and the beta*d bound for pi. Zero quadratic precision in QuadraticRegularization gives beta-Lipschitz continuity of the actual gradient. For the standard Gaussian, MemLp2 gives norm-square L1; its zero mean and covariance identity give unit directional second moments. Establish each directional L1 before summing over an orthonormal basis and applying Parseval, obtaining E norm(Z)^2=d even for the empty basis.

\[\mathbb E_\pi\|\nabla U\|^2\le\beta d,\qquad \operatorname{Lip}(\nabla U)\le\beta,\qquad \mathbb E_G\|Z\|^2=d.\]
Corresponding Lean step

gaussian_square; approximate_initial_gradient_moment: hG,hbase,hLip; GibbsGradientMoment.gibbs_gradient_moment; QuadraticRegularization.strongConvexOn_and_lipschitzWith_gradient_add_quadratic

2. Integrate the true smoothing pushforward

Expand gaussianSmoothing through addNoise and scaledStdGaussian. Product-map and map-composition equalities identify the measure as the law of X+sigma*Z for independent X~pi and Z~G. For any beta-Lipschitz vector function g, the quadratic triangle inequality gives the displayed domination. Its right side is integrable under the product law. Transfer this L1 statement through the actual pushforward, then integrate and put sigma=sqrt(eta). This is not simultaneous-smoothing contraction used as a displacement bound.

\[\|g(x+\sigma z)\|^2\le2\|g(x)\|^2+2\beta^2\sigma^2\|z\|^2,\qquad \mathbb E_{\rho_\eta}\|\nabla U\|^2\le2\beta d+2\beta^2\eta d.\]
Corresponding Lean step

lipschitz_square_bound; smoothing_square; MeasureTheory.Measure.map_prod_map; MeasureTheory.Measure.map_map; MeasureTheory.integrable_map_measure

3. Derive actual target integrability from a finite-cost coupling

Let gamma couple the target first marginal nu to the known-moment second marginal rho_eta. A finite ENNReal quadratic cost yields actual real displacement-square integrability; it is not a marginal state-moment assumption. Pull the known gradient square back through the second projection. The displayed Lipschitz bound then supplies first-coordinate gradient-square L1, which descends through the first marginal map to nu. Only after these L1 facts are established are the real integrals compared.

\[\|g(x)\|^2\le2\|g(y)\|^2+2\beta^2\|x-y\|^2,\quad \int\|x-y\|^2\,d\gamma\le s\ \Longrightarrow\ \mathbb E_\nu\|g\|^2\le2\mathbb E_{\rho_\eta}\|g\|^2+2\beta^2s.\]
Corresponding Lean step

coupling_square; CouplingQuadraticIntegrability.measurePreserving_fst_of_isCoupling; CouplingQuadraticIntegrability.measurePreserving_snd_of_isCoupling; MeasureTheory.integrable_toReal_of_lintegral_ne_top

4. Eliminate strict near-optimal transport budgets

The squared Wasserstein distance is the actual infimum of coupling costs. For each s>r^2 select a genuine coupling with cost below s. First take s=r^2+1 to establish target L1 once. For arbitrary epsilon>0 take s=r^2+epsilon/(2*beta^2+1); the preceding integral bound is at most the desired bound plus epsilon. Order closure removes epsilon. This works at r=0 without an optimizer and avoids division by beta. Combine with the actual smoothed moment to obtain M.

\[s=r^2+\frac{\varepsilon}{2\beta^2+1}\quad\Longrightarrow\quad \mathbb E_\nu\|\nabla U\|^2\le 4\beta d+4\beta^2\eta d+2\beta^2r^2.\]
Corresponding Lean step

wasserstein_square; Transport.exists_isCoupling_lintegral_lt_of_transportCost_lt; WassersteinSpace.wassersteinDistance_sq; approximate_initial_gradient_moment: hSm,hW,hbound

5. Differentiate the actual random-center potential

Since eta+tau>0, differentiate the quadratic penalty with y,z held fixed, and add the genuine derivative of U. At x=y the displacement from y+sqrt(tau)*z is -sqrt(tau)*z. This proves the actual gradient identity, rather than defining the desired gradient by a formula. The same Y occurs in the initial point and in the center.

\[\nabla F_{y,z}(x)=\nabla U(x)+\frac{x-y-\sqrt\tau z}{\eta+\tau},\qquad \nabla F_{y,z}(y)=\nabla U(y)-\frac{\sqrt\tau}{\eta+\tau}z.\]
Corresponding Lean step

regularized_gradient; approximate_initial_gradient_moment: hA,hgrad; HasGradientAt.gradient; HasFDerivAt.norm_sq

6. Prove cross-term integrability before using independence

For a continuous g with its now-proved square L1 under nu, finite probability mass gives vector L1. The standard Gaussian is also vector L1. The inner-product norm bound and Integrable.op_fst_snd establish absolute integrability of the cross term under the actual product measure. Fubini and the Gaussian strong-dual mean-zero identity then show its integral is zero. Each squared term is integrable, so the square expansion both proves joint L1 and permits termwise integration.

\[\langle g(Y),Z\rangle\in L^1(\nu\otimes G),\quad \mathbb E\langle g(Y),Z\rangle=0,\quad \mathbb E\|g(Y)-cZ\|^2=\mathbb E_\nu\|g\|^2+c^2d.\]
Corresponding Lean step

gaussian_perturbation_square; MeasureTheory.Integrable.op_fst_snd; MeasureTheory.integral_prod; ProbabilityTheory.integral_strongDual_stdGaussian

7. Combine the exact expectation and derive the source-scale constant

Substitute c=sqrt(tau)/(eta+tau) into the exact product expectation and use tau>0 to replace sqrt(tau)^2 by tau. Combining with M yields the joint bound. When beta=1 and eta<=1/4, M<=5d+2r^2; nonnegativity of dimension, r^2 and the noise term yields the displayed sufficient constant5. The paper uses a generic constant C. This fixed-call estimate does not yet integrate the random-center GD stopping cost or propagate moments through random histories.

\[\mathbb E\|\nabla F_{Y,Z}(Y)\|^2\le M+\frac{\tau d}{(\eta+\tau)^2}\le5\left(d+r^2+\frac{\tau d}{(\eta+\tau)^2}\right)\quad(\beta=1,\ \eta\le1/4).\]
Corresponding Lean step

approximate_initial_gradient_moment: hnoise,hEq,hd,hn,hηd

Lean statement · approximate_initial_gradient_moment

Seven actual-law conclusions: nu gradient-square L1/bound, same-pair regularized gradient identity, joint L1/exact expectation/bound and derived constant5 specialization.

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 approximate_initial_gradient_moment {U : E → ℝ} {α β : ℝ≥0}
    (hα : 0 < α) (hαβ : α ≤ β) (hU : ContDiff ℝ 2 U)
    (hH : ∀ x v : E, (α : ℝ)*‖v‖^2 ≤ fderiv ℝ (fderiv ℝ U) x v v ∧
      fderiv ℝ (fderiv ℝ U) x v v ≤ (β : ℝ)*‖v‖^2)
    {η τ r : ℝ} (hη : 0 ≤ η) (hτ : 0 < τ) (_hr : 0 ≤ r)
    (ν : Measure E) [IsProbabilityMeasure ν]
    (hw : TechnicalLemmas.Measure.WassersteinSpace.wassersteinDistance ν
      (TechnicalLemmas.Measure.GaussianSmoothing.gaussianSmoothing
        ((volume : Measure E).tilted (fun x => -U x)) (Real.sqrt η)) ^ 2 ≤ ENNReal.ofReal (r^2)) :
    let d : ℝ := Module.finrank ℝ E
    let M := 4*(β : ℝ)*d + 4*(β : ℝ)^2*η*d + 2*(β : ℝ)^2*r^2
    let F := fun y z x : E => U x + ‖x-(y+Real.sqrt τ • z)‖^2/(2*(η+τ))
    Integrable (fun y => ‖gradient U y‖^2) ν ∧
      (∫ y, ‖gradient U y‖^2 ∂ν) ≤ M ∧
      (∀ y z, gradient (F y z) y = gradient U y - (Real.sqrt τ/(η+τ)) • z) ∧
      Integrable (fun p : E × E => ‖gradient (F p.1 p.2) p.1‖^2) (ν.prod (stdGaussian E)) ∧
      (∫ p : E × E, ‖gradient (F p.1 p.2) p.1‖^2 ∂ν.prod (stdGaussian E)) =
        (∫ y, ‖gradient U y‖^2 ∂ν) + τ*d/(η+τ)^2 ∧
      (∫ p : E × E, ‖gradient (F p.1 p.2) p.1‖^2 ∂ν.prod (stdGaussian E)) ≤ M + τ*d/(η+τ)^2 ∧
      (β=1 → η≤1/4 → (∫ p : E × E, ‖gradient (F p.1 p.2) p.1‖^2 ∂ν.prod (stdGaussian E)) ≤
        5*(d+r^2+τ*d/(η+τ)^2))

Exact module and namespace context

Lean proof · approximate_initial_gradient_moment

Actual Gibbs and Gaussian moments, actual smoothing pushforward, finite-cost coupling L1 and strict-budget elimination, true quadratic differentiation, absolutely integrable Gaussian cancellation and explicit arithmetic.

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 approximate_initial_gradient_moment {U : E → ℝ} {α β : ℝ≥0}
    (hα : 0 < α) (hαβ : α ≤ β) (hU : ContDiff ℝ 2 U)
    (hH : ∀ x v : E, (α : ℝ)*‖v‖^2 ≤ fderiv ℝ (fderiv ℝ U) x v v ∧
      fderiv ℝ (fderiv ℝ U) x v v ≤ (β : ℝ)*‖v‖^2)
    {η τ r : ℝ} (hη : 0 ≤ η) (hτ : 0 < τ) (_hr : 0 ≤ r)
    (ν : Measure E) [IsProbabilityMeasure ν]
    (hw : TechnicalLemmas.Measure.WassersteinSpace.wassersteinDistance ν
      (TechnicalLemmas.Measure.GaussianSmoothing.gaussianSmoothing
        ((volume : Measure E).tilted (fun x => -U x)) (Real.sqrt η)) ^ 2 ≤ ENNReal.ofReal (r^2)) :
    let d : ℝ := Module.finrank ℝ E
    let M := 4*(β : ℝ)*d + 4*(β : ℝ)^2*η*d + 2*(β : ℝ)^2*r^2
    let F := fun y z x : E => U x + ‖x-(y+Real.sqrt τ • z)‖^2/(2*(η+τ))
    Integrable (fun y => ‖gradient U y‖^2) ν ∧
      (∫ y, ‖gradient U y‖^2 ∂ν) ≤ M ∧
      (∀ y z, gradient (F y z) y = gradient U y - (Real.sqrt τ/(η+τ)) • z) ∧
      Integrable (fun p : E × E => ‖gradient (F p.1 p.2) p.1‖^2) (ν.prod (stdGaussian E)) ∧
      (∫ p : E × E, ‖gradient (F p.1 p.2) p.1‖^2 ∂ν.prod (stdGaussian E)) =
        (∫ y, ‖gradient U y‖^2 ∂ν) + τ*d/(η+τ)^2 ∧
      (∫ p : E × E, ‖gradient (F p.1 p.2) p.1‖^2 ∂ν.prod (stdGaussian E)) ≤ M + τ*d/(η+τ)^2 ∧
      (β=1 → η≤1/4 → (∫ p : E × E, ‖gradient (F p.1 p.2) p.1‖^2 ∂ν.prod (stdGaussian E)) ≤
        5*(d+r^2+τ*d/(η+τ)^2)) := by
  let d : ℝ := Module.finrank ℝ E
  let μ := (volume : Measure E).tilted (fun x => -U x)
  let ρ := TechnicalLemmas.Measure.GaussianSmoothing.gaussianSmoothing μ (Real.sqrt η)
  let M := 4*(β : ℝ)*d + 4*(β : ℝ)^2*η*d + 2*(β : ℝ)^2*r^2
  let F := fun y z x : E => U x + ‖x-(y+Real.sqrt τ • z)‖^2/(2*(η+τ))
  have hG := TechnicalLemmas.Analysis.GibbsGradientMoment.gibbs_gradient_moment hα hαβ hU hH
  have : IsProbabilityMeasure μ := hG.1
  have hbase := TechnicalLemmas.Analysis.QuadraticRegularization.strongConvexOn_and_lipschitzWith_gradient_add_quadratic
    (r := 0) hU hH (0 : E)
  have hLip : LipschitzWith β (gradient U) := by simpa using hbase.2
  have hSm := smoothing_square hLip hG.2.1 (Real.sqrt η)
  have hW := wasserstein_square hLip hSm.1 hw
  have hbound : (∫ y, ‖gradient U y‖^2 ∂ν) ≤ M := by
    have h1 := hG.2.2.2.2
    have h2 := hSm.2
    have h3 := hW.2
    rw [Real.sq_sqrt hη] at h2
    dsimp [M, d, μ, ρ] at *
    linarith
  have hA : 0 < η+τ := add_pos_of_nonneg_of_pos hη hτ
  have hgrad (y z : E) : gradient (F y z) y =
      gradient U y - (Real.sqrt τ/(η+τ)) • z := by
    rw [regularized_gradient hU hA]
    have he : y-(y+Real.sqrt τ • z) = -(Real.sqrt τ • z) := by abel
    rw [he]
    simp only [smul_neg, smul_smul, sub_eq_add_neg, div_eq_mul_inv, mul_comm]
  have hP := gaussian_perturbation_square hLip.continuous hW.1 (Real.sqrt τ/(η+τ))
  have hnoise : (Real.sqrt τ/(η+τ))^2 * d = τ*d/(η+τ)^2 := by
    rw [div_pow, Real.sq_sqrt hτ.le]
    ring
  have hEq : (∫ p : E × E, ‖gradient (F p.1 p.2) p.1‖^2 ∂ν.prod (stdGaussian E)) =
      (∫ y, ‖gradient U y‖^2 ∂ν) + τ*d/(η+τ)^2 := by
    simp_rw [hgrad]
    exact hP.2.trans (by rw [show (Module.finrank ℝ E : ℝ)=d from rfl, hnoise])
  refine ⟨hW.1, hbound, hgrad, ?_, hEq, ?_, ?_⟩
  · change Integrable (fun p : E × E => ‖gradient (F p.1 p.2) p.1‖^2) (ν.prod (stdGaussian E))
    simpa only [hgrad] using hP.1
  · rw [hEq]
    change (∫ y, ‖gradient U y‖^2 ∂ν) + τ*d/(η+τ)^2 ≤ M + τ*d/(η+τ)^2
    linarith
  · intro hβ hηsmall
    rw [hEq]
    have hd : 0 ≤ d := Nat.cast_nonneg _
    have hn : 0 ≤ τ*d/(η+τ)^2 := div_nonneg (mul_nonneg hτ.le hd) (sq_nonneg _)
    have hηd : 4*η*d ≤ d := by nlinarith [mul_le_mul_of_nonneg_right hηsmall hd]
    simp only [M, hβ, NNReal.coe_one, one_pow, mul_one] at hbound
    nlinarith [sq_nonneg r]


end AutoSamplingTheory.ExampleCases.SmoothedPicardHMC.ApproximateInitialGradientMoment

Exact module and namespace context

Scope and omitted-condition boundaries

  • Fixed-call actual input moments only. The W2 hypothesis remains supplied; no smoothed sampler implementation or A2/A3-to-input adapter is proved. In the normalized source call one may substitute r^2=kappa_U*eps_j^2. General beta, coordinate-free finite dimension, dimension zero and eta=0 are explicit extensions. Public r>=0 and tau>0 remain; beta=0 is excluded by curvature. M and constant5 are derived sufficient constants, whereas the source writes a generic C. No state-second-moment, optimizer, target gradient-moment or cross-term-integrability premise is added. Public conclusions do not separately assert a joint parameter kernel or program measurability. Random-history conditioning, jointly measurable GD stopping/counting at the same random center, accumulated expected query cost and both main results remain separate.

Source and reuse

ASTIS parents called

Mathlib API called (external library)

  • ProbabilityTheory.IsGaussian.memLp_two_id
  • ProbabilityTheory.covarianceBilin_stdGaussian
  • ProbabilityTheory.integral_id_stdGaussian
  • MeasureTheory.Measure.map_prod_map
  • MeasureTheory.Measure.map_map
  • MeasureTheory.integrable_map_measure
  • MeasureTheory.integrable_toReal_of_lintegral_ne_top
  • MeasureTheory.Integrable.op_fst_snd
  • MeasureTheory.integral_prod
  • ProbabilityTheory.integral_strongDual_stdGaussian

Mathematical sources

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