intros A B f g x y H' H'0; try assumption.
apply Trans with (f y).
apply (Map_compatible_prf f); auto with algebra.
simpl in H'0.
unfold Map_eq in H'0.
auto with algebra.
Qed.
Hint Resolve Ap_comp: algebra.

Lemma map_ext :
forall (A B : Setoid) (f g : MAP A B),
(forall x : A, Equal (f x) (g x)) -> Equal f g.