[Merged by Bors] - feat(data/finset/basic): insert and erase lemmas#18729
[Merged by Bors] - feat(data/finset/basic): insert and erase lemmas#18729YaelDillies wants to merge 6 commits intomasterfrom
insert and erase lemmas#18729Conversation
|
Are the corresponding lemmas already there for |
|
There's no |
|
If only someone had a linter for that... |
| lemma erase_sdiff_comm (s t : finset α) (a : α) : s.erase a \ t = (s \ t).erase a := | ||
| by simp_rw [erase_eq, sdiff_right_comm] | ||
|
|
||
| lemma insert_union_comm (s t : finset α) (a : α) : insert a s ∪ t = s ∪ insert a t := | ||
| by rw [insert_union, union_insert] |
There was a problem hiding this comment.
comm seems to mean bin (unary x) y = unary (bin x y) in the first name but bin (unary x) y = bin x (unary y) in the second one, Calling the first one erase_sdiff would ease this a little.
There was a problem hiding this comment.
If you consider both insert and erase to be binary, they're respectively
bin1 (bin2 s a) t = bin2 (bin1 s t) abin1 (bin2 a s) t = bin1 s (bin2 a t)
so the first one is clearly right commutativity, but the second one isn't clearly anything.
|
(I merged master to try fix the bibtool error) |
|
@alexjbest, did you want to take a final look? |
|
@eric-wieser nothing more from me I think |
|
bors d+ Thanks! |
|
✌️ YaelDillies can now approve this pull request. To approve and merge a pull request, simply reply with |
|
Looks like building is alright, so bors merge |
|
Pull request successfully merged into master. Build succeeded: |
insert and erase lemmasinsert and erase lemmas
Match leanprover-community/mathlib3#18729 * [`order.heyting.basic`@`4e42a9d0a79d151ee359c270e498b1a00cc6fa4e`..`9ac7c0c8c4d7a535ec3e5b34b8859aab9233b2f4`](https://leanprover-community.github.io/mathlib-port-status/file/order/heyting/basic?range=4e42a9d0a79d151ee359c270e498b1a00cc6fa4e..9ac7c0c8c4d7a535ec3e5b34b8859aab9233b2f4) * [`order.boolean_algebra`@`bc7d81beddb3d6c66f71449c5bc76c38cb77cf9e`..`9ac7c0c8c4d7a535ec3e5b34b8859aab9233b2f4`](https://leanprover-community.github.io/mathlib-port-status/file/order/boolean_algebra?range=bc7d81beddb3d6c66f71449c5bc76c38cb77cf9e..9ac7c0c8c4d7a535ec3e5b34b8859aab9233b2f4) * [`data.set.basic`@`29cb56a7b35f72758b05a30490e1f10bd62c35c1`..`9ac7c0c8c4d7a535ec3e5b34b8859aab9233b2f4`](https://leanprover-community.github.io/mathlib-port-status/file/data/set/basic?range=29cb56a7b35f72758b05a30490e1f10bd62c35c1..9ac7c0c8c4d7a535ec3e5b34b8859aab9233b2f4) * [`data.finset.basic`@`68cc421841f2ebb8ad2b5a35a853895feb4b850a`..`9ac7c0c8c4d7a535ec3e5b34b8859aab9233b2f4`](https://leanprover-community.github.io/mathlib-port-status/file/data/finset/basic?range=68cc421841f2ebb8ad2b5a35a853895feb4b850a..9ac7c0c8c4d7a535ec3e5b34b8859aab9233b2f4)
Match leanprover-community/mathlib3#18729 * [`order.heyting.basic`@`4e42a9d0a79d151ee359c270e498b1a00cc6fa4e`..`9ac7c0c8c4d7a535ec3e5b34b8859aab9233b2f4`](https://leanprover-community.github.io/mathlib-port-status/file/order/heyting/basic?range=4e42a9d0a79d151ee359c270e498b1a00cc6fa4e..9ac7c0c8c4d7a535ec3e5b34b8859aab9233b2f4) * [`order.boolean_algebra`@`bc7d81beddb3d6c66f71449c5bc76c38cb77cf9e`..`9ac7c0c8c4d7a535ec3e5b34b8859aab9233b2f4`](https://leanprover-community.github.io/mathlib-port-status/file/order/boolean_algebra?range=bc7d81beddb3d6c66f71449c5bc76c38cb77cf9e..9ac7c0c8c4d7a535ec3e5b34b8859aab9233b2f4) * [`data.set.basic`@`29cb56a7b35f72758b05a30490e1f10bd62c35c1`..`9ac7c0c8c4d7a535ec3e5b34b8859aab9233b2f4`](https://leanprover-community.github.io/mathlib-port-status/file/data/set/basic?range=29cb56a7b35f72758b05a30490e1f10bd62c35c1..9ac7c0c8c4d7a535ec3e5b34b8859aab9233b2f4) * [`data.finset.basic`@`68cc421841f2ebb8ad2b5a35a853895feb4b850a`..`9ac7c0c8c4d7a535ec3e5b34b8859aab9233b2f4`](https://leanprover-community.github.io/mathlib-port-status/file/data/finset/basic?range=68cc421841f2ebb8ad2b5a35a853895feb4b850a..9ac7c0c8c4d7a535ec3e5b34b8859aab9233b2f4)
Match leanprover-community/mathlib3#18729 * [`order.heyting.basic`@`4e42a9d0a79d151ee359c270e498b1a00cc6fa4e`..`9ac7c0c8c4d7a535ec3e5b34b8859aab9233b2f4`](https://leanprover-community.github.io/mathlib-port-status/file/order/heyting/basic?range=4e42a9d0a79d151ee359c270e498b1a00cc6fa4e..9ac7c0c8c4d7a535ec3e5b34b8859aab9233b2f4) * [`order.boolean_algebra`@`bc7d81beddb3d6c66f71449c5bc76c38cb77cf9e`..`9ac7c0c8c4d7a535ec3e5b34b8859aab9233b2f4`](https://leanprover-community.github.io/mathlib-port-status/file/order/boolean_algebra?range=bc7d81beddb3d6c66f71449c5bc76c38cb77cf9e..9ac7c0c8c4d7a535ec3e5b34b8859aab9233b2f4) * [`data.set.basic`@`29cb56a7b35f72758b05a30490e1f10bd62c35c1`..`9ac7c0c8c4d7a535ec3e5b34b8859aab9233b2f4`](https://leanprover-community.github.io/mathlib-port-status/file/data/set/basic?range=29cb56a7b35f72758b05a30490e1f10bd62c35c1..9ac7c0c8c4d7a535ec3e5b34b8859aab9233b2f4) * [`data.finset.basic`@`68cc421841f2ebb8ad2b5a35a853895feb4b850a`..`9ac7c0c8c4d7a535ec3e5b34b8859aab9233b2f4`](https://leanprover-community.github.io/mathlib-port-status/file/data/finset/basic?range=68cc421841f2ebb8ad2b5a35a853895feb4b850a..9ac7c0c8c4d7a535ec3e5b34b8859aab9233b2f4)
Match leanprover-community/mathlib3#18729 * [`order.heyting.basic`@`4e42a9d0a79d151ee359c270e498b1a00cc6fa4e`..`9ac7c0c8c4d7a535ec3e5b34b8859aab9233b2f4`](https://leanprover-community.github.io/mathlib-port-status/file/order/heyting/basic?range=4e42a9d0a79d151ee359c270e498b1a00cc6fa4e..9ac7c0c8c4d7a535ec3e5b34b8859aab9233b2f4) * [`order.boolean_algebra`@`bc7d81beddb3d6c66f71449c5bc76c38cb77cf9e`..`9ac7c0c8c4d7a535ec3e5b34b8859aab9233b2f4`](https://leanprover-community.github.io/mathlib-port-status/file/order/boolean_algebra?range=bc7d81beddb3d6c66f71449c5bc76c38cb77cf9e..9ac7c0c8c4d7a535ec3e5b34b8859aab9233b2f4) * [`data.set.basic`@`29cb56a7b35f72758b05a30490e1f10bd62c35c1`..`9ac7c0c8c4d7a535ec3e5b34b8859aab9233b2f4`](https://leanprover-community.github.io/mathlib-port-status/file/data/set/basic?range=29cb56a7b35f72758b05a30490e1f10bd62c35c1..9ac7c0c8c4d7a535ec3e5b34b8859aab9233b2f4) * [`data.finset.basic`@`68cc421841f2ebb8ad2b5a35a853895feb4b850a`..`9ac7c0c8c4d7a535ec3e5b34b8859aab9233b2f4`](https://leanprover-community.github.io/mathlib-port-status/file/data/finset/basic?range=68cc421841f2ebb8ad2b5a35a853895feb4b850a..9ac7c0c8c4d7a535ec3e5b34b8859aab9233b2f4)
Interaction of
insertanderasewithinter,unionanddisjoint.