feat(Data/SetLike): add more IsConcrete type classes#39853
feat(Data/SetLike): add more IsConcrete type classes#39853martinwintermath wants to merge 1 commit into
IsConcrete type classes#39853Conversation
PR summary 99381a425fImport changes for modified filesNo significant changes to the import graph Import changes for all files
|
|
|
||
| end SetLike | ||
|
|
||
| class IsConcreteEmpty (A : Type*) (B : outParam Type*) [SetLike A B] [EmptyCollection A] where |
There was a problem hiding this comment.
I think we should be using ∅ for only (fin)sets. We should use ⊥ for everything else.
(Ideally I'd prefer using ⊥ always, but that's a conversation for some other time.)
There was a problem hiding this comment.
There seem to be some efforts to make set-notation available for objects that behave like sets: see #32983. And it makes sense to me: an IsConcrete-instance expresses that the object behaves, for all practical purpose, like a set. Why distinguish this in notation?
I asked about this here: #mathlib4 > Abstracting the substructure lattice construction @ 💬, if you want to discuss.
There was a problem hiding this comment.
Also, ⊥ is context dependent. ∅ really only expresses "the empty set". Why not use it if you really mean it?
(I guess my question is: "why is there set notation if we are not supposed to use it?", but this might be more related to your "conversation for another time".)
There was a problem hiding this comment.
What #32983 does is ensure that ⊆ gets elaborated as ≤ for these types, which is in line with my comment that we should be primarily employing order notation.
⊥ and ∅ are both context-dependent, but the difference is that we already have swaths of API for ⊥, whereas for ∅ we really just have the Set/Finset API.
There was a problem hiding this comment.
What #32983 does is ensure that ⊆ gets elaborated as ≤ for these types, which is in line with my comment that we should be primarily employing order notation.
But it also delaborates the order relation for set-likes as ⊆ (according to my clarification here).
⊥and∅are both context-dependent, but the difference is that we already have swaths of API for⊥, whereas for∅we really just have theSet/FinsetAPI.
But you are probably right: if #32983 continuous as proposed and does the same for other set notations, we will also defeq ∅ and ⊥, and all the bot-API becomes available for ∅. In particular, the IsConcreteEmpty features will already be included in any potential IsConcreteBot or so. But as it stands right now, I need to duplicate if I want to enable both notations.
|
|
||
| end SetLike | ||
|
|
||
| class HasConcreteUniv (A : Type*) (B : outParam Type*) [SetLike A B] where |
Add
IsConcreteEmptyHasConcreteUnivIsConcreteSingletonIsConcreteInsertIsConcreteComplZulip: #mathlib4 > More `IsConcrete` classes for `SetLike`