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

Bench / sampling

sogb-017 · public-dev · editorial and formal status separate

Averaging a conditional event-error bound

SampleWiki research problems / Markov Chain Monte Carlo · natural-language: L3 / lean: L3 (author-assigned; calibration pending)

Why this difficulty?

Justify measurability and integrability of kernel event probabilities, convert finite extended-measure masses to real expectations, then apply the integral triangle inequality and almost-everywhere domination. No recursion or unbounded-cost transfer is folded into this local theorem.

Editorial review and exact formal-coverage boundary

AI editorial review accepted. This is not canonical theorem publication, full Lean coverage or empirical difficulty calibration.

  • Only the displayed one-step event discrepancy proposition is the formal conclusion of this QA. Its prose explanation, independent pedagogical assessment and four-point rubric are not separately formalized scoring theorems, although the integrability and conversion mechanisms appear in the checked reference proof.
  • Common-suffix data processing and finite telescoping are separate local results; recursively constructed adaptive history kernels, measurable paper error quantities, stopping/cap adapters, uncapped/capped comparisons and expected query-cost guarantees remain outside this QA. The packet explicitly acknowledges these limits and does not claim full alignment of the earlier hybrid/cost question or a whole paper theorem.

Content-bound review status and evidence hashes · Independent reports and frozen inputs. Historical rejected wording is audit material, not training gold.

Assumptions and conventions

  • \(A,B\) are arbitrary measurable spaces, \(\mu\) is a probability measure on A, and \(K,L:A\leadsto B\) are Markov kernels.
  • \(\varepsilon:A\to\mathbb R\) is integrable under \(μ\). On one common \(μ\)-full-measure set of inputs x, every measurable event s satisfies \[|K(x,s)-L(x,s)|\le\varepsilon(x).\] Event masses in this inequality are finite real probabilities.

Natural-language question

For every measurable event t, prove |(K composed with \(μ)(t)-(L\) composed with μ)(t)|≤∫ε \(dμ\). Give the measurability, finiteness and integrability justifications required to subtract the two real integrals and use almost-everywhere domination. Do not assume a measurable total-variation supremum or a query-cost conclusion.

Reference mathematical proof
  1. Fix a measurable event t. Kernel measurability makes \(k_t(x)=K(x,t)\) and \(l_t(x)=L(x,t)\) measurable real functions. Markov normalization gives \(0\le k_t,l_t\le1\); since \(μ\) is a probability measure, both are integrable.

  2. The bind/composition law gives \[\begin{gathered}(K\circ_m\mu)(t)=\int k_t\,d\mu,\\(L\circ_m\mu)(t)=\int l_t\,d\mu.\end{gathered}\] In Lean the underlying masses are extended nonnegative reals. Their finiteness, supplied by the probability-kernel assumptions, justifies conversion to real integrals; the totalized toReal API is not used as if infinity were finite.

  3. The two integrable event functions can be subtracted inside the integral. The integral triangle inequality gives \[\left|\int k_t\,d\mu-\int l_t\,d\mu\right|\le\int|k_t-l_t|\,d\mu.\] The absolute difference is integrable as well.

  4. The common almost-everywhere hypothesis supplies \(|k_t-l_t|\le\varepsilon\) almost everywhere for this event. Monotonicity for integrable real functions yields \[|(K\circ_m\mu)(t)-(L\circ_m\mu)(t)|\le\int\varepsilon\,d\mu.\] No measurable supremum over all events is needed, and no new global nonnegativity premise on \(ε\) is inserted.

How the Lean proof follows these steps

The reference builds integrability separately for each fixed event from kernel measurability, Markov mass bounds and the probability input law. The bind_apply and integral_toReal steps expose the finite-mass conversion. It then uses integral_sub, abs_integral_le_integral_abs and integral_mono_ae, specializing the common almost-everywhere bound to the chosen event. The complete proof is reconstructed from the existing component; its target module is not imported.

/- SamplingOptimisationGeometryBench public-dev reference.
   Reuses the existing project proof; retain LICENSE and NOTICE. -/
