Section MapLists.
Fixpoint ad_in_list (a:ad) (l:list ad) {struct l} : bool :=
match l with
| nil => false
| a' :: l' => orb (N.eqb a a') (ad_in_list a l')
end.
Fixpoint ad_list_stutters (l:list ad) : bool :=
match l with
| nil => false
| a :: l' => orb (ad_in_list a l') (ad_list_stutters l')
end.
Fixpoint Elems (l:list ad) : FSet :=
match l with
| nil => M0 unit
| a :: l' => MapPut _ (Elems l') a tt
end.

Lemma Elems_app :
forall l l':list ad, Elems (l ++ l') = FSetUnion (Elems l) (Elems l').