Construct a one-block heat-bath update
AutoSamplingTheory.TechnicalLemmas.Probability.HeatBath.heatBathSnd · def · Teaching coverage
Mathematical statement
Under the product-space hypotheses, define a kernel Hμ from α × β back to α × β by first projecting the input to its first coordinate and then pairing the identity kernel on that coordinate with the selected conditional distribution of the second coordinate. This is a noncomputable law construction; it does not implement a procedure for drawing a conditional sample.
Lean statement · heatBathSnd
Keep a, redraw b from the selected law conditioned on a, and regard the result as a law for the whole pair. The word noncomputable warns that an abstract conditional distribution need not come with a usable sampling algorithm.
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.
noncomputable def heatBathSnd (μ : Measure (α × β)) [IsFiniteMeasure μ] :
Kernel (α × β) (α × β)Proof roadmap
- 1Forget only the old resampled value
The deterministic first-projection kernel turns (a,b) into the point-mass law at a. Its measurability is supplied by the measurable first projection. This determines which information the update retains.
- 2Build a joint output law at a retained value
At a, Kernel.id gives δa and condDistrib Prod.snd Prod.fst μ gives q(a). Their kernel product is a measurable family of laws on α × β. The conditional kernel comes from the finite-measure disintegration machinery, with β nonempty and Standard Borel.
- 3Compose in the order of the experiment
Compose the output-law kernel after the deterministic projection, obtaining a state-to-state kernel. In κ ∘ₖ η, η acts first. The old second coordinate is not used in selecting q(a). The following theorems establish its mass-one and invariant-law properties; these are not additional clauses of the definition.
Full assumptions and notation
All objects and hypotheses
- {α β : Type*} — Two possibly universe-polymorphic coordinate types α and β.
- [MeasurableSpace α] [MeasurableSpace β] — Both carry measurable-space structures; α × β has the product sigma-algebra.
- [StandardBorelSpace β] — The resampled space β is Standard Borel, supplying the regular-conditional-distribution existence contract.
- [Nonempty β] — β is nonempty, so the selected conditional kernel can be totalized as a probability law even on marginal-null fibers.
- (μ : Measure (α × β)) [IsFiniteMeasure μ] — μ is any finite joint measure. It need not be normalized and may be zero. α need not be Standard Borel or nonempty.
Notation and interpretation
- m
The first marginal, represented by μ.map Prod.fst.
\[m=(\operatorname{fst})_\#\mu\]- q
The particular regular conditional probability kernel selected by Mathlib, not a pointwise unique conditional density.
\[q(a)=\operatorname{condDistrib}(\operatorname{snd}\mid\operatorname{fst};\mu)(a)\]- μ ⊗ₘ q
Composition-product of a measure and a kernel, for measurable A ⊆ α × β. It is a joint measure, unlike ordinary kernel composition which forgets the intermediate state.
\[(m\otimes_m q)(A)=\int_\alpha q(a,\{b:(a,b)\in A\})\,m(da)\]- K ∘ₘ μ
The measure after one kernel application. Invariant means exactly K ∘ₘ μ = μ.
\[(K\circ_m\mu)(A)=\int K(x,A)\,\mu(dx)\]
- All sets used to test equality of measures are measurable unless explicitly stated otherwise.
- All measure values, reciprocals and scalar multiplications in the Lean conditional formula are in ℝ≥0∞. Integral displays of kernel probabilities denote nonnegative extended integrals, not Bochner integrals with unstated integrability hypotheses.
- The notation r_i, F_i, e_i, q_i and K_i in the teaching text is explanatory mathematical shorthand, not new public Lean definitions.
- Markovness quantifies over every input; a selected conditional version's law characterization is only marginal-a.e. unless a positive-atom/fiber theorem applies.
- Finite target mass is not probability normalization. Fin (n+1) counts sites, not states. No law is assumed to have a density.
Construction and meaning
1. Forget only the old resampled value
The deterministic first-projection kernel turns (a,b) into the point-mass law at a. Its measurability is supplied by the measurable first projection. This determines which information the update retains.
Corresponding Lean step
Kernel.deterministic Prod.fst measurable_fst.
2. Build a joint output law at a retained value
At a, Kernel.id gives δa and condDistrib Prod.snd Prod.fst μ gives q(a). Their kernel product is a measurable family of laws on α × β. The conditional kernel comes from the finite-measure disintegration machinery, with β nonempty and Standard Borel.
Corresponding Lean step
Kernel.id ×ₖ condDistrib Prod.snd Prod.fst μ. The pointwise evaluation is separately proved by heatBathSnd_apply.
3. Compose in the order of the experiment
Compose the output-law kernel after the deterministic projection, obtaining a state-to-state kernel. In κ ∘ₖ η, η acts first. The old second coordinate is not used in selecting q(a). The following theorems establish its mass-one and invariant-law properties; these are not additional clauses of the definition.
Corresponding Lean step
The definition is the displayed composition. noncomputable records that the conditional version is selected nonconstructively.
Lean verification
The exact proof begins folded immediately after the mathematical argument; the statement is folded beside the claim above.
Lean construction · heatBathSnd
`Kernel (α × β) (α × β)` means a measurable assignment from each input state to an output measure. `Kernel.id` is the probabilistic identity kernel a ↦ δa, not an ordinary function that returns a directly. `×ₖ` forms a product of two kernels with the same input; it returns a law on the pair of output spaces. `∘ₖ` composes kernels in right-to-left order. `measurable_fst` is an actual measurability proof, not a placeholder.
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.
noncomputable def heatBathSnd (μ : Measure (α × β)) [IsFiniteMeasure μ] :
Kernel (α × β) (α × β) :=
(Kernel.id ×ₖ condDistrib Prod.snd Prod.fst μ) ∘ₖ
Kernel.deterministic Prod.fst measurable_fstScope and omitted-condition boundaries
- These are existing source-neutral measure/kernel interfaces, not newly proved claims in this research packet. Reading source and historical tests is not a fresh Lean build or independent verification.
- Finite target measure means μ(univ) < ∞, not μ(univ) = 1; zero and finite unnormalized targets are allowed unless a positive-fiber hypothesis rules them out.
- A selected regular conditional distribution is a probability kernel at every conditioning value. Its conditional-law characterization is determined only almost everywhere under the conditioning marginal; null fibers have no asserted feasible/Gibbs-support property.
- No reversibility, irreducibility, ergodicity, convergence from a different initial law, mixing rate, random scan, scan-order correctness, executable conditional sampling or cost bound follows from these declarations alone.
Sources, dependencies, and reuse
Source and reuse
Samplinglib parents called
Mathlib API called (external library)
- ProbabilityTheory.Kernel.id
- ProbabilityTheory.condDistrib
- ProbabilityTheory.Kernel.prod
- ProbabilityTheory.Kernel.comp
- ProbabilityTheory.Kernel.deterministic
- measurable_fst
Mathematical sources
- Fearnhead–Nemeth–Oates–Sherlock, arXiv:2407.12751v1, §2.1.1 Component-wise updates and Gibbs moves; printed page 48 / PDF page 54 — Conditional-update motivation only; the generic finite-measure regular-conditional-law contract is not a numbered-source theorem assimilation.
- Chen–Štefankovič–Vigoda, arXiv:2307.13826v4, §1.3 Glauber dynamics/Gibbs sampler; printed/PDF page 5; support convention in §1.1 printed/PDF page 4 — Fixed-site update motivation, not full finite-binary-state algorithm or uniform-scan certification.
- Existing ASTIS declaration AutoSamplingTheory.TechnicalLemmas.Probability.HeatBath.heatBathSnd — Exact public declaration and proof/construction read from the local source. Line numbers are current source anchors; no new source certification or Lean build performed.
- Focused tests (consumer evidence) — The definition is exercised by its Markovness, product-law, invariance, finite-power and zero-target consumers.
Older frontier cells and the coordinate card say the printed copy-index repair is pending. The later positive-fiber card and source-support audit record separate acceptance of the exact one-index correction as ASTIS-REPAIR-20260908-GlauberCopyIndex. The old PositiveFiberUpdate audit remains possible-source-error for its limited page-5 evidence window. Do not overwrite that history, call the original PDF corrected, call a null-fiber start a counterexample to the positive-support source convention, or infer full source fidelity. This packet reads local evidence only; it performs no new PDF/source certification.
Samplinglib prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.