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 filter_sort_in T (P : {pred T}) (leT : rel T) :
{in P &, total leT} -> {in P & &, transitive leT} ->
forall p s, all P s -> filter p (sort leT s) = sort leT (filter p s).