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(measure_theory/independence): define independence of sets of sets, measurable spaces, sets, functions #5848

Closed
wants to merge 20 commits into from

Conversation

RemyDegenne
Copy link
Collaborator

This first PR about independence contains definitions, a few lemmas about independence of unions/intersections of sets of sets, and a proof that two measurable spaces are independent iff generating pi-systems are independent (included in this PR to demonstrate usability of the definitions).


The plan is to follow with the content of the file independence.lean on the independence branch:

  • proof of the pi-system lemma for a family of measurable spaces instead of just two,
  • Kolmogorov's 0-1 law.

@RemyDegenne RemyDegenne added the awaiting-review The author would like community review of the PR label Jan 22, 2021
@hrmacbeth
Copy link
Member

Great to see a new area start to be filled out! Could you update docs/undergrad.yaml with each PR, so this PR knocks off the first few items on the "Probability" list, etc?

Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@eric-wieser
Copy link
Member

eric-wieser commented Jan 22, 2021

If you're feeling ambitious you could also introduce notation for independence. As a contrived demo:

def indep { A : Type*} (μ : ℕ) (a b : A) : Prop := sorry
def Indep { A B : Type*} (μ : ℕ) (f : B → A) : Prop := sorry

-- assuming the "indepedent" (⫫) of probability is suitable here: 
infix ` ⫫ `:50 := indep _
notation a ` ⫫[` μ `] ` b :50 := indep μ a b

notation `⫫ `:65 := indep
notation `⫫` binders `, ` r:(scoped:67 f, Indep _ f) := r
notation `⫫[` μ `]` binders `, ` r:(scoped:67 f, Indep μ f) := r

variables {A B : Type*} (a b : A) (f : B → A) (μ : ℕ) -- obviously mu should be a measure, I'm lazy

#check a ⫫[μ] b
#check a ⫫ b

#check (⫫ i, f i)
#check (⫫[μ] i, f i)

Copy link
Collaborator

@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.

I think the math structure is good. I have a problem with the terminology in many docstrings, coming from the fact that "measurable space" means a space with a sigma-algebra in maths, and a sigma-algebra on an already given space in Lean. You could avoid the ambiguity by replacing "measurable space" with "measurable space structure" in many docstrings, to indicate that you are not introducing a new space, only a new measurable structure.

src/measure_theory/independence.lean Outdated Show resolved Hide resolved
src/measure_theory/independence.lean Outdated Show resolved Hide resolved
src/measure_theory/independence.lean Outdated Show resolved Hide resolved
src/measure_theory/independence.lean Outdated Show resolved Hide resolved
src/measure_theory/independence.lean Outdated Show resolved Hide resolved
src/measure_theory/independence.lean Outdated Show resolved Hide resolved
src/measure_theory/independence.lean Outdated Show resolved Hide resolved
src/measure_theory/independence.lean Outdated Show resolved Hide resolved
src/measure_theory/independence.lean Outdated Show resolved Hide resolved
@sgouezel sgouezel added awaiting-author A reviewer has asked the author a question or requested changes and removed awaiting-review The author would like community review of the PR labels Jan 23, 2021
@RemyDegenne RemyDegenne added awaiting-review The author would like community review of the PR and removed awaiting-author A reviewer has asked the author a question or requested changes labels Jan 26, 2021
@sgouezel
Copy link
Collaborator

I have pushed minor changes:

  • some docstring clarification
  • use dot notation where possible
  • put everything in a namespace probability_theory (there are enough notions of independence in mathematics that we shouldn't preempt it in the root namespace)
  • Move the file to a new folder probability_theory
  • Remove a useless assumption of finite measure in an ext lemma.

I have checked what you've done, and I am very happy with it. You should my changes before this can be merged, though!

bors d+

@bors
Copy link

bors bot commented Jan 26, 2021

✌️ 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.

@RemyDegenne RemyDegenne removed the awaiting-review The author would like community review of the PR label Jan 26, 2021
@bryangingechen bryangingechen added the delegated The PR author may merge after reviewing final suggestions. label Jan 26, 2021
@eric-wieser
Copy link
Member

@sgouezel, do you have any thoughts on my notation suggestion in #5848 (comment)?

@sgouezel
Copy link
Collaborator

It's a nice suggestion. However, in most probability theory papers this kind of notation is not used, and independence is spellt out explicitly. So I would say it's good to have it but I am not sure it should become the normal form to express independence in mathlib. In any case, it can wait for a later PR unless Rémy wants to add it now.

@eric-wieser
Copy link
Member

Waiting for a later PR is probably a good idea anyway

@RemyDegenne
Copy link
Collaborator Author

I will not add the notation to this PR, and to be honest I am not completely sure about its utility. The indep names are already short enough that I don't see a huge benefit in introducing new notation. But that might be entirely due to the habit I have of not using notation for independence in my own work (except for "i.i.d.", which should probably be introduced at some point).

@RemyDegenne
Copy link
Collaborator Author

bors r+

bors bot pushed a commit that referenced this pull request Jan 26, 2021
…s, measurable spaces, sets, functions (#5848)

This first PR about independence contains definitions, a few lemmas about independence of unions/intersections of sets of sets, and a proof that two measurable spaces are independent iff generating pi-systems are independent (included in this PR to demonstrate usability of the definitions).



Co-authored-by: Rémy Degenne <remydegenne@gmail.com>
Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr>
@sgouezel
Copy link
Collaborator

Yes, I expect that iid will be a very useful (and very much used) definition

@bors
Copy link

bors bot commented Jan 26, 2021

Build failed (retrying...):

@bors
Copy link

bors bot commented Jan 26, 2021

Canceled.

@RemyDegenne
Copy link
Collaborator Author

bors r+

bors bot pushed a commit that referenced this pull request Jan 27, 2021
…s, measurable spaces, sets, functions (#5848)

This first PR about independence contains definitions, a few lemmas about independence of unions/intersections of sets of sets, and a proof that two measurable spaces are independent iff generating pi-systems are independent (included in this PR to demonstrate usability of the definitions).



Co-authored-by: Rémy Degenne <remydegenne@gmail.com>
Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr>
@bors
Copy link

bors bot commented Jan 27, 2021

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(measure_theory/independence): define independence of sets of sets, measurable spaces, sets, functions [Merged by Bors] - feat(measure_theory/independence): define independence of sets of sets, measurable spaces, sets, functions Jan 27, 2021
@bors bors bot closed this Jan 27, 2021
@bors bors bot deleted the independence_1 branch January 27, 2021 16:14
b-mehta pushed a commit that referenced this pull request Apr 2, 2021
…s, measurable spaces, sets, functions (#5848)

This first PR about independence contains definitions, a few lemmas about independence of unions/intersections of sets of sets, and a proof that two measurable spaces are independent iff generating pi-systems are independent (included in this PR to demonstrate usability of the definitions).



Co-authored-by: Rémy Degenne <remydegenne@gmail.com>
Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
delegated The PR author may merge after reviewing final suggestions.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants