lean2/tests/lua/hidden1.lua
Leonardo de Moura 70e06f8e86 feat(library/hidden_defs): hidden definitions are just hints for tactics and solvers
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-01 10:27:27 -08:00

14 lines
425 B
Lua

local env = environment()
assert(is_hidden(env, "and"))
assert(is_hidden(env, "or"))
assert(is_hidden(env, {"Int", "lt"}))
parse_lean_cmds([[
Definition a : Bool := true
]], env)
assert(not is_hidden(env, "a"))
set_hidden_flag(env, "a")
assert(is_hidden(env, "a"))
set_hidden_flag(env, "a", false)
assert(not is_hidden(env, "a"))
assert(not is_hidden(env, "b"))
assert(not pcall(function () set_hidden_flag(env, "b") end))