Inductive Vector (A : Set) : nat -> Set :=
  | Vnil : Vector A 0
  | Vcons : forall (a : A) (n : nat), Vector A n -> Vector A (S n).Inductive Vector (A : Set) : nat -> Set :=
  | Vnil : Vector A 0
  | Vcons : forall (a : A) (n : nat), Vector A n -> Vector A (S n).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.

Lemma consVector : forall (A : Set) (n : nat) (x : Vector A (S n)), {pair : A * Vector A n | Vcons A (fst pair) n (snd pair) = x}.