Documentation

CsdLean4.Mathlib.Probability.ConditionalProbability

Conditional-probability toolkit: pushforward, products, full-measure events #

Category: 1-Mathlib (CSD-free Mathlib upstream candidates).

Four small lemmas about ProbabilityTheory.cond that Mathlib does not currently provide:

Provenance #

cond_map/cond_prod_prod/cond_eq_self extracted 2026-08-02 from CsdLean4/RecordLayer/JoinLuders.lean (the degenerate-Lüders conditioning bookkeeping); cond_finsetSum added 2026-08-03 for the outcome-conditioned mixed update (CsdLean4/RecordLayer/MixedLuders.lean). Staged here for upstream. Naming and import discipline track Mathlib idiom; intended target Mathlib.Probability.ConditionalProbability.

Conditioning commutes with pushforward: cond (f_*μ) S = f_* (cond μ (f⁻¹S)).

Conditioning a product on a product event conditions the factors independently.

Conditioning a probability measure on a full-measure event does nothing.

theorem ProbabilityTheory.cond_finsetSum {X : Type u_1} [MeasurableSpace X] {ι : Type u_3} (s : Finset ι) (μ : ιMeasureTheory.Measure X) [∀ (j : ι), MeasureTheory.IsFiniteMeasure (μ j)] (c : ιENNReal) {S : Set X} (hS : MeasurableSet S) :
(∑ js, c j μ j)[|S] = js, (c j * (μ j) S / (∑ ks, c k μ k) S) (μ j)[|S]

Bayes for finite mixtures: conditioning a finite mixture of finite measures on an event is the posterior-weighted mixture of the conditioned components — the posterior of component j being its prior weight cⱼ times its likelihood μⱼ S, normalised by the mixture's total mass on S. Zero-mass components contribute zero to both sides, and a zero-mass mixture makes both sides the zero measure, so no positivity hypothesis is needed.