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

Actual source smoothed Hessian upper

AutoSamplingTheory.ExampleCases.SmoothedPicardHMC.SmoothedHessianUpper.smoothed_hessian_upper · theorem · Teaching coverage

Read this first

Mathematical statement

For every observation y and direction v, the actual selected RGO posterior R_y has covarianceBilin(R_y)(v,v)≥norm(v)^2/(beta+eta^-1). The actual source unnormalized Gaussian convolution V_eta has genuine Hessian D2V_eta(y)[v,v]≤beta/(1+beta eta)*norm(v)^2. Source beta=1 gives exactly (1+eta)^-1. Brascamp-Lieb/Hessian lower and the full two-sided Lemma4.1 are not claimed.

\[R_y(dx)\propto e^{-V(x)-\|x-y\|^2/(2\eta)}dx,\quad \operatorname{Cov}_{R_y}(v,v)\ge\frac{\|v\|^2}{\beta+\eta^{-1}},\quad D^2V_\eta(y)[v,v]\le\frac{\beta}{1+\beta\eta}\|v\|^2.\]
Lean statement · smoothed_hessian_upper

For every observation y and direction v, the actual selected RGO posterior R_y has covarianceBilin(R_y)(v,v)>=norm(v)^2/(beta+eta^-1). The actual source unnormalized Gaussian convolution V_eta has genuine Hessian D2V_eta(y)[v,v]<=beta/(1+beta eta)*norm(v)^2. Source beta=1 gives exactly (1+eta)^-1. Brascamp-Lieb/Hessian lower and the full two-sided Lemma4.1 are not claimed.

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 smoothed_hessian_upper {V : E → ℝ} {α β : ℝ≥0} {η : ℝ}
    (hα : 0<α) (hαβ : α≤β) (hV : ContDiff ℝ 2 V)
    (hH : ∀ x v : E, (α:ℝ)*‖v‖^2 ≤ fderiv ℝ (fderiv ℝ V) x v v ∧
      fderiv ℝ (fderiv ℝ V) x v v ≤ (β:ℝ)*‖v‖^2) (hη : 0<η) :
    let μ := (volume : Measure E).tilted (fun x => -V x)
    let C := ((Real.sqrt (2*Real.pi*η))⁻¹)^Module.finrank ℝ E
    let A := fun y : E => C*∫ x, Real.exp (-V x-‖y-x‖^2/(2*η)) ∂(volume : Measure E)
    let Vη := fun y => -Real.log (A y)
    let R := fun y : E => μ.tilted (fun x => -‖x-y‖^2/(2*η))
    (∀ y v, ‖v‖^2/((β:ℝ)+η⁻¹) ≤ covarianceBilin (R y) v v) ∧
      ∀ y v, fderiv ℝ (fderiv ℝ Vη) y v v ≤ ((β:ℝ)/(1+(β:ℝ)*η))*‖v‖^2

Exact module and namespace context

Proof roadmap

  1. 1Use the actual quadratic posterior potential

    For each y define W_y(x)=V(x)+norm(x-y)^2/(2eta). Differentiate the genuine squared norm twice. C2 and actual Hessian bounds become alpha+eta^-1 through beta+eta^-1. eta>0 ensures positive precision and the lower bound.

  2. 2Identify the actual selected posterior measure

    Strong convexity derives integrability of exp(-V). The true tilted_tilted identity identifies R_y=mu.tilted(-quadratic) with volume.tilted(-W_y), without assuming any posterior density or normalizer. Apply the new canonical covariance lower producer.

  3. 3Keep the true source unnormalized potential

    The source defines exp(-V_eta)=C_eta integral exp(-V(x)-norm(y-x)^2/(2eta))dx. Its true normalized negative-log density is U_eta=V_eta+log Z_V, by the existing actual smoothed Gibbs producer. The fixed constant cancels in first and second derivatives.

  4. 4Apply the actual posterior covariance identity

    Original Gibbs probability is derived, and the canonical Gaussian derivative producer gives the actual selected-posterior covariance identity, with posterior L2 proved there. No Hessian identity or moment is supplied to this consumer.

  5. 5Subtract the covariance lower and simplify the exact constant

    eta squared is positive. Subtract the genuine covariance lower bound and simplify the reciprocal expression using eta>0 and beta≥0. The exact Hessian upper is beta/(1+beta eta), including the source beta=1 constant.

  6. 6Retain the separate lower-Hessian boundary

    The source two-sided Lemma4.1 also needs Brascamp-Lieb covariance upper. This packet supplies its Cramer-Rao half only. Generic alpha/beta and all eta>0 extend the source normalized beta=1 and eta≤1 assumptions explicitly. The actual nonquadratic source test checks the full posterior and literal convolution without covariance or curvature certificates.

