intros.
generalize dependent i.
generalize dependent v.
induction xs;
intros.
rewrite Coqlib.nth_error_nil in H.
discriminate.
destruct i; simpl in *;
now auto.
Qed.

Lemma le_sub:
forall x y z,
(x < z)%positive ->
(z <= y)%positive ->
(x <= Z.to_pos (Z.pos_sub y (z - x)))%positive.