lean2/tests/lua/cnstr1.lua
Leonardo de Moura 5eaf04518b refactor(*): rename Bool to Prop
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-22 09:43:18 -07:00

16 lines
448 B
Lua

local a = Const("a")
local f = Const("f")
local m = mk_metavar("m", Prop)
local j = justification("type match")
local c = mk_eq_cnstr(f(a), m, j)
assert(c:is_eq())
assert(not c:is_level_eq())
assert(c:lhs() == f(a))
assert(c:rhs() == m)
assert(c:justification():is_eqp(j))
print(c)
local c3 = mk_level_eq_cnstr(mk_level_zero(), mk_level_one(), j)
assert(c3:is_level_eq())
print(c3)
assert(c:is_eqp(c))
assert(not c:is_eqp(mk_eq_cnstr(f(a), m, j)))