Section Inter1.
Variable E : Setoid.
Definition inter : part_set E -> part_set E -> part_set E.
intros A B.
apply (Build_Predicate (Pred_fun:=fun x : E => in_part x A /\ in_part x B)).
red in |- *.
intros x y H' H'0; try assumption.
elim H'; intros H'1 H'2; try exact H'1; clear H'.
split; [ try assumption | idtac ].
apply in_part_comp_l with x; auto with algebra.
apply in_part_comp_l with x; auto with algebra.
Defined.
unfold included in |- *; simpl in |- *; intuition.
Qed.
unfold included in |- *; simpl in |- *; intuition.
Qed.
simpl in |- *; intuition.
Qed.
simpl in |- *; intuition.
Qed.
simpl in |- *. intuition.
Qed.
simpl in |- *; intuition.
Qed.
simpl in |- *; intuition.
Qed.
unfold included in |- *; simpl in |- *; intuition.
Qed.
unfold inter in |- *; simpl in |- *.
unfold eq_part in |- *; simpl in |- *.
intros A A' B B' H' H'0 x.
generalize (H' x) (H'0 x); tauto.
Qed.
simpl in |- *. unfold eq_part in |- *. simpl in |- *.
tauto.
Qed.

Lemma inter_com : forall A B : part_set E, Equal (inter A B) (inter B A).