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/pi_system) lemmas for pi_system, useful for independence. #6353
Conversation
You requested a review from me and I am happy to help on this, but note that I am not a maintainer and cannot approve the PR for merge.
Aside from the review, I feel that we should make sure to coordinate our efforts. I am also currently adding results about independence and we should make sure that we don't do the same things twice. I have a series of PRs coming towards Kolmogorov's 0-1 law (see the |
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.
Here are several minor comments, mostly about style, with suggestions to shorten the proofs.
I did not look at the two long proofs at the end yet.
@RemyDegenne: I think I speak for all the maintainers when I say that we are very grateful when contributors help with reviews. Thank you! |
Co-authored-by: Rémy Degenne <remydegenne@gmail.com>
@RemyDegenne, thanks for the detailed review! The reason I added you was because I am less concerned about the syntax and more because you wrote the proofs in independence. Since this PR is heading towards: https://github.com/leanprover-community/mathlib/tree/mzinkevi_independent_finite_alt I wanted to make sure we were on the same page. I'll add a second reviewer. -Marty |
I added fpvandoorn as an "assignee". Maybe next time I will flip them. |
You can see that continuous integration is failing due to the linter. If you click on details, it tells you that your definition
You can write As I suggested in my first comment, I feel like the basic API around
At that point, I am not sure |
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.
A few minor changes about spacing.
Co-authored-by: Rémy Degenne <remydegenne@gmail.com>
…mathlib into mzinkevi_pi_system
Okay, I have given a more thorough review of your comments. I renamed the algorithms. We should start a separate thread discussing the high level goals here. The indep_set we should discuss: I wanted you to be aware, and we should definitely coordinate. I am pushing towards Chernoff's inequalities, so we shouldn't have too much of a collision. A question I have right now (and it is a question more than an answer) is whether measurable functions and measurable sets (and random variables and events) should be types. I am not sure if the default answer is yes or no. It is certainly prettier with them as types, but there are also an additional layer of theorems and definitions. A key question in my mind is what formulation makes it easier to automate theorems. It feels like the key goal is developing tactics and patterns proving:
But again, let's discuss. -Marty |
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.
I finally had a look at the last lemma.
Thank you! These changes are helpful in understanding the style. I haven't quite figured out the style as to line breaks, but I'll try to implement this pattern moving forward. I have seen `suffices`, but I haven't used it yet. I'll look through my next PR to see where I can use it. Co-authored-by: Rémy Degenne <remydegenne@gmail.com>
@mzinkevi I noticed that you put the following reply in the commit message:
It's better to reply in the comments here since the commit messages aren't copied here and so are easily missed. |
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.
Thanks a lot for this! Since you are expanding nicely on what there is on pi systems in the file measurable_space.lean
, I wonder if it wouldn't make sense to move all there is on this notion (and on dynkin systems) to the file you are creating, to get something more self-contained and easier to locate.
By the way, you are importing measure_space
, but I guess it would suffice to import measurable_space
for everything to make sense (and you don't need to open measure_theory
as there is no measure in your file).
Updating to latest version of master
Okay, I have refactored it as sgouezel requested. I added some comments on attribution. |
Thanks for the refactor! I have pushed a few more detailed docstrings. This looks good to me, but I'd be happy to have a last look from @fpvandoorn or @RemyDegenne on this. |
It looks good to me. |
Thanks for checking! |
…endence. (#6353) The goal here is to prove that the expectation of a product of an finite number of independent random variables equals the production of the expectations. See https://github.com/leanprover-community/mathlib/tree/mzinkevi_independent_finite_alt Co-authored-by: mzinkevi <41597957+mzinkevi@users.noreply.github.com> Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr>
Pull request successfully merged into master. Build succeeded: |
…endence. (#6353) The goal here is to prove that the expectation of a product of an finite number of independent random variables equals the production of the expectations. See https://github.com/leanprover-community/mathlib/tree/mzinkevi_independent_finite_alt Co-authored-by: mzinkevi <41597957+mzinkevi@users.noreply.github.com> Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr>
The goal here is to prove that the expectation of a product of an finite number of independent random variables equals the production of the expectations.
See https://github.com/leanprover-community/mathlib/tree/mzinkevi_independent_finite_alt