(** ** 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_init :
forall m i i', eqA i i' -> eqA (fold f m i) (fold f m i').