Hypothesis r_refl : reflexive r.

(* Specifications: *)
Lemma sorted_le_nth x0 (s : seq T) : sorted r s ->
{in [pred n | n < size s] &, {homo nth x0 s : i j / i <= j >-> r i j}}.
Lemma leq_index (s : seq T) : sorted r s ->
{in s &, forall x y, index x s <= index y s -> r x y}.