Full assumptions and notation

All objects and hypotheses

  • E is a complete finite-dimensional real inner-product space with its Borel measurable space and canonical volume, including dimension zero. alpha,beta are NNReal, 0<alpha≤beta. U or V is genuinely C2; actual Hessian at every point and direction lies between alpha*norm(v)^2 and beta*norm(v)^2.
  • Every Gibbs law is the actual volume.tilted(-potential). Probability, finite second moments, score integrability, centered score pairing and covariance bounds are derived. No minimizer, finite input moments, partition constant, derivative/score/covariance or well-behaved certificate is supplied.
  • eta>0 is arbitrary; source eta≤1 is unnecessary for this half. C_eta=(sqrt(2 pi eta)^-1)^d is the actual Gaussian prefactor. V_eta is the literal unnormalized source convolution; U_eta=V_eta+log Z_V, and R_y is the actual selected quadratic tilt of the original Gibbs law.

Mathematical proof

1. Use the actual quadratic posterior potential

For each y define W_y(x)=V(x)+norm(x-y)^2/(2eta). Differentiate the genuine squared norm twice. C2 and actual Hessian bounds become alpha+eta^-1 through beta+eta^-1. eta>0 ensures positive precision and the lower bound.

\[D^2W_y=D^2V+\eta^{-1}I,\quad(\alpha+\eta^{-1})I\preceq D^2W_y\preceq(\beta+\eta^{-1})I.\]
Corresponding Lean step

smoothed_hessian_upper: hq,hWfd,hWdd,hb; HasFDerivAt.norm_sq

2. Identify the actual selected posterior measure

Strong convexity derives integrability of exp(-V). The true tilted_tilted identity identifies R_y=mu.tilted(-quadratic) with volume.tilted(-W_y), without assuming any posterior density or normalizer. Apply the new canonical covariance lower producer.

\[R_y=\operatorname{tilt}_{-W_y}(dx),\quad \operatorname{Cov}_{R_y}(v,v)\ge\frac{\|v\|^2}{\beta+\eta^{-1}}.\]
Corresponding Lean step

StrongConvexGibbsIntegrability.integrable_exp_neg_of_strongConvexOn; tilted_tilted; gibbs_covariance_lower

3. Keep the true source unnormalized potential

The source defines exp(-V_eta)=C_eta integral exp(-V(x)-norm(y-x)^2/(2eta))dx. Its true normalized negative-log density is U_eta=V_eta+log Z_V, by the existing actual smoothed Gibbs producer. The fixed constant cancels in first and second derivatives.

\[e^{-V_\eta(y)}=C_\eta\int e^{-V(x)-\|y-x\|^2/(2\eta)}dx,\quad U_\eta=V_\eta+\log Z_V,\quad D^2U_\eta=D^2V_\eta.\]
Corresponding Lean step

SmoothedGibbsPotential.smoothed_gibbs_potential; fderiv_add_const

4. Apply the actual posterior covariance identity

