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

Actual terminal reference, FORS kernel and source program

AutoSamplingTheory.ExampleCases.SmoothedPicardHMC.TerminalFORSKernel.terminal_fors_kernel · theorem · Teaching coverage

Statement

N and xp are measurable, the actual terminal gradient threshold holds and every earlier iterate fails it, and norm(h-xp)<=sqrt(d*A). There exists a single Markov kernel R on the whole state space whose fiber is the measurable first-success program output law; never-hit has rho_s measure zero and the actual sampling-stage integral of1+queryCount is at most1+2*exp(2). Each pi_s is a probability, pi_s and R(s) are mutually absolutely continuous, both RN ell-powers are integrable under their respective denominator laws with strictly positive integrals at most1+eps^2, and both log-integral/(ell-1) bounds are at most eps^2. Phi_s pushes rho_s to the original retry law, preserves acceptance and full-batch counts on every stream, and makes old default-u output equal to new default-zero output almost everywhere.

\[\rho_s\circ\mathrm{output}_s^{-1}=R_s,\qquad \int^- (1+C_s)\,d\rho_s\le1+2e^2,\qquad \int\!\left(\frac{d\pi_s}{dR_s}\right)^\ell dR_s\le1+\varepsilon^2.\]

All objects and hypotheses

  • E is a finite-dimensional real inner-product Borel space with d=dim(E)>0; S is any measurable state space. V:E->R is fixed and C2. Its genuine Hessian lies between alpha*norm(v)^2 and beta*norm(v)^2, with nonnegative alpha<=beta and beta>0.
  • The functions b:S->R and u,initial:S->E are measurable and b(s)>0. The fixed parameters ell,eps satisfy ell>=2 and0<eps<=1/2. Every state satisfies 64*beta*(sqrt(d*(ell+log(1/eps)))+ell+log(1/eps))<=b(s). No execution reachability of this terminal domain is assumed or concluded.
  • Set A(s)=1/b(s), F_s(x)=V(x)+b(s)/2*norm(x-u(s))^2 and T_s(x)=x-(beta+b(s))^(-1)*grad F_s(x). N(s) is the least n with norm(grad F_s(T_s^n(initial(s))))^2<=d*b(s), with fallback zero if no n exists. Set xp(s)=T_s^N(s)(initial(s)), g(s)=grad V(xp(s)) and h(s)=u(s)-A(s)*g(s). Finite attainment and the reference residual are proved, not additional hypotheses.
  • Let nu0 be Lebesgue restricted to Ioc(0,1) product standardGaussian, and q_s the law of h(s)+sqrt(A(s))*Z. For z=(t,zeta), the cached arc estimator is inner((pi/2)*(cos(pi*t/2)*(x-h)-sin(pi*t/2)*zeta),g-grad V(h+sin(pi*t/2)*(x-h)+cos(pi*t/2)*zeta)). W_s uses zeta=sqrt(A(s))*Z and clips this scalar to[-1,1]. The arc time uniform is distinct from the acceptance uniform on Icc(0,1).
  • An attempt p=(x,n,(zseq,v)) has law q_s product Poisson(2) product (infinitePi nu0 product uniformIcc(0,1)). It accepts iff v<=product over i:Fin n of(1+W_s(x,zseq(i)))/2. rho_s is the infinite product of independent attempts. output_s is the proposal at the first accepting attempt, or0 if none. queryCount sums each batch size when all earlier attempts failed, including the successful batch. The charged sampling-stage count is1+queryCount.
  • The target pi_s is the Gaussian law u(s)+sqrt(A(s))*Z tilted by -V. The original auxiliary law nua_s uses Gaussian variance A(s) instead of the standard Gaussian. Wa_s clips the same cached estimator without scaling inside. The stream map Phi_s scales each auxiliary Gaussian coordinate and preserves every proposal, batch size, arc time and acceptance uniform. The old program default is u(s).

Mathematical proof

1. Construct the actual terminal first hit

