-
Notifications
You must be signed in to change notification settings - Fork 251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Merged by Bors] - feat(Probability/Independence): add conditional independence #6098
Conversation
I seem to remember from an old discussion (on Zulip?) that this refactor may require at some point that the spaces should be standard Lebesgue spaces (which I am not really enthusiastic about if this can be avoided). Can you comment on that? |
I opened a WIP PR for mathlib3 a while ago where I raised that question. I guess that's where you remember it from. For unconditional independence this changes nothing. The constant kernel always exists and formulating the definition using it does not change the generality. For conditional independence, using this definition means that we need the space to be Polish Borel, since that is what is needed for We could also have the more general property as the definition, and then have a lemma stating that it is equivalent to the kernel definition. But since I am unsure whether conditional independence is useful outside of the Polish Borel setting, I thought I might as well define it in the way that gave the most API directly. |
In summary, this refactor can be cut into three steps: An alternative step (A3') would be to define conditional independence more generally using the conditional expectation, then add a lemma stating that in Polish Borel spaces it is a special case of (A1), and prove conditional independence properties in one generality or the other depending on the lemma. Another way to proceed (B) would be to not define the generalized independence, not change anything to unconditional independence, and to simply add conditional independence with all its properties proved separately. That would be a lot of code duplication (or almost duplication). (A) avoids code duplication entirely at the cost of some generality for conditional independence. (A') with step (A3') keeps the generality, as does (B). The relative merits of (A') and (B) depend on the proportion of properties that hold without the Polish Borel assumption. The prevalence of that assumption in references makes me think that (A)/(A') and in particular (A1) are a good idea (it looks like conditional independence has nice properties only when the conditional kernel exists), but I need to investigate more to be sure. Non-Polish spaces are not my usual use case :) |
…a measure (#6106) We introduce a new notion of independence with respect to a kernel and a measure. The plan is to eventually express both independence and conditional independence as particular cases of this new notion (see #6098). Two sigma-algebras `m` and `m'` are said to be independent with respect to a kernel `κ` and a measure `μ` if for all `m`-measurable sets `t₁` and `m'`-measurable sets `t₂`, `∀ᵐ a ∂μ, κ a (t₁ ∩ t₂) = κ a t₁ * κ a t₂`. Independence is the special case where `κ` is a constant kernel. Conditional independence can be defined by using the conditional expectation kernel `condexpKernel`. Co-authored-by: RemyDegenne <Remydegenne@gmail.com>
…a measure (#6106) We introduce a new notion of independence with respect to a kernel and a measure. The plan is to eventually express both independence and conditional independence as particular cases of this new notion (see #6098). Two sigma-algebras `m` and `m'` are said to be independent with respect to a kernel `κ` and a measure `μ` if for all `m`-measurable sets `t₁` and `m'`-measurable sets `t₂`, `∀ᵐ a ∂μ, κ a (t₁ ∩ t₂) = κ a t₁ * κ a t₂`. Independence is the special case where `κ` is a constant kernel. Conditional independence can be defined by using the conditional expectation kernel `condexpKernel`. Co-authored-by: RemyDegenne <Remydegenne@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's get this in. Thanks! I haven't looked at everything in detail, since it is modelled on the other files, but it makes perfect sense.
bors d+
(h : CondIndepSets m' hm' s₁ s₂ μ) : CondIndepSets m' hm' s₂ s₁ μ := | ||
kernel.IndepSets.symm h | ||
|
||
theorem condIndepSets_of_condIndepSets_of_le_left {s₁ s₂ s₃ : Set (Set Ω)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
le
sounds weird here, as it's just a subset. Since the same terminology is used in the other independence files, let's keep it like that and maybe fix it some other day.
✌️ RemyDegenne can now approve this pull request. To approve and merge a pull request, simply reply with |
Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr>
Thanks for the review! |
Define conditional independence of sigma-algebras, sets and functions. This is a special case of independence with respect to a kernel and a measure. Conditional independence is obtained by using the conditional expectation kernel `condexpKernel`. Co-authored-by: Rémy Degenne <remydegenne@gmail.com> Co-authored-by: RemyDegenne <remydegenne@gmail.com>
Pull request successfully merged into master. Build succeeded: |
Define conditional independence of sigma-algebras, sets and functions. This is a special case of independence with respect to a kernel and a measure. Conditional independence is obtained by using the conditional expectation kernel `condexpKernel`. Co-authored-by: Rémy Degenne <remydegenne@gmail.com> Co-authored-by: RemyDegenne <remydegenne@gmail.com>
Define conditional independence of sigma-algebras, sets and functions. This is a special case of independence with respect to a kernel and a measure. Conditional independence is obtained by using the conditional expectation kernel
condexpKernel
.The PR is huge, but most of it is a copy of Independence/Kernel.lean with a particular choice of kernel, and most lemmas are proved in one line.
The main new part is the section DefinitionsLemmas, which relates the kernel definition and the more usual definition of conditional independence with conditional expectations.