condExp_piFinset_eq_marginal
ProvedLet be probability measures on measurable spaces over a finite index type , and let be integrable on the product cube (Measure.pi μ). Fix a coordinate subset and consider the prefix sub--algebra generated by the restriction-to- map (MeasurableSpace.comap (Finset.restrict s)). Then the conditional expectation of given this prefix -algebra equals, -almost everywhere, the result of integrating out over the complement coordinates , with the prefix values held fixed:
where the merge of the prefix-values with complement-values is performed by the measurable equivalence MeasurableEquiv.piEquivPiSubtypeProd. This is the multi-coordinate generalization of the two-factor brick condExp_comap_fst_eq_partial_integral: conditioning on a block of coordinates equals marginalizing out the complementary block. It is the step-(c) ingredient (prefix-filtration conditional expectation as marginalization) of the Doob-martingale proof of the Efron–Stein tensorization of variance. Source: R. van Handel, Probability in High Dimension (APC 550), §2.1; Boucheron–Lugosi–Massart, Concentration Inequalities (OUP 2013), Ch. 3.
import Mathlib.MeasureTheory.Function.ConditionalExpectation.Basic import Mathlib.MeasureTheory.Integral.Prod import Mathlib.MeasureTheory.Measure.Prod import Mathlib.MeasureTheory.Constructions.Pi import Mathlib.Probability.Process.Filtration open MeasureTheory Filter open scoped ENNReal NNReal BigOperators
theorem condExp_piFinset_eq_marginal
{ι : Type*} [Fintype ι] [DecidableEq ι]
{α : ι → Type*} [∀ i, MeasurableSpace (α i)]
(μ : ∀ i, Measure (α i)) [∀ i, IsProbabilityMeasure (μ i)]
(s : Finset ι) {Z : (∀ i, α i) → ℝ}
(hZ : Integrable Z (Measure.pi μ)) :
(Measure.pi μ)[Z | MeasurableSpace.comap (Finset.restrict s) inferInstance]
=ᵐ[Measure.pi μ]
fun ω => ∫ z : (∀ i : {i // ¬ i ∈ s}, α i),
Z ((MeasurableEquiv.piEquivPiSubtypeProd α (· ∈ s)).symm
((MeasurableEquiv.piEquivPiSubtypeProd α (· ∈ s) ω).1, z))
∂(Measure.pi fun i : {i // ¬ i ∈ s} => μ i) := by sorry