2014-12-01 05:16:01 +00:00
|
|
|
prelude
|
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
|
|
|
|
2014-09-04 23:36:06 +00:00
|
|
|
coercion int.of_nat
|
2014-06-29 14:55:48 +00:00
|
|
|
|
2014-10-02 23:20:52 +00:00
|
|
|
constants n m : nat
|
|
|
|
constants i j : int
|
|
|
|
constant l : list nat
|
2014-09-04 23:36:06 +00:00
|
|
|
namespace list end list open list
|
2014-06-29 14:55:48 +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)))
|