lean2/tests/lua/proof_builder1.lua
Leonardo de Moura 4d9075bdfd feat(bindings/lua): add proof_map, assignment and proof_builder to Lua API
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-26 08:37:37 -08:00

14 lines
423 B
Lua

local pb = proof_builder(function(m, a)
return m:find("main")
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))
assert(pb(m, a) == Const("H"))