test(lua): add another inductive datatype example

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2014-05-22 10:52:58 -07:00
parent 6246fae32c
commit 1447d7e765

18
tests/lua/ind6.lua Normal file
View file

@ -0,0 +1,18 @@
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))))