lean2/tests/lua/place1.lua
Leonardo de Moura 6902d8cb05 feat(library): add simple placeholder module
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-30 20:28:28 -07:00

14 lines
590 B
Lua

print(mk_expr_placeholder())
print(mk_level_placeholder())
assert(is_placeholder(mk_expr_placeholder()))
assert(not is_placeholder(Var(0)))
assert(not is_placeholder(Const("A")))
assert(is_placeholder(mk_level_placeholder()))
assert(not is_placeholder(param_univ("l")))
local f = Const("f")
local a = Const("a")
assert(has_placeholder(f(mk_expr_placeholder())))
assert(not has_placeholder(f(a)))
assert(has_placeholder(f(Const("a", { mk_level_placeholder() }))))
assert(has_placeholder(mk_sort(mk_level_placeholder())))
assert(has_placeholder(mk_sort(max_univ(1, mk_level_placeholder()))))