observational-type-theory

Self-representation and universes in OTT

老子叫甜甜 提交于 2020-01-02 07:16:09
问题 The question is about Observational Type Theory. Consider this setting: data level : Set where # : ℕ -> level ω : level _⊔_ : level -> level -> level # α ⊔ # β = # (α ⊔ℕ β) _ ⊔ _ = ω _⊔ᵢ_ : level -> level -> level α ⊔ᵢ # 0 = # 0 α ⊔ᵢ β = α ⊔ β mutual Prop = Univ (# 0) Type = Univ ∘ # ∘ suc data Univ : level -> Set where bot : Prop top : Prop nat : Type 0 univ : ∀ α -> Type α σ≡ : ∀ {α β γ} -> α ⊔ β ≡ γ -> (A : Univ α) -> (⟦ A ⟧ -> Univ β) -> Univ γ π≡ : ∀ {α β γ} -> α ⊔ᵢ β ≡ γ -> (A : Univ α)

Self-representation and universes in OTT

送分小仙女□ 提交于 2019-12-06 02:19:59
The question is about Observational Type Theory . Consider this setting: data level : Set where # : ℕ -> level ω : level _⊔_ : level -> level -> level # α ⊔ # β = # (α ⊔ℕ β) _ ⊔ _ = ω _⊔ᵢ_ : level -> level -> level α ⊔ᵢ # 0 = # 0 α ⊔ᵢ β = α ⊔ β mutual Prop = Univ (# 0) Type = Univ ∘ # ∘ suc data Univ : level -> Set where bot : Prop top : Prop nat : Type 0 univ : ∀ α -> Type α σ≡ : ∀ {α β γ} -> α ⊔ β ≡ γ -> (A : Univ α) -> (⟦ A ⟧ -> Univ β) -> Univ γ π≡ : ∀ {α β γ} -> α ⊔ᵢ β ≡ γ -> (A : Univ α) -> (⟦ A ⟧ -> Univ β) -> Univ γ πᵤ : ∀ {α} -> (A : Univ α) {k : ⟦ A ⟧ -> level} -> (∀ x -> Univ (k x))

Pattern matching in Observational Type Theory

帅比萌擦擦* 提交于 2019-12-04 16:32:05
问题 In the end of the "5. Full OTT" section of Towards Observational Type Theory the authors show how to define coercible-under-constructors indexed data types in OTT. The idea is basically to turn indexed data types into parameterized like this: data IFin : ℕ -> Set where zero : ∀ {n} -> IFin (suc n) suc : ∀ {n} -> IFin n -> IFin (suc n) data PFin (m : ℕ) : Set where zero : ∀ {n} -> suc n ≡ m -> PFin m suc : ∀ {n} -> suc n ≡ m -> PFin n -> PFin m Conor also mentions this technique at the bottom

Pattern matching in Observational Type Theory

江枫思渺然 提交于 2019-12-03 10:35:00
In the end of the "5. Full OTT" section of Towards Observational Type Theory the authors show how to define coercible-under-constructors indexed data types in OTT. The idea is basically to turn indexed data types into parameterized like this: data IFin : ℕ -> Set where zero : ∀ {n} -> IFin (suc n) suc : ∀ {n} -> IFin n -> IFin (suc n) data PFin (m : ℕ) : Set where zero : ∀ {n} -> suc n ≡ m -> PFin m suc : ∀ {n} -> suc n ≡ m -> PFin n -> PFin m Conor also mentions this technique at the bottom of observational type theory (delivery) : The fix, of course, is to do what the GADT people did, and