LogrelCC.types
From stdpp Require Import prelude.
From LogrelCC Require Import lang_base prelude.
Inductive type :=
| TUnit : type
| TNat : type
| TBool : type
| TProd : type → type → type
| TSum : type → type → type
| TArrow : type → type → type
| TRec (τ : {bind 1 of type})
| TVar (x : var)
| TForall (τ : {bind 1 of type})
| Tref (τ : type)
| TCont (τ : type).
Instance Ids_type : Ids type. derive. Defined.
Instance Rename_type : Rename type. derive. Defined.
Instance Subst_type : Subst type. derive. Defined.
Instance SubstLemmas_typer : SubstLemmas type. derive. Qed.
Definition binop_res_type (op : binop) : type :=
match op with
| Add => TNat | Sub => TNat
| Eq => TBool | Le => TBool | Lt => TBool
end.
Inductive EqType : type → Prop :=
| EqTUnit : EqType TUnit
| EqTNat : EqType TNat
| EqTBool : EqType TBool
| EqTProd τ τ' : EqType τ → EqType τ' → EqType (TProd τ τ')
| EqSum τ τ' : EqType τ → EqType τ' → EqType (TSum τ τ').
Reserved Notation "Γ ⊢ₜ e : τ" (at level 74, e, τ at next level).
Reserved Notation "Kₜ :: Γ ⊢ₜₜ τ ₜ~>ₜ Γ' ⊢ₜₜ τ'" (at level 72, τ, τ' at next level).
From LogrelCC Require Import lang_base prelude.
Inductive type :=
| TUnit : type
| TNat : type
| TBool : type
| TProd : type → type → type
| TSum : type → type → type
| TArrow : type → type → type
| TRec (τ : {bind 1 of type})
| TVar (x : var)
| TForall (τ : {bind 1 of type})
| Tref (τ : type)
| TCont (τ : type).
Instance Ids_type : Ids type. derive. Defined.
Instance Rename_type : Rename type. derive. Defined.
Instance Subst_type : Subst type. derive. Defined.
Instance SubstLemmas_typer : SubstLemmas type. derive. Qed.
Definition binop_res_type (op : binop) : type :=
match op with
| Add => TNat | Sub => TNat
| Eq => TBool | Le => TBool | Lt => TBool
end.
Inductive EqType : type → Prop :=
| EqTUnit : EqType TUnit
| EqTNat : EqType TNat
| EqTBool : EqType TBool
| EqTProd τ τ' : EqType τ → EqType τ' → EqType (TProd τ τ')
| EqSum τ τ' : EqType τ → EqType τ' → EqType (TSum τ τ').
Reserved Notation "Γ ⊢ₜ e : τ" (at level 74, e, τ at next level).
Reserved Notation "Kₜ :: Γ ⊢ₜₜ τ ₜ~>ₜ Γ' ⊢ₜₜ τ'" (at level 72, τ, τ' at next level).