LeanMachineLearning

ProbabilityTheory.HasCondDistrib.hasLaw_cond🔗

Lemma

From the authors

If the conditional distribution of Y given X is a kernel κ which is constant equal to η on a measurable set s, then the law of Y under μ conditioned on X ∈ s is η.

Types
  • α : Type u_1mα : MeasurableSpace αA measurable space is a space equipped with a σ-algebra.
  • β : Type u_2mβ : MeasurableSpace β
  • Ω : Type u_4mΩ : MeasurableSpace Ω
Given
  • μ : 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 μA measure μ is called finite if μ univ < ∞.
  • X : α → β
  • Y : α → Ω
  • κ : Kernel β ΩA kernel from a measurable space α to another measurable space β is a measurable function κ : α → Measure β.IsSFiniteKernel κA kernel is s-finite if it can be written as the sum of countably many finite kernels.
  • s : Set βA set is a collection of elements of some type α.
  • η : MeasureTheory.Measure Ω
Assuming
  • h : HasCondDistrib Y X κ μPredicate stating that the conditional distribution of Y given X under the measure P is equal to the kernel κ.
  • hY : Measurable YA function f between measurable spaces is measurable if the preimage of every measurable set is measurable.
  • hs : MeasurableSet sMeasurableSet s means that s is measurable (in the ambient measure space on α)
  • hκ : Set.EqOn (⇑κ) (fun x => η) sTwo functions f₁ f₂ : α → β are equal on s if f₁ x = f₂ x for all x ∈ s.
  • hμs : μ (X ⁻¹' s)0
Then
HasLaw Y η μ[|X ⁻¹' s]
The predicate HasLaw X μ P registers the fact that the random variable X has law μ under the measure P, in other words that P.map X = μ.
Code
lemma HasCondDistrib.hasLaw_cond (h : HasCondDistrib Y X κ μ) (hY : Measurable Y)
    {s : Set β} (hs : MeasurableSet s) {η : Measure Ω} (hκ : Set.EqOn κ (fun _ ↦ η) s)
    (hμs : μ (X ⁻¹' s) ≠ 0) :
    HasLaw Y η μ[|X ⁻¹' s] where
  aemeasurable
Proof
hY.aemeasurable
  map_eq := by
    ext u hu
    rw [Measure.map_apply hY hu, cond_apply' (hu.preimage hY),
      h.measure_inter_preimage_eq_mul_of_eqOn_const hs hκ hu, ← mul_assoc,
      ENNReal.inv_mul_cancel hμs (measure_ne_top _ _), one_mul]

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, 21 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.