Section fparts_in_def.
Variable E : Setoid.
(* Add_part. *)
Definition add_part (A : part_set E) (x : E) := union A (single x).
unfold add_part in |- *; auto with algebra.
Qed.
Hint Resolve add_part_comp: algebra.
simpl in |- *; auto with algebra.
Qed.
Hint Resolve add_part_in: algebra.
unfold add_part in |- *.
intros.
apply Trans with (union A (union (single x) (single y))); auto with algebra.
apply Trans with (union A (union (single y) (single x))); auto with algebra.
Qed.
Hint Immediate add_part_com: algebra.
intro A.
case A.
simpl in |- *; unfold pred_compatible, eq_part, in_part in |- *;
simpl in |- *.
intuition eauto.
Qed.
Hint Resolve add_in: algebra.

Lemma add_part_in_el_diff :
forall (A : part_set E) (x y : E),
in_part y (add_part A x) -> ~ Equal y x -> in_part y A.