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

ObservationConditionalKernel: 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 observation-conditioned retained-state execution
ASTIS mathematical exposition

Actual observation-conditioned retained-state execution

AutoSamplingTheory.ExampleCases.SmoothedPicardHMC.ObservationConditionalKernel.observation_conditional_kernel · theorem · Teaching coverage

Statement

There exist a Markov joint kernel J:S->(E x S) and a Markov absorbed transition P:S->S. For every s, J_s is the pushforward of M_s product gamma_E by (x,z) -> (obs(s,(x,z)),U(s,(x,z))). Its first marginal is exactly G(M_s,sqrt(tau_s/(beta+b))). The kernel identity J.fst compProd J.condKernel=J holds. For each s, for J.fst_s-almost every y, for J.condKernel(s,y)-almost every t, t.precision=bp_s and t.center=bp_s^(-1)*(b*u+v_s^(-1)*y). For every actual Markov R:S->E, every s and every measurable A, the nonnegative integral of R(U(s,(x,z)),A) under M_s product gamma_E equals the iterated nonnegative integral of R(t,A) first under J.condKernel(s,y), then under J.fst_s. P_s is dirac_s when threshold<=b and the pushforward by U otherwise. If b<threshold, (R composed with P)(s,A) equals the same conditional iterated integral.

\[J_s=(\mathrm{obs}_s,U_s)_\#(M_s\otimes\gamma_E)=Q_s\otimes C_s,\qquad (R\circ P)(s,A)=\int\!\int R(t,A)\,C(s,y,dt)\,Q_s(dy)\quad(b_s< b_*).\]

All objects and hypotheses

  • E is a finite-dimensional real inner-product Borel space of positive dimension d. V:E->R is C2 and its genuine Hessian satisfies alpha*norm(w)^2 <= D2V(x)[w,w] <= beta*norm(w)^2 for all x,w. The nonnegative reals alpha,beta satisfy0<alpha<=beta.
  • The full state is S=NNReal x E x E x Nat x (Nat->E), written s=(b,u,xref,k,history). M:S->E is an actual Markov kernel. eta,tau:S->R are measurable and strictly positive at every state; they may depend on all coordinates. Fix any nonnegative precision threshold. No source schedule,initial-reference admissibility,history origin,accuracy or moment assumption is imposed.
  • Put v_s=(eta_s+tau_s)/(beta+b), bp_s=b+toNNReal(v_s^(-1)), and obs(s,(x,z))=x+sqrt(tau_s/(beta+b))*z. The next center is center(s,(x,z))=bp_s^(-1)*(b*u+v_s^(-1)*obs(s,(x,z))). The observation variance tau_s/(beta+b) is distinct from the RGO update variance v_s.
  • Define F_p(w)=V(w)+bp_s/2*norm(w-center(p))^2 and T_p(w)=w-(beta+bp_s)^(-1)*grad F_p(w), where p=(s,(x,z)). N_p is the least n with norm(grad F_p(T_p^n(x)))^2 <= (alpha+bp_s)*d, or zero if none exists. The actual update is U(p)=(bp_s,center(p),T_p^N_p(x),k+1,prepend(obs(p),history)). It uses the pre-noise sample x to initialize GD, and retains the full reference and history.
  • gamma_E denotes standard Gaussian measure. Gaussian smoothing G(mu,sigma) is the pushforward of mu product the law of sigma*Z under addition. J.fst denotes the observation marginal of a joint kernel J:S->(E x S). J.condKernel is the parameterized Markov conditional state kernel (s,y)->S supplied by standard-Borel disintegration. R composed with P means first draw a state from P and then an output from R.

Mathematical proof

1. Keep the exact pre-noise reference update

Apply ReferenceCarryingKernel under the genuine Hessian assumptions. Its measurable update contains the true first inner GD hit from x, the precision-weighted center, and the complete reference/count/history. The private firstIndex definition is definitionally the same fallback/least-hit function as the parent. No reference is supplied as a free observation-only function.

\[U(s,x,z)=(b^+,u^+,T_{s,x,z}^{N_{s,x,z}}x,k+1,\mathrm{prepend}(y,h)).\]
Corresponding Lean step

firstIndex; actual_joint: href,hu

2. Build one joint observation and updated-state law

Set Q=M times the constant standard Gaussian kernel. Pair the input state with this draw using the identity kernel, then push forward by the measurable pair (obs,update). Both coordinates therefore refer to the same x,z. The product and measurable-map kernel instances prove the resulting J is Markov.

\[J_s=(\mathrm{obs}_s,U_s)_\#(M_s\otimes\gamma_E).\]
Corresponding Lean step

joint: Q,f,hf,J,hJs

3. Identify the actual observation marginal

Project the joint pushforward onto its first coordinate. Composition of measurable maps removes update while preserving the actual observation x+sigma_s*z. The product pushforward identity moves Gaussian scaling into its noise marginal, giving the existing GaussianSmoothing definition exactly. No Wasserstein or KL assumption is used.

\[Q_s=(J_s)_{\rm fst}=G(M_s,\sqrt{\tau_s/(\beta+b_s)}).\]
Corresponding Lean step

joint: hfs,hp,Kernel.fst_apply,Measure.map_map,Measure.map_prod_map

4. Disintegrate jointly in state and observation

The full state has a standard Borel structure and is nonempty, and the finite-dimensional observation space is countably generated. The finite Markov J therefore has a parameterized Markov conditional kernel on (s,y). Mathlib disintegrate gives a kernel identity, not separate nonmeasurable choices of a conditional measure for each s.

\[Q\otimes_{\rm k}J.\mathrm{condKernel}=J.\]
Corresponding Lean step

joint: Kernel.disintegrate J J.condKernel

5. Recover deterministic precision and center only almost everywhere

Under the actual joint pushforward the next precision and center equal their source formulas for every original x,z. Their equality event is measurable. Transfer its full measure through the map, rewrite J by its disintegration, and apply the kernel AE Fubini direction. This gives the nested AE statement; conditional versions on null observation fibers are not constrained.

\[Q_s\text{-a.e. }y,\ C(s,y)\text{-a.e. }t:\quad b_t=b_s^+,\quad u_t=(b_s^+)^{-1}(b_su_s+v_s^{-1}y).\]
Corresponding Lean step

actual_conditional: hf,hm,Kernel.ae_ae_of_ae_compProd,ae_map_iff

6. Factor any actual remaining output

For measurable A the function (y,t)->R(t,A) is measurable and nonnegative. Integrate it against the disintegration and then rewrite the same J as the actual joint pushforward. The nonnegative compProd/map formulas yield the equality without a finite moment or integrability premise. R may depend on the retained reference and history.

\[\int R(U_s(x,z),A)\,d(M_s\otimes\gamma_E)=\int\!\int R(t,A)\,dC(s,y)\,dQ_s(y).\]
Corresponding Lean step

actual_conditional: hr,hi,Kernel.lintegral_compProd,lintegral_map

7. Connect the absorbed execution on its active branch

Take the actual P constructed by ReferenceCarryingKernel. At b<threshold its law is precisely the update pushforward. The kernel composition integral and the measurable map formula reduce (R composed with P)(s,A) to the preceding equality. At terminal states P is a self-loop, so no such identification with hypothetical continuing J is asserted.

\[b_s<b_*\Rightarrow (R\circ P)(s,A)=\int\!\int R(t,A)\,dC(s,y)\,dQ_s(y).\]
Corresponding Lean step

observation_conditional_kernel: href,hu,P,hPs,hum,hfactor

Lean statement · observation_conditional_kernel

Actual joint observation and retained-state law, Gaussian marginal, conditional support and active execution factorization.

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 observation_conditional_kernel {V : E → ℝ} {α β : ℝ≥0}
    (hα : 0 < α) (hαβ : α ≤ β) (hV : ContDiff ℝ 2 V)
    (hH : ∀ x w : E, (α:ℝ)*‖w‖^2 ≤ fderiv ℝ (fderiv ℝ V) x w w ∧
      fderiv ℝ (fderiv ℝ V) x w w ≤ (β:ℝ)*‖w‖^2)
    (hd : 0 < (Module.finrank ℝ E : ℝ))
    (η τ : RefState E → ℝ) (hη : Measurable η) (hτ : Measurable τ)
    (hη0 : ∀ s, 0 < η s) (hτ0 : ∀ s, 0 < τ s)
    (M : Kernel (RefState E) E) [IsMarkovKernel M] (threshold : ℝ≥0) :
    let d : ℝ := Module.finrank ℝ E
    let v := fun s : RefState E => (η s+τ s)/((β:ℝ)+s.1)
    let bp := fun s : RefState E => s.1+Real.toNNReal (v s)⁻¹
    let obs := fun p : RefState E × (E × E) => p.2.1+Real.sqrt (τ p.1/((β:ℝ)+p.1.1)) • p.2.2
    let center := fun p : RefState E × (E × E) => (bp p.1:ℝ)⁻¹ •
      ((p.1.1:ℝ) • p.1.2.1+(v p.1)⁻¹ • obs p)
    let F := fun p x => V x+(bp p.1:ℝ)/2*‖x-center p‖^2
    let T := fun p x => x-((β:ℝ)+bp p.1)⁻¹ • gradient (F p) x
    let q := fun n p => ‖gradient (F p) ((T p)^[n] p.2.1)‖^2
    let N := firstIndex q (fun p => ((α:ℝ)+bp p.1)*d)
    let out := fun p => (T p)^[N p] p.2.1
    let update := fun p : RefState E × (E × E) =>
      (bp p.1,center p,out p,p.1.2.2.2.1+1,fun n => Nat.casesOn n (obs p) p.1.2.2.2.2)
    ∃ J : Kernel (RefState E) (E × RefState E), ∃ hJ : IsMarkovKernel J,
      letI := hJ
      (∀ s, J s = ((M s).prod (stdGaussian E)).map
        (fun z => (obs (s,z),update (s,z)))) ∧
      (∀ s, J.fst s =
        AutoSamplingTheory.TechnicalLemmas.Measure.GaussianSmoothing.gaussianSmoothing
          (M s) (Real.sqrt (τ s/((β:ℝ)+s.1)))) ∧
      J.fst ⊗ₖ J.condKernel = J ∧
      (∀ s, ∀ᵐ y ∂J.fst s, ∀ᵐ t ∂J.condKernel (s,y),
        t.1=bp s ∧ t.2.1=(bp s:ℝ)⁻¹ • ((s.1:ℝ) • s.2.1+(v s)⁻¹ • y)) ∧
      (∀ (R : Kernel (RefState E) E) [IsMarkovKernel R] (s : RefState E)
        (A : Set E), MeasurableSet A →
        (∫⁻ z, R (update (s,z)) A ∂(M s).prod (stdGaussian E)) =
        ∫⁻ y, ∫⁻ t, R t A ∂J.condKernel (s,y) ∂J.fst s) ∧
      ∃ P : Kernel (RefState E) (RefState E), ∃ hP : IsMarkovKernel P,
        letI := hP
        (∀ s, P s=if threshold ≤ s.1 then Measure.dirac s else
          ((M s).prod (stdGaussian E)).map (fun z => update (s,z))) ∧
        ∀ (R : Kernel (RefState E) E) [IsMarkovKernel R] (s : RefState E),
          s.1 < threshold → ∀ A : Set E, MeasurableSet A →
          (R ∘ₖ P) s A = ∫⁻ y, ∫⁻ t, R t A ∂J.condKernel (s,y) ∂J.fst s

Exact module and namespace context

Lean proof · observation_conditional_kernel

Measurable product pushforward, parameterized disintegration, AE conditional support and nonnegative integration on the actual active branch.

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 observation_conditional_kernel {V : E → ℝ} {α β : ℝ≥0}
    (hα : 0 < α) (hαβ : α ≤ β) (hV : ContDiff ℝ 2 V)
    (hH : ∀ x w : E, (α:ℝ)*‖w‖^2 ≤ fderiv ℝ (fderiv ℝ V) x w w ∧
      fderiv ℝ (fderiv ℝ V) x w w ≤ (β:ℝ)*‖w‖^2)
    (hd : 0 < (Module.finrank ℝ E : ℝ))
    (η τ : RefState E → ℝ) (hη : Measurable η) (hτ : Measurable τ)
    (hη0 : ∀ s, 0 < η s) (hτ0 : ∀ s, 0 < τ s)
    (M : Kernel (RefState E) E) [IsMarkovKernel M] (threshold : ℝ≥0) :
    let d : ℝ := Module.finrank ℝ E
    let v := fun s : RefState E => (η s+τ s)/((β:ℝ)+s.1)
    let bp := fun s : RefState E => s.1+Real.toNNReal (v s)⁻¹
    let obs := fun p : RefState E × (E × E) => p.2.1+Real.sqrt (τ p.1/((β:ℝ)+p.1.1)) • p.2.2
    let center := fun p : RefState E × (E × E) => (bp p.1:ℝ)⁻¹ •
      ((p.1.1:ℝ) • p.1.2.1+(v p.1)⁻¹ • obs p)
    let F := fun p x => V x+(bp p.1:ℝ)/2*‖x-center p‖^2
    let T := fun p x => x-((β:ℝ)+bp p.1)⁻¹ • gradient (F p) x
    let q := fun n p => ‖gradient (F p) ((T p)^[n] p.2.1)‖^2
    let N := firstIndex q (fun p => ((α:ℝ)+bp p.1)*d)
    let out := fun p => (T p)^[N p] p.2.1
    let update := fun p : RefState E × (E × E) =>
      (bp p.1,center p,out p,p.1.2.2.2.1+1,fun n => Nat.casesOn n (obs p) p.1.2.2.2.2)
    ∃ J : Kernel (RefState E) (E × RefState E), ∃ hJ : IsMarkovKernel J,
      letI := hJ
      (∀ s, J s = ((M s).prod (stdGaussian E)).map
        (fun z => (obs (s,z),update (s,z)))) ∧
      (∀ s, J.fst s =
        AutoSamplingTheory.TechnicalLemmas.Measure.GaussianSmoothing.gaussianSmoothing
          (M s) (Real.sqrt (τ s/((β:ℝ)+s.1)))) ∧
      J.fst ⊗ₖ J.condKernel = J ∧
      (∀ s, ∀ᵐ y ∂J.fst s, ∀ᵐ t ∂J.condKernel (s,y),
        t.1=bp s ∧ t.2.1=(bp s:ℝ)⁻¹ • ((s.1:ℝ) • s.2.1+(v s)⁻¹ • y)) ∧
      (∀ (R : Kernel (RefState E) E) [IsMarkovKernel R] (s : RefState E)
        (A : Set E), MeasurableSet A →
        (∫⁻ z, R (update (s,z)) A ∂(M s).prod (stdGaussian E)) =
        ∫⁻ y, ∫⁻ t, R t A ∂J.condKernel (s,y) ∂J.fst s) ∧
      ∃ P : Kernel (RefState E) (RefState E), ∃ hP : IsMarkovKernel P,
        letI := hP
        (∀ s, P s=if threshold ≤ s.1 then Measure.dirac s else
          ((M s).prod (stdGaussian E)).map (fun z => update (s,z))) ∧
        ∀ (R : Kernel (RefState E) E) [IsMarkovKernel R] (s : RefState E),
          s.1 < threshold → ∀ A : Set E, MeasurableSet A →
          (R ∘ₖ P) s A = ∫⁻ y, ∫⁻ t, R t A ∂J.condKernel (s,y) ∂J.fst s := by
  classical
  intro d v bp obs center F T q N out update
  obtain ⟨J,hJ,hJs,hJfst,hdis,hsupp,hfactor⟩ :=
    actual_conditional hα hαβ hV hH hd η τ hη hτ hη0 hτ0 M threshold
  let := hJ
  have href := AutoSamplingTheory.ExampleCases.SmoothedPicardHMC.ReferenceCarryingKernel.reference_carrying_kernel
    hα hαβ hV hH hd η τ hη hτ hη0 hτ0 M threshold
  have hu : Measurable update := href.2.2.2.1
  obtain ⟨P,hP,hPs,hproj⟩ := href.2.2.2.2.2
  let := hP
  refine ⟨J,hJ,hJs,hJfst,hdis,hsupp,hfactor,P,hP,hPs,?_⟩
  intro R hR s hs A hA
  rw [Kernel.comp_apply' R P s hA,hPs s,if_neg (not_le.mpr hs)]
  change (∫⁻ t, R t A ∂(((M s).prod (stdGaussian E)).map
    (fun z => update (s,z)))) = _
  have hum : Measurable (fun z : E × E => update (s,z)) :=
    hu.comp (measurable_const.prodMk measurable_id)
  rw [lintegral_map (R.measurable_coe hA) hum]
  exact hfactor R s A hA

end AutoSamplingTheory.ExampleCases.SmoothedPicardHMC.ObservationConditionalKernel

Exact module and namespace context

Scope and omitted-condition boundaries

  • Actual observation-conditioned retained-state execution component, not KL propagation or either complete paper. C2 genuine Hessian bounds strengthen source regularity; positive finite dimension and0<alpha<=beta are explicit. Eta,tau and M may depend on all state coordinates. M and R are arbitrary actual Markov kernels with no approximation/moment guarantees, and initial reference/count/history are arbitrary. J describes hypothetical unabsorbed update on all states; its output factorization identifies actual absorbed P only on b<threshold. Threshold0 makes this active interface empty. Precision/center support is doubly almost everywhere, not for all conditional fibers. The reference is not reconstructed from y; its law is retained in the joint pushforward. No ideal posterior,source schedule,depth,initial admissibility,final accuracy,KL recurrence,cost or TV-to-unbounded-cost conclusion.

Source and reuse

ASTIS parents called

Mathlib API called (external library)

  • ProbabilityTheory.Kernel.disintegrate
  • ProbabilityTheory.Kernel.condKernel
  • ProbabilityTheory.Kernel.ae_ae_of_ae_compProd
  • ProbabilityTheory.Kernel.lintegral_compProd
  • MeasureTheory.Measure.map_prod_map
  • MeasureTheory.lintegral_map

Mathematical sources

  • SPHMC Algorithm3.3 and Section6.3 after(6.5) — Actual observation-conditioned retained-state execution component, not KL propagation or either complete paper. C2 genuine Hessian bounds strengthen source regularity; positive finite dimension and0<alpha<=beta are explicit. Eta,tau and M may depend on all state coordinates. M and R are arbitrary actual Markov kernels with no approximation/moment guarantees, and initial reference/count/history are arbitrary. J describes hypothetical unabsorbed update on all states; its output factorization identifies actual absorbed P only on b<threshold. Threshold0 makes this active interface empty. Precision/center support is doubly almost everywhere, not for all conditional fibers. The reference is not reconstructed from y; its law is retained in the joint pushforward. No ideal posterior,source schedule,depth,initial admissibility,final accuracy,KL recurrence,cost or TV-to-unbounded-cost conclusion.

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