Skip to content
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

Closed
wants to merge 37 commits into from

Conversation

RemyDegenne
Copy link
Contributor

@RemyDegenne RemyDegenne commented Jul 24, 2023

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.

Open in Gitpod

@sgouezel
Copy link
Contributor

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?

@RemyDegenne
Copy link
Contributor Author

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 condexpKernel to be defined. We could use the explicit property μ⟦t1 ∩ t2 | m'⟧ =ᵐ[μ] μ⟦t1 | m'⟧ * μ⟦t2 | m'⟧ to define conditional independence more generally, but then most interesting properties would need the Polish Borel assumption (and for example as far as I can tell Kallenberg talks about conditional independence in this case only).

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.

@RemyDegenne
Copy link
Contributor Author

In summary, this refactor can be cut into three steps:
A1) introduce the definition of independence with respect to a kernel and a measure #6106
A2) rephrase unconditional independence as a special case of (A1).
A3) introduce conditional independence, defined as a special case of (A1). This restricts conditional independence to Polish Borel spaces.

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 :)

bors bot pushed a commit that referenced this pull request Aug 1, 2023
…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>
bors bot pushed a commit that referenced this pull request Aug 2, 2023
…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>
@bors bors bot changed the base branch from master to ScottCarnahan/BinomialRing2 September 17, 2023 03:25
@RemyDegenne RemyDegenne changed the base branch from ScottCarnahan/BinomialRing2 to master September 17, 2023 08:41
@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added the merge-conflict The PR has a merge conflict with master, and needs manual merging. label Oct 25, 2023
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. label Oct 31, 2023
@RemyDegenne RemyDegenne changed the title feat(Probability/Independence): add generalization of independence and conditional independence feat(Probability/Independence): add conditional independence Nov 18, 2023
@RemyDegenne RemyDegenne added awaiting-review The author would like community review of the PR and removed WIP Work in progress labels Nov 18, 2023
Copy link
Contributor

@sgouezel sgouezel left a 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+

Mathlib/Probability/Independence/Conditional.lean Outdated Show resolved Hide resolved
(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 Ω)}
Copy link
Contributor

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.

Mathlib/Probability/Independence/ZeroOne.lean Show resolved Hide resolved
Mathlib/Probability/Independence/ZeroOne.lean Show resolved Hide resolved
@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Nov 30, 2023

✌️ RemyDegenne can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added delegated and removed awaiting-review The author would like community review of the PR labels Nov 30, 2023
@RemyDegenne
Copy link
Contributor Author

Thanks for the review!
bors r+

@github-actions github-actions bot added the ready-to-merge This PR has been sent to bors. label Nov 30, 2023
mathlib-bors bot pushed a commit that referenced this pull request Nov 30, 2023
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>
@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Nov 30, 2023

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat(Probability/Independence): add conditional independence [Merged by Bors] - feat(Probability/Independence): add conditional independence Nov 30, 2023
@mathlib-bors mathlib-bors bot closed this Nov 30, 2023
@mathlib-bors mathlib-bors bot deleted the RD_indep_refactor branch November 30, 2023 18:08
awueth pushed a commit that referenced this pull request Dec 19, 2023
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
delegated ready-to-merge This PR has been sent to bors. t-measure-probability Measure theory / Probability theory
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants