induction ls; intuition; simpl in *.
intuition.
intuition; subst.
inversion H; clear H; subst.
trivial.
inversion H; clear H; subst.
eapply IHls; intuition.
Qed.

Theorem map_eq_if_all :
forall (A B : Type)(ls : list A)(f1 f2 : A -> B),
(forall a, In a ls -> f1 a = f2 a) ->
map f1 ls = map f2 ls.