It has been reported in the general channel that this example generates problems for the Lean 3 elaborator.
13 lines
290 B
Text
13 lines
290 B
Text
def Hd : List α → Type
|
||
| [] => Unit
|
||
| a :: _ => α
|
||
|
||
def hd : (as : List α) → Hd as
|
||
| [] => ()
|
||
| a :: l => a
|
||
|
||
theorem inj_hd : (a a': α) → (l l' : List α) → a :: l = a' :: l' → a = a' := by
|
||
intro a a' l l' h
|
||
show hd (a :: l) = hd (a' :: l')
|
||
cases h
|
||
rfl
|