chore(tests): add missing tests
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
f5f3816596
commit
7d5522e36a
2 changed files with 40 additions and 0 deletions
23
tests/lean/run/e18.lean
Normal file
23
tests/lean/run/e18.lean
Normal file
|
@ -0,0 +1,23 @@
|
|||
inductive nat : Type :=
|
||||
| zero : nat
|
||||
| succ : nat → nat
|
||||
|
||||
inductive list (A : Type) : Type :=
|
||||
| nil {} : list A
|
||||
| cons : A → list A → list A
|
||||
|
||||
inductive int : Type :=
|
||||
| of_nat : nat → int
|
||||
| neg : nat → int
|
||||
|
||||
coercion of_nat
|
||||
|
||||
variables n m : nat
|
||||
variables i j : int
|
||||
variable l : list nat
|
||||
|
||||
check cons i (cons i nil)
|
||||
check cons n (cons n nil)
|
||||
check cons i (cons n nil)
|
||||
check cons n (cons i nil)
|
||||
check cons n (cons i (cons m (cons j nil)))
|
17
tests/lua/level3.lua
Normal file
17
tests/lua/level3.lua
Normal file
|
@ -0,0 +1,17 @@
|
|||
local g = mk_global_univ("g")
|
||||
local g1 = mk_level_succ(g)
|
||||
local g2 = mk_level_succ(g1)
|
||||
local g3 = mk_level_succ(g2)
|
||||
local g1b = mk_level_succ(mk_global_univ("g"))
|
||||
assert(mk_level_max(g, g1) == g1)
|
||||
assert(mk_level_max(g2, g1) == g2)
|
||||
assert(mk_level_max(g3, g2) == g3)
|
||||
assert(mk_level_max(g2, g3) == g3)
|
||||
assert(mk_level_max(g1b, g2) == g2)
|
||||
assert(mk_level_max(g1b, g) == g1b)
|
||||
assert(mk_level_max(g, g1b) == g1b)
|
||||
assert(not (mk_level_max(mk_global_univ("g2"), g1b) == g1b))
|
||||
|
||||
assert(mk_level_imax(g2, g3) == g3)
|
||||
assert(not (mk_level_imax(g3, g) == g3))
|
||||
assert(mk_level_imax(g3, g1) == g3)
|
Loading…
Reference in a new issue