lean2/tests/lua/ind6.lua
Leonardo de Moura 1447d7e765 test(lua): add another inductive datatype example
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-22 14:10:25 -07:00

18 lines
539 B
Lua

local env = environment()
local u = param_univ("u")
local Set = Const("Set", {u})
local A = Local("A", mk_sort(u))
env = add_inductive(env,
"Set", {u}, 0, mk_sort(u+1),
"sup", Pi(A, mk_arrow(mk_arrow(A, Set), Set)))
local env = environment()
local u = param_univ("u")
local Set = Const("Set", {u})
local A = Local("A", mk_sort(u))
env = add_inductive(env,
"Set", {u}, 1, Pi(A, mk_sort(u+1)),
"sup", Pi(A, mk_arrow(mk_arrow(A, Set(A)), Set(A))))