2014-06-29 14:55:48 +00:00
|
|
|
inductive nat : Type :=
|
2014-08-22 22:46:10 +00:00
|
|
|
zero : nat,
|
|
|
|
succ : nat → nat
|
2014-06-29 14:55:48 +00:00
|
|
|
|
|
|
|
inductive list (A : Type) : Type :=
|
2014-08-22 22:46:10 +00:00
|
|
|
nil {} : list A,
|
|
|
|
cons : A → list A → list A
|
2014-06-29 14:55:48 +00:00
|
|
|
|
|
|
|
inductive int : Type :=
|
2014-08-22 22:46:10 +00:00
|
|
|
of_nat : nat → int,
|
|
|
|
neg : nat → int
|
2014-06-29 14:55:48 +00:00
|
|
|
|
|
|
|
coercion of_nat
|
|
|
|
|
|
|
|
variables n m : nat
|
|
|
|
variables i j : int
|
|
|
|
variable l : list nat
|
|
|
|
|
|
|
|
check cons i (cons i nil)
|
|
|
|
check cons n (cons n nil)
|
|
|
|
check cons i (cons n nil)
|
|
|
|
check cons n (cons i nil)
|
|
|
|
check cons n (cons i (cons m (cons j nil)))
|