a few tests
This commit is contained in:
parent
7d36a7ff54
commit
37dd1ee76d
1 changed files with 12 additions and 0 deletions
|
@ -33,6 +33,8 @@ parameters (0 d : Nat) (ctx : TyContext Three d n)
|
||||||
subTD, equalTD : Term Three d n -> Term Three d n -> Term Three d n -> M ()
|
subTD, equalTD : Term Three d n -> Term Three d n -> Term Three d n -> M ()
|
||||||
subTD ty s t = Term.sub ctx ty s t
|
subTD ty s t = Term.sub ctx ty s t
|
||||||
equalTD ty s t = Term.equal ctx ty s t
|
equalTD ty s t = Term.equal ctx ty s t
|
||||||
|
equalTyD : Term Three d n -> Term Three d n -> M ()
|
||||||
|
equalTyD s t = Term.equalType ctx s t
|
||||||
|
|
||||||
subED, equalED : Elim Three d n -> Elim Three d n -> M ()
|
subED, equalED : Elim Three d n -> Elim Three d n -> M ()
|
||||||
subED e f = Elim.sub ctx e f
|
subED e f = Elim.sub ctx e f
|
||||||
|
@ -42,6 +44,8 @@ parameters (ctx : TyContext Three 0 n)
|
||||||
subT, equalT : Term Three 0 n -> Term Three 0 n -> Term Three 0 n -> M ()
|
subT, equalT : Term Three 0 n -> Term Three 0 n -> Term Three 0 n -> M ()
|
||||||
subT = subTD 0 ctx
|
subT = subTD 0 ctx
|
||||||
equalT = equalTD 0 ctx
|
equalT = equalTD 0 ctx
|
||||||
|
equalTy : Term Three 0 n -> Term Three 0 n -> M ()
|
||||||
|
equalTy = equalTyD 0 ctx
|
||||||
|
|
||||||
subE, equalE : Elim Three 0 n -> Elim Three 0 n -> M ()
|
subE, equalE : Elim Three 0 n -> Elim Three 0 n -> M ()
|
||||||
subE = subED 0 ctx
|
subE = subED 0 ctx
|
||||||
|
@ -418,6 +422,14 @@ tests = "equality & subtyping" :- [
|
||||||
(F "f")
|
(F "f")
|
||||||
],
|
],
|
||||||
|
|
||||||
|
"natural type" :- [
|
||||||
|
testEq "ℕ = ℕ" $ equalTy empty Nat Nat,
|
||||||
|
testEq "ℕ = ℕ : ★₀" $ equalT empty (TYPE 0) Nat Nat,
|
||||||
|
testEq "ℕ = ℕ : ★₆₉" $ equalT empty (TYPE 69) Nat Nat,
|
||||||
|
testNeq "ℕ ≠ {}" $ equalTy empty Nat (enum []),
|
||||||
|
testEq "0=1 ⊢ ℕ = {}" $ equalTy empty01 Nat (enum [])
|
||||||
|
],
|
||||||
|
|
||||||
"natural numbers" :- [
|
"natural numbers" :- [
|
||||||
testEq "zero = zero" $ equalT empty Nat Zero Zero,
|
testEq "zero = zero" $ equalT empty Nat Zero Zero,
|
||||||
testEq "succ two = succ two" $
|
testEq "succ two = succ two" $
|
||||||
|
|
Loading…
Reference in a new issue