Original Gibbs probability is derived, and the canonical Gaussian derivative producer gives the actual selected-posterior covariance identity, with posterior L2 proved there. No Hessian identity or moment is supplied to this consumer.

\[D^2V_\eta(y)[v,v]=\frac{\|v\|^2}{\eta}-\frac{\operatorname{Cov}_{R_y}(v,v)}{\eta^2}.\]
Corresponding Lean step

GaussianConvolutionRegularity.gaussian_convolution_derivatives; hDD

5. Subtract the covariance lower and simplify the exact constant

eta squared is positive. Subtract the genuine covariance lower bound and simplify the reciprocal expression using eta>0 and beta≥0. The exact Hessian upper is beta/(1+beta eta), including the source beta=1 constant.

\[D^2V_\eta(y)[v,v]\le\left(\eta^{-1}-\eta^{-2}(\beta+\eta^{-1})^{-1}\right)\|v\|^2=\frac{\beta}{1+\beta\eta}\|v\|^2.\]
Corresponding Lean step

div_le_div_of_nonneg_right; field_simp; ring

6. Retain the separate lower-Hessian boundary

The source two-sided Lemma4.1 also needs Brascamp-Lieb covariance upper. This packet supplies its Cramer-Rao half only. Generic alpha/beta and all eta>0 extend the source normalized beta=1 and eta≤1 assumptions explicitly. The actual nonquadratic source test checks the full posterior and literal convolution without covariance or curvature certificates.

\[\text{source }\beta=1:\quad D^2V_\eta\preceq(1+\eta)^{-1}I;\quad\text{BL lower-Hessian half remains open}.\]
Corresponding Lean step

Tests.GibbsCovarianceLower.actual_nonconstant_source

Lean verification

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

Lean proof · smoothed_hessian_upper

