1
(************************************************************************)
2
(* v * The Coq Proof Assistant / The Coq Development Team *)
3
(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
4
(* \VV/ **************************************************************)
5
(* // * This file is distributed under the terms of the *)
6
(* * GNU Lesser General Public License Version 2.1 *)
7
(************************************************************************)
8
(****************************************************************************)
10
(* Naive Set Theory in Coq *)
13
(* Rocquencourt Sophia-Antipolis *)
22
(* Acknowledgments: This work was started in July 1993 by F. Prost. Thanks *)
23
(* to the Newton Institute for providing an exceptional work environment *)
24
(* in Summer 1995. Several developments by E. Ledinot were an inspiration. *)
25
(****************************************************************************)
27
(*i $Id: Classical_sets.v 9245 2006-10-17 12:53:34Z notin $ i*)
29
Require Export Ensembles.
30
Require Export Constructive_sets.
31
Require Export Classical_Type.
33
Section Ensembles_classical.
36
Lemma not_included_empty_Inhabited :
37
forall A:Ensemble U, ~ Included U A (Empty_set U) -> Inhabited U A.
40
elim (not_all_ex_not U (fun x:U => ~ In U A x)).
41
intros x H; apply Inhabited_intro with x.
42
apply NNPP; auto with sets.
44
apply NI; red in |- *.
45
intros x H'; elim (H x); trivial with sets.
48
Lemma not_empty_Inhabited :
49
forall A:Ensemble U, A <> Empty_set U -> Inhabited U A.
51
intros; apply not_included_empty_Inhabited.
52
red in |- *; auto with sets.
55
Lemma Inhabited_Setminus :
56
forall X Y:Ensemble U,
57
Included U X Y -> ~ Included U Y X -> Inhabited U (Setminus U Y X).
60
elim (not_all_ex_not U (fun x:U => In U Y x -> In U X x) NI).
62
apply Inhabited_intro with x.
64
apply not_imply_elim with (In U X x); trivial with sets.
68
Lemma Strict_super_set_contains_new_element :
69
forall X Y:Ensemble U,
70
Included U X Y -> X <> Y -> Inhabited U (Setminus U Y X).
72
auto 7 using Inhabited_Setminus with sets.
75
Lemma Subtract_intro :
76
forall (A:Ensemble U) (x y:U), In U A y -> x <> y -> In U (Subtract U A x) y.
78
unfold Subtract at 1 in |- *; auto with sets.
80
Hint Resolve Subtract_intro : sets.
83
forall (A:Ensemble U) (x y:U), In U (Subtract U A x) y -> In U A y /\ x <> y.
85
intros A x y H'; elim H'; auto with sets.
88
Lemma Included_Strict_Included :
89
forall X Y:Ensemble U, Included U X Y -> Strict_Included U X Y \/ X = Y.
91
intros X Y H'; try assumption.
92
elim (classic (X = Y)); auto with sets.
95
Lemma Strict_Included_inv :
96
forall X Y:Ensemble U,
97
Strict_Included U X Y -> Included U X Y /\ Inhabited U (Setminus U Y X).
99
intros X Y H'; red in H'.
100
split; [ tauto | idtac ].
101
elim H'; intros H'0 H'1; try exact H'1; clear H'.
102
apply Strict_super_set_contains_new_element; auto with sets.
105
Lemma not_SIncl_empty :
106
forall X:Ensemble U, ~ Strict_Included U X (Empty_set U).
108
intro X; red in |- *; intro H'; try exact H'.
109
lapply (Strict_Included_inv X (Empty_set U)); auto with sets.
110
intro H'0; elim H'0; intros H'1 H'2; elim H'2; clear H'0.
111
intros x H'0; elim H'0.
115
Lemma Complement_Complement :
116
forall A:Ensemble U, Complement U (Complement U A) = A.
118
unfold Complement in |- *; intros; apply Extensionality_Ensembles;
120
red in |- *; split; auto with sets.
121
red in |- *; intros; apply NNPP; auto with sets.
124
End Ensembles_classical.
126
Hint Resolve Strict_super_set_contains_new_element Subtract_intro
127
not_SIncl_empty: sets v62.