Instance CompSpecs : compspecs.Definition Vprog : varspecs.Fixpoint map2 {A B C: Type} (f: A -> B -> C) (al: list A) (bl: list B) : list C :=
 match al, bl with
  | a::al', b::bl' => f a b :: map2 f al' bl'
  | _, _ => nil
  end.Definition dotprod (fx fy : list float) : float :=
  fold_left Float.add (map2 Float.mul fx fy) Float.zero .

Lemma Zlength_map2: forall A B C (f: A -> B -> C) fy fz, Zlength fy = Zlength fz -> Zlength (map2 f fy fz) = Zlength fy.