-
Notifications
You must be signed in to change notification settings - Fork 27
Description
Currently we implement universe lifting based on "Dependently typed lambda calculus with a lifting operator (Internship Report)", which was inspired by Conor McBride's blog post, "Crude but Effective Stratification". Thanks goes to Jon Sterling for pointing us to this stuff! Unfortunately this version of McBride's idea is a bit fiddly, threading the accumulated universe offset through the evaluation environment. It also doesn't use coercions as a way to implement cumulativity, requiring us to have subtyping in the core language. From memory Jon Sterling avoided the complexity of the internship report in RedTT by restricting lifting to top level definitions, but this is not as useful in Pikelet where I'm trying to avoid top level definitions as much as possible.
@AndrasKovacs recently did an interesting lecture on universe lifting, Generalized universe hierarchies, which looks promising! There is a formalisation in Agda and a prototype implementation in Haskell using normalization-by-evaluation and coercive subtyping. I'm still trying to figure out what Up and Down do (these look like quote/unquote?), but it seems like the threading of the universe offsets through evaluation is avoided.
- AndrasKovacs/universes: formalisation in Agda
- AndrasKovacs/elaboration-zoo/.../univ-lifts: Universes indexed with natural numbers, with a lifting operation.