Definition remove {A : Type} {dom : Dom.t} (x : key) (m : @t A dom) : @t A (Dom.remove x dom) :=
  exist (OK (Dom.remove x dom)) (S.remove x (proj1_sig m)) (remove_OK x m).

(* Specifications: *)
Lemma constant_OK_aux : forall A v (m : S.t A) l x, S.In x (fold_left (λ (a : S.t A) (e : Dom.elt), S.add e v a) l m) <-> S.In x m ∨ InA X.eq x l.