Definition F (A : Set) (f : ad -> A -> M) (r : ad * A) 
  (m : M) := let (a, y) := r in op (f a y) m.

(* Specifications: *)
Lemma op_eq_2 : forall a b b1 : M, R b b1 -> R (op a b) (op a b1).
Lemma my_fold_right_aapp : forall (A : Set) (f : ad -> A -> M) (l l' : alist A), R (fold_right (F A f) neutral (aapp _ l l')) (op (fold_right (F A f) neutral l) (fold_right (F A f) neutral l')).
Lemma myMapFold_as_fold_1 : forall (A : Set) (f : ad -> A -> M) (m : Map A) (pf : ad -> ad), R (MapFold1 _ M neutral op f pf m) (fold_right (fun (r : ad * A) (m : M) => let (a, y) := r in op (f a y) m) neutral (MapFold1 _ (alist A) (anil A) (aapp A) (fun (a : ad) (y : A) => acons _ (a, y) (anil _)) pf m)).
Lemma myMapFold_as_fold : forall (A : Set) (f : ad -> A -> M) (m : Map A), R (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)).
Lemma eqmap_equiv : forall A : Set, equiv _ (eqmap A).
Lemma MapMerge_assoc : forall (A : Set) (a b c : Map A), eqmap _ (MapMerge _ (MapMerge _ a b) c) (MapMerge _ a (MapMerge _ b c)).
Lemma MapMerge_neutral_left : forall (A : Set) (m : Map A), eqmap _ (MapMerge _ (M0 A) m) m.
Lemma MapMerge_neutral_right : forall (A : Set) (m : Map A), eqmap _ (MapMerge _ m (M0 _)) m.
Lemma MapMerge_eq : forall (A : Set) (a a1 b b1 : Map A), eqmap _ a a1 -> eqmap _ b b1 -> eqmap _ (MapMerge _ a b) (MapMerge _ a1 b1).
Lemma myMapFold_as_fold_2 : forall (A B : Set) (f : ad -> A -> Map B) (m : Map A), eqmap _ (MapFold _ (Map B) (M0 _) (MapMerge _) f m) (fold_right (fun (r : ad * A) (m : Map B) => let (a, y) := r in MapMerge _ (f a y) m) (M0 _) (alist_of_Map _ m)).
Lemma my_alist_of_map_lemma_1 : forall (A : Set) (m : Map A) (a : ad) (y : A), MapGet _ m a = Some y -> In (a, y) (alist_of_Map _ m).
Lemma my_alist_of_map_lemma_2 : forall (A : Set) (m : Map A) (pf fp : ad -> ad), (forall a : ad, fp (pf a) = a) -> forall (a : ad) (y : A), In (a, y) (MapFold1 _ _ (anil _) (aapp _) (fun (a : ad) (y : A) => acons _ (a, y) (anil _)) pf m) -> MapGet _ m (fp a) = Some y /\ pf (fp a) = a.
Lemma my_alist_of_map_lemma_3 : forall (A : Set) (m : Map A) (a : ad) (y : A), In (a, y) (alist_of_Map _ m) -> MapGet _ m a = Some y.