Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion Mathlib/Probability/HasLaw.lean
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ measurable. Indeed, if `X` is not almost-everywhere measurable then `P.map X` is
so that `HasLaw X 0 P` would be true. The measurability hypothesis ensures nice interactions with
operations on the codomain of `X`.
See for instance `HasLaw.comp`, `IndepFun.hasLaw_mul` and `IndepFun.hasLaw_add`.

Note the existence of the analog concept `MeasureTheory.MeasurePreserving` which requires
measurability instead of a.e.-measurability. This is too strong in probability theory where
we often use almost-everywhere equality and only need a.e.-measurability hypotheses.
However, if one wants to state `HasLaw f μ P` for a certain explicit function `f` that is not
only `AEMeasurable` but `Measurable`, then one should state `MeasureTheory.MeasurePreserving f P μ`
instead and rely on lemmas in this file that link the two notions.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
instead and rely on lemmas in this file that link the two notions.
instead and rely on `MeasureTheory.MeasurePreserving.hasLaw` and `HasLaw.measurePreserving` to convert between the two notions.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is also MeasureTheory.MeasurePreserving.comp_hasLaw which I think is actually more useful.

-/

public section
Expand All @@ -34,7 +41,14 @@ variable (X μ) in
/-- 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 = μ`. 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`. -/
`HasLaw.comp`, `IndepFun.hasLaw_mul` and `IndepFun.hasLaw_add`.

Note the existence of the analog concept `MeasureTheory.MeasurePreserving` which requires
measurability instead of a.e.-measurability. This is too strong in probability theory where
we often use almost-everywhere equality and only need a.e.-measurability hypotheses.
However, if one wants to state `HasLaw f μ P` for a certain explicit function `f` that is not
only `AEMeasurable` but `Measurable`, then one should state `MeasureTheory.MeasurePreserving f P μ`
instead and rely on lemmas in this file that link the two notions. -/

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

Suggested change
instead and rely on lemmas in this file that link the two notions. -/
instead and rely on `MeasureTheory.MeasurePreserving.hasLaw` and `HasLaw.measurePreserving` to convert between the two notions. -/

@[fun_prop]
structure HasLaw (P : Measure Ω := by volume_tac) : Prop where
protected aemeasurable : AEMeasurable X P := by fun_prop
Expand Down
Loading