Global Instance partition_ok1 s f : forall `(Ok s), Ok (fst (partition f s)).
Global Instance partition_ok2 s f : forall `(Ok s), Ok (snd (partition f s)).

(* Specifications: *)
Lemma partition_spec1 :
forall (s : t) (f : elt -> bool),
Proper (X.eq==>eq) f -> Equal (fst (partition f s)) (filter f s).
Lemma partition_spec2 :
forall (s : t) (f : elt -> bool),
Proper (X.eq==>eq) f ->
Equal (snd (partition f s)) (filter (fun x => negb (f x)) s).