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 ad_in_list_app :
forall (l l':list ad) (x:ad),
ad_in_list x (l ++ l') = orb (ad_in_list x l) (ad_in_list x l').