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: add lemma not_mem_singleton_iff #14443

Closed
wants to merge 13 commits into from

Conversation

sinhp
Copy link
Collaborator

@sinhp sinhp commented Jul 5, 2024

The contrapositive (?) of the lemma

theorem mem_singleton_iff {a b : α} : a ∈ ({b} : Set α) ↔ a = b :=
  Iff.rfl

was missing. This PR adds

@[simp]
theorem not_mem_singleton_iff {a b : α} : a ∉ ({b} : Set α) ↔ a ≠ b :=
  Iff.rfl

which can be useful in avoiding extra have statements in other proofs.


Open in Gitpod

@github-actions github-actions bot added the new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community! label Jul 5, 2024
@sinhp sinhp added easy < 20s of review time. See the lifecycle page for guidelines. awaiting-review labels Jul 5, 2024
Copy link

github-actions bot commented Jul 5, 2024

PR summary 371bc73f7f

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ not_mem_singleton_iff

You can run this locally as follows
## summary with just the declaration names:
./scripts/no_lost_declarations.sh short <optional_commit>

## more verbose report:
./scripts/no_lost_declarations.sh <optional_commit>

@dagurtomas
Copy link
Collaborator

This PR includes some Grothendieck construction stuff, which it shouldn't, according to the PR description

@dagurtomas dagurtomas added awaiting-author A reviewer has asked the author a question or requested changes and removed awaiting-review labels Jul 5, 2024
@sinhp
Copy link
Collaborator Author

sinhp commented Jul 6, 2024

This PR includes some Grothendieck construction stuff, which it shouldn't, according to the PR description

So, I think this is because I am doing something wrong: I have only one mathlib repo locally, and do all my PRs from that. I do follow the Mathlib contribution guidelines in switching branches first, but nevertheless I get the problem that this PR for sets shows up as a continuation of GrothendieckIsFunctorial branch. What am I missing?

@erdOne
Copy link
Member

erdOne commented Jul 6, 2024

git checkout master Mathlib/CategoryTheory/Grothendieck.lean on that branch will reset the file to master.
Be sure to back up first!

@sinhp
Copy link
Collaborator Author

sinhp commented Jul 6, 2024

git checkout master Mathlib/CategoryTheory/Grothendieck.lean on that branch will reset the file to master. Be sure to back up first!

Just did that. Would the next step be for the current PR (i.e. not_mem_singleton_iff) be to commit the change (i.e. resetting Grothendieck.lean back to the master version) and push?

@erdOne
Copy link
Member

erdOne commented Jul 6, 2024

Yes.

@sinhp sinhp added awaiting-review and removed awaiting-author A reviewer has asked the author a question or requested changes labels Jul 6, 2024
@erdOne
Copy link
Member

erdOne commented Jul 16, 2024

Thanks!
maintainer merge

Copy link

🚀 Pull request has been placed on the maintainer queue by erdOne.

@Ruben-VandeVelde Ruben-VandeVelde changed the title Adding a useful massing lemma: not_mem_singleton_iff feat: adding lemma not_mem_singleton_iff Jul 16, 2024
@Ruben-VandeVelde Ruben-VandeVelde changed the title feat: adding lemma not_mem_singleton_iff feat: add lemma not_mem_singleton_iff Jul 16, 2024
Copy link
Member

@jcommelin jcommelin left a comment

Choose a reason for hiding this comment

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

Thanks 🎉

bors merge

@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added the ready-to-merge This PR has been sent to bors. label Jul 16, 2024
mathlib-bors bot pushed a commit that referenced this pull request Jul 16, 2024
The contrapositive (?) of the lemma 
```
theorem mem_singleton_iff {a b : α} : a ∈ ({b} : Set α) ↔ a = b :=
  Iff.rfl
```
was missing. This PR adds 

```
@[simp]
theorem not_mem_singleton_iff {a b : α} : a ∉ ({b} : Set α) ↔ a ≠ b :=
  Iff.rfl
```
which can be useful in avoiding extra `have` statements in other proofs.
@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Jul 16, 2024

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat: add lemma not_mem_singleton_iff [Merged by Bors] - feat: add lemma not_mem_singleton_iff Jul 16, 2024
@mathlib-bors mathlib-bors bot closed this Jul 16, 2024
@mathlib-bors mathlib-bors bot deleted the not_mem_singleton_iff branch July 16, 2024 17:30
@adomani adomani mentioned this pull request Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easy < 20s of review time. See the lifecycle page for guidelines. maintainer-merge new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community! ready-to-merge This PR has been sent to bors.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants