lean2/tests/lean/run/coercion_bug2.lean
Leonardo de Moura 364bba2129 feat(frontends/lean/inductive_cmd): prefix introduction rules with the name of the inductive datatype
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-04 17:26:36 -07:00

10 lines
261 B
Text

import data.nat
open nat
inductive list (T : Type) : Type :=
nil {} : list T,
cons : T → list T → list T
definition length {T : Type} : list T → nat := list.rec 0 (fun x l m, succ m)
theorem length_nil {T : Type} : length (@list.nil T) = 0
:= eq.refl _