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] - chore(data/finset/basic): move disjoint
proofs earlier
#16436
Conversation
This avoids repeating work for `disj_union`, and takes the stance that `disjoint` is part of the lattice API.
@[simp] lemma disjoint_map [decidable_eq α] [decidable_eq β] {s t : finset α} (f : α ↪ β) : | ||
disjoint (s.map f) (t.map f) ↔ disjoint s t := | ||
by rw [disjoint_left, disjoint_left, ←map_disj_union_aux] |
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 lemma along with disjoint_image
are the main golfs from this change; but the longer term goal is to unify the hypothesis taken by finset.disj_union
with disjoint
.
end bUnion | ||
|
||
/-! ### disjoint -/ | ||
--TODO@Yaël: Kill lemmas duplicate with `boolean_algebra` |
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.
@YaelDillies, I assume this comment refers only to sdiff
lemmas?
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.
Absolutely.
@@ -1339,7 +1412,17 @@ sup_eq_sdiff_sup_sdiff_sup_inf | |||
lemma erase_eq_empty_iff (s : finset α) (a : α) : s.erase a = ∅ ↔ s = ∅ ∨ s = {a} := | |||
by rw [←sdiff_singleton_eq_erase, sdiff_eq_empty_iff_subset, subset_singleton_iff] | |||
|
|||
end decidable_eq | |||
--TODO@Yaël: Kill lemmas duplicate with `boolean_algebra` |
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 comment moved along with the lemmas below)
Co-authored-by: Yaël Dillies <yael.dillies@gmail.com>
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 r+
bors r- |
Canceled. |
bors r+ |
Sorry, I think I didn't merge this carefully. Could you fix the merge? Then feel free to bors it. bors r- |
✌️ eric-wieser can now approve this pull request. To approve and merge a pull request, simply reply with |
Canceled. |
Thanks @YaelDillies for fixing this PR. I'd have preferred if you had exercised less editorial control (i.e., not removing all the sections that Eric had introduced -- another bors r+ |
I thought those sections were remnants of your merge? Pretty sure they got deleted in another PR rather than added here. |
@YaelDillies All you have to do to check is go to https://github.com/leanprover-community/mathlib/pull/16436/commits and look at the commits. The sections were introduced in the first commit and never removed until 7fe139a. You can also check what my merge did, which was just deciding where to put the new stuff about symmetric differences -- the merge wasn't careful in that I didn't bother to fix the required variables. I think it's good practice to read through git histories to keep track of who is doing what and whether anyone (including myself) has accidentally deleted other people's work. |
This avoids repeating work for `disj_union`, and takes the stance that `disjoint` is part of the lattice API. Co-authored-by: Kyle Miller <kmill31415@gmail.com> Co-authored-by: Yaël Dillies <yael.dillies@gmail.com>
This PR was included in a batch that was canceled, it will be automatically retried |
This avoids repeating work for `disj_union`, and takes the stance that `disjoint` is part of the lattice API. Co-authored-by: Kyle Miller <kmill31415@gmail.com> Co-authored-by: Yaël Dillies <yael.dillies@gmail.com>
Build failed (retrying...): |
This avoids repeating work for `disj_union`, and takes the stance that `disjoint` is part of the lattice API. Co-authored-by: Kyle Miller <kmill31415@gmail.com> Co-authored-by: Yaël Dillies <yael.dillies@gmail.com>
Build failed (retrying...): |
This avoids repeating work for `disj_union`, and takes the stance that `disjoint` is part of the lattice API. Co-authored-by: Kyle Miller <kmill31415@gmail.com> Co-authored-by: Yaël Dillies <yael.dillies@gmail.com>
Build failed (retrying...): |
This avoids repeating work for `disj_union`, and takes the stance that `disjoint` is part of the lattice API. Co-authored-by: Kyle Miller <kmill31415@gmail.com> Co-authored-by: Yaël Dillies <yael.dillies@gmail.com>
Build failed (retrying...): |
This avoids repeating work for `disj_union`, and takes the stance that `disjoint` is part of the lattice API. Co-authored-by: Kyle Miller <kmill31415@gmail.com> Co-authored-by: Yaël Dillies <yael.dillies@gmail.com>
Pull request successfully merged into master. Build succeeded: |
disjoint
proofs earlierdisjoint
proofs earlier
This avoids repeating work for `disj_union`, and takes the stance that `disjoint` is part of the lattice API. Co-authored-by: Kyle Miller <kmill31415@gmail.com> Co-authored-by: Yaël Dillies <yael.dillies@gmail.com>
This avoids repeating work for
disj_union
, and takes the stance thatdisjoint
is part of the lattice API.