lean2/tests/lua/env9.lua
Leonardo de Moura bf081ed431 refactor(kernel): rename var_decl to constant_assumption
Motivation: it matches the notation used to declare it.
2014-10-02 17:55:34 -07:00

11 lines
554 B
Lua

local env = bare_environment()
-- Trust level is set to 0 by default. Then, we must type check a
-- definition, before adding it to the environment
assert(not pcall(function() env:add(mk_constant_assumption("A", Prop)) end))
-- The function check produces a "certified declaration".
env:add(check(env, mk_constant_assumption("A", Prop)))
local env = bare_environment({trust_level = 10000000})
-- Now, env has trust_level > LEAN_BELIEVER_TRUST_LEVEL, then we can
-- add declarations without type checking them.
env:add(mk_constant_assumption("A", Prop))