-
Notifications
You must be signed in to change notification settings - Fork 297
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] - refactor(data/set/pairwise): Indexed sets as arguments to set.pairwise_disjoint
#9898
Conversation
Can you expand a little upon the motivation in the PR description? The fact this introduces a bunch of |
What do you think about it now? The fact that I had to add a bunch of |
@YaelDillies I think Eric's point is that the |
I think not. The current definition isn't used much and my proposed generalization is quite light. |
That's not included in this PR though, right? |
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
src/algebra/big_operators/basic.lean
Outdated
@@ -303,20 +304,17 @@ end | |||
|
|||
@[to_additive] | |||
lemma prod_bUnion [decidable_eq α] {s : finset γ} {t : γ → finset α} : | |||
(∀ x ∈ s, ∀ y ∈ s, x ≠ y → disjoint (t x) (t y)) → | |||
(set.pairwise_disjoint ↑s t) → |
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.
This feels like a slightly worse lemma than the original, as now the caller has to deal with awkward coercions.
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.
It really is fine. After all, I managed to golf the proofs that were using it already.
# Conflicts: # src/data/set/pairwise.lean # src/measure_theory/covering/besicovitch.lean # src/measure_theory/covering/vitali.lean # src/topology/bases.lean
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 🎉
bors merge
…se_disjoint` (#9898) This will allow to express the bind operation: you can't currently express that the pairwise disjoint union of pairwise disjoint sets pairwise disjoint. Here's the corresponding statement with `finset.sup_indep` (defined in #9867): ```lean lemma sup_indep.sup {s : finset ι'} {g : ι' → finset ι} {f : ι → α} (hs : s.sup_indep (λ i, (g i).sup f)) (hg : ∀ i' ∈ s, (g i').sup_indep f) : (s.sup g).sup_indep f := ``` You currently can't do `set.pairwise_disjoint s (λ i, ⋃ x ∈ g i, f x)`. Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Build failed (retrying...): |
…se_disjoint` (#9898) This will allow to express the bind operation: you can't currently express that the pairwise disjoint union of pairwise disjoint sets pairwise disjoint. Here's the corresponding statement with `finset.sup_indep` (defined in #9867): ```lean lemma sup_indep.sup {s : finset ι'} {g : ι' → finset ι} {f : ι → α} (hs : s.sup_indep (λ i, (g i).sup f)) (hg : ∀ i' ∈ s, (g i').sup_indep f) : (s.sup g).sup_indep f := ``` You currently can't do `set.pairwise_disjoint s (λ i, ⋃ x ∈ g i, f x)`. Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Pull request successfully merged into master. Build succeeded: |
set.pairwise_disjoint
set.pairwise_disjoint
…se_disjoint` (#9898) This will allow to express the bind operation: you can't currently express that the pairwise disjoint union of pairwise disjoint sets pairwise disjoint. Here's the corresponding statement with `finset.sup_indep` (defined in #9867): ```lean lemma sup_indep.sup {s : finset ι'} {g : ι' → finset ι} {f : ι → α} (hs : s.sup_indep (λ i, (g i).sup f)) (hg : ∀ i' ∈ s, (g i').sup_indep f) : (s.sup g).sup_indep f := ``` You currently can't do `set.pairwise_disjoint s (λ i, ⋃ x ∈ g i, f x)`. Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
This will allow to express the bind operation: you can't currently express that the pairwise disjoint union of pairwise disjoint sets pairwise disjoint. Here's the corresponding statement with
finset.sup_indep
(defined in #9867):You currently can't do
set.pairwise_disjoint s (λ i, ⋃ x ∈ g i, f x)
.