test(tests/lean/run): define list head using recursive equations

This commit is contained in:
Leonardo de Moura 2015-01-05 19:50:07 -08:00
parent 828ce3f8dc
commit 6451cad38d

9
tests/lean/run/eq22.lean Normal file
View file

@ -0,0 +1,9 @@
import data.list
open list
definition head {A : Type} : Π (l : list A), l ≠ nil → A,
head nil h := absurd rfl h,
head (a :: l) _ := a
theorem head_cons {A : Type} (a : A) (l : list A) (h : a :: l ≠ nil) : head (a :: l) h = a :=
rfl