Actual Gibbs integrability and score L2, position L2 via gradient monotonicity, centered-linear and score IBP, nonnegative scalar square, bilinear scaling; actual quadratic posterior and exact source potential Hessian 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 smoothed_hessian_upper {V : E → ℝ} {α β : ℝ≥0} {η : ℝ}
    (hα : 0<α) (hαβ : α≤β) (hV : ContDiff ℝ 2 V)
    (hH : ∀ x v : E, (α:ℝ)*‖v‖^2 ≤ fderiv ℝ (fderiv ℝ V) x v v ∧
      fderiv ℝ (fderiv ℝ V) x v v ≤ (β:ℝ)*‖v‖^2) (hη : 0<η) :
    let μ := (volume : Measure E).tilted (fun x => -V x)
    let C := ((Real.sqrt (2*Real.pi*η))⁻¹)^Module.finrank ℝ E
    let A := fun y : E => C*∫ x, Real.exp (-V x-‖y-x‖^2/(2*η)) ∂(volume : Measure E)
    let Vη := fun y => -Real.log (A y)
    let R := fun y : E => μ.tilted (fun x => -‖x-y‖^2/(2*η))
    (∀ y v, ‖v‖^2/((β:ℝ)+η⁻¹) ≤ covarianceBilin (R y) v v) ∧
      ∀ y v, fderiv ℝ (fderiv ℝ Vη) y v v ≤ ((β:ℝ)/(1+(β:ℝ)*η))*‖v‖^2 := by
  let μ := (volume : Measure E).tilted (fun x => -V x)
  let R := fun y : E => μ.tilted (fun x => -‖x-y‖^2/(2*η))
  let r : ℝ≥0 := ⟨η⁻¹,(inv_pos.mpr hη).le⟩
  have hr : (r:ℝ)=η⁻¹ := rfl
  have ha : (0:ℝ)<α := hα
  have h0 := AutoSamplingTheory.TechnicalLemmas.Analysis.QuadraticRegularization.strongConvexOn_and_lipschitzWith_gradient_add_quadratic
    (r:=0) hV hH (0:E)
  simp only [NNReal.coe_zero,zero_div,zero_mul,add_zero] at h0
  have hi := AutoSamplingTheory.TechnicalLemmas.Analysis.StrongConvexGibbsIntegrability.integrable_exp_neg_of_strongConvexOn
    ha (hV.differentiable (by norm_num)) h0.1
  have hR (y : E) : ∀ v : E, ‖v‖^2/((β:ℝ)+η⁻¹) ≤ covarianceBilin (R y) v v := by
    let W := fun x => V x+(r:ℝ)/2*‖x-y‖^2
    have hVd : Differentiable ℝ V := hV.differentiable (by norm_num)
    have hVdd : Differentiable ℝ (fderiv ℝ V) := (hV.fderiv_right (m:=1) (by norm_num)).differentiable_one
    have hW : ContDiff ℝ 2 W := hV.add (contDiff_const.mul ((contDiff_id.sub contDiff_const).norm_sq (𝕜:=ℝ)))
    have hq (x : E) : HasFDerivAt (fun z => (r:ℝ)/2*‖z-y‖^2)
        ((r:ℝ) • innerSL ℝ (x-y)) x := by
      convert (((hasFDerivAt_id x).sub_const y).norm_sq).const_mul ((r:ℝ)/2)
        using 1 <;> first | rfl | (ext v; simp;ring)
    have hWfd (x : E) : fderiv ℝ W x = fderiv ℝ V x+(r:ℝ) • innerSL ℝ (x-y) :=
      ((hVd x).hasFDerivAt.add (hq x)).fderiv
    let J : E →L[ℝ] (E →L[ℝ] ℝ) :=
      {toFun := fun v => innerSL ℝ v
       map_add' := by intros;ext;simp
       map_smul' := by intros;ext;simp
       cont := (innerSL ℝ (E:=E)).continuous}
    have hWdd (x : E) : HasFDerivAt (fderiv ℝ W)
        (fderiv ℝ (fderiv ℝ V) x+(r:ℝ) • J) x := by
      rw [show fderiv ℝ W=(fun z => fderiv ℝ V z+(r:ℝ) • innerSL ℝ (z-y)) from funext hWfd]
      convert (hVdd x).hasFDerivAt.add ((J.hasFDerivAt.comp x ((hasFDerivAt_id x).sub_const y)).const_smul (r:ℝ)) using 1 <;> rfl
    have hb (x v : E) : ((α+r:ℝ≥0):ℝ)*‖v‖^2 ≤ fderiv ℝ (fderiv ℝ W) x v v ∧
        fderiv ℝ (fderiv ℝ W) x v v ≤ ((β+r:ℝ≥0):ℝ)*‖v‖^2 := by
      rw [(hWdd x).fderiv]
      change ((α:ℝ)+r)*‖v‖^2 ≤ fderiv ℝ (fderiv ℝ V) x v v+(r:ℝ)*inner ℝ v v ∧
        fderiv ℝ (fderiv ℝ V) x v v+(r:ℝ)*inner ℝ v v ≤ ((β:ℝ)+r)*‖v‖^2
      rw [real_inner_self_eq_norm_sq]
      constructor <;> nlinarith [(hH x v).1,(hH x v).2]
    have hc := AutoSamplingTheory.TechnicalLemmas.Analysis.GibbsGradientMoment.gibbs_covariance_lower
      (show 0<α+r from by positivity) (show α+r≤β+r from by simpa only [add_comm] using (add_le_add_right hαβ r)) hW hb
    have hRW : R y=(volume : Measure E).tilted (fun x => -W x) := by
      dsimp only [R,μ]
      rw [tilted_tilted hi]
      congr 1
      funext x
      simp only [Pi.add_apply,W]
      rw [hr]
      field_simp [hη.ne']
      ring
    rw [hRW]
    simpa only [NNReal.coe_add,hr] using hc.2.2
  refine ⟨hR,?_⟩
  let C := ((Real.sqrt (2*Real.pi*η))⁻¹)^Module.finrank ℝ E
  let A := fun y : E => C*∫ x, Real.exp (-V x-‖y-x‖^2/(2*η)) ∂(volume : Measure E)
  let Vη := fun y => -Real.log (A y)
  let U := fun y : E => -Real.log (C*∫ x, Real.exp (-‖y-x‖^2/(2*η)) ∂μ)
  let ZV := ∫ x, Real.exp (-V x) ∂(volume : Measure E)
  obtain ⟨_hZ,hμ,_hlaw,_hI,_hInt,_hTilt,_hA,_hC2,hshift⟩ :=
    AutoSamplingTheory.ExampleCases.SmoothedPicardHMC.SmoothedGibbsPotential.smoothed_gibbs_potential
      ha hV (fun x v => (hH x v).1) hη
  have : IsProbabilityMeasure μ := hμ
  have hC : 0<C := by dsimp only [C]; positivity
  obtain ⟨_hRm,_hD,hDD⟩ :=
    AutoSamplingTheory.TechnicalLemmas.Measure.GaussianConvolutionRegularity.gaussian_convolution_derivatives μ hη hC
  have he : U=(fun y => Vη y+Real.log ZV) := funext hshift
  have hd : fderiv ℝ U=fderiv ℝ Vη := by
    rw [he]
    funext y
    exact fderiv_add_const _
  change ∀ y v w, fderiv ℝ (fderiv ℝ U) y v w = _ at hDD
  rw [hd] at hDD
  intro y v
  rw [hDD y v v,real_inner_self_eq_norm_sq]
  have hden : 0<(β:ℝ)+η⁻¹ := add_pos_of_nonneg_of_pos β.coe_nonneg (inv_pos.mpr hη)
  have hbden : 0<1+(β:ℝ)*η := by positivity
  calc
    ‖v‖^2/η-covarianceBilin (R y) v v/η^2 ≤
        ‖v‖^2/η-(‖v‖^2/((β:ℝ)+η⁻¹))/η^2 :=
      sub_le_sub_left (div_le_div_of_nonneg_right (hR y v) (sq_nonneg η)) _
    _ = ((β:ℝ)/(1+(β:ℝ)*η))*‖v‖^2 := by
      field_simp [hη.ne',hden.ne',hbden.ne']
      ring

end
end AutoSamplingTheory.ExampleCases.SmoothedPicardHMC.SmoothedHessianUpper

Exact module and namespace context

Scope and omitted-condition boundaries
  • Actual Gibbs all-direction covariance lower bound and its actual RGO/source V_eta Hessian upper consumer only. No Brascamp-Lieb covariance upper/Hessian lower, full Lemma4.1, general nonlinear Cramer-Rao, higher regularity, exact stationarity, approximate/stochastic/history work, PBPS process or either complete main/composition. TV never transfers unbounded expected cost.
Sources, dependencies, and reuse

Source and reuse

Samplinglib parents called

Mathlib API called (external library)

  • tilted_tilted
  • fderiv_add_const
  • HasFDerivAt.norm_sq
  • HasFDerivAt.const_mul
  • HasFDerivAt.add
  • HasFDerivAt.comp
  • div_le_div_of_nonneg_right

Mathematical sources

  • SPHMC Lemma4.1 Cramer-Rao half — Actual Gibbs all-direction covariance lower bound and its actual RGO/source V_eta Hessian upper consumer only. No Brascamp-Lieb covariance upper/Hessian lower, full Lemma4.1, general nonlinear Cramer-Rao, higher regularity, exact stationarity, approximate/stochastic/history work, PBPS process or either complete main/composition. TV never transfers unbounded expected cost.
  • Auxiliary pinned author book Theorem3.5.8 / Corollary3.5.9 — Linear-observable corollary only; genuine hidden regularity proved; not a Lean dependency.

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