Skip to content
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(data/{finset,set}/basic): More insert and erase lemmas #14675

Closed
wants to merge 5 commits into from

Conversation

YaelDillies
Copy link
Collaborator

Also turn finset.disjoint_iff_disjoint_coe around and change set.finite.to_finset_insert take (insert a s).finite instead of s.finite.


Open in Gitpod

ha.to_finset = {a} :=
finset.ext $ by simp

@[simp] lemma finite.to_finset_insert [decidable_eq α] {s : set α} {a : α}
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this lemma is an improvement over the removed one; I suspect this is a case where we want both versions, one for each direction of rewrite

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Same thought here, so I restored it but unsimped and primed.

Copy link
Member

@eric-wieser eric-wieser left a comment

Choose a reason for hiding this comment

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

This largely looks good, although I'm worried that some of these lemmas might already exist with different names

@YaelDillies
Copy link
Collaborator Author

Indeed, insert_singleton already was pair_eq_singleton. I have good hope that the rest isn't duplicating anything.

@riccardobrasca
Copy link
Member

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 Jun 12, 2022
bors bot pushed a commit that referenced this pull request Jun 12, 2022
Also turn `finset.disjoint_iff_disjoint_coe` around and change `set.finite.to_finset_insert` take `(insert a s).finite` instead of `s.finite`.
@bors
Copy link

bors bot commented Jun 12, 2022

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(data/{finset,set}/basic): More insert and erase lemmas [Merged by Bors] - feat(data/{finset,set}/basic): More insert and erase lemmas Jun 12, 2022
@bors bors bot closed this Jun 12, 2022
@bors bors bot deleted the insert_idem branch June 12, 2022 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants