Fixpoint Map_of_alist (l:alist) : Map A :=
    match l with
    | nil => M0 A
    | (a, y) :: l' => MapPut A (Map_of_alist l') a y
    end.

Lemma MapFold_as_fold : forall (M:Type) (neutral:M) (op:M -> M -> M), (forall a b c:M, op (op a b) c = op a (op b c)) -> (forall a:M, op neutral a = a) -> (forall a:M, op a neutral = a) -> forall (f:ad -> A -> M) (m:Map A), MapFold M neutral op f m = fold_right (fun (r:ad * A) (m:M) => let (a, y) := r in op (f a y) m) neutral (alist_of_Map m).