Section Union1.
Variable E : Setoid.
Definition union : 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; try exact H'1; clear H' | intros H'1; clear H' ].
left; try assumption.
apply in_part_comp_l with x; auto with algebra.
right; try assumption.
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.
Parameter
in_part_union_or :
forall (A B : part_set E) (x : E),
in_part x A \/ in_part x B -> in_part x (union A B).
intros A B x; try assumption.
unfold union in |- *; intuition.
Qed.
unfold union in |- *; simpl in |- *; intuition.
Qed.
unfold included in |- *; simpl in |- *; intuition.
Qed.
unfold union in |- *; simpl in |- *.
unfold eq_part in |- *; simpl in |- *.
intros A A' B B' H' H'0 x; split; [ intros H'1; try assumption | idtac ].
elim H'1; [ intros H'2; try exact H'2; clear H'1 | intros H'2; clear H'1 ].
left; try assumption.
elim (H' x); intros H'3 H'4; lapply H'3;
[ intros H'5; try exact H'5; clear H'3 | clear H'3 ].
auto with algebra.
right; try assumption.
elim (H'0 x); intros H'3 H'4; lapply H'3;
[ intros H'5; try exact H'5; clear H'3 | clear H'3 ].
auto with algebra.
intros H'1; try assumption.
elim H'1; [ intros H'2; try exact H'2; clear H'1 | intros H'2; clear H'1 ].
left; try assumption.
elim (H' x); intros H'3 H'4; lapply H'4;
[ intros H'5; try exact H'5; clear H'4 | clear H'4 ].
auto with algebra.
right; try assumption.
elim (H'0 x); intros H'3 H'4; lapply H'4;
[ intros H'5; try exact H'5; clear H'4 | clear H'4 ].
auto with algebra.
Qed.
unfold union in |- *; simpl in |- *.
unfold eq_part in |- *; simpl in |- *.
intros A B C x; split; [ try assumption | idtac ].
intuition.
intuition.
Qed.

Lemma union_com : forall A B : part_set E, Equal (union A B) (union B A).