fix nat elim quantities
This commit is contained in:
parent
036e2bd4a5
commit
15f6f4c8a4
4 changed files with 41 additions and 9 deletions
|
@ -401,6 +401,23 @@ tests = "typechecker" :- [
|
|||
todo "nat elim"
|
||||
],
|
||||
|
||||
"natural elim" :- [
|
||||
note "1 · λ n ⇒ case1 n return ℕ of { zero ⇒ 0; succ n ⇒ n }",
|
||||
note " ⇐ 1.ℕ → ℕ",
|
||||
testTC "pred" $
|
||||
check_ empty sone
|
||||
([< "n"] :\\ E (CaseNat One Zero (BV 0) (SN Nat)
|
||||
Zero (SY [< "n", Unused] $ BVT 1)))
|
||||
(Arr One Nat Nat),
|
||||
note "1 · λ m n ⇒ case1 m return ℕ of { zero ⇒ n; succ _, 1.p ⇒ succ p }",
|
||||
note " ⇐ 1.ℕ → 1.ℕ → 1.ℕ",
|
||||
testTC "plus" $
|
||||
check_ empty sone
|
||||
([< "m", "n"] :\\ E (CaseNat One One (BV 1) (SN Nat)
|
||||
(BVT 0) (SY [< Unused, "p"] $ Succ $ BVT 0)))
|
||||
(Arr One Nat $ Arr One Nat Nat)
|
||||
],
|
||||
|
||||
"box types" :- [
|
||||
testTC "0 · [0.ℕ] ⇐ ★₀" $
|
||||
check_ empty szero (BOX Zero Nat) (TYPE 0),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue