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

Commit e42af8d

Browse files
committed
refactor(topology/category/Profinite): define Profinite as a subcategory of CompHaus (#8314)
This adjusts the definition of Profinite to explicitly be a subcategory of CompHaus rather than a subcategory of Top which embeds into CompHaus. Essentially this means it's easier to construct an element of Profinite from an element of CompHaus.
1 parent e343609 commit e42af8d

File tree

2 files changed

+53
-55
lines changed

2 files changed

+53
-55
lines changed

src/topology/category/Profinite/cofiltered_limit.lean

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ begin
4343
-- First, we have the topological basis of the cofiltered limit obtained by pulling back
4444
-- clopen sets from the factors in the limit. By continuity, all such sets are again clopen.
4545
have hB := Top.is_topological_basis_cofiltered_limit
46-
(F ⋙ Profinite_to_Top)
47-
(Profinite_to_Top.map_cone C)
46+
(F ⋙ Profinite.to_Top)
47+
(Profinite.to_Top.map_cone C)
4848
(is_limit_of_preserves _ hC)
4949
(λ j, {W | is_clopen W})
5050
_ (λ i, is_clopen_univ) (λ i U1 U2 hU1 hU2, hU1.inter hU2) _,
@@ -225,16 +225,16 @@ begin
225225
rw ← not_forall,
226226
intros h,
227227
apply hα,
228-
haveI : ∀ j : J, nonempty ((F ⋙ Profinite_to_Top).obj j) := h,
229-
haveI : ∀ j : J, t2_space ((F ⋙ Profinite_to_Top).obj j) := λ j,
228+
haveI : ∀ j : J, nonempty ((F ⋙ Profinite.to_Top).obj j) := h,
229+
haveI : ∀ j : J, t2_space ((F ⋙ Profinite.to_Top).obj j) := λ j,
230230
(infer_instance : t2_space (F.obj j)),
231-
haveI : ∀ j : J, compact_space ((F ⋙ Profinite_to_Top).obj j) := λ j,
231+
haveI : ∀ j : J, compact_space ((F ⋙ Profinite.to_Top).obj j) := λ j,
232232
(infer_instance : compact_space (F.obj j)),
233233
have cond := Top.nonempty_limit_cone_of_compact_t2_cofiltered_system
234-
(F ⋙ Profinite_to_Top),
234+
(F ⋙ Profinite.to_Top),
235235
suffices : nonempty C.X, by exact nonempty.map S.proj this,
236-
let D := Profinite_to_Top.map_cone C,
237-
have hD : is_limit D := is_limit_of_preserves Profinite_to_Top hC,
236+
let D := Profinite.to_Top.map_cone C,
237+
have hD : is_limit D := is_limit_of_preserves Profinite.to_Top hC,
238238
have CD := (hD.cone_point_unique_up_to_iso (Top.limit_cone_is_limit _)).inv,
239239
exact cond.map CD }
240240
end

src/topology/category/Profinite/default.lean

Lines changed: 45 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,8 @@ open category_theory
4545

4646
/-- The type of profinite topological spaces. -/
4747
structure Profinite :=
48-
(to_Top : Top)
49-
[is_compact : compact_space to_Top]
50-
[is_t2 : t2_space to_Top]
51-
[is_totally_disconnected : totally_disconnected_space to_Top]
48+
(to_CompHaus : CompHaus)
49+
[is_totally_disconnected : totally_disconnected_space to_CompHaus]
5250

5351
namespace Profinite
5452

@@ -57,21 +55,23 @@ Construct a term of `Profinite` from a type endowed with the structure of a
5755
compact, Hausdorff and totally disconnected topological space.
5856
-/
5957
def of (X : Type*) [topological_space X] [compact_space X] [t2_space X]
60-
[totally_disconnected_space X] : Profinite := ⟨⟨X⟩⟩
58+
[totally_disconnected_space X] : Profinite := ⟨⟨⟨X⟩⟩⟩
6159

6260
instance : inhabited Profinite := ⟨Profinite.of pempty⟩
6361

64-
instance category : category Profinite := induced_category.category to_Top
62+
instance category : category Profinite := induced_category.category to_CompHaus
6563
instance concrete_category : concrete_category Profinite := induced_category.concrete_category _
6664
instance has_forget₂ : has_forget₂ Profinite Top := induced_category.has_forget₂ _
6765

68-
instance : has_coe_to_sort Profinite := ⟨Type*, λ X, X.to_Top⟩
69-
instance {X : Profinite} : compact_space X := X.is_compact
70-
instance {X : Profinite} : t2_space X := X.is_t2
66+
instance : has_coe_to_sort Profinite := ⟨Type*, λ X, X.to_CompHaus⟩
7167
instance {X : Profinite} : totally_disconnected_space X := X.is_totally_disconnected
7268

