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_list_Elems :
forall l l':list ad,
MapCard _ (Elems l) = MapCard _ (Elems l') ->
length l = length l' -> ad_list_stutters l = ad_list_stutters l'.