(* conversion to/from list *)
Fixpoint from_list A (l: List.list A): Vector.t A (List.length l) :=
match l return Vector.t A (List.length l) with
| List.nil => Vector.nil | List.cons h t => Vector.cons h (from_list t)
end.
Coercion to_list: Vector.t >-> List.list.
Coercion from_list: List.list >-> Vector.t.

(* Specifications: *)
Lemma list_round_trip A (l: List.list A): to_list (from_list l) = l.
Proof with try reflexivity. induction l... simpl. rewrite IHl... Qed.
Lemma vec_round_trip (X T: Set) (n : nat) (v : Vector.t X n) (f: forall n, Vector.t X n -> T):
(f _ (from_list (to_list v))) = f _ v.