lean2/tests/lean/run/indimp.lean
Leonardo de Moura 4ad7e709aa feat(frontends/lean): default for inductive types, closes #32
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-07 07:52:37 -07:00

21 lines
513 B
Text

abbreviation Prop := Type.{0}
inductive nat :=
| zero : nat
| succ : nat → nat
inductive list (A : Type) :=
| nil {} : list A
| cons : A → list A → list A
inductive list2 (A : Type) : Type :=
| nil2 {} : list2 A
| cons2 : A → list2 A → list2 A
inductive and (A B : Prop) : Prop :=
| and_intro : A → B → and A B
inductive class {T1 : Type} (R1 : T1 → T1 → Prop) {T2 : Type} (R2 : T2 → T2 → Prop) (f : T1 → T2) :=
| mk : (∀x y : T1, R1 x y → R2 (f x) (f y)) → class R1 R2 f