Section EqSorted.
Variables (T : eqType) (leT : rel T).
Implicit Type s : seq T.
Local Notation path := (path leT).
Local Notation sorted := (sorted leT).

Lemma sorted_leq_index_in s :
{in s & &, transitive leT} -> {in s, reflexive leT} -> sorted s ->
{in s &, forall x y, index x s <= index y s -> leT x y}.