Definition setd {T} (f : M.elt -> T) (g : T -> T -> T) (b : T) (s : M.t) :=
  listd f g b (M.elements s).

Lemma setd_fold cls0 l s : setd f inter b l s -> setd f inter b cls0 s -> setd f inter b (M.fold (Basics.flip h) cls0 l) s.