lean2/tests/lean/run/e18.lean
Leonardo de Moura a5f0593df1 feat(*): change inductive datatype syntax
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-22 15:46:10 -07:00

23 lines
No EOL
435 B
Text

inductive nat : Type :=
zero : nat,
succ : nat → nat
inductive list (A : Type) : Type :=
nil {} : list A,
cons : A → list A → list A
inductive int : Type :=
of_nat : nat → int,
neg : nat → int
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)))