Fixpoint tailOpt(A : Set)(n : nat)(v : Vector.t A n) : option (Vector.t A (pred n)):=
  match v with
    | [] => None
    | Vector.cons _ _ _ v => Some v
  end.

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