Section EqSortSeq.
Variables (T : eqType) (leT : rel T).
Let pop_stable s1 ss :
push_invariant (s1 :: ss) -> sorted lt_lex (merge_sort_pop leN s1 ss).
End Stability_iota.

Lemma sort_stable T (leT leT' : rel T) :
total leT -> transitive leT' -> forall s : seq T, sorted leT' s ->
sorted [rel x y | leT x y && (leT y x ==> leT' x y)] (sort leT s).