2014-05-09 01:08:32 +00:00
|
|
|
function init(env)
|
|
|
|
env = add_decl(env, mk_var_decl("A", Bool))
|
|
|
|
env = add_decl(env, mk_var_decl("And", mk_arrow(Bool, mk_arrow(Bool, Bool))))
|
|
|
|
env = add_decl(env, mk_axiom("p", Const("A")))
|
|
|
|
env = add_decl(env, mk_axiom("q", Const("A")))
|
|
|
|
return env
|
|
|
|
end
|
|
|
|
local And = Const("And")
|
|
|
|
local p = Const("p")
|
|
|
|
local q = Const("q")
|
|
|
|
|
2014-05-21 18:24:24 +00:00
|
|
|
local env = init(bare_environment())
|
2014-05-09 01:08:32 +00:00
|
|
|
local t = type_checker(env)
|
|
|
|
assert(t:is_def_eq(p, q))
|
|
|
|
assert(t:is_def_eq(And(p, q), And(q, p)))
|
|
|
|
|
2014-05-21 18:24:24 +00:00
|
|
|
env = init(bare_environment({prop_proof_irrel=false}))
|
2014-05-09 01:08:32 +00:00
|
|
|
t = type_checker(env)
|
|
|
|
assert(not t:is_def_eq(p, q))
|
|
|
|
assert(not t:is_def_eq(And(p, q), And(q, p)))
|
|
|
|
|