Definition Equal m m' := forall y, find y m = find y m'.Definition Equiv (eq_elt:A->A->Prop) m m' := 
    (forall k, In k m <-> In k m') /\ 
    (forall k e e', MapsTo k e m -> MapsTo k e' m' -> eq_elt e e').Definition Equivb (cmp: A->A->bool) := Equiv (Cmp cmp).(** unfortunately, the [MapFold] of [IntMap] isn't compatible with 
   the FMap interface. We use a naive version for now : *)

  Definition fold (B:Type)(f:key -> A -> B -> B)(m:t A)(i:B) : B := 
    fold_left (fun a p => f (fst p) (snd p) a) (elements m) i.

Lemma fold_1 : forall (B:Type) (i : B) (f : key -> A -> B -> B), fold f m i = fold_left (fun a p => f (fst p) (snd p) a) (elements m) i.