feat(library/data/list/basic): add list.is_inhabited
This commit is contained in:
parent
c0cd72fc8d
commit
16f50d9aea
1 changed files with 3 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue