Section def.
Variable A:Set.

Inductive vect: nat -> Set :=
  vnil: vect O
| vcons:forall n:nat, A -> (vect n) -> (vect (S n)).

Fixpoint app (n0 m:nat)(v:vect n0) {struct v} : vect m -> vect (n0 + m) :=
   match v in (vect n0) return (vect m -> vect (n0 + m)) with
   | vnil => fun vm : vect m => vm
   | vcons n0 x vn0 => fun vm : vect m => vcons (n0 + m) x (app n0 m vn0 vm)
   end.

Reset app.

Definition app: forall n m:nat, vect n -> vect m -> vect (n+m).
fix 3.
intros n m v ; case v.
intros vm ; apply vm.
intros n0 x vn0 vm. 
simpl;apply vcons.
apply x.
apply app.
apply vn0.
apply vm.
Defined.

