(* 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_irr : irreflexive leT ->
forall s1 s2, sorted s1 -> sorted s2 -> s1 =i s2 -> s1 = s2.