2014-05-20 00:06:19 +00:00
|
|
|
local env = environment()
|
|
|
|
|
|
|
|
local tricky = Const("tricky")
|
2014-06-30 16:14:55 +00:00
|
|
|
local P = Local("P", Bool)
|
2014-05-20 00:06:19 +00:00
|
|
|
|
|
|
|
env = add_inductive(env,
|
|
|
|
"tricky", Bool,
|
2014-06-30 16:14:55 +00:00
|
|
|
"C", mk_arrow(Pi(P, mk_arrow(P, P)), tricky))
|
2014-05-20 00:06:19 +00:00
|
|
|
|
|
|
|
function display_type(env, t)
|
|
|
|
print(tostring(t) .. " : " .. tostring(type_checker(env):check(t)))
|
|
|
|
end
|
|
|
|
|
2014-06-13 15:26:05 +00:00
|
|
|
env = env:add_universe("u")
|
2014-05-20 00:06:19 +00:00
|
|
|
local tricky_rec = Const("tricky_rec", {0})
|
|
|
|
|
|
|
|
display_type(env, tricky_rec)
|