2014-06-18 20:55:48 +00:00
|
|
|
section
|
2014-10-09 14:13:06 +00:00
|
|
|
variable A : Type
|
2014-06-18 20:55:48 +00:00
|
|
|
inductive list : Type :=
|
2015-02-26 01:00:10 +00:00
|
|
|
| nil : list
|
|
|
|
| cons : A → list → list
|
2014-06-18 20:55:48 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
check list.{1}
|
2014-09-04 23:36:06 +00:00
|
|
|
check list.cons.{1}
|
2014-06-18 20:55:48 +00:00
|
|
|
|
|
|
|
section
|
2014-10-09 14:13:06 +00:00
|
|
|
variable A : Type
|
2014-06-18 20:55:48 +00:00
|
|
|
inductive tree : Type :=
|
2015-02-26 01:00:10 +00:00
|
|
|
| node : A → forest → tree
|
2014-06-18 20:55:48 +00:00
|
|
|
with forest : Type :=
|
2015-02-26 01:00: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}
|
2014-09-04 23:36:06 +00:00
|
|
|
check forest.{1}
|