Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

[Merged by Bors] - feat(probability/independence): Independence of singletons#18506

Closed
YaelDillies wants to merge 12 commits intomasterfrom
generate_from_singleton
Closed

[Merged by Bors] - feat(probability/independence): Independence of singletons#18506
YaelDillies wants to merge 12 commits intomasterfrom
generate_from_singleton

Conversation

@YaelDillies
Copy link
Copy Markdown
Collaborator

@YaelDillies YaelDillies commented Feb 27, 2023

Characterisation of independence in terms of measure distributing over finite intersections, and lemmas connecting the different concepts of independence.

Also add supporting measurable_space and set.preimage lemmas


Match leanprover-community/mathlib4#2513

Open in Gitpod

@YaelDillies YaelDillies requested review from a team as code owners February 27, 2023 09:56
@YaelDillies YaelDillies added awaiting-review The author would like community review of the PR t-measure-probability Measure theory / Probability theory labels Feb 27, 2023
@kim-em kim-em added the modifies-synchronized-file This PR touches a files that has already been ported to mathlib4, and may need a synchronization PR. label Mar 28, 2023
@YaelDillies YaelDillies requested a review from sgouezel April 24, 2023 12:21
lemma comap_map_le : (m.map f).comap f ≤ m := (gc_comap_map f).l_u_le _
lemma le_map_comap : m ≤ (m.comap g).map g := (gc_comap_map g).le_u_l _

lemma comap_of_involutive {m' : measurable_space β} {g : β → β} (hg : involutive g)
Copy link
Copy Markdown
Member

@urkud urkud Jun 21, 2023

Choose a reason for hiding this comment

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

This lemma immediately follows from 3 facts, 2 of them are not in mathlib yet. Could you add them, please?

  • measurable_embedding.comap_eq: comap of the measurable_space instance along a measurable_embedding is the corresponding instance; BTW, measurable_embedding f is equivalent to comap f _ = _ + measurable_set (range f).
  • measurable_equiv.of_involutive: a measurable involutive map generates a measurable_equiv; the to_equiv projection is given by equiv.perm.of_involutive;
  • measurable_space.comap_comp - already in the library.

While you're at it, could you please add

  • measurable_equiv.map_eq
    as well?

I'm not sure if we should use measurable_space in the names to make it clear that the lemmas are not about measure_theory.measure.map and measure_theory.measure.comap.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I've added everything you mentioned here, but I couldn't prove measurable_embedding f ↔ comap f _ = _ ∧ measurable_set (range f). Instead I proved measurable_embedding f ↔ injective f ∧ comap f _ = _ ∧ measurable_set (range f).

@urkud
Copy link
Copy Markdown
Member

urkud commented Jun 21, 2023

Also, let's ask @RemyDegenne to review the part about Indep_sets.

@urkud urkud requested a review from RemyDegenne June 21, 2023 19:02
@urkud urkud 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 Jun 21, 2023
@kim-em kim-em added the too-late This PR was ready too late for inclusion in mathlib3 label Jul 16, 2023
@YaelDillies
Copy link
Copy Markdown
Collaborator Author

Sorry, why has this been tagged as too-late? We're in the middle of a review here. In particular, it was compiling before Yury' review and it now compiles again.

@YaelDillies YaelDillies added awaiting-review The author would like community review of the PR not-too-late This PR was ready at the point mathlib3 was frozen: we will try to merge it and port it to mathlib4 and removed awaiting-author A reviewer has asked the author a question or requested changes too-late This PR was ready too late for inclusion in mathlib3 labels Jul 17, 2023
@kim-em kim-em requested a review from RemyDegenne July 30, 2023 23:13
@kim-em
Copy link
Copy Markdown
Collaborator

kim-em commented Jul 30, 2023

Are we good to go, now?

instance : measurable_space punit := ⊤ -- this also works for `unit`
instance : measurable_space bool := ⊤
instance Prop.measurable_space : measurable_space Prop := ⊤
instance {α} : measurable_space (set α) := ⊤
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why this is the right instance for measurable_space (set α)? IMHO, any instance on set α that is not equal to the corresponding instance on α → Prop needs an explanation in the docstring.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I thought I needed this instance but I'm not sure anymore. Let's see whether this PR compiles without it.

Copy link
Copy Markdown
Collaborator

@RemyDegenne RemyDegenne left a comment

Choose a reason for hiding this comment

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

I am not sure that I agree that this is not too late but fine, let's proceed with this PR.

The changes to the independence file look good.
My only issue with this PR is the one raised by Yuri about the measurable space on set α: if there is a good reason for it not to be measurable_space.pi, it should be explained. If the case you care about is finite α, then measurable_space.pi is the same as top:

example [fintype α] : (measurable_space.pi : measurable_space (set α)) = ⊤ :=
begin
  ext x,
  simp only [measurable_space.measurable_set_top, iff_true],
  refine measurable.set_of _,
  exact measurable_of_countable _,
end

Apart from that, everything looks good.

@RemyDegenne RemyDegenne 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 Jul 31, 2023
@YaelDillies YaelDillies 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 Aug 3, 2023
@urkud
Copy link
Copy Markdown
Member

urkud commented Sep 10, 2023

Thanks! 🎉
bors merge

@github-actions github-actions bot added ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) and removed awaiting-review The author would like community review of the PR labels Sep 10, 2023
bors bot pushed a commit that referenced this pull request Sep 10, 2023
Characterisation of independence in terms of measure distributing over finite intersections, and lemmas connecting the different concepts of independence.

