(* Contribution to the Coq Library   V6.3 (July 1999)                    *)
(***************************************************************************)
(* File: axs_comprehension.v                                               *)
(* auteur: alex@sysal.ibp.fr                                               *)
(* date: 19/10/95                                                          *)
(***************************************************************************)
Require Export axs_parties.
(***************************************************************************)
(* Schema d'axiome de comprehension                                        *)
(***************************************************************************)
Parameter subset : (E -> Prop) -> E -> E.
Axiom
axs_comprehension :
forall (F : E -> Prop) (a v0 : E), In v0 (subset F a) <-> In v0 a /\ F v0.
(* Proof of lem_comprehension_lr                                           *)
intros; elim (axs_comprehension F a v0); intros; exact (H0 H).
Qed.
(* End of proof of lem_comprehension_lr                                    *)
(* Proof of lem_comprehension_rl                                           *)
intros; elim (axs_comprehension F a v0); intros; exact (H1 H).
Qed.
(* End of proof of lem_comprehension_rl                                    *)
(***************************************************************************)
(* Consequences                                                            *)
(***************************************************************************)
(***************************************************************************)
(* Existence de l'ensemble vide                                            *)
(***************************************************************************)
Definition def_F_vide (v0 : E) := v0 <> v0.
Definition vide (a : E) := subset def_F_vide a.
(* Proof of lem_vide_propertie                                             *)
intros; unfold vide in |- *; unfold def_F_vide in |- *; unfold not in |- *;
intros.
elim (axs_comprehension def_F_vide v1 v0); unfold def_F_vide in |- *;
unfold not in |- *; intros.
elim H0; clear H0; intros.
clear H; clear H1; clear H0; apply H2; clear H2; reflexivity.
apply H1; clear H1.
split.
elim (axs_comprehension def_F_vide v1 v0); unfold def_F_vide in |- *;
unfold not in |- *; intros.
elim H0; clear H0; intros; assumption.
elim (axs_comprehension def_F_vide v1 v0); unfold def_F_vide in |- *;
unfold not in |- *; intros.
elim H0; clear H0; intros.
apply H3; reflexivity.
assumption.
Qed.
(* End of proof of lem_vide_existence                                      *)
(* Proof of lem_vide_unicite                                               *)
intros; apply axs_extensionnalite; unfold iff in |- *; split; intros.
generalize (lem_vide_propertie v2 v0); intros; elim H0; assumption.
generalize (lem_vide_propertie v2 v1); intros; elim H0; assumption.
Qed.
(* End of proof of lem_vide_unicite                                        *)
Parameter var_vide : E.
Definition Vide := vide var_vide.
(* Proof of lem_x_inc_vide                                                 *)
intros.
unfold inc in H.
apply axs_extensionnalite; intros; unfold iff in |- *; split; intros.
exact (H v2 H0).
generalize (lem_vide_propertie v2 var_vide); intros.
unfold Vide in H0.
absurd (In v2 (vide var_vide)); auto with zfc.
Qed.
(* End of proof of lem_x_inc_vide                                          *)
(* Proof of lem_x_noteq_vide                                               *)
intros.
unfold not in |- *; intros.
generalize H; clear H; rewrite H0; intros.
generalize (lem_vide_propertie y var_vide); intros; unfold Vide in H.
absurd (In y (vide var_vide)); auto with zfc.
Qed.
(* End of proof of lem_x_noteq_vide                                        *)
(* Proof of lem_paire_not_empty                                            *)
intros.
cut (In a (paire a b)); intros.
unfold not in |- *; intros.
generalize H; clear H; rewrite H0; intros.
generalize (lem_vide_propertie a var_vide); intros; unfold Vide in H.
absurd (In a (vide var_vide)); auto with zfc.
elim (axs_paire a b a); intros; apply H0; left; reflexivity.
Qed.
(* End of proof of lem_paire_not_empty                                     *)

Lemma lem_not_vide_in_vide : ~ In Vide Vide.