2015-01-06 03:50:07 +00:00
|
|
|
import data.list
|
|
|
|
open list
|
|
|
|
|
2015-02-26 00:20:44 +00:00
|
|
|
definition head {A : Type} : Π (l : list A), l ≠ nil → A
|
|
|
|
| head nil h := absurd rfl h
|
|
|
|
| head (a :: l) _ := a
|
2015-01-06 03:50:07 +00:00
|
|
|
|
|
|
|
theorem head_cons {A : Type} (a : A) (l : list A) (h : a :: l ≠ nil) : head (a :: l) h = a :=
|
|
|
|
rfl
|