(* Ordered paths and sorting. *)
Section SortSeq.
Variable T : eqType.
Variable leT : rel T.
Definition sorted s := if s is x :: s' then path leT x s' else true.

Lemma eq_sorted : antisymmetric leT ->
forall s1 s2, sorted s1 -> sorted s2 -> perm_eq s1 s2 -> s1 = s2.