Inductive Vector (A : Set) : nat -> Set :=
| Vnil : Vector A 0
| Vcons : forall (a : A) (n : nat), Vector A n -> Vector A (S n).
Fixpoint vector2list (A : Set) (n : nat) (v : Vector A n) {struct v} :
list A :=
match v with
| Vnil => nil (A:=A)
| Vcons a n v' => a :: vector2list A n v'
end.
Fixpoint list2vector (A : Set) (l : list A) {struct l} :
Vector A (length l) :=
match l return (Vector A (length l)) with
| nil => Vnil A
| a :: l' => Vcons A a (length l') (list2vector A l')
end.
Section VectorSizes.
Let nilVectorHelp (A : Set) (n : nat) (p : n = 0) : Vector A n.
intros.
induction n as [| n Hrecn].
apply Vnil.
discriminate p.
Defined.

(* Specifications: *)
Lemma nilVector : forall (A : Set) (x : Vector A 0), Vnil A = x.
Let consVectorHelp (A : Set) (n m : nat) (p : n = S m)
(a : A) (v : Vector A m) : Vector A n.