Proof with auto with arith.
intros s.
induction s.
intros.
inversion i.
intros.
rewrite (nb1 i).
rewrite (nb1 j).
simpl.
apply preord_refl...
intro i. pattern i. apply natBelow_S_inv'; [idtac | intro m]; intro j; pattern j; apply natBelow_S_inv'.
rewrite nth_0.
intros. apply preord_refl...
rewrite nth_0.
intros.
rewrite nth_S.
apply (preord_trans _ _ XO) with (nth (Vector.cons b t) (nb0 _))...
rewrite val_Snb.
simpl @nb_val.
intros.
inversion H0.
intro.
do 2 rewrite val_Snb.
do 2 rewrite nth_S...
Qed.

Lemma sorted_lt_values_lt_indices n (v: Vector.t X n): sorted v ->
forall i j, Xlt (nth v i) (nth v j) -> i < j.