2014-06-18 20:55:48 +00:00
|
|
|
section
|
|
|
|
parameter A : Type
|
|
|
|
inductive list : Type :=
|
2014-08-22 22:46:10 +00:00
|
|
|
nil : list,
|
|
|
|
cons : A → list → list
|
2014-06-18 20:55:48 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
check list.{1}
|
|
|
|
check cons.{1}
|
|
|
|
|
|
|
|
section
|
|
|
|
parameter A : Type
|
|
|
|
inductive tree : Type :=
|
2014-08-22 22:46:10 +00:00
|
|
|
node : A → forest → tree
|
2014-06-18 20:55:48 +00:00
|
|
|
with forest : Type :=
|
2014-08-22 22:46:10 +00:00
|
|
|
fnil : forest,
|
|
|
|
fcons : tree → forest → forest
|
2014-06-18 20:55:48 +00:00
|
|
|
check tree
|
|
|
|
check forest
|
|
|
|
end
|
|
|
|
|
|
|
|
check tree.{1}
|
|
|
|
check forest.{1}
|