Section Fold_More.
(** ** Additional properties of fold *)
(** When a function [f] is compatible and allows transpositions, we can compute [fold f] in any order. *)
Variables (A:Type)(eqA:A->A->Prop)(st:Equivalence eqA)(f:key->elt->A->A).
(** This is more convenient than a [compat_op eqke ...]. In fact, every [compat_op], [compat_bool], etc, should become a [Proper] someday. *)
Hypothesis Comp : Proper (E.eq==>eq==>eqA==>eqA) f.

Lemma fold_Empty :
forall m i, Empty m -> eqA (fold f m i) i.