intuition.
inversion H; trivial.
assert (tailOpt (Vector.cons A a1 n v1) = tailOpt (Vector.cons A a2 n v2)).
eapply tailOpt_eq.
trivial.
simpl in *.
inversion H0; clear H0; subst.
trivial.
Qed.

Lemma pair_eq_inv : forall (A B : Type)(a1 a2 : A)(b1 b2 : B),
(a1, b1) = (a2, b2) ->
a1 = a2 /\ b1 = b2.