-
Notifications
You must be signed in to change notification settings - Fork 0
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
Reification of Universes! #1
Comments
It probably isn't too bad to determine the universe levels, but there doesn't seem to be any convenient way to denote them. |
I can just use the type as the universe level (though this could induce universe problems if you try to quote something with syntax inside of it). This means that you can't see if two universes are the same, but this information does not readily exist in the kernel anyways. |
demo of this in f250e6d |
Going to solve this in master using a reification map. |
One could reify using a map from level list (level being a positive with a boolean for +1 potentially) to Type. (That last type will be higher than any other). In the universe polymorphic case the term under the universe context refers to the universe context variables (internally, using de Bruijn indices, but you probably don't see it if you get the body of e.g. id@{i} := fun (A : Type@{Var 0}) (a : A) => a then the body you get is "fun (A: Type@{i}) (a : A) => A". |
One issue that we might run into is that you can never write a Gallina term that is universe polymorphic because the top-level always instantiates it with fresh variables. When we quote, we will either need to figure this out, or not really quote universe polymorphism. Potentially the annoying bit with universes is that constraints might dictate that two universes are equal, but they will appear syntactically different. Perhaps this isn't a problem though because it appears the same way in Coq. |
Because one cannot analyze a Also, is there a way to implement unquoting (e.g. Make Definition) such that the user doesn't have to specify the universe constraints needed for a definition to typecheck and let Coq figure them out? |
No description provided.
The text was updated successfully, but these errors were encountered: