Section FSetDefs.
Variable A : Type.
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.
Definition FSetUnion (s s':FSet) : FSet := MapMerge unit s s'.
Definition FSetInter (s s':FSet) : FSet := MapDomRestrTo unit unit s s'.
Definition FSetDiff (s s':FSet) : FSet := MapDomRestrBy unit unit s s'.

Lemma in_FSet_diff :
forall (s s':FSet) (a:ad),
in_FSet a (FSetDiff s s') = andb (in_FSet a s) (negb (in_FSet a s')).