import AutoSamplingTheory.TechnicalLemmas.Probability.KernelTotalVariation

open MeasureTheory ProbabilityTheory Set Finset
open scoped ProbabilityTheory BigOperators

example
    {A B : Type*} [MeasurableSpace A] [MeasurableSpace B]
    (μ : Measure A) [IsProbabilityMeasure μ]
    (K L : Kernel A B) [IsMarkovKernel K] [IsMarkovKernel L]
    (ε : A → ℝ) (hε : Integrable ε μ)
    (hbound : ∀ᵐ x ∂μ, ∀ s, MeasurableSet s →
      |(K x).real s - (L x).real s| ≤ ε x) :
    ∀ t, MeasurableSet t →
      |(K ∘ₘ μ).real t - (L ∘ₘ μ).real t| ≤ ∫ x, ε x ∂μ := by
  intro t ht
  have hint (M : Kernel A B) [IsMarkovKernel M] :
      Integrable (fun x => (M x).real t) μ := by
    apply (integrable_const (1 : ℝ)).mono'
      (M.measurable_coe ht).ennreal_toReal.aestronglyMeasurable
    exact Filter.Eventually.of_forall fun x => by
      rw [Real.norm_eq_abs, abs_of_nonneg ENNReal.toReal_nonneg]
      exact (measureReal_le_one : (M x).real t ≤ 1)
  have happly (M : Kernel A B) [IsMarkovKernel M] :
      (M ∘ₘ μ).real t = ∫ x, (M x).real t ∂μ := by
    change (Measure.bind μ M t).toReal = ∫ x, (M x t).toReal ∂μ
    rw [Measure.bind_apply ht M.aemeasurable]
    exact (integral_toReal (M.measurable_coe ht).aemeasurable
      (Filter.Eventually.of_forall fun x => measure_lt_top (M x) t)).symm
  rw [happly K, happly L, ← integral_sub (hint K) (hint L)]
  exact abs_integral_le_integral_abs.trans <|
    integral_mono_ae ((hint K).sub (hint L)).abs hε <|
      hbound.mono fun x hx => hx t ht

Download runnable reference

Assessment rubric · 4 points
  1. Establishes event measurability and boundedness by one, hence integrability under the probability input law. (1 point)
  2. Uses the bind law with finite event masses to justify the real expectation identities. (1 point)
  3. Justifies integral subtraction and the triangle inequality using integrability, not a formal subtraction of infinities. (1 point)
  4. Applies the common almost-everywhere event bound and integrability of \(ε\) without assuming a measurable TV supremum or an expected-cost theorem. (1 point)

Lean question

Keep the target and context fixed; replace the comment slot with your proof. Ancestor libraries are allowed, but the target module is not imported directly.

Show fixed Lean task
/- SamplingOptimisationGeometryBench public-dev reference.
   Reuses the existing project proof; retain LICENSE and NOTICE. -/
import AutoSamplingTheory.TechnicalLemmas.Probability.KernelTotalVariation

open MeasureTheory ProbabilityTheory Set Finset
open scoped ProbabilityTheory BigOperators

example
    {A B : Type*} [MeasurableSpace A] [MeasurableSpace B]
    (μ : Measure A) [IsProbabilityMeasure μ]
    (K L : Kernel A B) [IsMarkovKernel K] [IsMarkovKernel L]
    (ε : A → ℝ) (hε : Integrable ε μ)
    (hbound : ∀ᵐ x ∂μ, ∀ s, MeasurableSet s →
      |(K x).real s - (L x).real s| ≤ ε x) :
    ∀ t, MeasurableSet t →
      |(K ∘ₘ μ).real t - (L ∘ₘ μ).real t| ≤ ∫ x, ε x ∂μ := by
  -- Replace this comment with your proof.

Download task template

Reference Lean and explanation

