2014-11-30 21:16:01 -08:00
|
|
|
prelude
|
2014-06-26 18:39:23 -07:00
|
|
|
inductive nat : Type :=
|
2015-02-25 17:00:10 -08:00
|
|
|
| zero : nat
|
|
|
|
| succ : nat → nat
|
2014-06-26 18:39:23 -07:00
|
|
|
|
|
|
|
inductive list (A : Type) : Type :=
|
2015-02-25 17:00:10 -08:00
|
|
|
| nil {} : list A
|
|
|
|
| cons : A → list A → list A
|
2014-06-26 18:39:23 -07:00
|
|
|
|
|
|
|
inductive int : Type :=
|
2015-02-25 17:00:10 -08:00
|
|
|
| of_nat : nat → int
|
|
|
|
| neg : nat → int
|
2014-06-26 18:39:23 -07:00
|
|
|
|
2015-01-24 20:23:21 -08:00
|
|
|
attribute int.of_nat [coercion]
|
2014-06-26 18:39:23 -07:00
|
|
|
|
2014-10-02 16:20:52 -07:00
|
|
|
constants n m : nat
|
|
|
|
constants i j : int
|
2014-09-04 16:36:06 -07:00
|
|
|
namespace list end list open list
|
2014-06-26 18:39:23 -07: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 16:36:06 -07:00
|
|
|
check cons n (cons i (cons m (cons j nil)))
|