refactor(library/data/list/basic): move tail to init

This commit is contained in:
Leonardo de Moura 2016-06-18 14:27:57 -07:00
parent 8065318c40
commit 9371aa0e99
2 changed files with 4 additions and 4 deletions

View file

@ -144,10 +144,6 @@ rfl
theorem head_append [simp] [h : inhabited T] (t : list T) : ∀ {s : list T}, s ≠ [] → head (s ++ t) = head s :=
sorry -- by rec_inst_simp
definition tail : list T → list T
| [] := []
| (a :: l) := l
theorem tail_nil [simp] : tail (@nil T) = [] :=
rfl

View file

@ -49,4 +49,8 @@ definition nth : list A → nat → option A
| (a :: l) 0 := some a
| (a :: l) (n+1) := nth l n
definition tail : list A → list A
| [] := []
| (a :: l) := l
end list