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

True smoothed score and standardized posterior expectation

AutoSamplingTheory.ExampleCases.SmoothedPicardHMC.SmoothedScorePosterior.smoothed_score_posterior · theorem · Teaching coverage

Read this first

Mathematical statement

The literal source convolution potential is C2 and its gradient at every y is the actual true quadratic posterior expectation of gradientV, with probability and position/gradient domains proved internally. Produce a measurable stationary proximal p and the same literal affine standardized posterior r, its exact normalized Gibbs law, gradient-rho L2, the exact source Ex9 mean identity, and the pointwise deterministic Gaussian evaluator chain identity.

\[\nabla V_\eta(y)=\int\nabla V\,dR_y=\nabla V(p_y)+\eta^{-1/2}\int\nabla\rho_y\,dr_y,\quad\nabla V(p_y+\sqrt\eta z)=\nabla V(p_y)+\eta^{-1/2}\nabla\rho_y(z).\]
Lean statement · smoothed_score_posterior

The literal source convolution potential is C2 and its gradient at every y is the actual true quadratic posterior expectation of gradientV, with probability and position/gradient domains proved internally. Produce a measurable stationary proximal p and the same literal affine standardized posterior r, its exact normalized Gibbs law, gradient-rho L2, the exact source Ex9 mean identity, and the pointwise deterministic Gaussian evaluator chain identity.

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_score_posterior
    {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E]
    [CompleteSpace E] [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E]
    {V : E → ℝ} {κ η : ℝ} (hκ : 1 ≤ κ) (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 : E => -Real.log (A y)
    let R := fun y : E => μ.tilted (fun x => -‖x-y‖^2/(2*η))
    IsProbabilityMeasure μ ∧ ContDiff ℝ 2 Vη ∧
      (∀ y, IsProbabilityMeasure (R y) ∧ MemLp id 2 (R y) ∧
        Integrable (gradient V) (R y) ∧
        gradient Vη y = ∫ x, gradient V x ∂(R y)) ∧
      ∃ p : E → E, Measurable p ∧ (∀ y, p y+η • gradient V (p y)=y) ∧
        let rho := fun y u => V (p y+Real.sqrt η • u)-V (p y)-
          Real.sqrt η*inner ℝ (gradient V (p y)) u
        let r := fun y => (R y).map (fun x => (Real.sqrt η)⁻¹ • (x-p y))
        ∀ y, r y=(volume : Measure E).tilted (fun u => -(‖u‖^2/2+rho y u)) ∧
          IsProbabilityMeasure (r y) ∧ MemLp (gradient (rho y)) 2 (r y) ∧
          gradient Vη y=gradient V (p y)+(Real.sqrt η)⁻¹ • (∫ u, gradient (rho y) u ∂(r y)) ∧
          ∀ z, gradient V (p y+Real.sqrt η • z)=
            gradient V (p y)+(Real.sqrt η)⁻¹ • gradient (rho y) z

Exact module and namespace context

Proof roadmap

  1. 1Keep the exact unnormalized convolution

    Reuse the actual smoothing producer. With ZV the original partition and A the literal source convolution including the printed Gaussian prefactor, the normalized potential is Ueta=Veta+logZV. Both partitions are positive and the source Veta is C2. Differentiate the constant shift, rather than asserting equal potentials.

  2. 2Reuse the true everywhere Gaussian-convolution derivative

    The canonical Gaussian-convolution theorem internally produces probability and position L2 for the actual unreflected posterior R_y, and the directional derivative of Ueta. This is an everywhere literal tilted law, so no arbitrary conditional version is used at a null y.

  3. 3Construct the actual posterior Gibbs potential

    For each y define Wy=V+norm(x-y)^2/(2eta). Its C2 chain rule gives Hessian bounds kappa^-1+eta^-1 and1+eta^-1, both derived from the unchanged source binders. Canonical consecutive tilts show R_y=volume.tilted(-Wy). Positive eta is the complete analytic range.

  4. 4Cancel the actual posterior gradient mean

    The new shared mean-zero producer gives E_R gradWy=0 and genuine vector L1. Position L2 gives L1 of the quadratic gradient, hence L1 of gradV. Integrate the actual chain identity and rearrange. No expected-gradient identity or IBP domain is a source input.

  5. 5Identify the true smoothed score

    Compare the Gaussian-convolution derivative with the posterior cancellation, and use the Riesz inner-product characterization of gradient. The exact constant shift has already been differentiated. The resulting mean is under the true RGO posterior; it is not the own mean of the separate Gaussian-gradient output law.

  6. 6Reuse the same produced proximal selector and standardized law

    The existing allpositive standardized RGO theorem produces a measurable p, its stationarity, the affine pushforward r_y and its actual normalized Gibbs identification, with gradient-rho L2. The same p occurs in rho, the affine map, and the evaluator. No Jacobian or probability identity is assumed.

  7. 7Integrate the exact standardized chain rule

    The internally derived Frechet/Riesz chain identity gives grad_rho(u)=sqrteta times (gradV(p+sqrteta*u)-gradVp). Actual gradient-rho L2 supplies all needed first moments. Push the affine observable through the same r=T#R, use the exact inverse map, and integrate constants/scalars. This proves both printed Ex9 identities while leaving all bias/transport/cost bounds separate.

Full assumptions and notation

All objects and hypotheses

  • Complete finite real Hilbert E with its Borel structure and canonical volume, including dimension zero.
  • The unchanged source normalization: kappa≥1, actual global C2 V and Hessian kappa^-1 I≤HessV≤I.
  • Every eta>0, with no numerical upper cap. Actual measures, normalization, p, stationarity, moments and gradient/mean identities are derived outputs, not supplied premises.

Mathematical proof

1. Keep the exact unnormalized convolution

Reuse the actual smoothing producer. With ZV the original partition and A the literal source convolution including the printed Gaussian prefactor, the normalized potential is Ueta=Veta+logZV. Both partitions are positive and the source Veta is C2. Differentiate the constant shift, rather than asserting equal potentials.

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

SmoothedGibbsPotential.smoothed_gibbs_potential; fderiv_add_const

2. Reuse the true everywhere Gaussian-convolution derivative

The canonical Gaussian-convolution theorem internally produces probability and position L2 for the actual unreflected posterior R_y, and the directional derivative of Ueta. This is an everywhere literal tilted law, so no arbitrary conditional version is used at a null y.

\[R_y\propto e^{-V(x)-\|x-y\|^2/(2\eta)}dx,\quad DU_\eta(y)[v]=\eta^{-1}\langle y-\mathbb E_{R_y}X,v\rangle.\]
Corresponding Lean step

GaussianConvolutionRegularity.gaussian_convolution_derivatives

3. Construct the actual posterior Gibbs potential

For each y define Wy=V+norm(x-y)^2/(2eta). Its C2 chain rule gives Hessian bounds kappa^-1+eta^-1 and1+eta^-1, both derived from the unchanged source binders. Canonical consecutive tilts show R_y=volume.tilted(-Wy). Positive eta is the complete analytic range.

\[W_y(x)=V(x)+\frac{\|x-y\|^2}{2\eta},\quad(\kappa^{-1}+\eta^{-1})I\preceq\nabla^2W_y\preceq(1+\eta^{-1})I.\]
Corresponding Lean step

tilted_tilted; HasFDerivAt.norm_sq; actual hWfd/hWdd/hRW

4. Cancel the actual posterior gradient mean

The new shared mean-zero producer gives E_R gradWy=0 and genuine vector L1. Position L2 gives L1 of the quadratic gradient, hence L1 of gradV. Integrate the actual chain identity and rearrange. No expected-gradient identity or IBP domain is a source input.

\[\nabla W_y=\nabla V+\eta^{-1}(x-y),\quad\mathbb E_{R_y}\nabla V=\eta^{-1}(y-\mathbb E_{R_y}X).\]
Corresponding Lean step

GibbsGradientMean.integrable_gradient_and_integral_eq_zero; MemLp.integrable; integral_add; integral_sub; integral_smul

5. Identify the true smoothed score

Compare the Gaussian-convolution derivative with the posterior cancellation, and use the Riesz inner-product characterization of gradient. The exact constant shift has already been differentiated. The resulting mean is under the true RGO posterior; it is not the own mean of the separate Gaussian-gradient output law.

\[\nabla V_\eta(y)=\mathbb E_{R_y}\nabla V(X).\]
Corresponding Lean step

inner_gradient_left; ext_inner_right; actual hDU/hD/hscore

6. Reuse the same produced proximal selector and standardized law

The existing allpositive standardized RGO theorem produces a measurable p, its stationarity, the affine pushforward r_y and its actual normalized Gibbs identification, with gradient-rho L2. The same p occurs in rho, the affine map, and the evaluator. No Jacobian or probability identity is assumed.

\[p_y+\eta\nabla V(p_y)=y,\quad r_y=(x\mapsto\eta^{-1/2}(x-p_y))_\#R_y\propto e^{-\|u\|^2/2-\rho_y(u)}du.\]
Corresponding Lean step

StandardizedRGOPositionFisher.standardized_rgo_position_and_fisher

7. Integrate the exact standardized chain rule

The internally derived Frechet/Riesz chain identity gives grad_rho(u)=sqrteta times (gradV(p+sqrteta*u)-gradVp). Actual gradient-rho L2 supplies all needed first moments. Push the affine observable through the same r=T#R, use the exact inverse map, and integrate constants/scalars. This proves both printed Ex9 identities while leaving all bias/transport/cost bounds separate.

\[\nabla\rho_y(u)=\sqrt\eta(\nabla V(p_y+\sqrt\eta u)-\nabla V(p_y)),\quad\nabla V_\eta(y)=\nabla V(p_y)+\eta^{-1/2}\mathbb E_{r_y}\nabla\rho_y(U).\]
Corresponding Lean step

rho_gradient; integral_map; integral_add; integral_smul; integral_const; actual heval/hmap

Lean verification

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

Lean proof · smoothed_score_posterior

Keep the exact unnormalized convolution; Reuse the true everywhere Gaussian-convolution derivative; Construct the actual posterior Gibbs potential; Cancel the actual posterior gradient mean; Identify the true smoothed score; Reuse the same produced proximal selector and standardized law; Integrate the exact standardized chain rule

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_score_posterior
    {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E]
    [CompleteSpace E] [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E]
    {V : E → ℝ} {κ η : ℝ} (hκ : 1 ≤ κ) (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 : E => -Real.log (A y)
    let R := fun y : E => μ.tilted (fun x => -‖x-y‖^2/(2*η))
    IsProbabilityMeasure μ ∧ ContDiff ℝ 2 Vη ∧
      (∀ y, IsProbabilityMeasure (R y) ∧ MemLp id 2 (R y) ∧
        Integrable (gradient V) (R y) ∧
        gradient Vη y = ∫ x, gradient V x ∂(R y)) ∧
      ∃ p : E → E, Measurable p ∧ (∀ y, p y+η • gradient V (p y)=y) ∧
        let rho := fun y u => V (p y+Real.sqrt η • u)-V (p y)-
          Real.sqrt η*inner ℝ (gradient V (p y)) u
        let r := fun y => (R y).map (fun x => (Real.sqrt η)⁻¹ • (x-p y))
        ∀ y, r y=(volume : Measure E).tilted (fun u => -(‖u‖^2/2+rho y u)) ∧
          IsProbabilityMeasure (r y) ∧ MemLp (gradient (rho y)) 2 (r y) ∧
          gradient Vη y=gradient V (p y)+(Real.sqrt η)⁻¹ • (∫ u, gradient (rho y) u ∂(r y)) ∧
          ∀ z, gradient V (p y+Real.sqrt η • z)=
            gradient V (p y)+(Real.sqrt η)⁻¹ • gradient (rho y) z := by
  have hk : 0 < κ := lt_of_lt_of_le zero_lt_one hκ
  have ha : 0 < κ⁻¹ := inv_pos.mpr hk
  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 : E => -Real.log (A y)
  let R := fun y : E => μ.tilted (fun x => -‖x-y‖^2/(2*η))
  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⟩ :=
    SmoothedGibbsPotential.smoothed_gibbs_potential ha hV (fun x a => (hH x a).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 hi := AutoSamplingTheory.TechnicalLemmas.Analysis.StrongConvexGibbsIntegrability.integrable_exp_neg_of_strongConvexOn
    ha (hV.differentiable (by norm_num))
    (AutoSamplingTheory.TechnicalLemmas.Analysis.HessianStrongConvexity.strongConvexOn_univ_of_fderiv2_lower hV (fun x a => (hH x a).1))
  have hshiftfun : U = (fun y => Vη y+Real.log ZV) := funext hshift
  have hDU : fderiv ℝ U = fderiv ℝ Vη := by
    rw [hshiftfun]
    funext y
    exact fderiv_add_const _
  have hscore (y : E) : Integrable (gradient V) (R y) ∧
      gradient Vη y = ∫ x, gradient V x ∂(R y) := by
    let W := fun x => V x+η⁻¹/2*‖x-y‖^2
    have hW : ContDiff ℝ 2 W := hV.add (contDiff_const.mul ((contDiff_id.sub contDiff_const).norm_sq (𝕜 := ℝ)))
    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 hq (x : E) : HasFDerivAt (fun z => η⁻¹/2*‖z-y‖^2)
        (η⁻¹ • innerSL ℝ (x-y)) x := by
      convert (((hasFDerivAt_id x).sub_const y).norm_sq).const_mul (η⁻¹/2)
        using 1 <;> first | rfl | (ext a; simp; ring)
    have hWfd (x : E) : fderiv ℝ W x = fderiv ℝ V x+η⁻¹ • innerSL ℝ (x-y) :=
      ((hVd x).hasFDerivAt.add (hq x)).fderiv
    let J : E →L[ℝ] (E →L[ℝ] ℝ) :=
      {toFun := fun a => innerSL ℝ a
       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+η⁻¹ • J) x := by
      rw [show fderiv ℝ W=(fun z => fderiv ℝ V z+η⁻¹ • innerSL ℝ (z-y)) from funext hWfd]
      convert (hVdd x).hasFDerivAt.add ((J.hasFDerivAt.comp x ((hasFDerivAt_id x).sub_const y)).const_smul η⁻¹) using 1 <;> rfl
    have hb (x a : E) : (κ⁻¹+η⁻¹)*‖a‖^2 ≤ fderiv ℝ (fderiv ℝ W) x a a ∧
        fderiv ℝ (fderiv ℝ W) x a a ≤ (1+η⁻¹)*‖a‖^2 := by
      rw [(hWdd x).fderiv]
      change (κ⁻¹+η⁻¹)*‖a‖^2 ≤ fderiv ℝ (fderiv ℝ V) x a a+η⁻¹*inner ℝ a a ∧
        fderiv ℝ (fderiv ℝ V) x a a+η⁻¹*inner ℝ a a ≤ (1+η⁻¹)*‖a‖^2
      rw [real_inner_self_eq_norm_sq]
      constructor <;> nlinarith [(hH x a).1,(hH x a).2]
    have hgradW (x : E) : gradient W x = gradient V x+η⁻¹ • (x-y) := by
      apply ext_inner_right ℝ
      intro a
      rw [inner_gradient_left,hWfd]
      simp only [add_apply,smul_apply,innerSL_apply_apply,inner_add_left,real_inner_smul_left,inner_gradient_left,smul_eq_mul]
    let α : ℝ≥0 := ⟨κ⁻¹+η⁻¹,by positivity⟩
    let β : ℝ≥0 := ⟨1+η⁻¹,by positivity⟩
    have hα : 0 < α := by change 0 < κ⁻¹+η⁻¹; positivity
    have hmean := AutoSamplingTheory.TechnicalLemmas.Analysis.GibbsGradientMean.integrable_gradient_and_integral_eq_zero
      (α := α) (β := β) hα 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]
      field_simp [hη.ne']
      ring
    have : IsProbabilityMeasure (R y) := (hRm y).1
    have hX : Integrable (fun x : E => x) (R y) := (hRm y).2.integrable (by norm_num)
    have hqint : Integrable (fun x => η⁻¹ • (x-y)) (R y) :=
      (hX.sub (integrable_const y)).smul η⁻¹
    have hgw : Integrable (gradient W) (R y) := hRW.symm ▸ hmean.2.1
    have hgv : Integrable (gradient V) (R y) := by
      convert hgw.sub hqint using 1
      funext x
      change gradient V x = gradient W x-η⁻¹ • (x-y)
      rw [hgradW]
      abel
    have hz : (∫ x, gradient V x ∂(R y))+η⁻¹ • ((∫ x, x ∂(R y))-y) = 0 := by
      have he : (∫ x, gradient W x ∂(R y)) = 0 := hRW.symm ▸ hmean.2.2
      simp_rw [hgradW] at he
      rw [integral_add hgv hqint,integral_smul,integral_sub hX (integrable_const y)] at he
      simpa only [integral_const,probReal_univ,one_smul] using he
    have hemean : (∫ x, gradient V x ∂(R y)) = η⁻¹ • (y-∫ x, x ∂(R y)) := by
      calc
        _ = -(η⁻¹ • ((∫ x, x ∂(R y))-y)) := eq_neg_of_add_eq_zero_left hz
        _ = _ := by rw [← smul_neg,neg_sub]
    refine ⟨hgv,?_⟩
    rw [hemean]
    apply ext_inner_right ℝ
    intro v
    rw [inner_gradient_left,← hDU,hD]
    simp only [real_inner_smul_left]
    change inner ℝ (y-∫ x,x ∂(R y)) v/η = η⁻¹*inner ℝ (y-∫ x,x ∂(R y)) v
    ring
  refine ⟨hμ,hC2,(fun y => ⟨(hRm y).1,(hRm y).2,(hscore y).1,(hscore y).2⟩),?_⟩
  obtain ⟨p,hpm,hstat,hstd⟩ :=
    StandardizedRGOPositionFisher.standardized_rgo_position_and_fisher hκ hV hH
      (eta := fun _ : E => η) (y := fun x => x) measurable_const measurable_id (fun _ => hη)
  refine ⟨p,hpm,hstat,?_⟩
  let rho := fun y u => V (p y+Real.sqrt η • u)-V (p y)-
    Real.sqrt η*inner ℝ (gradient V (p y)) u
  let r := fun y => (R y).map (fun x => (Real.sqrt η)⁻¹ • (x-p y))
  change ∀ y, r y=(volume : Measure E).tilted (fun u => -(‖u‖^2/2+rho y u)) ∧
    IsProbabilityMeasure (r y) ∧ MemLp (gradient (rho y)) 2 (r y) ∧
    gradient Vη y=gradient V (p y)+(Real.sqrt η)⁻¹ • (∫ u, gradient (rho y) u ∂(r y)) ∧
    ∀ z, gradient V (p y+Real.sqrt η • z)=
      gradient V (p y)+(Real.sqrt η)⁻¹ • gradient (rho y) z
  intro y
  obtain ⟨_hRp,_hρ,_hQ,_hρ0,_hQ0,_hρH,_hQH,hrlaw,hrp,_hrX,_hrXI,_hrXb,hrρ,_hrρa,_hrρb⟩ := hstd.2 y
  have : IsProbabilityMeasure (r y) := hrp
  have heval (z : E) : gradient V (p y+Real.sqrt η • z) =
      gradient V (p y)+(Real.sqrt η)⁻¹ • gradient (rho y) z := by
    have hρ := rho_gradient hV (p y) η z
    change gradient (rho y) z = _ at hρ
    rw [hρ,smul_smul,inv_mul_cancel₀ (Real.sqrt_pos.mpr hη).ne',one_smul]
    abel
  refine ⟨hrlaw,hrp,hrρ,?_,heval⟩
  have hρint : Integrable (gradient (rho y)) (r y) := hrρ.integrable (by norm_num)
  have hρscaled : Integrable (fun u => (Real.sqrt η)⁻¹ • gradient (rho y) u) (r y) :=
    hρint.smul (Real.sqrt η)⁻¹
  have hconst : Integrable (fun _ : E => gradient V (p y)) (r y) := integrable_const _
  have hFint : Integrable (fun u => gradient V (p y+Real.sqrt η • u)) (r y) := by
    convert hconst.add hρscaled using 1 <;> try rfl
    funext u
    change gradient V (p y+Real.sqrt η • u)=gradient V (p y)+(Real.sqrt η)⁻¹ • gradient (rho y) u
    exact heval u
  have hmap : (∫ u, gradient V (p y+Real.sqrt η • u) ∂(r y)) =
      ∫ x, gradient V x ∂(R y) := by
    rw [show r y=(R y).map (fun x => (Real.sqrt η)⁻¹ • (x-p y)) from rfl,
      integral_map (by fun_prop) hFint.aestronglyMeasurable]
    apply integral_congr_ae
    filter_upwards with x
    congr 1
    rw [smul_smul,mul_inv_cancel₀ (Real.sqrt_pos.mpr hη).ne',one_smul]
    abel
  rw [(hscore y).2,← hmap]
  simp_rw [heval]
  rw [integral_add hconst hρscaled,integral_smul,
    integral_const,probReal_univ,one_smul]

end
end AutoSamplingTheory.ExampleCases.SmoothedPicardHMC.SmoothedScorePosterior

Exact module and namespace context

Scope and omitted-condition boundaries
  • Only actual Gibbs gradient mean zero and source3.1/S4.Ex9 genuine smoothed-score/posterior/standardized-chain identity. No supplied means/moments/normalizers/IBP/gradient equality/selector; exact eta>0. No bias4.2, FIRST4.6W2/LSI/T2, fullLemma4.2, algorithm/work/main/composition credit. Actual RGO law is not Gaussian gradient-output or HMC. Focused3751 passed, standard3 only; independent math/blind/source/exactcommit/publication/integration admission pending. RenderedQA, Copy/Download implementation and postmerge purification remain open.
Sources, dependencies, and reuse

Source and reuse

Samplinglib parents called

Mathlib API called (external library)

  • MeasureTheory.tilted_tilted
  • MeasureTheory.integral_map
  • MeasureTheory.integral_add
  • MeasureTheory.integral_smul
  • fderiv_add_const
  • inner_gradient_left

Mathematical sources

  • Exact source mean identity and its internal analytic background — Only actual Gibbs gradient mean zero and source3.1/S4.Ex9 genuine smoothed-score/posterior/standardized-chain identity. No supplied means/moments/normalizers/IBP/gradient equality/selector; exact eta>0. No bias4.2, FIRST4.6W2/LSI/T2, fullLemma4.2, algorithm/work/main/composition credit. Actual RGO law is not Gaussian gradient-output or HMC. Focused3751 passed, standard3 only; independent math/blind/source/exactcommit/publication/integration admission pending. RenderedQA, Copy/Download implementation and postmerge purification remain open.

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