-
Notifications
You must be signed in to change notification settings - Fork 27
Universe polymorphism edits #151
Comments
Sounds like a good plan. I'd recommend |
Actually, another thought: should we always enable universe polymorphism and/or cumulativity? What would be the ramifications of that? (With |
That is a good question. I have been trying to modify |
Good suggestions! Thanks! |
BTW, the first use case can now be simulated by adding |
Ah, good point about the preamble. We could also switch to default polymorphic/edits for monomorphism, but it seems like there's no reason to do that – polymorphism seems to be less necessary. |
And my plan is to try to understand this part better :) |
I have just found another term called "template universe polymorphic". It happened when you define something with explicit universe levels but without the keyword "Polymorphic" in front of the definition. This might also be something we want. In this case, it looks like the edits of declaring something to be polymorphic and the edits of annotating universe levels should be separate edits that can be used together. I have not found much information about "template universe polymorphic", except for this documentation: https://github.com/coq/coq/blob/master/dev/doc/universes.md |
It seems that an edit that makes a definition polymorphic would be helpful. I know that Eric has already been working on this, and I am opening this issue to list a few use cases I found.
The most basic form would be something like
set Foo.bar polymorphic
whereFoo.bar
is the qualified name of a definition. The definition can be a record, a type class, a type class instance, a function, an inductive or a coinductive data type, a variant, or a lemma/theorem/axiom (I have found scenarios where I want to make a lemma polymorphic)...Ideally, when the definition is an instance, we will also want to make all its class methods polymorphic (in Coq translations, they are separate definitions).
When the definition is an inductive or coinductive data type, a variant, or a record type, it would also be useful if a single edit can make it polymorphic and cumulative (maybe something like
set Foo.bar polymorphic cumulative
?)---the definition would not be cumulative by default otherwise (see: https://coq.inria.fr/refman/addendum/universe-polymorphism.html#cumulative-noncumulative).In some scenarios, we may also want to use a single edit to make everything in a module universe polymorphic. And in those scenarios, we may also want edits that can make a few definitions monomorphic.
The text was updated successfully, but these errors were encountered: