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