LeanMachineLearning

ProbabilityTheory.identDistrib_of_forall_identDistrib_cond🔗

Lemma

From the authors

Two random variables which are identically distributed conditionally on each atom of a countable measurable partition are identically distributed.

Types
  • Ω : Type u_1mΩ : MeasurableSpace ΩA measurable space is a space equipped with a σ-algebra.
  • 𝓧 : Type u_2m𝓧 : MeasurableSpace 𝓧
  • ι : Type u_3Countable ιA type α is countable if there exists an injective map α → ℕ.mι : MeasurableSpace ιMeasurableSingletonClass ιA typeclass mixin for MeasurableSpaces such that each singleton is measurable.
Given
  • P : MeasureTheory.Measure ΩA measure is defined to be an outer measure that is countably additive on measurable sets, with the additional assumption that the outer measure is the canonical extension of the restricted measure.MeasureTheory.IsFiniteMeasure PA measure μ is called finite if μ univ < ∞.
  • g : Ω → ι
  • X : Ω → 𝓧
  • Y : Ω → 𝓧
Assuming
  • hg : Measurable gA function f between measurable spaces is measurable if the preimage of every measurable set is measurable.
  • hX : Measurable X
  • hY : Measurable Y
  • h : ∀ (i : ι), IdentDistrib X Y P[|g ⁻¹' {i}] P[|g ⁻¹' {i}]Two functions defined on two (possibly different) measure spaces are identically distributed if their image measures coincide.
Then
IdentDistrib X Y P P
Code
lemma identDistrib_of_forall_identDistrib_cond [IsFiniteMeasure P] {g : Ω → ι}
    (hg : Measurable g) {X Y : Ω → 𝓧} (hX : Measurable X) (hY : Measurable Y)
    (h : ∀ i, IdentDistrib X Y P[|g ⁻¹' {i}] P[|g ⁻¹' {i}]) :
    IdentDistrib X Y P P where
  aemeasurable_fst
Proof
hX.aemeasurable
  aemeasurable_snd := hY.aemeasurable
  map_eq := by
    ext s hs
    rw [Measure.map_apply hX hs, Measure.map_apply hY hs]
    have h_union (t : Set Ω) : t = ⋃ i, t ∩ g ⁻¹' {i} := by ext; simp
    have h_disj (t : Set Ω) : Pairwise (Function.onFun Disjoint fun i ↦ t ∩ g ⁻¹' {i}) := by
      intro i j hij
      rw [Function.onFun, Set.disjoint_left]
      rintro x ⟨-, hi⟩ ⟨-, hj⟩
      exact hij ((show g x = i from hi).symm.trans hj)
    rw [h_union (X ⁻¹' s), h_union (Y ⁻¹' s),
      measure_iUnion (h_disj _) fun i ↦ (hs.preimage hX).inter (hg (measurableSet_singleton i)),
      measure_iUnion (h_disj _) fun i ↦ (hs.preimage hY).inter (hg (measurableSet_singleton i))]
    refine tsum_congr fun i ↦ ?_
    rw [Set.inter_comm, ← cond_mul_eq_inter (hg (measurableSet_singleton i)),
      Set.inter_comm _ (g ⁻¹' {i}), ← cond_mul_eq_inter (hg (measurableSet_singleton i)),
      ← Measure.map_apply hX hs, ← Measure.map_apply hY hs, (h i).map_eq]

Meaning last changed in v4.34.0-rc2-76-g565f652 (2026-09-10).

Self-contained, with its dependencies inlined and proofs replaced by sorry: download the raw file · open it in the Lean web editor.

Dependency graph

Nothing to draw. Its statement rests on no other declaration in this project, and names nothing from a package left unaudited — so the graph is this declaration alone. That is the answer, not a missing picture.

Audit surface: 0 project declarations, 12 external constants

✓ Proved: no sorry anywhere in its closure

This is the tool's own reading of one build's recorded axioms, and it is not robust against an author who wants it to pass. Checking meant to be relied on should go through Comparator, which replays the proof through the kernel from an export against an explicit list of permitted axioms.