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_sort_inP (T : eqType) (leT : rel T) (s1 s2 : seq T) :
{in s1 &, total leT} -> {in s1 & &, transitive leT} ->
{in s1 &, antisymmetric leT} ->
reflect (sort leT s1 = sort leT s2) (perm_eq s1 s2).