Notation seq := seq.Notation list_compare := list_compare.

Lemma prefix_eq {prefix1 prefix2 xs1 xs2 ys1 ys2 : list A} {x1 x2 y1 y2 : A} : prefix1 ++ x1 :: xs1 = prefix2 ++ x2 :: xs2 -> prefix1 ++ y1 :: ys1 = prefix2 ++ y2 :: ys2 -> x1 <> y1 -> x2 <> y2 -> prefix1 = prefix2.