Also add supporting `measurable_space` and `set.preimage` lemmas
@bors
Copy link
Copy Markdown

bors bot commented Sep 10, 2023

Build failed:

@urkud
Copy link
Copy Markdown
Member

urkud commented Sep 12, 2023

bors merge

bors bot pushed a commit that referenced this pull request Sep 12, 2023
Characterisation of independence in terms of measure distributing over finite intersections, and lemmas connecting the different concepts of independence.

Also add supporting `measurable_space` and `set.preimage` lemmas
@bors
Copy link
Copy Markdown

bors bot commented Sep 13, 2023

Pull request successfully merged into master.

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot changed the title feat(probability/independence): Independence of singletons [Merged by Bors] - feat(probability/independence): Independence of singletons Sep 13, 2023
@bors bors bot closed this Sep 13, 2023
@bors bors bot deleted the generate_from_singleton branch September 13, 2023 02:58
YaelDillies added a commit to leanprover-community/mathlib4 that referenced this pull request Sep 19, 2023
bors bot pushed a commit to leanprover-community/mathlib4 that referenced this pull request Sep 26, 2023
bors bot pushed a commit to leanprover-community/mathlib4 that referenced this pull request Oct 31, 2023
Port a bit of leanprover-community/mathlib3#18506, but it's mostly handmade.




Co-authored-by: RemyDegenne <Remydegenne@gmail.com>
fgdorais pushed a commit to leanprover-community/mathlib4 that referenced this pull request Nov 1, 2023
Port a bit of leanprover-community/mathlib3#18506, but it's mostly handmade.




Co-authored-by: RemyDegenne <Remydegenne@gmail.com>
chenjulang added a commit to chenjulang/mathlib that referenced this pull request May 11, 2024
* commit '65a1391a0106c9204fe45bc73a039f056558cb83': (12443 commits)
  feat(data/{list,multiset,finset}/*): `attach` and `filter` lemmas (leanprover-community#18087)
  feat(combinatorics/simple_graph): More clique lemmas (leanprover-community#19203)
  feat(measure_theory/order/upper_lower): Order-connected sets in `ℝⁿ` are measurable (leanprover-community#16976)
  move old README.md to OLD_README.md
  doc: Add a warning mentioning Lean 4 to the readme (leanprover-community#19243)
  feat(topology/metric_space): diameter of pointwise zero and addition (leanprover-community#19028)
  feat(topology/algebra/order/liminf_limsup): Eventual boundedness of neighborhoods (leanprover-community#18629)
  feat(probability/independence): Independence of singletons (leanprover-community#18506)
  feat(combinatorics/set_family/ahlswede_zhang): Ahlswede-Zhang identity, part I (leanprover-community#18612)
  feat(data/finset/lattice): `sup'`/`inf'` lemmas (leanprover-community#18989)
  chore(order/liminf_limsup): Generalise and move lemmas (leanprover-community#18628)
  feat(algebraic_topology/dold_kan): The Dold-Kan equivalence for abelian categories (leanprover-community#17926)
  feat(data/sum/interval): The lexicographic sum of two locally finite orders is locally finite (leanprover-community#11352)
  feat(analysis/convex/proj_Icc): Extending convex functions (leanprover-community#18797)
  feat(algebraic_topology/dold_kan): The Dold-Kan equivalence for pseudoabelian categories (leanprover-community#17925)
  feat(measure_theory/measure/haar_quotient): the Unfolding Trick (leanprover-community#18863)
  feat(linear_algebra/orientation): add `orientation.reindex` (leanprover-community#19236)
  feat(combinatorics/quiver/covering): Definition of coverings and unique lifting of paths (leanprover-community#17828)
  feat(set_theory/game/pgame): small sets of pre-games / games / surreals are bounded (leanprover-community#15260)
  feat(tactic/positivity): Extension for `ite` (leanprover-community#17650)
  ...

# Conflicts:
#	README.md
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

modifies-synchronized-file This PR touches a files that has already been ported to mathlib4, and may need a synchronization PR. not-too-late This PR was ready at the point mathlib3 was frozen: we will try to merge it and port it to mathlib4 ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) t-measure-probability Measure theory / Probability theory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants