feat(library/data/list/basic): add list.is_inhabited

This commit is contained in:
Leonardo de Moura 2015-07-17 06:52:43 -04:00
parent c0cd72fc8d
commit 16f50d9aea

View file

@ -12,6 +12,9 @@ inductive list (T : Type) : Type :=
| nil {} : list T
| cons : T → list T → list T
protected definition list.is_inhabited [instance] (A : Type) : inhabited (list A) :=
inhabited.mk list.nil
namespace list
notation h :: t := cons h t
notation `[` l:(foldr `,` (h t, cons h t) nil `]`) := l