End MEASURE.
(** Forall and exists *)
Section FORALL_EXISTS.
Variable A: Type.
Definition for_all (m: T.t A) (f: T.elt -> A -> bool) : bool :=
T.fold (fun b x a => b && f x a) m true.

Lemma for_all_correct:
forall m f,
for_all m f = true <-> (forall x a, T.get x m = Some a -> f x a = true).