Differentiate the genuine regularized potential and write its GD iterates using grad V and b(s)*(x-u(s)). Induction gives joint measurability of each iterate. The old terminal-GD theorem supplies a finite witness at the same threshold d*b. Measurable least-index selection then gives N and xp, the threshold, and strict failure of every earlier index. It does not replace this index by the inner-stage threshold.

\[N_s=\min\{n:\|\nabla F_s(T_s^n x_{\rm init,s})\|^2\le db_s\}.\]
Corresponding Lean step

state_iterates; firstIndex; stopped_family; variable_reference

2. Derive the reference residual and base smoothness

The genuine gradient identity yields h-xp=-A*grad F_s(xp). Squaring the norm and using the terminal stopping bound gives the source residual sqrt(d*A). Applying the quadratic-regularization theorem with zero added precision derives Lipschitz continuity of grad V directly from its genuine Hessian bounds.

\[\|h_s-xp_s\|=A_s\|\nabla F_s(xp_s)\|\le\sqrt{dA_s}.\]
Corresponding Lean step

variable_reference: he,hstop,hid; terminal_fors_kernel: href,hlip

3. Build the parameterized Gaussian proposal

Retain the state with a product kernel and push it through(s,z)->h(s)+sqrt(A(s))*z. Joint measurability proves this is one Markov proposal kernel Q, not an unrelated family of pointwise laws. The constructed g and h are measurable because xp and grad V are measurable.

\[Q_s=\mathcal L(h_s+\sqrt{A_s}Z),\qquad g_s=\nabla V(xp_s).\]
Corresponding Lean step

gaussian_proposal; terminal_fors_kernel: hxp,hVm,hAm,hgm,hhm

4. Construct the actual rejection output kernel

Use the fixed auxiliary law nu0. Scale the Gaussian coordinate inside both arc position and velocity, then clip the estimator to[-1,1]. The public Poisson program theorem constructs one Markov R and gives measurability of each actual output function, its exact pushforward law, and the null never-hit event under the same attempt stream.

