2014-06-27 01:39:23 +00:00
|
|
|
inductive nat : Type :=
|
2014-08-22 22:46:10 +00:00
|
|
|
zero : nat,
|
|
|
|
succ : nat → nat
|
2014-06-27 01:39:23 +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-27 01:39:23 +00:00
|
|
|
|
|
|
|
inductive int : Type :=
|
2014-08-22 22:46:10 +00:00
|
|
|
of_nat : nat → int,
|
|
|
|
neg : nat → int
|
2014-06-27 01:39:23 +00:00
|
|
|
|
2014-09-04 23:36:06 +00:00
|
|
|
coercion int.of_nat
|
2014-06-27 01:39:23 +00:00
|
|
|
|
|
|
|
variables n m : nat
|
|
|
|
variables i j : int
|
2014-09-04 23:36:06 +00:00
|
|
|
namespace list end list open list
|
2014-06-27 01:39:23 +00:00
|
|
|
|
|
|
|
check cons i (cons i nil)
|
|
|
|
check cons n (cons n nil)
|
|
|
|
check cons i (cons n nil)
|
|
|
|
check cons n (cons i nil)
|
2014-09-04 23:36:06 +00:00
|
|
|
check cons n (cons i (cons m (cons j nil)))
|