2014-05-02 20:37:46 +00:00
|
|
|
local a = Const("a")
|
|
|
|
local f = Const("f")
|
2014-07-22 16:43:18 +00:00
|
|
|
local m = mk_metavar("m", Prop)
|
2014-05-02 20:37:46 +00:00
|
|
|
local j = justification("type match")
|
|
|
|
local c = mk_eq_cnstr(f(a), m, j)
|
|
|
|
assert(c:is_eq())
|
2014-06-22 17:50:47 +00:00
|
|
|
assert(not c:is_level_eq())
|
2014-05-02 20:37:46 +00:00
|
|
|
assert(c:lhs() == f(a))
|
|
|
|
assert(c:rhs() == m)
|
|
|
|
assert(c:justification():is_eqp(j))
|
|
|
|
print(c)
|
2014-06-22 17:50:47 +00:00
|
|
|
local c3 = mk_level_eq_cnstr(mk_level_zero(), mk_level_one(), j)
|
|
|
|
assert(c3:is_level_eq())
|
2014-05-02 20:37:46 +00:00
|
|
|
print(c3)
|
|
|
|
assert(c:is_eqp(c))
|
|
|
|
assert(not c:is_eqp(mk_eq_cnstr(f(a), m, j)))
|