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.
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'5; elim H'7.
elim (Upper_Bound_Couple_inv U D a b bsup);
[ intros H'15 H'16; elim H'16; intros H'17 H'18; try exact H'17; clear H'16
| idtac ]; auto with sets.
intros H'9 H'10 H'11 H'12; try assumption.
apply Lub_definition; auto with sets.
apply Upper_Bound_definition; auto with sets.
intros y H'13; elim H'13.
intros x H'30; apply RoT with (y := a); auto with sets.
intros x H'30; apply RoT with (y := b); auto with sets.
intros y H'13; try assumption.
apply H'4.
elim H'13; auto 7 with sets.
Qed.
intro H'; elim H'.
intros H'0 A B H'1 x H'2 H'3 a b H'4 H'5; try assumption.
elim (H'0 (Union U A B)); [ intros bsup E; try exact E | idtac | idtac ];
auto with sets.
2: exists x; try assumption.
exists bsup; split; [ try assumption | idtac ].
apply LUaux with (A := A) (B := B); auto with sets.
Qed.

Theorem approximants_closed_by_finite_lubs :
Conditionally_complete U D ->
forall (x : U) (C : Ensemble U),
In U (Carrier_of U D) x ->
Finite U C ->
Included U C (Approximants U D x) ->
exists bsup : U, Lub U D C bsup /\ Approximant U D x bsup.