Section Stability_subseq_in.
Variables (T : eqType) (leT : rel T).
End Stability_subseq_in.
Arguments sort_sorted {T leT} leT_total s.
Arguments sort_sorted_in {T P leT} leT_total {s}.

Lemma homo_sort_map (T : Type) (T' : eqType) (f : T -> T') leT leT' :
antisymmetric (relpre f leT') -> transitive (relpre f leT') -> total leT ->
{homo f : x y / leT x y >-> leT' x y} ->
forall s : seq T, sort leT' (map f s) = map f (sort leT s).