Section Advanced_lemmas.
Variable U : Type.
Variable D : PO U.
Hint Resolve Lub_definition Upper_Bound_Couple_intro.
intros A B H' H'0 a b H'1 H'2; try assumption.
elim H'1; auto with sets.
intros H'3 H'4; apply H'4.
apply Upper_downward_stable with (B := B); auto with sets.
elim H'2; auto with sets.
Qed.
intros A B C H' H'0 H'1 a b c H'2 H'3 H'4; red in |- *; simpl in |- *.
intros H'5 H'6; exists c; split.
apply Lub_is_in_Carrier with (X := C); auto with sets.
apply Upper_Bound_Couple_intro; auto with sets.
apply Lub_is_in_Carrier with (X := C); auto with sets.
apply Lub_monotonic with (A := A) (B := C); auto with sets.
apply Lub_monotonic with (A := B) (B := C); auto with sets.
Qed.
generalize Rel_of_transitive; intro RoT; red in RoT.
intros A B H' a b bsup H'0 H'1 H'2; try assumption.
elim H'0; elim H'1; elim H'2.
intros H'3 H'4 H'5 H'6 H'7 H'8; try assumption.
elim H'3; elim H'5; elim H'7.
intros H'9 H'10 H'11 H'12 H'13 H'14; try assumption.
apply Lub_definition; auto 8 with sets.
intros y H'15; apply H'4.
apply Upper_Bound_definition; auto with sets.
elim H'15; auto with sets.
elim (Upper_Bound_Couple_inv U D a b y);
[ intros H'22 H'23; elim H'23; intros H'24 H'25; try exact H'24; clear H'23
| idtac ]; auto with sets.
intros y0 H'16; elim H'16.
intros x H'17; apply RoT with (y := a); auto with sets.
intros x H'17; apply RoT with (y := b); auto with sets.
Qed.

Lemma LUaux2 :
forall A B : Ensemble U,
Included U (Union U A B) (Carrier_of U D) ->
forall a b bsup : U,
Lub U D A a ->
Lub U D B b -> Lub U D (Couple U a b) bsup -> Lub U D (Union U A B) bsup.