Self-representation and universes in OTT

送分小仙女□ 提交于 2019-12-06 02:19:59

I ended up with the following hierarchy:

Prop : Type 0 : Type 1 : ...
(∀ α -> Type α) : Type ω₀ : Type ω₁

There is no code for Type ω₁ as there was no code for Type ω₀ before, but we need a code for Type ω₀ to be able to define equality of universe polymorphic functions and a code for Type ω₁ is less useful.

Now we have four universe dependent quantifiers

σ₀ π₀   : {α : Lev false}
        -> (A : Univ α) {k : ⟦ A ⟧ -> Lev false} -> (∀ x -> Univ (k x)) -> Univ {false} ω₀
σ₁ π₁   : ∀ {a} {α : Lev a}
        -> (A : Univ α) {b : ⟦ A ⟧ -> Bool} {k : ∀ x -> Lev (b x)}
        -> (∀ x -> Univ (k x))
        -> Univ ω₁

The point is that it's now possible to pattern match on π₀ thus allowing to define equality of universe polymorphic functions, but it's impossible to pattern match on π₁ (as was with π₀ which was called πᵤ) and we can live with that.

Equalities have these "reflexive" types:

mutual
  Eq : ⟦ (π₁ lev λ α -> π₁ lev λ β -> univ⁺ α ⇒ univ⁺ β ⇒ prop) ⟧
  eq : ⟦ (π₁ lev λ α -> π₁ lev λ β -> π (univ⁺ α) λ A -> π (univ⁺ β) λ B -> A ⇒ B ⇒ prop) ⟧

The code is here. However it looks like I need to extend the hierarchy once again to be able to prove coherence. I'll ask a question about that.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!