Skip to content

Experiment with Andras Korvacs' version of universe lifting #237

@brendanzab

Description

@brendanzab

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions