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.
intros H' x C H H'0; elim H'0.
elim (Bottom_is_compact U D);
[ intros bot E; elim E; intros H'4 H'5; elim H'4; clear E | idtac ];
auto with sets.
exists bot; split; auto with sets; auto with sets.
apply Lub_definition; auto with sets.
intros y H'1; elim H'1; auto with sets.
intros A H'1 H'2 x0 H'3.
cut (forall x : U, Union U A (Singleton U x) = Add U A x); auto with sets.
intro H'4; rewrite <- (H'4 x0).
clear H'4; intro H'4.
elim H'2; [ intros bsup E; elim E; intros H'6 H'7; clear E H'2 | clear H'2 ];
auto with sets.
red in H'4.
lapply Lub_of_Union;
[ intro H'2; lapply (H'2 A (Singleton U x0));
[ intro H'9; lapply (H'9 x);
[ intro H'11; lapply H'11;
[ intro H'12; elim (H'12 bsup x0);
[ intros bsup0 E; elim E; intros H'17 H'18; try exact H'17;
clear E H'11
| clear H'11
| clear H'11 ]
| clear H'11 ]
| idtac ]
| idtac ]
| idtac ]; auto with sets.
exists bsup0; split; [ assumption | auto with sets ].
lapply Lub_of_compacts_is_compact;
[ intro H'5; elim (H'5 bsup x0 x);
[ intros bsup1 E; elim E; intros H'15 H'16; try exact H'16; clear E
| idtac
| idtac ]
| idtac ]; auto with sets.
lapply (Lub_is_unique U D);
[ intro H'11; rewrite (H'11 (Couple U bsup x0) bsup0 bsup1) | idtac ];
auto with sets.
red in |- *; simpl in |- *.
intros x1 H'8; elim H'8; auto with sets.
elim H'7; auto with sets.
apply Singleton_has_lub.
lapply (H'4 x0); [ intro H'8; elim H'8 | idtac ]; auto with sets.
apply Upper_Bound_definition; auto with sets.
intros y H'5; try assumption.
lapply (H'4 y); [ intro H'10; elim H'10 | idtac ]; auto with sets.
red in |- *; simpl in |- *.
intros x1 H'5; try assumption.
lapply (H'4 x1); [ intro H'9; elim H'9 | idtac ]; auto with sets.
Qed.
Hint Resolve Inclusion_of_Approximants.

Theorem Less_imp_Inclusion_of_Approximants :
Domain U D ->
forall x y : U,
In U (Carrier_of U D) x ->
In U (Carrier_of U D) y ->
Rel_of U D x y -> Included U (Approximants U D x) (Approximants U D y).