lean2/tests/lua/expr11.lua
Leonardo de Moura 11fc917102 test(lua): add tests for improving kernel_bindings coverage
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-20 12:16:12 -07:00

11 lines
387 B
Lua

local a = Const("a")
local f = Const("f")
local x = Var(0)
assert(not f(a):has_free_var(0))
assert(f(a, x):has_free_var(0))
assert(not f(a, x):has_free_var(1, 3))
assert(f(a, Var(1)):has_free_var(1, 3))
assert(f(a, Var(2)):has_free_var(1, 3))
assert(not f(a, Var(3)):has_free_var(1, 3))
assert(not f(a, Var(4)):has_free_var(1, 3))
assert(f(a, Var(2)):lower_free_vars(2) == f(a, Var(0)))