whnf actually reduces to whnf now (probably)

This commit is contained in:
rhiannon morris 2023-01-23 00:53:34 +01:00
parent f097e1c091
commit 92617a2e4a
11 changed files with 693 additions and 679 deletions

View file

@ -22,18 +22,27 @@ import Data.Vect
%default total
public export
0 TermLike : Type
TermLike = Type -> Nat -> Nat -> Type
public export
0 TSubstLike : Type
TSubstLike = Type -> Nat -> Nat -> Nat -> Type
infixl 8 :#
infixl 9 :@, :%
mutual
public export
0 TSubst : Type -> Nat -> Nat -> Nat -> Type
0 TSubst : TSubstLike
TSubst q d = Subst $ Elim q d
||| first argument `q` is quantity type;
||| second argument `d` is dimension scope size;
||| third `n` is term scope size
public export
data Term : (q : Type) -> (d, n : Nat) -> Type where
data Term : TermLike where
||| type of types
TYPE : (l : Universe) -> Term q d n
@ -61,7 +70,7 @@ mutual
||| first argument `d` is dimension scope size, second `n` is term scope size
public export
data Elim : (q : Type) -> (d, n : Nat) -> Type where
data Elim : TermLike where
||| free variable
F : (x : Name) -> Elim q d n
||| bound variable
@ -85,7 +94,7 @@ mutual
||| a scope with one more bound variable
public export
data ScopeTerm : (q : Type) -> (d, n : Nat) -> Type where
data ScopeTerm : TermLike where
||| variable is used
TUsed : (body : Term q d (S n)) -> ScopeTerm q d n
||| variable is unused
@ -93,7 +102,7 @@ mutual
||| a scope with one more bound dimension variable
public export
data DScopeTerm : (q : Type) -> (d, n : Nat) -> Type where
data DScopeTerm : TermLike where
||| variable is used
DUsed : (body : Term q (S d) n) -> DScopeTerm q d n
||| variable is unused