Ltac hypInv :=
      try (match goal with
          | [H: Some _ = Some _ |-_ ] => inversion H; clear H; subst
      end); try pairInv.Fixpoint lookupIndex (A : Set)(eqd : eq_dec A)(ls : list A)(a : A) def :=
  match ls with
    | nil => def
    | a' :: ls' =>
      if (eqd a a') then O else S (lookupIndex eqd ls' a def)
  end.

Theorem zip_map_eq : forall (A B C : Set)(ls : list A)(f1 : A -> B)(f2 : A -> C), zip (map f1 ls) (map f2 ls) = map (fun a => (f1 a, f2 a)) ls.