Definition FSet := Map unit.Definition in_FSet : ad -> FSet -> bool := in_dom unit.Fixpoint MapDom (m:Map A) : FSet :=
    match m with
    | M0 => M0 unit
    | M1 a _ => M1 unit a tt
    | M2 m m' => M2 unit (MapDom m) (MapDom m')
    end.

(* Specifications: *)
Lemma MapDom_semantics_1 : forall (m:Map A) (a:ad) (y:A), MapGet A m a = Some y -> in_FSet a (MapDom m) = true.
Lemma MapDom_semantics_2 : forall (m:Map A) (a:ad), in_FSet a (MapDom m) = true -> {y : A | MapGet A m a = Some y}.
Lemma MapDom_semantics_3 : forall (m:Map A) (a:ad), MapGet A m a = None -> in_FSet a (MapDom m) = false.
Lemma MapDom_semantics_4 : forall (m:Map A) (a:ad), in_FSet a (MapDom m) = false -> MapGet A m a = None.
Lemma MapDom_Dom : forall (m:Map A) (a:ad), in_dom A a m = in_FSet a (MapDom m).