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 to_list_eq_inv : forall (A : Set) n (v1 v2 : Vector.t A n), VectorDef.to_list v1 = VectorDef.to_list v2 -> v1 = v2.