lean2/tests/lua/level6.lua
Leonardo de Moura 4ec89e8561 feat(library/kernel_bindings): add sugar for level expressions in the Lua API
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-17 08:10:36 -07:00

23 lines
550 B
Lua

local l = mk_param_univ("l")
print(mk_sort(0))
print(mk_sort(1))
print(mk_sort(2))
print(mk_sort(l+2))
print(mk_sort(mk_level_max(l, 2)))
print(mk_sort(mk_level_imax(l, 2)))
assert(not pcall(function()
print(mk_sort(1000000000))
end
))
assert(not pcall(function()
print(mk_sort(-10))
end
))
print(mk_sort(l+0))
assert(not pcall(function()
print(mk_sort(0+l))
end
))
local z = mk_level_zero()
assert(is_level(z))
assert(z:is_equivalent(0))