universe polymorphism problem

1 view
Skip to first unread message

Vladimir Voevodsky

unread,
Jul 17, 2015, 5:04:46 PM7/17/15
to Benedikt Ahrens, Daniel R. Grayson, Prof. Vladimir Voevodsky, homotopytypetheory
Here is a little Coq file that does not compile that shows one of the problems with the current approach to universe polymorphism in Coq:

test.v
signature.asc

Michael Shulman

unread,
Jul 17, 2015, 5:47:04 PM7/17/15
to Vladimir Voevodsky, Benedikt Ahrens, Daniel R. Grayson, homotopytypetheory
It seems to me to compile just fine if you add "Set Universe
Polymorphism." at the top. (Universe polymorphism isn't enabled by
default, you have to turn it on.)

On Fri, Jul 17, 2015 at 2:04 PM, Vladimir Voevodsky <vlad...@ias.edu> wrote:
> Here is a little Coq file that does not compile that shows one of the problems with the current approach to universe polymorphism in Coq:
>
> --
> You received this message because you are subscribed to the Google Groups "Homotopy Type Theory" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to HomotopyTypeThe...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
>
>
> Vladimir.
>
> --
> You received this message because you are subscribed to the Google Groups "Homotopy Type Theory" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to HomotopyTypeThe...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

Vladimir Voevodsky

unread,
Jul 17, 2015, 6:17:58 PM7/17/15
to Michael Shulman, Prof. Vladimir Voevodsky, homotopytypetheory
If I add “Set Universe Polymorphism” then how can I fix a universe and a variable in that particular universe?
signature.asc

Michael Shulman

unread,
Jul 17, 2015, 6:21:17 PM7/17/15
to Vladimir Voevodsky, homotopytypetheory
On Fri, Jul 17, 2015 at 3:17 PM, Vladimir Voevodsky <vlad...@ias.edu> wrote:
> If I add “Set Universe Polymorphism” then how can I fix a universe and a variable in that particular universe?

I would say the point of universe polymorphism is that we don't *need*
to fix particular universes. What are you trying to achieve?

Vladimir Voevodsky

unread,
Jul 17, 2015, 6:22:23 PM7/17/15
to Michael Shulman, Prof. Vladimir Voevodsky, homotopytypetheory
I am trying to obtain an answer to the question that I have asked.
signature.asc

Michael Shulman

unread,
Jul 17, 2015, 6:32:47 PM7/17/15
to Vladimir Voevodsky, homotopytypetheory
It seems to me that fixing a universe is not something you should need
to do in a universe-polymorphic theory. I don't see any intrinsic
reason why one would want to fix a universe, so I assumed that you
wanted to do it with some more substantive purpose in mind. I thought
that if you explained that purpose, then either we could find a
different way to achieve it in current universe-polymorphic Coq, or
else I would understand why current universe-polymorphic Coq is
insufficient for your needs. So why do you want to fix a particular
universe?

On Fri, Jul 17, 2015 at 3:22 PM, Vladimir Voevodsky <vlad...@ias.edu> wrote:
> I am trying to obtain an answer to the question that I have asked.
>

Jason Gross

unread,
Jul 17, 2015, 9:19:33 PM7/17/15
to Michael Shulman, Vladimir Voevodsky, homotopyt...@googlegroups.com

To answer the technical question, you can do

Monomorphic Definition foo := ...

-Jason

Vladimir Voevodsky

unread,
Jul 18, 2015, 8:23:25 PM7/18/15
to Jason Gross, Prof. Vladimir Voevodsky, Michael Shulman, homotopyt...@googlegroups.com
Thanks! I now try a much simpler code:

***

Set Universe Polymorphism.
Set Printing All.
Set Printing Universes .

Definition UU' := Type .
Definition UU : UU' := Type .

Variable T : UU .
Type T .
Type T .

****

and at the first printing I am told that T@{Top.6 Top.7}  is in UU@{Top.6 Top.7} and at the second that T@{Top.8 Top.9} is in UU@{Top.8 Top.9}.

What does it mean?

Vladimir.
signature.asc

Jason Gross

unread,
Jul 18, 2015, 8:41:46 PM7/18/15
to Vladimir Voevodsky, Michael Shulman, homotopyt...@googlegroups.com

It means that every time you mention [T], you get fresh universes.  You probably want to make your definitions of UU' and UU monomorphic definitions, and make everything else polymorphic.  Alternatively, you can do something like

Set Universe Polymorphism.
Universes uu uu'.
Definition UU' := Type@{uu'}.
Definition UU : UU' := Type@{uu}.

And then you'll get actual names for your universes (I think you could even call them UU and UU'), since [Universe] declares global universe variables.

-Jason

Michael Shulman

unread,
Jul 18, 2015, 10:07:55 PM7/18/15
to Jason Gross, Vladimir Voevodsky, homotopyt...@googlegroups.com
I say again, however, that I doubt that this is really what you should
want to do. I would be really interested to hear why you want to fix
particular universes.

On Sat, Jul 18, 2015 at 5:41 PM, Jason Gross <jason...@gmail.com> wrote:
> It means that every time you mention [T], you get fresh universes. You
> probably want to make your definitions of UU' and UU monomorphic
> definitions, and make everything else polymorphic. Alternatively, you can
> do something like
>
> Set Universe Polymorphism.
> Universes uu uu'.
> Definition UU' := Type@{uu'}.
> Definition UU : UU' := Type@{uu}.
>
> And then you'll get actual names for your universes (I think you could even
> call them UU and UU'), since [Universe] declares global universe variables.
>
> -Jason
>

Vladimir Voevodsky

unread,
Jul 19, 2015, 11:25:46 AM7/19/15
to Jason Gross, Prof. Vladimir Voevodsky, Michael Shulman, homotopyt...@googlegroups.com
And what are the double indexes as in {Top.6 Top.7}?
signature.asc

Jason Gross

unread,
Jul 19, 2015, 2:03:47 PM7/19/15
to Vladimir Voevodsky, Michael Shulman, homotopyt...@googlegroups.com

One is "the universe of UU" and the other is "the universe of UU'"; the constraint enforced is not the UU + 1 = UU', but merely UU < UU'.

-Jason

Reply all
Reply to author
Forward
0 new messages