Definition Subset (s s': t) := Subset' (proj1_sig s) (proj1_sig s').
Definition Empty (s: t) := Empty' (proj1_sig s).
Definition For_all (P : elt -> Prop) (s: t) := For_all' P (proj1_sig s).
Definition Exists (P : elt -> Prop) (s: t) := Exists' P  (proj1_sig s).
Definition eq : t -> t -> Prop := Equal.

Lemma add_spec : forall s x y, In y (add x s) <-> E.eq y x \/ In y s.
Definition mem_add (x: elt) (s: t) : option t :=
match mem_add' x (proj1_sig s) as b return (b = mem_add' x (proj1_sig s) -> option t)with
| None => fun _ => None
| Some s' => fun p => Some (exist valid s' (mem_add_valid x _ (proj2_sig s) s' p))
end (Logic.eq_refl _).