intros A B C l1 l2; elim l2; simpl in |- *; auto.
intros a l H' a0 b H'0.
case (in_app_or _ _ _ H'0); auto with datatypes.
elim l1; simpl in |- *; auto with datatypes.
intros H'1; elim H'1; auto.
intros a1 l0 H'1 H'2; elim H'2; clear H'2; intros H'3;
[ inversion H'3 | idtac ]; auto with datatypes.
intros H'1; right; apply H' with (a := a0); auto.
Qed.

(* Specifications: *)
Theorem in_map_inv :
forall (A B : Set) (f : A -> B) (l : list A) (x : A),
(forall a b : A, f a = f b -> a = b) -> In (f x) (map f l) -> In x l.