2014-06-18 13:55:48 -07:00
|
|
|
section
|
2014-10-09 07:13:06 -07:00
|
|
|
variable A : Type
|
2014-06-18 13:55:48 -07:00
|
|
|
inductive list : Type :=
|
2015-02-25 17:00:10 -08:00
|
|
|
| nil : list
|
|
|
|
| cons : A → list → list
|
2014-06-18 13:55:48 -07:00
|
|
|
end
|
|
|
|
|
|
|
|
check list.{1}
|
2014-09-04 16:36:06 -07:00
|
|
|
check list.cons.{1}
|
2014-06-18 13:55:48 -07:00
|
|
|
|
|
|
|
section
|
2014-10-09 07:13:06 -07:00
|
|
|
variable A : Type
|
2014-06-18 13:55:48 -07:00
|
|
|
inductive tree : Type :=
|
2015-02-25 17:00:10 -08:00
|
|
|
| node : A → forest → tree
|
2014-06-18 13:55:48 -07:00
|
|
|
with forest : Type :=
|
2015-02-25 17:00:10 -08:00
|
|
|
| fnil : forest
|
|
|
|
| fcons : tree → forest → forest
|
2014-06-18 13:55:48 -07:00
|
|
|
check tree
|
|
|
|
check forest
|
|
|
|
end
|
|
|
|
|
|
|
|
check tree.{1}
|
2014-09-04 16:36:06 -07:00
|
|
|
check forest.{1}
|