(** * [elements] *)

(* Specifications: *)
Lemma elements_1 : forall m x e, MapsTo x e m -> InA eqke (x,e) (elements m).
Lemma elements_2 : forall m x e, InA eqke (x,e) (elements m) -> MapsTo x e m.
Lemma elements_3w : forall m (Hm:NoDupA m), NoDupA (elements m).
Fixpoint fold (A:Type)(f:key->elt->A->A)(m:t elt) (acc : A) {struct m} :  A :=
match m with
| nil => acc
| (k,e)::m' => fold f m' (f k e acc)
end.
Lemma elements_1 : forall m x e,
MapsTo x e m -> InA eqke (x,e) (elements m).
Lemma elements_2 : forall m x e,
InA eqke (x,e) (elements m) -> MapsTo x e m.
Lemma elements_3 : forall m (Hm:Sort m), sort ltk (elements m).
Lemma elements_3w : forall m (Hm:Sort m), NoDupA eqk (elements m).
Fixpoint fold (A:Type)(f:key->elt->A->A)(m:t elt) (acc:A) {struct m} :  A :=
match m with
| nil => acc
| (k,e)::m' => fold f m' (f k e acc)
end.