2014-05-20 00:06:19 +00:00
|
|
|
local env = environment()
|
|
|
|
|
|
|
|
local tricky = Const("tricky")
|
2014-07-22 16:43:18 +00:00
|
|
|
local P = Local("P", Prop)
|
2014-05-20 00:06:19 +00:00
|
|
|
|
|
|
|
env = add_inductive(env,
|
2014-07-22 16:43:18 +00:00
|
|
|
"tricky", Prop,
|
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-09-04 22:03:59 +00:00
|
|
|
local tricky_rec = Const({"tricky", "rec"}, {0})
|
2014-05-20 00:06:19 +00:00
|
|
|
|
|
|
|
display_type(env, tricky_rec)
|