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 filter_neq_eq :
forall {A :eqType} (xs : seq.seq A) i j (Hneq: i <> j),
[seq x <- [seq x <- xs | x != i] | x == j] = [seq x <- xs | x == j].