Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit d1bb5ea

Browse files
committed
feat(topology/category/Compactum): Compact Hausdorff spaces (#4555)
This PR provides the equivalence between the category of compact Hausdorff topological spaces and the category of algebras for the ultrafilter monad. ## Notation 1. `Compactum` is the category of algebras for the ultrafilter monad. It's a wrapper around `monad.algebra (of_type_functor $ ultrafilter)`. 2. `CompHaus` is the full subcategory of `Top` consisting of topological spaces which are compact and Hausdorff.
1 parent bc77a23 commit d1bb5ea

File tree

6 files changed

+648
-0
lines changed

6 files changed

+648
-0
lines changed

src/data/set/constructions.lean

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
/-
2+
Copyright (c) 2020 Adam Topaz. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Adam Topaz
5+
-/
6+
7+
import tactic
8+
import data.finset.basic
9+
10+
/-!
11+
# Constructions involving sets of sets.
12+
13+
## Finite Intersections
14+
15+
We define a structure `has_finite_inter` which asserts that a set `S` of subsets of `α` is
16+
closed under finite intersections.
17+
18+
We define `finite_inter_closure` which, given a set `S` of subsets of `α`, is the smallest
19+
set of subsets of `α` which is closed under finite intersections.
20+
21+
`finite_inter_closure S` is endowed with a term of type `has_finite_inter` using
22+
`finite_inter_closure_has_finite_inter`.
23+
24+
-/
25+
26+
variables {α : Type*} (S : set (set α))
27+
28+
/-- A structure encapsulating the fact that a set of sets is closed under finite intersection. -/
29+
structure has_finite_inter :=
30+
(univ_mem : set.univ ∈ S)
31+
(inter_mem {s t} : s ∈ S → t ∈ S → s ∩ t ∈ S)
32+
33+
namespace has_finite_inter
34+
35+
-- Satisfying the inhabited linter...
36+
instance : inhabited (has_finite_inter ({set.univ} : set (set α))) :=
37+
⟨⟨by tauto, λ _ _ h1 h2, by finish⟩⟩
38+
39+
/-- The smallest set of sets containing `S` which is closed under finite intersections. -/
40+
inductive finite_inter_closure : set (set α)
41+
| basic {s} : s ∈ S → finite_inter_closure s
42+
| univ : finite_inter_closure set.univ
43+
| inter {s t} : finite_inter_closure s → finite_inter_closure t → finite_inter_closure (s ∩ t)
44+
45+
/-- Defines `has_finite_inter` for `finite_inter_closure S`. -/
46+
def finite_inter_closure_has_finite_inter : has_finite_inter (finite_inter_closure S) :=
47+
{ univ_mem := finite_inter_closure.univ,
48+
inter_mem := λ _ _, finite_inter_closure.inter }
49+
50+
variable {S}
51+
lemma finite_inter_mem (cond : has_finite_inter S) (F : finset (set α)) :
52+
↑F ⊆ S → ⋂₀ (↑F : set (set α)) ∈ S :=
53+
begin
54+
classical,
55+
refine finset.induction_on F (λ _, _) _,
56+
{ simp [cond.univ_mem] },
57+
{ intros a s h1 h2 h3,
58+
suffices : a ∩ ⋂₀ ↑s ∈ S, by simpa,
59+
exact cond.inter_mem (h3 (finset.mem_insert_self a s))
60+
(h2 $ λ x hx, h3 $ finset.mem_insert_of_mem hx) }
61+
end
62+
63+
lemma finite_inter_closure_insert {A : set α} (cond : has_finite_inter S)
64+
(P ∈ finite_inter_closure (insert A S)) : P ∈ S ∨ ∃ Q ∈ S, P = A ∩ Q :=
65+
begin
66+
induction H with S h T1 T2 _ _ h1 h2,
67+
{ cases h,
68+
{ exact or.inr ⟨set.univ, cond.univ_mem, by simpa⟩ },
69+
{ exact or.inl h } },
70+
{ exact or.inl cond.univ_mem },
71+
{ rcases h1 with (h | ⟨Q, hQ, rfl⟩); rcases h2 with (i | ⟨R, hR, rfl⟩),
72+
{ exact or.inl (cond.inter_mem h i) },
73+
{ exact or.inr ⟨T1 ∩ R, cond.inter_mem h hR, by finish⟩ },
74+
{ exact or.inr ⟨Q ∩ T2, cond.inter_mem hQ i, by finish⟩ },
75+
{ exact or.inr ⟨Q ∩ R, cond.inter_mem hQ hR , by tidy⟩ } }
76+
end
77+
78+
end has_finite_inter

src/order/filter/ultrafilter.lean

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,26 @@ lemma ultrafilter_iff_compl_mem_iff_not_mem :
5959
have s ∩ sᶜ ∈ g, from inter_mem_sets hs (g_le this),
6060
by simp only [empty_in_sets_eq_bot, hg, inter_compl_self] at this; contradiction⟩⟩
6161

62+
/-- A variant of `ultrafilter_iff_compl_mem_iff_not_mem`. -/
63+
lemma ultrafilter_iff_compl_mem_iff_not_mem' :
64+
is_ultrafilter f ↔ (∀ s, s ∈ f ↔ sᶜ ∉ f) :=
65+
begin
66+
rw ultrafilter_iff_compl_mem_iff_not_mem,
67+
split,
68+
{ intros h s, conv_lhs {rw (show s = sᶜᶜ, by simp)}, exact h _, },
69+
{ intros h s, conv_rhs {rw (show s = sᶜᶜ, by simp)}, exact h _, }
70+
end
71+
72+
lemma ne_empty_of_mem_ultrafilter (s : set α) : is_ultrafilter f → s ∈ f → s ≠ ∅ :=
73+
begin
74+
rintros h hs rfl,
75+
replace h := ((ultrafilter_iff_compl_mem_iff_not_mem'.mp h) ∅).mp hs,
76+
finish [f.univ_sets],
77+
end
78+
79+
lemma nonempty_of_mem_ultrafilter (s : set α) : is_ultrafilter f → s ∈ f → s.nonempty :=
80+
λ hf hs, ne_empty_iff_nonempty.mp (ne_empty_of_mem_ultrafilter _ hf hs)
81+
6282
lemma mem_or_compl_mem_of_ultrafilter (hf : is_ultrafilter f) (s : set α) :
6383
s ∈ f ∨ sᶜ ∈ f :=
6484
or_iff_not_imp_left.2 (ultrafilter_iff_compl_mem_iff_not_mem.mp hf s).mpr

src/topology/basic.lean

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -816,6 +816,18 @@ section lim
816816
/-- If `f` is a filter, then `Lim f` is a limit of the filter, if it exists. -/
817817
noncomputable def Lim [nonempty α] (f : filter α) : α := epsilon $ λa, f ≤ 𝓝 a
818818

819+
/--
820+
If `f` is a filter satisfying `ne_bot f`, then `Lim' f` is a limit of the filter, if it exists.
821+
-/
822+
def Lim' (f : filter α) [ne_bot f] : α := @Lim _ _ (nonempty_of_ne_bot f) f
823+
824+
-- Note: `ultrafilter` is inside the `filter` namespace.
825+
/--
826+
If `F` is an ultrafilter, then `filter.ultrafilter.Lim F` is a limit of the filter, if it exists.
827+
Note that dot notation `F.Lim` can be used for `F : ultrafilter α`.
828+
-/
829+
def filter.ultrafilter.Lim : ultrafilter α → α := λ F, Lim' F.1
830+
819831
/-- If `f` is a filter in `β` and `g : β → α` is a function, then `lim f` is a limit of `g` at `f`,
820832
if it exists. -/
821833
noncomputable def lim [nonempty α] (f : filter β) (g : β → α) : α :=
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
/-
2+
Copyright (c) 2020 Adam Topaz. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Adam Topaz
5+
-/
6+
7+
import topology.category.Top
8+
9+
/-!
10+
11+
# The category of Compact Hausdorff Spaces
12+
13+
We construct the category of compact Hausdorff spaces.
14+
The type of compact Hausdorff spaces is denoted `CompHaus`, and it is endowed with a category
15+
instance making it a full subcategory of `Top`.
16+
The fully faithful functor `CompHaus ⥤ Top` is denoted `CompHaus_to_Top`.
17+
18+
**Note:** The file `topology/category/Compactum.lean` provides the equivalence between `Compactum`,
19+
which is defined as the category of algebras for the ultrafilter monad, and `CompHaus`.
20+
`Compactum_to_CompHaus` is the functor from `Compactum` to `CompHaus` which is proven to be an
21+
equivalence of categories in `Compactum_to_CompHaus.is_equivalence`.
22+
See `topology/category/Compactum.lean` for a more detailed discussion where these definitions are
23+
introduced.
24+
25+
-/
26+
27+
open category_theory
28+
29+
/-- The type of Compact Hausdorff topological spaces. -/
30+
structure CompHaus :=
31+
(to_Top : Top)
32+
[is_compact : compact_space to_Top]
33+
[is_hausdorff : t2_space to_Top]
34+
35+
namespace CompHaus
36+
37+
instance : inhabited CompHaus := ⟨{to_Top := { α := pempty }}⟩
38+
39+
instance : has_coe_to_sort CompHaus := ⟨Type*, λ X, X.to_Top⟩
40+
instance {X : CompHaus} : compact_space X := X.is_compact
41+
instance {X : CompHaus} : t2_space X := X.is_hausdorff
42+
43+
instance category : category CompHaus := induced_category.category to_Top
44+
45+
end CompHaus
46+
47+
/-- The fully faithful embedding of `CompHaus` in `Top`. -/
48+
def CompHaus_to_Top : CompHaus ⥤ Top :=
49+
{ obj := λ X, { α := X },
50+
map := λ _ _ f, f }
51+
52+
namespace CompHaus_to_Top
53+
54+
instance : full CompHaus_to_Top := { preimage := λ _ _ f, f }
55+
instance : faithful CompHaus_to_Top := {}
56+
57+
end CompHaus_to_Top

0 commit comments

Comments
 (0)