feat(Data/Set): add Set.Uncountable#34245
feat(Data/Set): add Set.Uncountable#34245staroperator wants to merge 10 commits intoleanprover-community:masterfrom
Set.Uncountable#34245Conversation
PR summary 7c260e7c29Import changes for modified filesNo significant changes to the import graph Import changes for all files
|
This reverts commit b995b1f.
| protected def Uncountable (s : Set α) : Prop := | ||
| ¬s.Countable |
There was a problem hiding this comment.
One question which arose in a discussion about the simp-question below is whether it is really sensible to add such a definition.
[...] we already have a nice phrasing as ¬s.Countable, I am not convinced it is useful, because it will force us to introduce quite a lot of API for a gain I don't really see.
and
[...] If the concept is really used a lot, and in particular makes it possible to have several lemmas expressed with dot notation, then we should definitely have it. If it's less used, it's less obvious we should have it. For Infinite, it's a natural assumption in many many lemmas so we should definitely have it. For Uncountable, I don't know. [...]
Is there some more motivation you could provide besides the analogy to Infinite?
There was a problem hiding this comment.
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 use Set.Countable.of_diff for the former but the latter is not quite easy (grind may help I guess). These are exactly "several lemmas expressed with dot notation" in my feeling.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Another thing I'd like to point out is that besides ¬s.Countable, another way to write "a set is uncountable" is Uncountable s (where s is coerced to a type). They are of course equivalent via Set.countable_coe_iff and not_countable_iff, but I don't think there is one representation that is more canonical than another (while Set.Uncountable would definitely be the most canonical way to say it).
There was a problem hiding this comment.
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.
I'm somewhat unsure as to why we even have an Uncountable predicate. 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.
There was a problem hiding this comment.
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.
I guess Uncountable exists 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.
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.
|
Thanks for the motivation. I personally don't see anything against introducing it and the analogy to all the other declarations listed seems already reasonably compelling to me. I'll leave this to the maintainer to decide; for context: #mathlib reviewers > @[simp] @ 💬 maintainer merge? |
|
🚀 Pull request has been placed on the maintainer queue by joneugster. |
There was a problem hiding this comment.
I'm increasingly convinced that we don't want this, and furthermore, that we don't want Uncountable either.
I've opened a Zulip thread for discussion.
|
@staroperator if the zulip discussion has been fruitful, could you please act on it or write about the conclusion here and remove the label by commenting |
Thanks for the reminder. I guess the conclusion is that There is no discussion about whether -awaiting-zulip |
|
So far I've only heard the opinion of @vihdzp and @sgouezel voicing concerns that the API If you believe it to be useful, it would be nice if you could take the initiative of gathering such evidence. meanwhile I'm going to unassign myself for now. This should mean other people might see the PR and voice their opinion. |
Actually, I'm also not sure whether introducing this is useful now, so I will close the PR. |
There are
Setspecialized shortcutsSet.Finite,Set.InfiniteandSet.Countable, but lackingSet.Uncountable. I find this useful in #34246.