-
Notifications
You must be signed in to change notification settings - Fork 1.3k
feat(Data/Set): add Set.Uncountable
#34245
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
Closed
staroperator
wants to merge
10
commits into
leanprover-community:master
from
staroperator:set_uncountable
+82
−4
Closed
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
5bb7551
add
staroperator 0cd051a
fix
staroperator c89b4b8
add nontrivial
staroperator 98f778c
add mono
staroperator a654426
fix name
staroperator 56a89b3
Merge branch 'master' into set_uncountable
staroperator b995b1f
unsimp
staroperator 3b65825
Merge branch 'master' into set_uncountable
staroperator 68e89e0
Revert "unsimp"
staroperator 67489f0
Merge branch 'master' into set_uncountable
staroperator File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
One question which arose in a discussion about the simp-question below is whether it is really sensible to add such a definition.
and
Is there some more motivation you could provide besides the analogy to
Infinite?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.
Besides analogy, I find I need the result of "removing a countable set from an uncountable set is still countable" (
Set.Uncountable.diff) and "any uncountable set is non-empty" (Set.Uncountable.nonempty) in #34246. If I represent this as¬s.Countable, I can definitely useSet.Countable.of_difffor the former but the latter is not quite easy (grindmay help I guess). These are exactly "several lemmas expressed with dot notation" in my feeling.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.
Though I agree that "uncountable sets" do not occur in a lot of lemmas. In fact I would likely generalize #34246 to any regular cardinal so this PR may become unnecessary then.
Uh oh!
There was an error while loading. Please reload this page.
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.
Another thing I'd like to point out is that besides
¬s.Countable, another way to write "a set is uncountable" isUncountable s(wheresis coerced to a type). They are of course equivalent viaSet.countable_coe_iffandnot_countable_iff, but I don't think there is one representation that is more canonical than another (whileSet.Uncountablewould definitely be the most canonical way to say it).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.
FYI, I have generalized #34246, so I don't need this PR now. Still, it doesn't harm to introduce such a shortcut.
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.
I'm somewhat unsure as to why we even have an
Uncountablepredicate. I don't believe there's many useful theorems to be stated about it other thanℵ₁ ≤ #α? And considering you were able to generalize your use of it, I think that signals we don't need this either.Uh oh!
There was an error while loading. Please reload this page.
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.
I guess
Uncountableexists because it's a typeclass. That's useful because instance synthesis automates proof that some complicate type is actually uncountable.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.
There's only three dozen theorems about uncountable, and most are just boilerplate conversions. I don't think anyone would miss this typeclass if it were gone.