49. A nonempty list has a first element
xs.head? is none for the empty list and some x for a list that starts with x. Prove that it is not none when xs is not empty.
1theorem solution (xs : List Nat) (h : xs ≠ []) : xs.head? ≠ none := by
givenLoading editor…
Type
\to in the editor, or click:Where you start. Everything above ⊢ may be assumed; the line below it is what you must prove.
xs:List Nat
h:xs ≠ []
⊢xs.head? ≠ none
ReadyLn 1, Col 1Lean 4
Draft saved in this browser