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

Lemma in_dom_restrto : forall (m:Map A) (m':Map B) (a:ad), in_dom A a (MapDomRestrTo A B m m') = andb (in_dom A a m) (in_dom B a m').