mathlib4 icon indicating copy to clipboard operation
mathlib4 copied to clipboard

Adding a useful massing lemma: `not_mem_singleton_iff`

Open sinhp opened this issue 1 year ago • 2 comments

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

sinhp avatar Jul 05 '24 10:07 sinhp

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>

github-actions[bot] avatar Jul 05 '24 10:07 github-actions[bot]

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

dagurtomas avatar Jul 05 '24 12:07 dagurtomas

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?

sinhp avatar Jul 06 '24 13:07 sinhp

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

erdOne avatar Jul 06 '24 14:07 erdOne

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?

sinhp avatar Jul 06 '24 14:07 sinhp

Yes.

erdOne avatar Jul 06 '24 14:07 erdOne

Thanks! maintainer merge

erdOne avatar Jul 16 '24 15:07 erdOne

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

github-actions[bot] avatar Jul 16 '24 15:07 github-actions[bot]

Pull request successfully merged into master.

Build succeeded:

mathlib-bors[bot] avatar Jul 16 '24 17:07 mathlib-bors[bot]