Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
PratherConid committed Sep 25, 2024
1 parent f339b7d commit 45fc6c6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Auto/Lib/ListExtra.lean
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,11 @@ def List.mergeSort (r : α → α → Prop) [DecidableRel r] : List α → List
| [] => []
| [a] => [a]
| a :: b :: l => by
let ls := split l
have e : split (a :: b :: l) = ⟨a :: ls.1, b :: ls.2⟩ := rfl
let ls := split (a :: b :: l)
have e : split (a :: b :: l) = ⟨ls.1, ls.2⟩ := rfl
have h := length_split_lt e
have : (split l).fst.length < l.length + 2 := Nat.le_of_lt h.1
have : (split l).snd.length < l.length + 2 := Nat.le_of_lt h.2
have : (split l).fst.length < l.length + 1 := Nat.lt_of_succ_lt_succ h.1
have : (split l).snd.length < l.length + 1 := Nat.lt_of_succ_lt_succ h.2
exact merge r (mergeSort r ls.1) (mergeSort r ls.2)
termination_by l => List.length l

Expand Down

0 comments on commit 45fc6c6

Please sign in to comment.