\[\rho_s=\Lambda_s^{\otimes\mathbb N},\quad (\mathrm{output}_s)_\#\rho_s=R_s,\quad\rho_s(\text{never hit})=0.\]
Corresponding Lean step

scaledCached; measurable_scaledCached; Attempt; attemptLaw; accepted; output; actual_kernel_program: hW,hb,hRs

5. Charge the complete sampled batches

queryCount includes batch n whenever all earlier batches failed, so the successful batch is charged in full. The Poisson parent bounds this actual nonnegative integral by2exp2. The retry law is a probability, so adding the one cached gradient gives1+2exp2. Finding xp is separate and its last gradient check is not silently discounted.

\[C_s(\omega)=\sum_{n\ge0}N_n\mathbf1\{\text{all earlier attempts fail}\},\quad\int^-(1+C_s)d\rho_s\le1+2e^2.\]
Corresponding Lean step

queryCount; actual_kernel_program: hc0,hc', probability instances,lintegral_add_left

6. Identify the original scaled auxiliary law

The map(t,z)->(t,sqrt(A)*z) pushes nu0 to the source auxiliary law nua. Pushforward integration shows the clipped scaled estimator mean is exactly the old clipped cached-estimator mean. This identifies the very same R(s) with the old terminal theorem output tilt.

\[(t,z)\mapsto(t,\sqrt{A_s}z),\quad (f_s)_\#\nu_0=\nu_{A_s},\quad\int W_s\,d\nu_0=\int W_s^{a}\,d\nu_{A_s}.\]
Corresponding Lean step

cachedEstimator; auxiliary_scale; scaled_mean; terminal_fors_kernel: hr

7. Apply accuracy to that same output law

Supply the derived reference residual, genuine gradient Lipschitz bound, positive A and explicit terminal threshold to TerminalSamplerAccuracyCost. Replace its qhat by the identified R(s). Both directions retain their own denominator measure: d pi/d R is integrated under R and d R/d pi under pi. This yields probability, mutual AC, integrability, positive moments, moment bounds and the two normalized logarithmic bounds.

\[0<\int\!\left(\frac{d\pi_s}{dR_s}\right)^\ell dR_s\le1+\varepsilon^2,\quad\frac{\log\int(d\pi_s/dR_s)^\ell dR_s}{\ell-1}\le\varepsilon^2\quad\text{and reverse}.\]
Corresponding Lean step

terminal_fors_kernel: ht,hr,hpi,hpq,hqp,hfi,hri,hfp,hrp,hfb,hrb,hfl,hrl

8. Push forward the whole retry stream

First map every auxiliary sequence coordinate, then the attempt product, then every independent retry coordinate. Mathlib infinitePi_map_pi and product pushforwards prove the full law identity. Proposal points, Poisson batch sizes and acceptance uniforms are unchanged; no independence between the current batch size and its acceptance event is used.

\[(\Phi_s)_\#\rho_s=\rho_s^{a}.\]
Corresponding Lean step

Stream.Attempt; Stream.attemptLaw; Stream.attemptMap; Stream.stream_law; source_correspondence: hl

9. Preserve the actual acceptance and count

The same Fin N acceptance product is evaluated after auxiliary scaling, including the empty product at N=0. Therefore every accepted event and the first successful index agree. The sum over all batches satisfying prior failure has exactly the same summands, proving pointwise equality of full-batch counts.

\[\Phi_s(\omega)_n\in E_s^a\iff\omega_n\in E_s,\qquad C_s^a(\Phi_s\omega)=C_s(\omega).\]
Corresponding Lean step

Stream.accepted; Stream.output; Stream.queryCount; Stream.stream_program; source_correspondence

10. Handle defaults only on the null failure event

With the same fallback, outputs coincide pointwise. The old source default is u(s), while the parameterized program uses0. On a stream with a successful attempt neither default is used. The proved never-hit null event therefore supplies almost-everywhere equality, not equality on every stream. The explicit output-function alignment also checks the B=1 and simplified stream definitions.

\[\mathrm{output}^{a}_{s,u_s}\circ\Phi_s=\mathrm{output}_{s,0}\quad\rho_s\text{-a.e.}\]
Corresponding Lean step

Stream.stream_output_ae; output_eq_stream; source_correspondence; terminal_fors_kernel: hc

Lean statement · terminal_fors_kernel

Actual measurable reference, single terminal Markov kernel, concrete program law/cost, two-way RN accuracy and full source retry-stream correspondence.

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 terminal_fors_kernel {V : E → ℝ} {α β : ℝ≥0}
    (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αβ : α ≤ β) (hβ : 0 < (β:ℝ)) (hd : 0 < (Module.finrank ℝ E : ℝ))
    {b : S → ℝ} {u initial : S → E} (hb : Measurable b)
    (hb0 : ∀ s, 0 < b s) (hu : Measurable u) (hi : Measurable initial)
    (ell eps : ℝ) (hell : 2 ≤ ell) (heps : 0 < eps) (heps1 : eps ≤ 1/2)
    (hstep : ∀ s, 64*(β:ℝ)*(Real.sqrt ((Module.finrank ℝ E:ℝ)*(ell+Real.log (1/eps)))+
      (ell+Real.log (1/eps))) ≤ b s) :
    let d : ℝ := Module.finrank ℝ E
    let F := fun s x => V x+b s/2*‖x-u s‖^2
    let T := fun s x => x-((β:ℝ)+b s)⁻¹ • gradient (F s) x
    let Qn := fun n s => ‖gradient (F s) ((T s)^[n] (initial s))‖^2
    let N := firstIndex Qn (fun s => d*b s)
    let xp := fun s => (T s)^[N s] (initial s)
    let A := fun s => (b s)⁻¹
    let g := fun s => gradient V (xp s)
    let h := fun s => u s-A s • g s
    let ν := (volume.restrict (Ioc (0 : ℝ) 1)).prod (stdGaussian E)
    let W := fun s (p : E × (ℝ × E)) => min 1 (max (-1) (scaledCached V A h g ((s,p.1),p.2)))
    let q := fun s => (stdGaussian E).map (fun z => h s+Real.sqrt (A s) • z)
    let ρ := fun s => Measure.infinitePi (fun _ : ℕ => attemptLaw (q s) ν 1 (by norm_num))
    let π := fun s => ((stdGaussian E).map (fun z => u s+Real.sqrt (A s) • z)).tilted (fun x => -V x)
    let νa := fun s => (volume.restrict (Ioc (0 : ℝ) 1)).prod ((stdGaussian E).map (fun z => Real.sqrt (A s) • z))
    let Wa := fun s (p : E × (ℝ × E)) => min 1 (max (-1) (cachedEstimator V (h s) (g s) p))
    let ρa := fun s => Measure.infinitePi (fun _ : ℕ => attemptLaw (q s) (νa s) 1 (by norm_num))
    let Φ := fun s (ω : ℕ → Attempt E (ℝ × E)) n =>
      Stream.attemptMap (fun p : ℝ × E => (p.1,Real.sqrt (A s) • p.2)) (ω n)
    Measurable N ∧ Measurable xp ∧
    (∀ s, Qn (N s) s ≤ d*b s ∧ (∀ j < N s, d*b s < Qn j s) ∧
      ‖h s-xp s‖ ≤ Real.sqrt (d*A s)) ∧
    ∃ R : Kernel S E, IsMarkovKernel R ∧ ∀ s,
      (Measurable (output (W s) 1 0) ∧ (ρ s).map (output (W s) 1 0)=R s ∧
        ρ s {ω | ∀ n, ω n ∉ accepted (W s) 1}=0 ∧
        (∫⁻ ω, 1+queryCount (W s) 1 ω ∂ρ s) ≤ ENNReal.ofReal (1+2*Real.exp 2)) ∧
      IsProbabilityMeasure (π s) ∧ π s ≪ R s ∧ R s ≪ π s ∧
      Integrable (fun x => ((π s).rnDeriv (R s) x).toReal^ell) (R s) ∧
      Integrable (fun x => ((R s).rnDeriv (π s) x).toReal^ell) (π s) ∧
      0 < (∫ x, ((π s).rnDeriv (R s) x).toReal^ell ∂R s) ∧
      0 < (∫ x, ((R s).rnDeriv (π s) x).toReal^ell ∂π s) ∧
      (∫ x, ((π s).rnDeriv (R s) x).toReal^ell ∂R s) ≤ 1+eps^2 ∧
      (∫ x, ((R s).rnDeriv (π s) x).toReal^ell ∂π s) ≤ 1+eps^2 ∧
      Real.log (∫ x, ((π s).rnDeriv (R s) x).toReal^ell ∂R s)/(ell-1) ≤ eps^2 ∧
      Real.log (∫ x, ((R s).rnDeriv (π s) x).toReal^ell ∂π s)/(ell-1) ≤ eps^2 ∧
      (ρ s).map (Φ s)=ρa s ∧
      (∀ ω n, Φ s ω n ∈ accepted (Wa s) 1 ↔ ω n ∈ accepted (W s) 1) ∧
      (∀ ω, queryCount (Wa s) 1 (Φ s ω)=queryCount (W s) 1 ω) ∧
      (fun ω => output (Wa s) 1 (u s) (Φ s ω)) =ᵐ[ρ s] output (W s) 1 0

Exact module and namespace context

Lean proof · terminal_fors_kernel

Genuine terminal firsthit and residual; fixed auxiliary Markov program; true-law cached cost; scaled mean identity; source RN comparison; full infinite-product reparameterization and AE defaults.

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 terminal_fors_kernel {V : E → ℝ} {α β : ℝ≥0}
    (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αβ : α ≤ β) (hβ : 0 < (β:ℝ)) (hd : 0 < (Module.finrank ℝ E : ℝ))
    {b : S → ℝ} {u initial : S → E} (hb : Measurable b)
    (hb0 : ∀ s, 0 < b s) (hu : Measurable u) (hi : Measurable initial)
    (ell eps : ℝ) (hell : 2 ≤ ell) (heps : 0 < eps) (heps1 : eps ≤ 1/2)
    (hstep : ∀ s, 64*(β:ℝ)*(Real.sqrt ((Module.finrank ℝ E:ℝ)*(ell+Real.log (1/eps)))+
      (ell+Real.log (1/eps))) ≤ b s) :
    let d : ℝ := Module.finrank ℝ E
    let F := fun s x => V x+b s/2*‖x-u s‖^2
    let T := fun s x => x-((β:ℝ)+b s)⁻¹ • gradient (F s) x
    let Qn := fun n s => ‖gradient (F s) ((T s)^[n] (initial s))‖^2
    let N := firstIndex Qn (fun s => d*b s)
    let xp := fun s => (T s)^[N s] (initial s)
    let A := fun s => (b s)⁻¹
    let g := fun s => gradient V (xp s)
    let h := fun s => u s-A s • g s
    let ν := (volume.restrict (Ioc (0 : ℝ) 1)).prod (stdGaussian E)
    let W := fun s (p : E × (ℝ × E)) => min 1 (max (-1) (scaledCached V A h g ((s,p.1),p.2)))
    let q := fun s => (stdGaussian E).map (fun z => h s+Real.sqrt (A s) • z)
    let ρ := fun s => Measure.infinitePi (fun _ : ℕ => attemptLaw (q s) ν 1 (by norm_num))
    let π := fun s => ((stdGaussian E).map (fun z => u s+Real.sqrt (A s) • z)).tilted (fun x => -V x)
    let νa := fun s => (volume.restrict (Ioc (0 : ℝ) 1)).prod ((stdGaussian E).map (fun z => Real.sqrt (A s) • z))
    let Wa := fun s (p : E × (ℝ × E)) => min 1 (max (-1) (cachedEstimator V (h s) (g s) p))
    let ρa := fun s => Measure.infinitePi (fun _ : ℕ => attemptLaw (q s) (νa s) 1 (by norm_num))
    let Φ := fun s (ω : ℕ → Attempt E (ℝ × E)) n =>
      Stream.attemptMap (fun p : ℝ × E => (p.1,Real.sqrt (A s) • p.2)) (ω n)
    Measurable N ∧ Measurable xp ∧
    (∀ s, Qn (N s) s ≤ d*b s ∧ (∀ j < N s, d*b s < Qn j s) ∧
      ‖h s-xp s‖ ≤ Real.sqrt (d*A s)) ∧
    ∃ R : Kernel S E, IsMarkovKernel R ∧ ∀ s,
      (Measurable (output (W s) 1 0) ∧ (ρ s).map (output (W s) 1 0)=R s ∧
        ρ s {ω | ∀ n, ω n ∉ accepted (W s) 1}=0 ∧
        (∫⁻ ω, 1+queryCount (W s) 1 ω ∂ρ s) ≤ ENNReal.ofReal (1+2*Real.exp 2)) ∧
      IsProbabilityMeasure (π s) ∧ π s ≪ R s ∧ R s ≪ π s ∧
      Integrable (fun x => ((π s).rnDeriv (R s) x).toReal^ell) (R s) ∧
      Integrable (fun x => ((R s).rnDeriv (π s) x).toReal^ell) (π s) ∧
      0 < (∫ x, ((π s).rnDeriv (R s) x).toReal^ell ∂R s) ∧
      0 < (∫ x, ((R s).rnDeriv (π s) x).toReal^ell ∂π s) ∧
      (∫ x, ((π s).rnDeriv (R s) x).toReal^ell ∂R s) ≤ 1+eps^2 ∧
      (∫ x, ((R s).rnDeriv (π s) x).toReal^ell ∂π s) ≤ 1+eps^2 ∧
      Real.log (∫ x, ((π s).rnDeriv (R s) x).toReal^ell ∂R s)/(ell-1) ≤ eps^2 ∧
      Real.log (∫ x, ((R s).rnDeriv (π s) x).toReal^ell ∂π s)/(ell-1) ≤ eps^2 ∧
      (ρ s).map (Φ s)=ρa s ∧
      (∀ ω n, Φ s ω n ∈ accepted (Wa s) 1 ↔ ω n ∈ accepted (W s) 1) ∧
      (∀ ω, queryCount (Wa s) 1 (Φ s ω)=queryCount (W s) 1 ω) ∧
      (fun ω => output (Wa s) 1 (u s) (Φ s ω)) =ᵐ[ρ s] output (W s) 1 0 := by
  let d : ℝ := Module.finrank ℝ E
  let F := fun s x => V x+b s/2*‖x-u s‖^2
  let T := fun s x => x-((β:ℝ)+b s)⁻¹ • gradient (F s) x
  let Qn := fun n s => ‖gradient (F s) ((T s)^[n] (initial s))‖^2
  let N := firstIndex Qn (fun s => d*b s)
  let xp := fun s => (T s)^[N s] (initial s)
  let A := fun s => (b s)⁻¹
  let g := fun s => gradient V (xp s)
  let h := fun s => u s-A s • g s
  let ν := (volume.restrict (Ioc (0 : ℝ) 1)).prod (stdGaussian E)
  let W := fun s (p : E × (ℝ × E)) => min 1 (max (-1) (scaledCached V A h g ((s,p.1),p.2)))
  let q := fun s => (stdGaussian E).map (fun z => h s+Real.sqrt (A s) • z)
  let ρ := fun s => Measure.infinitePi (fun _ : ℕ => attemptLaw (q s) ν 1 (by norm_num))
  let π := fun s => ((stdGaussian E).map (fun z => u s+Real.sqrt (A s) • z)).tilted (fun x => -V x)
  let νa := fun s => (volume.restrict (Ioc (0 : ℝ) 1)).prod ((stdGaussian E).map (fun z => Real.sqrt (A s) • z))
  let Wa := fun s (p : E × (ℝ × E)) => min 1 (max (-1) (cachedEstimator V (h s) (g s) p))
  let ρa := fun s => Measure.infinitePi (fun _ : ℕ => attemptLaw (q s) (νa s) 1 (by norm_num))
  let Φ := fun s (ω : ℕ → Attempt E (ℝ × E)) n =>
    Stream.attemptMap (fun p : ℝ × E => (p.1,Real.sqrt (A s) • p.2)) (ω n)
  have href := variable_reference hV hH hαβ hd hb hb0 hu hi
  have hxp : Measurable xp := href.2.1
  have hVm : Measurable (gradient V) :=
    (TechnicalLemmas.Analysis.Calculus.Gradient.continuous_gradient_of_contDiff_one
      (hV.of_le (by norm_num))).measurable
  have hAm : Measurable A := hb.inv
  have hgm : Measurable g := hVm.comp hxp
  have hhm : Measurable h := hu.sub (hAm.smul hgm)
  have hlip : LipschitzWith β (gradient V) := by
    have hh := (TechnicalLemmas.Analysis.QuadraticRegularization.strongConvexOn_and_lipschitzWith_gradient_add_quadratic
      (r:=0) hV hH (0 : E)).2
    simpa using hh
  obtain ⟨R,hR,hRs⟩ := actual_kernel_program hVm hAm hhm hgm
  refine ⟨href.1,hxp,href.2.2.2,R,hR,fun s => ?_⟩
  have hs := hRs s
  refine ⟨⟨hs.1,hs.2.1,hs.2.2.2.1,hs.2.2.2.2⟩,?_⟩
  have hcenter : ‖(u s-A s • gradient V (xp s))-xp s‖ ≤ Real.sqrt (d*A s) :=
    (href.2.2.2 s).2.2
  have ht := TerminalSamplerAccuracyCost.terminal_sampler_accuracy_cost V
    (hV.differentiable (by norm_num)) (A s) (β:ℝ) ell eps
    (inv_pos.mpr (hb0 s)) hβ hell heps heps1 hd hlip (u s) (xp s) hcenter
    (by simpa only [A,one_div,inv_inv] using hstep s)
  have hr := hs.2.2.1
  change R s = (q s).tilted (fun x => ∫ z,
    min 1 (max (-1) (scaledCached V A h g ((s,x),z))) ∂ν) at hr
  dsimp only [ν] at hr
  simp_rw [scaled_mean hVm A h g s] at hr
  rw [hr]
  rcases ht with ⟨_,_,_,_,_,hpi,hpq,hqp,hfi,hri,hfp,hrp,hfb,hrb,hfl,hrl,_,_⟩
  have hc := source_correspondence V (A s) (h s) (g s) (u s)
  refine ⟨hpi,hpq,hqp,hfi,hri,hfp,hrp,hfb,hrb,hfl,hrl,hc.1,hc.2.1,hc.2.2.1,?_⟩
  exact hc.2.2.2 hs.2.2.2.1

end AutoSamplingTheory.ExampleCases.SmoothedPicardHMC.TerminalFORSKernel

Exact module and namespace context

Scope and omitted-condition boundaries

  • Parameterized local terminal FORS component with an actual generated reference, not full A4(2) or either paper. V,alpha,beta,ell,eps are fixed; b,u,initial vary and all states meet the sufficient terminal condition. C2/genuine Hessian hypotheses strengthen the source convex-smooth regularity; alpha=0 remains convex, not nonconvex. Positive dimension and beta are required. ell>=2 matches A4(2); the upstream B12 proof for1<ell<2 is not used. Numeric64 and explicit RN/expected constants are proved sufficient refinements, not verbatim source constants. The source high-probability query bound is not returned. The1+2exp2 count excludes reference GD initialization and any cache discount between its last check and the sampler. No joint stream-output measurability, target-family kernel, evaluator trace, terminal-domain reachability, history propagation, stage sum, initialization-cost integral or full composition is claimed.

Source and reuse

ASTIS parents called

Mathlib API called (external library)

  • MeasureTheory.measurable_find
  • MeasureTheory.Measurable.find
  • MeasureTheory.Measure.map_prod_map
  • MeasureTheory.Measure.infinitePi_map_pi
  • MeasureTheory.integral_map
  • MeasureTheory.lintegral_add_left

Mathematical sources

  • SPHMC Section6.3 terminal reference — Parameterized local terminal FORS component with an actual generated reference, not full A4(2) or either paper. V,alpha,beta,ell,eps are fixed; b,u,initial vary and all states meet the sufficient terminal condition. C2/genuine Hessian hypotheses strengthen the source convex-smooth regularity; alpha=0 remains convex, not nonconvex. Positive dimension and beta are required. ell>=2 matches A4(2); the upstream B12 proof for1<ell<2 is not used. Numeric64 and explicit RN/expected constants are proved sufficient refinements, not verbatim source constants. The source high-probability query bound is not returned. The1+2exp2 count excludes reference GD initialization and any cache discount between its last check and the sampler. No joint stream-output measurability, target-family kernel, evaluator trace, terminal-domain reachability, history propagation, stage sum, initialization-cost integral or full composition is claimed.
  • SPHMC TheoremA.4(2) terminal sampler — Parameterized local terminal FORS component with an actual generated reference, not full A4(2) or either paper. V,alpha,beta,ell,eps are fixed; b,u,initial vary and all states meet the sufficient terminal condition. C2/genuine Hessian hypotheses strengthen the source convex-smooth regularity; alpha=0 remains convex, not nonconvex. Positive dimension and beta are required. ell>=2 matches A4(2); the upstream B12 proof for1<ell<2 is not used. Numeric64 and explicit RN/expected constants are proved sufficient refinements, not verbatim source constants. The source high-probability query bound is not returned. The1+2exp2 count excludes reference GD initialization and any cache discount between its last check and the sampler. No joint stream-output measurability, target-family kernel, evaluator trace, terminal-domain reachability, history propagation, stage sum, initialization-cost integral or full composition is claimed.

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