69+
-- We check that we automatically infer that Profinite sets are compact and Hausdorff.
70+
example {X : Profinite} : compact_space X := infer_instance
71+
example {X : Profinite} : t2_space X := infer_instance
72+
7373
@[simp]
74-
lemma coe_to_Top {X : Profinite} : (X.to_Top : Type*) = X :=
74+
lemma coe_to_CompHaus {X : Profinite} : (X.to_CompHaus : Type*) = X :=
7575
rfl
7676

7777
@[simp] lemma coe_id (X : Profinite) : (𝟙 X : X → X) = id := rfl
@@ -80,20 +80,17 @@ rfl
8080

8181
end Profinite
8282

83-
/-- The fully faithful embedding of `Profinite` in `Top`. -/
84-
@[simps, derive [full, faithful]]
85-
def Profinite_to_Top : Profinite ⥤ Top := forget₂ _ _
86-
8783
/-- The fully faithful embedding of `Profinite` in `CompHaus`. -/
88-
@[simps] def Profinite.to_CompHaus : Profinite ⥤ CompHaus :=
89-
{ obj := λ X, { to_Top := X.to_Top },
90-
map := λ _ _ f, f }
84+
@[simps, derive [full, faithful]]
85+
def Profinite_to_CompHaus : Profinite ⥤ CompHaus := induced_functor _
9186

92-
instance : full Profinite.to_CompHaus := { preimage := λ _ _ f, f }
93-
instance : faithful Profinite.to_CompHaus := {}
87+
/-- The fully faithful embedding of `Profinite` in `Top`. This is definitionally the same as the
88+
obvious composite. -/
89+
@[simps, derive [full, faithful]]
90+
def Profinite.to_Top : Profinite ⥤ Top := forget₂ _ _
9491

9592
@[simp] lemma Profinite.to_CompHaus_to_Top :
96-
Profinite.to_CompHaus ⋙ CompHaus_to_Top = Profinite_to_Top :=
93+
Profinite_to_CompHaus ⋙ CompHaus_to_Top = Profinite.to_Top :=
9794
rfl
9895

