2013-11-26 16:37:37 +00:00
|
|
|
local pb = proof_builder(function(m, a)
|
2013-11-28 02:11:46 +00:00
|
|
|
print("builder...")
|
|
|
|
local e = m:find("main")
|
|
|
|
print(e)
|
|
|
|
return e
|
2013-11-26 16:37:37 +00:00
|
|
|
end)
|
|
|
|
assert(is_proof_builder(pb))
|
|
|
|
local a = assignment()
|
|
|
|
assert(is_assignment(a))
|
|
|
|
local m = proof_map()
|
|
|
|
assert(#m == 0)
|
|
|
|
assert(is_proof_map(m))
|
|
|
|
m:insert("main", Const("H"))
|
|
|
|
m:insert("subgoal", Const("H1"))
|
|
|
|
m:erase("subgoal")
|
|
|
|
assert(not pcall(function() m:find("subgoal") end))
|
2013-11-28 02:11:46 +00:00
|
|
|
print(m:find("main"))
|
|
|
|
print(pb(m, a))
|
2013-11-26 16:37:37 +00:00
|
|
|
assert(pb(m, a) == Const("H"))
|