Skip to content

Commit

Permalink
Use Pairwise.erase
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusrossel committed Sep 3, 2024
1 parent b033103 commit 9604c26
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Mathlib/Data/List/Sort.lean
Original file line number Diff line number Diff line change
Expand Up @@ -447,8 +447,7 @@ theorem insertionSort_stable' {l c : List α} (hs : c.Sorted r) (hc : c <+~ l) :
cases hd with
| cons _ h => exact ih hs _ hc h |>.trans (sublist_orderedInsert ..)
| cons₂ _ h =>
-- TODO(marcusrossel): Use `Pairwise.erase` here once we've moved to Lean v4.11.0.
specialize ih (hs.sublist <| erase_sublist a _) _ (erase_cons_head a ‹List _› ▸ hc.erase a) h
specialize ih (hs.erase _) _ (erase_cons_head a ‹List _› ▸ hc.erase a) h
have hm := hc.mem_iff.mp <| mem_cons_self ..
exact orderedInsert_erase _ _ hm hs ▸ orderedInsert_sublist _ ih (sorted_insertionSort ..)

Expand Down

0 comments on commit 9604c26

Please sign in to comment.