Section POrderTheory.
Context {disp : unit} {T : porderType disp}.
Implicit Types (x y : T) (s : seq T).
Definition lt_gtF x y hxy := le_gtF (@ltW x y hxy).

Lemma count_lt_nth x0 s i : sorted <%O s -> (i < size s)%N ->
count (< nth x0 s i) s = i.