lean4-htt/old_tests/tests/lean/run/eq22.lean
2018-04-10 12:56:55 -07:00

8 lines
221 B
Text

open list
definition head {A : Type} : Π (l : list A), l ≠ nil → A
| nil h := absurd rfl h
| (a :: l) h := a
theorem head_cons {A : Type} (a : A) (l : list A) (h : a :: l ≠ nil) : head (a :: l) h = a :=
rfl