-
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] - feat(order/sup_indep): More lemmas #11932
Conversation
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 also suggest making all the f
's of type ι × ι' → α
(and maybe the one in sup_indep.sigma
explicit)
src/data/set/pairwise.lean
Outdated
lemma pairwise_disjoint.prod {f : ι → set α} {g : κ → set β} (hs : s.pairwise_disjoint f) | ||
(ht : t.pairwise_disjoint g) : | ||
(s ×ˢ t : set (ι × κ)).pairwise_disjoint (λ i, (f i.1) ×ˢ (g i.2)) := | ||
λ ⟨i, i'⟩ ⟨hi, hi'⟩ ⟨j, j'⟩ ⟨hj, hj'⟩ hij ⟨a, b⟩ ⟨⟨hai, hbi⟩, haj, hbj⟩, | ||
hij $ prod.ext (hs.elim_set hi hj _ hai haj) $ ht.elim_set hi' hj' _ hbi hbj |
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 feels weird to have the pairwise_disjoint
vesion of this before the disjoint
version. Here's one disjoint version:
lemma disjoint.prod_left {α β : Type*} {f₁ f₂ : set α} (hf : disjoint f₁ f₂) (g₁ g₂ : set β) :
disjoint (f₁ ×ˢ g₁) (f₂ ×ˢ g₂) :=
λ ⟨a, b⟩ ⟨⟨ha₁, hb₁⟩, ⟨ha₂, hb₂⟩⟩, hf ⟨ha₁, ha₂⟩
lemma disjoint.prod_right {α β : Type*} (f₁ f₂ : set α) {g₁ g₂ : set β} (hg : disjoint g₁ g₂) :
disjoint (f₁ ×ˢ g₁) (f₂ ×ˢ g₂) :=
λ ⟨a, b⟩ ⟨⟨ha₁, hb₁⟩, ⟨ha₂, hb₂⟩⟩, hg ⟨hb₁, hb₂⟩
I'll let you think about what the analogous one for prod'
is.
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 tried, but it doesn't seem to golf anything down.
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.
LGTM
bors d+
✌️ YaelDillies can now approve this pull request. To approve and merge a pull request, simply reply with |
bors merge |
A few more lemmas about `finset.sup_indep` and `set.pairwise_disjoint`.
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. If you want to switch to GitHub's built-in merge queue, visit their help page. |
Match leanprover-community/mathlib#11932 Co-authored-by: Jeremy Tan Jie Rui <reddeloostw@gmail.com> Co-authored-by: Parcly Taxel <reddeloostw@gmail.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Match leanprover-community/mathlib#11932 Co-authored-by: Jeremy Tan Jie Rui <reddeloostw@gmail.com> Co-authored-by: Parcly Taxel <reddeloostw@gmail.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Match leanprover-community/mathlib#11932 Co-authored-by: Jeremy Tan Jie Rui <reddeloostw@gmail.com> Co-authored-by: Parcly Taxel <reddeloostw@gmail.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Match leanprover-community/mathlib#11932 Co-authored-by: Jeremy Tan Jie Rui <reddeloostw@gmail.com> Co-authored-by: Parcly Taxel <reddeloostw@gmail.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
A few more lemmas about
finset.sup_indep
andset.pairwise_disjoint
.