ProbabilityTheory.HasCondDistrib.hasLaw_cond
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 η.
-
α : Type u_1mα : MeasurableSpace αA measurable space is a space equipped with a σ-algebra. -
β : Type u_2mβ : MeasurableSpace β -
Ω : Type u_4mΩ : MeasurableSpace Ω
-
μ : 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 Ω
-
h : HasCondDistrib Y X κ μPredicate stating that the conditional distribution ofYgivenXunder the measurePis equal to the kernelκ. -
hY : Measurable YA functionfbetween measurable spaces is measurable if the preimage of every measurable set is measurable. -
hs : MeasurableSet sMeasurableSet smeans thatsis measurable (in the ambient measure space onα) -
hκ : Set.EqOn (⇑κ) (fun x => η) sTwo functionsf₁ f₂ : α → βare equal onsiff₁ x = f₂ xfor allx ∈ s. -
hμs : μ (X ⁻¹' s) ≠ 0
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 = μ.MeasurableSpace : Type u_6 → Type u_6A measurable space is a space equipped with a σ-algebra.
MeasureTheory.IsFiniteMeasure : {α : Type u_1} → {m0 : MeasurableSpace α} → MeasureTheory.Measure α → PropA measure `μ` is called finite if `μ univ < ∞`.
MeasureTheory.Measure : (α : Type u_5) → [MeasurableSpace α] → Type u_5A 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. The measure of a set `s`, denoted `μ s`, is an extended nonnegative real. The real-valued version is written `μ.real s`.
ProbabilityTheory.IsSFiniteKernel : {α : Type u_1} →
{β : Type u_2} → {mα : MeasurableSpace α} → {mβ : MeasurableSpace β} → ProbabilityTheory.Kernel α β → PropA kernel is s-finite if it can be written as the sum of countably many finite kernels.
ProbabilityTheory.Kernel : (α : Type u_1) → (β : Type u_2) → [MeasurableSpace α] → [MeasurableSpace β] → Type (max u_1 u_2)A kernel from a measurable space `α` to another measurable space `β` is a measurable function `κ : α → Measure β`. The measurable space structure on `MeasureTheory.Measure β` is given by `MeasureTheory.Measure.instMeasurableSpace`. A map `κ : α → MeasureTheory.Measure β` is measurable iff `∀ s : Set β, MeasurableSet s → Measurable (fun a ↦ κ a s)`.
Set : Type u → Type uA set is a collection of elements of some type `α`.
Although `Set` is defined as `α → Prop`, this is an implementation detail which should not be
relied on. Instead, `Set.ofPred` (also written `{x | p x}`) and membership of a set (`∈`) should be
used to convert between sets and predicates.ProbabilityTheory.HasCondDistrib : {Ω : Type u_1} →
{𝓧 : Type u_2} →
{𝓨 : Type u_3} →
{mΩ : MeasurableSpace Ω} →
{m𝓧 : MeasurableSpace 𝓧} →
{m𝓨 : MeasurableSpace 𝓨} → (Ω → 𝓨) → (Ω → 𝓧) → ProbabilityTheory.Kernel 𝓧 𝓨 → MeasureTheory.Measure Ω → PropPredicate stating that the conditional distribution of `Y` given `X` under the measure `P` is equal to the kernel `κ`.
Measurable : {α : Type u_1} → {β : Type u_2} → [MeasurableSpace α] → [MeasurableSpace β] → (α → β) → PropA function `f` between measurable spaces is measurable if the preimage of every measurable set is measurable.
MeasurableSet : {α : Type u_1} → [MeasurableSpace α] → Set α → Prop`MeasurableSet s` means that `s` is measurable (in the ambient measure space on `α`)
Set.EqOn : {α : Type u} → {β : Type v} → (α → β) → (α → β) → Set α → PropTwo functions `f₁ f₂ : α → β` are equal on `s` if `f₁ x = f₂ x` for all `x ∈ s`.
Ne : {α : Sort u} → α → α → Prop`a ≠ b`, or `Ne a b` is defined as `¬ (a = b)` or `a = b → False`, and asserts that `a` and `b` are not equal. Conventions for notations in identifiers: * The recommended spelling of `≠` in identifiers is `ne`.
Set.preimage : {α : Type u} → {β : Type v} → (α → β) → Set β → Set αThe preimage of `s : Set β` by `f : α → β`, written `f ⁻¹' s`, is the set of `x : α` such that `f x ∈ s`.
ProbabilityTheory.HasLaw : {Ω : Type u_1} →
{𝓧 : Type u_2} →
{mΩ : MeasurableSpace Ω} →
{m𝓧 : MeasurableSpace 𝓧} →
(Ω → 𝓧) → MeasureTheory.Measure 𝓧 → autoParam (MeasureTheory.Measure Ω) ProbabilityTheory.HasLaw._auto_1 → PropThe 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 = μ`. We also require `X` to be `AEMeasurable`, to allow for nice interactions with operations on the codomain of `X`. See for instance `HasLaw.comp`, `IndepFun.hasLaw_mul` and `IndepFun.hasLaw_add`.
ProbabilityTheory.cond : {Ω : Type u_1} → {m : MeasurableSpace Ω} → MeasureTheory.Measure Ω → Set Ω → MeasureTheory.Measure ΩThe conditional probability measure of measure `μ` on set `s` is `μ` restricted to `s` and scaled by the inverse of `μ s` (to make it a probability measure): `(μ s)⁻¹ • μ.restrict s`.
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
aemeasurableProof
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.