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 perm_sortP (T : eqType) (leT : rel T) :
total leT -> transitive leT -> antisymmetric leT ->
forall s1 s2, reflect (sort leT s1 = sort leT s2) (perm_eq s1 s2).