-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTopologicalSpaces.v
334 lines (304 loc) · 7.89 KB
/
TopologicalSpaces.v
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
Require Export Ensembles.
Require Import EnsemblesImplicit.
Require Export Families.
Require Export IndexedFamilies.
Require Export FiniteTypes.
Require Import EnsemblesSpec.
Record TopologicalSpace : Type := {
point_set : Type;
open : Ensemble point_set -> Prop;
open_family_union : forall F : Family point_set,
(forall S : Ensemble point_set, In F S -> open S) ->
open (FamilyUnion F);
open_intersection2: forall U V:Ensemble point_set,
open U -> open V -> open (Intersection U V);
open_full : open Full_set
}.
Implicit Arguments open [[t]].
Implicit Arguments open_family_union [[t]].
Implicit Arguments open_intersection2 [[t]].
Lemma open_empty: forall X:TopologicalSpace,
open (@Empty_set (point_set X)).
Proof.
intros.
rewrite <- empty_family_union.
apply open_family_union.
intros.
destruct H.
Qed.
Lemma open_union2: forall {X:TopologicalSpace}
(U V:Ensemble (point_set X)), open U -> open V -> open (Union U V).
Proof.
intros.
assert (Union U V = FamilyUnion (Couple U V)).
apply Extensionality_Ensembles; split; red; intros.
destruct H1.
exists U; auto with sets.
exists V; auto with sets.
destruct H1.
destruct H1.
left; trivial.
right; trivial.
rewrite H1; apply open_family_union.
intros.
destruct H2; trivial.
Qed.
Lemma open_indexed_union: forall {X:TopologicalSpace} {A:Type}
(F:IndexedFamily A (point_set X)),
(forall a:A, open (F a)) -> open (IndexedUnion F).
Proof.
intros.
rewrite indexed_to_family_union.
apply open_family_union.
intros.
destruct H0.
rewrite H1; apply H.
Qed.
Lemma open_finite_indexed_intersection:
forall {X:TopologicalSpace} {A:Type}
(F:IndexedFamily A (point_set X)),
FiniteT A -> (forall a:A, open (F a)) ->
open (IndexedIntersection F).
Proof.
intros.
induction H.
rewrite empty_indexed_intersection.
apply open_full.
assert (IndexedIntersection F = Intersection
(IndexedIntersection (fun x:T => F (Some x)))
(F None)).
apply Extensionality_Ensembles; split; red; intros.
destruct H1.
constructor.
constructor.
intros; apply H1.
apply H1.
destruct H1.
destruct H1.
constructor.
destruct a.
apply H1.
apply H2.
rewrite H1.
apply open_intersection2.
apply IHFiniteT.
intros; apply H0.
apply H0.
destruct H1.
assert (IndexedIntersection F =
IndexedIntersection (fun x:X0 => F (f x))).
apply Extensionality_Ensembles; split; red; intros.
constructor.
destruct H3.
intro; apply H3.
constructor.
destruct H3.
intro; rewrite <- H2 with a.
apply H3.
rewrite H3.
apply IHFiniteT.
intro; apply H0.
Qed.
Definition closed {X:TopologicalSpace} (F:Ensemble (point_set X)) :=
open (Ensembles.Complement F).
Lemma closed_complement_open: forall {X:TopologicalSpace}
(U:Ensemble (point_set X)), closed (Ensembles.Complement U) ->
open U.
Proof.
intros.
red in H.
rewrite Complement_Complement in H.
assumption.
Qed.
Lemma closed_union2: forall {X:TopologicalSpace}
(F G:Ensemble (point_set X)),
closed F -> closed G -> closed (Union F G).
Proof.
intros.
red in H, H0.
red.
assert (Ensembles.Complement (Union F G) =
Intersection (Ensembles.Complement F)
(Ensembles.Complement G)).
unfold Ensembles.Complement.
apply Extensionality_Ensembles; split; red; intros.
constructor.
auto with sets.
auto with sets.
destruct H1.
red; red; intro.
destruct H3.
apply (H1 H3).
apply (H2 H3).
rewrite H1.
apply open_intersection2; assumption.
Qed.
Lemma closed_intersection2: forall {X:TopologicalSpace}
(F G:Ensemble (point_set X)),
closed F -> closed G -> closed (Intersection F G).
Proof.
intros.
red in H, H0.
red.
assert (Ensembles.Complement (Intersection F G) =
Union (Ensembles.Complement F)
(Ensembles.Complement G)).
apply Extensionality_Ensembles; split; red; intros.
apply NNPP.
red; intro.
unfold Ensembles.Complement in H1.
unfold In in H1.
contradict H1.
constructor.
apply NNPP.
red; intro.
auto with sets.
apply NNPP.
red; intro.
auto with sets.
red; red; intro.
destruct H2.
destruct H1; auto with sets.
rewrite H1; apply open_union2; trivial.
Qed.
Lemma closed_family_intersection: forall {X:TopologicalSpace}
(F:Family (point_set X)),
(forall S:Ensemble (point_set X), In F S -> closed S) ->
closed (FamilyIntersection F).
Proof.
intros.
unfold closed in H.
red.
assert (Ensembles.Complement (FamilyIntersection F) =
FamilyUnion [ S:Ensemble (point_set X) |
In F (Ensembles.Complement S) ]).
apply Extensionality_Ensembles; split; red; intros.
apply NNPP.
red; intro.
red in H0; red in H0.
contradict H0.
constructor.
intros.
apply NNPP.
red; intro.
contradict H1.
exists (Ensembles.Complement S).
constructor.
rewrite Complement_Complement; assumption.
assumption.
destruct H0.
red; red; intro.
destruct H2.
destruct H0.
pose proof (H2 _ H0).
contradiction H3.
rewrite H0; apply open_family_union.
intros.
destruct H1.
pose proof (H _ H1).
rewrite Complement_Complement in H2; assumption.
Qed.
Lemma closed_indexed_intersection: forall {X:TopologicalSpace}
{A:Type} (F:IndexedFamily A (point_set X)),
(forall a:A, closed (F a)) -> closed (IndexedIntersection F).
Proof.
intros.
rewrite indexed_to_family_intersection.
apply closed_family_intersection.
intros.
destruct H0.
rewrite H1; trivial.
Qed.
Lemma closed_finite_indexed_union: forall {X:TopologicalSpace}
{A:Type} (F:IndexedFamily A (point_set X)),
FiniteT A -> (forall a:A, closed (F a)) ->
closed (IndexedUnion F).
Proof.
intros.
red.
assert (Ensembles.Complement (IndexedUnion F) =
IndexedIntersection (fun a:A => Ensembles.Complement (F a))).
apply Extensionality_Ensembles; split; red; intros.
constructor.
intros.
red; red; intro.
contradiction H1.
exists a.
assumption.
destruct H1.
red; red; intro.
destruct H2.
contradiction (H1 a).
rewrite H1; apply open_finite_indexed_intersection; trivial.
Qed.
Hint Unfold closed : topology.
Hint Resolve (@open_family_union) (@open_intersection2) open_full
open_empty (@open_union2) (@open_indexed_union)
(@open_finite_indexed_intersection) (@closed_complement_open)
(@closed_union2) (@closed_intersection2) (@closed_family_intersection)
(@closed_indexed_intersection) (@closed_finite_indexed_union)
: topology.
Section Build_from_closed_sets.
Variable X:Type.
Variable closedP : Ensemble X -> Prop.
Hypothesis closedP_empty: closedP Empty_set.
Hypothesis closedP_union2: forall F G:Ensemble X,
closedP F -> closedP G -> closedP (Union F G).
Hypothesis closedP_family_intersection: forall F:Family X,
(forall G:Ensemble X, In F G -> closedP G) ->
closedP (FamilyIntersection F).
Definition Build_TopologicalSpace_from_closed_sets : TopologicalSpace.
refine (Build_TopologicalSpace X
(fun U:Ensemble X => closedP (Ensembles.Complement U)) _ _ _).
intros.
replace (Ensembles.Complement (FamilyUnion F)) with
(FamilyIntersection [ G:Ensemble X | In F (Ensembles.Complement G) ]).
apply closedP_family_intersection.
destruct 1.
rewrite <- Complement_Complement.
apply H; trivial.
apply Extensionality_Ensembles; split; red; intros.
intro.
destruct H1.
destruct H0.
absurd (In (Ensembles.Complement S) x).
intro.
contradiction H3.
apply H0.
constructor.
rewrite Complement_Complement; trivial.
constructor.
destruct 1.
apply NNPP; intro.
contradiction H0.
exists (Ensembles.Complement S); trivial.
intros.
replace (Ensembles.Complement (Intersection U V)) with
(Union (Ensembles.Complement U) (Ensembles.Complement V)).
apply closedP_union2; trivial.
apply Extensionality_Ensembles; split; red; intros.
intro.
destruct H2.
destruct H1; contradiction H1.
apply NNPP; intro.
contradiction H1.
constructor; apply NNPP; intro; contradiction H2;
[ left | right ]; trivial.
apply eq_ind with (1 := closedP_empty).
apply Extensionality_Ensembles; split; auto with sets;
red; intros.
contradiction H.
constructor.
Defined.
Lemma Build_TopologicalSpace_from_closed_sets_closed:
forall (F:Ensemble (point_set Build_TopologicalSpace_from_closed_sets)),
closed F <-> closedP F.
Proof.
intros.
unfold closed.
simpl.
rewrite Complement_Complement.
split; trivial.
Qed.
End Build_from_closed_sets.
Implicit Arguments Build_TopologicalSpace_from_closed_sets [[X]].