Definition in_dom (a:ad) (m:Map A) :=
    match MapGet A m a with
    | None => false
    | _ => true
    end.

Lemma in_dom_restrby : forall (m:Map A) (m':Map B) (a:ad), in_dom A a (MapDomRestrBy A B m m') = andb (in_dom A a m) (negb (in_dom B a m')).