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.

(* Specifications: *)
Lemma map_ext X Y (f g: X -> Y) (e: ext_eq f g) (n: nat) (v: Vector.t X n): map f v = map g v.
Lemma In_map A B (f: A -> B) (a: A) n (v: Vector.t A n): List.In a v -> List.In (f a) (map f v).
Lemma List_map A B n (l: Vector.t A n) (f: A -> B): List.map f l = to_list (map f l).
Lemma natBelow0_rect: natBelow 0 -> forall T, T.