Definition ComposeApplicative : Applicative.
exists FG Compose_pure Compose_ap.
apply Compose_identity.
apply Compose_composition.
apply Compose_homomorphism.
apply Compose_interchange.
Defined.
End ComposeApplicative.

(* Specifications: *)
Lemma sequenceVector_Id  n a (v: Vector.t a n) :
sequenceVector (F:=IdApplicative) v = v.
Lemma sequenceVector_map n a b (F:Applicative) (f : a -> b) (v :Vector.t (F a) n) :
map (Vector.map f) (sequenceVector v) = sequenceVector (Vector.map (map f) v).
Lemma sequenceVector_compose n a (F G:Applicative) (v :Vector.t (F (G a)) n) :
sequenceVector (F:=ComposeApplicative F G) v = map (fun x => sequenceVector x) (sequenceVector v).
Lemma sequenceVector_append n m a (F:Applicative) (v1:Vector.t (F a) n) (v2:Vector.t (F a) m) :
sequenceVector (Vector.append v1 v2) =
ap (map (fun x y => Vector.append x y) (sequenceVector v1)) (sequenceVector v2).