intros A B m f; induction m; simpl; intros;
destruct x; simpl in *; try discriminate.
apply IHm2; auto.
apply IHm1; auto.
destruct o; simpl.
exists a; intuition.
congruence.
discriminate.
Qed.

Lemma fmap_update : forall A B (m:map A) (f:A->B) x a,
(map_fmap A B f (m#x <- a)) =
(map_fmap A B f m)#x <- (f a).