The reference builds integrability separately for each fixed event from kernel measurability, Markov mass bounds and the probability input law. The bind_apply and integral_toReal steps expose the finite-mass conversion. It then uses integral_sub, abs_integral_le_integral_abs and integral_mono_ae, specializing the common almost-everywhere bound to the chosen event. The complete proof is reconstructed from the existing component; its target module is not imported.

/- SamplingOptimisationGeometryBench public-dev reference.
   Reuses the existing project proof; retain LICENSE and NOTICE. -/
import AutoSamplingTheory.TechnicalLemmas.Probability.KernelTotalVariation

open MeasureTheory ProbabilityTheory Set Finset
open scoped ProbabilityTheory BigOperators

example
    {A B : Type*} [MeasurableSpace A] [MeasurableSpace B]
    (μ : Measure A) [IsProbabilityMeasure μ]
    (K L : Kernel A B) [IsMarkovKernel K] [IsMarkovKernel L]
    (ε : A → ℝ) (hε : Integrable ε μ)
    (hbound : ∀ᵐ x ∂μ, ∀ s, MeasurableSet s →
      |(K x).real s - (L x).real s| ≤ ε x) :
    ∀ t, MeasurableSet t →
      |(K ∘ₘ μ).real t - (L ∘ₘ μ).real t| ≤ ∫ x, ε x ∂μ := by
  intro t ht
  have hint (M : Kernel A B) [IsMarkovKernel M] :
      Integrable (fun x => (M x).real t) μ := by
    apply (integrable_const (1 : ℝ)).mono'
      (M.measurable_coe ht).ennreal_toReal.aestronglyMeasurable
    exact Filter.Eventually.of_forall fun x => by
      rw [Real.norm_eq_abs, abs_of_nonneg ENNReal.toReal_nonneg]
      exact (measureReal_le_one : (M x).real t ≤ 1)
  have happly (M : Kernel A B) [IsMarkovKernel M] :
      (M ∘ₘ μ).real t = ∫ x, (M x).real t ∂μ := by
    change (Measure.bind μ M t).toReal = ∫ x, (M x t).toReal ∂μ
    rw [Measure.bind_apply ht M.aemeasurable]
    exact (integral_toReal (M.measurable_coe ht).aemeasurable
      (Filter.Eventually.of_forall fun x => measure_lt_top (M x) t)).symm
  rw [happly K, happly L, ← integral_sub (hint K) (hint L)]
  exact abs_integral_le_integral_abs.trans <|
    integral_mono_ae ((hint K).sub (hint L)).abs hε <|
      hbound.mono fun x hx => hx t ht

Download runnable reference

No current trusted-reference compiler receipt recorded in this build.

What this does—and does not—verify

Only the displayed one-step averaged event discrepancy is formally concluded. Common-suffix contraction, finite telescoping, actual recursive-history construction, stopping/cap comparisons and expected query costs remain distinct results. It does not align the full earlier hybrid/cost QA or complete a paper theorem.

Existing library mathematics reused; no new mathematical leaf or paper-completion credit. The editorial panel records the exact current review scope and remaining unformalized explanation.

Sources, graph location and dependencies

Original QA over the local mean conditional-kernel error component. Its module cites arXiv:2609.38710v1 Lemma 6.3 and the common-suffix theorem consumes this component, but this QA does not reproduce the full paper lemma or its algorithmic adapters. No paper text is copied.

Exact local source and full context · Locate the existing Lean declaration

AutoSamplingTheory.TechnicalLemmas.Probability.KernelHybridTelescope.abs_real_comp_sub_le_integral_eventBound

ASTIS definitions / proof calls

    Mathlib facts / definitions

    • ProbabilityTheory.Kernel.measurable_coe
    • MeasureTheory.measureReal_le_one
    • MeasureTheory.Measure.bind_apply
    • MeasureTheory.integral_toReal
    • MeasureTheory.integral_sub
    • MeasureTheory.abs_integral_le_integral_abs
    • MeasureTheory.integral_mono_ae

    Binding SHA-256: 37f2cef51769619910cd718b9d66acd2d57f6a5a5956a6940a4d4dc2ba60eeba