Skip to content

Commit

Permalink
refactor: replace deprecated name with one
Browse files Browse the repository at this point in the history
Use `List.cons_prefix_cons` instead of `List.cons_prefix_iff`.
  • Loading branch information
chabulhwi committed May 10, 2024
1 parent 8ea0b9d commit cd6d973
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Mathlib/Data/List/Infix.lean
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ protected theorem IsPrefix.map (h : l₁ <+: l₂) (f : α → β) : l₁.map f
· simp only [nil_prefix, map_nil]
· cases' l₂ with hd₂ tl₂
· simpa only using eq_nil_of_prefix_nil h
· rw [cons_prefix_iff] at h
· rw [cons_prefix_cons] at h
simp only [List.map_cons, h, prefix_cons_inj, hl, map]
#align list.is_prefix.map List.IsPrefix.map

Expand All @@ -317,7 +317,7 @@ protected theorem IsPrefix.filterMap (h : l₁ <+: l₂) (f : α → Option β)
· simp only [nil_prefix, filterMap_nil]
· cases' l₂ with hd₂ tl₂
· simpa only using eq_nil_of_prefix_nil h
· rw [cons_prefix_iff] at h
· rw [cons_prefix_cons] at h
rw [← @singleton_append _ hd₁ _, ← @singleton_append _ hd₂ _, filterMap_append,
filterMap_append, h.left, prefix_append_right_inj]
exact hl h.right
Expand Down

0 comments on commit cd6d973

Please sign in to comment.