Fixpoint app A n: Vector.t A n -> forall m, Vector.t A m -> Vector.t A (n + m) :=
  match n return Vector.t A n -> forall m, Vector.t A m -> Vector.t A (n + m) with
  | 0 => fun _ _ w => w
  | S n' => fun v _ w => Vector.cons (head v) (app (tail v) w)
  end.(* vmap *)

Fixpoint map X Y (f: X -> Y) (n: nat) (v: Vector.t X n): Vector.t Y n :=
  match v with
  | Vector.nil => @Vector.nil Y
  | Vector.cons h _ t => Vector.cons (f h) (map f t)
  end.

Lemma List_map A B n (l: Vector.t A n) (f: A -> B): List.map f l = to_list (map f l).