9996
section Profinite
@@ -107,17 +104,18 @@ See: https://stacks.math.columbia.edu/tag/0900
107104
-- Without explicit universe annotations here, Lean introduces two universe variables and
108105
-- unhelpfully defines a function `CompHaus.{max u₁ u₂} → Profinite.{max u₁ u₂}`.
109106
def CompHaus.to_Profinite_obj (X : CompHaus.{u}) : Profinite.{u} :=
110-
{ to_Top := { α := connected_components X.to_Top.α },
111-
is_compact := quotient.compact_space,
112-
is_t2 := connected_components.t2,
107+
{ to_CompHaus :=
108+
{ to_Top := Top.of (connected_components X),
109+
is_compact := quotient.compact_space,
110+
is_hausdorff := connected_components.t2 },
113111
is_totally_disconnected := connected_components.totally_disconnected_space }
114112

115113
/--
116114
(Implementation) The bijection of homsets to establish the reflective adjunction of Profinite
117115
spaces in compact Hausdorff spaces.
118116
-/
119117
def Profinite.to_CompHaus_equivalence (X : CompHaus.{u}) (Y : Profinite.{u}) :
120-
(CompHaus.to_Profinite_obj X ⟶ Y) ≃ (X ⟶ Profinite.to_CompHaus.obj Y) :=
118+
(CompHaus.to_Profinite_obj X ⟶ Y) ≃ (X ⟶ Profinite_to_CompHaus.obj Y) :=
121119
{ to_fun := λ f,
122120
{ to_fun := f.1 ∘ quotient.mk,
123121
continuous_to_fun := continuous.comp f.2 (continuous_quotient_mk) },
@@ -135,7 +133,7 @@ def CompHaus.to_Profinite : CompHaus ⥤ Profinite :=
135133
adjunction.left_adjoint_of_equiv Profinite.to_CompHaus_equivalence (λ _ _ _ _ _, rfl)
136134

137135
lemma CompHaus.to_Profinite_obj' (X : CompHaus) :
138-
↥(CompHaus.to_Profinite.obj X) = connected_components X.to_Top.α := rfl
136+
↥(CompHaus.to_Profinite.obj X) = connected_components X := rfl
139137

140138
/-- Finite types are given the discrete topology. -/
141139
def Fintype.discrete_topology (A : Fintype) : topological_space A := ⊥
@@ -161,63 +159,63 @@ namespace Profinite
161159
def limit_cone {J : Type u} [small_category J] (F : J ⥤ Profinite.{u}) :
162160
limits.cone F :=
163161
{ X :=
164-
{ to_Top := CompHaus_to_Top.obj (CompHaus.limit_cone (F ⋙ Profinite.to_CompHaus)).X,
165-
is_compact := by { dsimp [CompHaus_to_Top], apply_instance },
166-
is_t2 := by { dsimp [CompHaus_to_Top], apply_instance },
167-
is_totally_disconnected := by {
168-
dsimp [CompHaus_to_Top, CompHaus.limit_cone, Profinite.to_CompHaus, Top.limit_cone],
169-
apply_instance } },
170-
π := { app := λ j, (CompHaus.limit_cone (F ⋙ Profinite.to_CompHaus)).π.app j } }
162+
{ to_CompHaus := (CompHaus.limit_cone (F ⋙ Profinite_to_CompHaus)).X,
163+
is_totally_disconnected :=
164+
begin
165+
change totally_disconnected_space ↥{u : Π (j : J), (F.obj j) | _},
166+
exact subtype.totally_disconnected_space,
167+
end },
168+
π := { app := (CompHaus.limit_cone (F ⋙ Profinite_to_CompHaus)).π.app } }
171169

172170
/-- The limit cone `Profinite.limit_cone F` is indeed a limit cone. -/
173171
def limit_cone_is_limit {J : Type u} [small_category J] (F : J ⥤ Profinite.{u}) :
174172
limits.is_limit (limit_cone F) :=
175-
{ lift := λ S, (CompHaus.limit_cone_is_limit (F ⋙ Profinite.to_CompHaus)).lift
176-
(Profinite.to_CompHaus.map_cone S),
173+
{ lift := λ S, (CompHaus.limit_cone_is_limit (F ⋙ Profinite_to_CompHaus)).lift
174+
(Profinite_to_CompHaus.map_cone S),
177175
uniq' := λ S m h,
178-
(CompHaus.limit_cone_is_limit _).uniq (Profinite.to_CompHaus.map_cone S) _ h }
176+
(CompHaus.limit_cone_is_limit _).uniq (Profinite_to_CompHaus.map_cone S) _ h }
179177

180178
/-- The adjunction between CompHaus.to_Profinite and Profinite.to_CompHaus -/
181-
def to_Profinite_adj_to_CompHaus : CompHaus.to_Profinite ⊣ Profinite.to_CompHaus :=
179+
def to_Profinite_adj_to_CompHaus : CompHaus.to_Profinite ⊣ Profinite_to_CompHaus :=
182180
adjunction.adjunction_of_equiv_left _ _
183181

184182
/-- The category of profinite sets is reflective in the category of compact hausdroff spaces -/
185-
instance to_CompHaus.reflective : reflective Profinite.to_CompHaus :=
183+
instance to_CompHaus.reflective : reflective Profinite_to_CompHaus :=
186184
{ to_is_right_adjoint := ⟨CompHaus.to_Profinite, Profinite.to_Profinite_adj_to_CompHaus⟩ }
187185

188186
noncomputable
189-
instance to_CompHaus.creates_limits : creates_limits Profinite.to_CompHaus :=
187+
instance to_CompHaus.creates_limits : creates_limits Profinite_to_CompHaus :=
190188
monadic_creates_limits _
191189

192190
noncomputable
193-
instance to_Top.reflective : reflective (Profinite_to_Top : Profinite ⥤ Top) :=
194-
reflective.comp Profinite.to_CompHaus CompHaus_to_Top
191+
instance to_Top.reflective : reflective Profinite.to_Top :=
192+
reflective.comp Profinite_to_CompHaus CompHaus_to_Top
195193

196194
noncomputable
197-
instance to_Top.creates_limits : creates_limits Profinite_to_Top :=
195+
instance to_Top.creates_limits : creates_limits Profinite.to_Top :=
198196
monadic_creates_limits _
199197

200198
instance has_limits : limits.has_limits Profinite :=
201-
has_limits_of_has_limits_creates_limits Profinite_to_Top
199+
has_limits_of_has_limits_creates_limits Profinite.to_Top
202200

203201
instance has_colimits : limits.has_colimits Profinite :=
204-
has_colimits_of_reflective to_CompHaus
202+
has_colimits_of_reflective Profinite_to_CompHaus
205203

206204
noncomputable
207205
instance forget_preserves_limits : limits.preserves_limits (forget Profinite) :=
208-
by apply limits.comp_preserves_limits Profinite_to_Top (forget _)
206+
by apply limits.comp_preserves_limits Profinite.to_Top (forget Top)
209207

210208
variables {X Y : Profinite.{u}} (f : X ⟶ Y)
211209

212210
/-- Any morphism of profinite spaces is a closed map. -/
213211
lemma is_closed_map : is_closed_map f :=
214-
show is_closed_map (Profinite.to_CompHaus.map f), from CompHaus.is_closed_map _
212+
CompHaus.is_closed_map _
215213

216214
/-- Any continuous bijection of profinite spaces induces an isomorphism. -/
217215
lemma is_iso_of_bijective (bij : function.bijective f) : is_iso f :=
218216
begin
219-
haveI := CompHaus.is_iso_of_bijective (Profinite.to_CompHaus.map f) bij,
220-
exact is_iso_of_fully_faithful Profinite.to_CompHaus _
217+
haveI := CompHaus.is_iso_of_bijective (Profinite_to_CompHaus.map f) bij,
218+
exact is_iso_of_fully_faithful Profinite_to_CompHaus _
221219
end
222220

223221
/-- Any continuous bijection of profinite spaces induces an isomorphism. -/

0 commit comments

Comments
 (0)