Skip to content

Commit

Permalink
feat: List.tail lemma (#5316)
Browse files Browse the repository at this point in the history
  • Loading branch information
kim-em authored Sep 12, 2024
1 parent 8fd6e46 commit 87fdd78
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Init/Data/List/Lemmas.lean
Original file line number Diff line number Diff line change
Expand Up @@ -1052,6 +1052,9 @@ theorem tail_eq_tailD (l) : @tail α l = tailD l [] := by cases l <;> rfl

theorem tail_eq_tail? (l) : @tail α l = (tail? l).getD [] := by simp [tail_eq_tailD]

theorem mem_of_mem_tail {a : α} {l : List α} (h : a ∈ tail l) : a ∈ l := by
induction l <;> simp_all

/-! ## Basic operations -/

/-! ### map -/
Expand Down

0 comments on commit 87fdd78

Please sign in to comment.