Skip to content

Commit 85c5c84

Browse files
dagurtomasadomani
authored andcommitted
feat: define the category of extremally disconnected compact Hausdorff spaces (#5761)
Co-authored-by: Adam Topaz [topaz@ualberta.ca](mailto:topaz@ualberta.ca) @adamtopaz Basics of the category `Stonean` of extremally disconnected compact Hausdorff spaces. This work was done during the 2023 Copenhagen masterclass on formalisation of condensed mathematics. Numerous participants contributed.
1 parent db41f4d commit 85c5c84

5 files changed

Lines changed: 314 additions & 2 deletions

File tree

Mathlib.lean

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3159,6 +3159,8 @@ import Mathlib.Topology.Category.Profinite.AsLimit
31593159
import Mathlib.Topology.Category.Profinite.Basic
31603160
import Mathlib.Topology.Category.Profinite.CofilteredLimit
31613161
import Mathlib.Topology.Category.Profinite.Projective
3162+
import Mathlib.Topology.Category.Stonean.Basic
3163+
import Mathlib.Topology.Category.Stonean.Limits
31623164
import Mathlib.Topology.Category.TopCat.Adjunctions
31633165
import Mathlib.Topology.Category.TopCat.Basic
31643166
import Mathlib.Topology.Category.TopCat.EpiMono

Mathlib/Data/Set/Image.lean

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1637,3 +1637,17 @@ theorem preimage_eq_empty_iff {s : Set β} : f ⁻¹' s = ∅ ↔ Disjoint s (ra
16371637
end Set
16381638

16391639
end Disjoint
1640+
1641+
section Sigma
1642+
1643+
variable {α : Type _} {β : α → Type _} {i j : α} {s : Set (β i)}
1644+
1645+
lemma sigma_mk_preimage_image' (h : i ≠ j) : Sigma.mk j ⁻¹' (Sigma.mk i '' s) = ∅ := by
1646+
change Sigma.mk j ⁻¹' {⟨i, u⟩ | u ∈ s} = ∅
1647+
simp [h]
1648+
1649+
lemma sigma_mk_preimage_image_eq_self : Sigma.mk i ⁻¹' (Sigma.mk i '' s) = s := by
1650+
change Sigma.mk i ⁻¹' {⟨i, u⟩ | u ∈ s} = s
1651+
simp
1652+
1653+
end Sigma
Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
/-
2+
Copyright (c) 2023 Adam Topaz. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Adam Topaz
5+
-/
6+
import Mathlib.Topology.ExtremallyDisconnected
7+
import Mathlib.CategoryTheory.Sites.Coherent
8+
import Mathlib.Topology.Category.CompHaus.Projective
9+
import Mathlib.Topology.Category.Profinite.Basic
10+
/-!
11+
# Extremally disconnected sets
12+
13+
This file develops some of the basic theory of extremally disconnected sets.
14+
15+
## Overview
16+
17+
This file defines the type `Stonean` of all extremally (note: not "extremely"!)
18+
disconnected compact Hausdorff spaces, gives it the structure of a large category,
19+
and proves some basic observations about this category and various functors from it.
20+
21+
The Lean implementation: a term of type `Stonean` is a pair, considering of
22+
a term of type `CompHaus` (i.e. a compact Hausdorff topological space) plus
23+
a proof that the space is extremally disconnected.
24+
This is equivalent to the assertion that the term is projective in `CompHaus`,
25+
in the sense of category theory (i.e., such that morphisms out of the object
26+
can be lifted along epimorphisms).
27+
28+
## Main definitions
29+
30+
* `Stonean` : the category of extremally disconnected compact Hausdorff spaces.
31+
* `Stonean.toCompHaus` : the forgetful functor `Stonean ⥤ CompHaus` from Stonean
32+
spaces to compact Hausdorff spaces
33+
* `Stonean.toProfinite` : the functor from Stonean spaces to profinite spaces.
34+
35+
-/
36+
universe u
37+
38+
open CategoryTheory
39+
40+
/-- `Stonean` is the category of extremally disconnected compact Hausdorff spaces. -/
41+
structure Stonean where
42+
/-- The underlying compact Hausdorff space of a Stonean space. -/
43+
compHaus : CompHaus.{u}
44+
/-- A Stonean space is extremally disconnected -/
45+
[extrDisc : ExtremallyDisconnected compHaus]
46+
47+
namespace CompHaus
48+
49+
/-- `Projective` implies `ExtremallyDisconnected`. -/
50+
instance (X : CompHaus.{u}) [Projective X] : ExtremallyDisconnected X := by
51+
apply CompactT2.Projective.extremallyDisconnected
52+
intro A B _ _ _ _ _ _ f g hf hg hsurj
53+
have : CompactSpace (TopCat.of A) := by assumption
54+
have : T2Space (TopCat.of A) := by assumption
55+
have : CompactSpace (TopCat.of B) := by assumption
56+
have : T2Space (TopCat.of B) := by assumption
57+
let A' : CompHaus := ⟨TopCat.of A⟩
58+
let B' : CompHaus := ⟨TopCat.of B⟩
59+
let f' : X ⟶ B' := ⟨f, hf⟩
60+
let g' : A' ⟶ B' := ⟨g,hg⟩
61+
have : Epi g' := by
62+
rw [CompHaus.epi_iff_surjective]
63+
assumption
64+
obtain ⟨h,hh⟩ := Projective.factors f' g'
65+
refine ⟨h,h.2,?_⟩
66+
ext t
67+
apply_fun (fun e => e t) at hh
68+
exact hh
69+
70+
/-- `Projective` implies `Stonean`. -/
71+
@[simps!]
72+
def toStonean (X : CompHaus.{u}) [Projective X] :
73+
Stonean where
74+
compHaus := X
75+
76+
end CompHaus
77+
78+
namespace Stonean
79+
80+
/-- Stonean spaces form a large category. -/
81+
instance : LargeCategory Stonean.{u} :=
82+
show Category (InducedCategory CompHaus (·.compHaus)) from inferInstance
83+
84+
/-- The (forgetful) functor from Stonean spaces to compact Hausdorff spaces. -/
85+
@[simps!]
86+
def toCompHaus : Stonean.{u} ⥤ CompHaus.{u} :=
87+
inducedFunctor _
88+
89+
/-- Construct a term of `Stonean` from a type endowed with the structure of a
90+
compact, Hausdorff and extremally disconnected topological space.
91+
-/
92+
def of (X : Type _) [TopologicalSpace X] [CompactSpace X] [T2Space X]
93+
[ExtremallyDisconnected X] : Stonean :=
94+
⟨⟨⟨X, inferInstance⟩⟩⟩
95+
96+
/-- The forgetful functor `Stonean ⥤ CompHaus` is full. -/
97+
instance : Full toCompHaus where
98+
preimage := fun f => f
99+
100+
101+
/-- The forgetful functor `Stonean ⥤ CompHaus` is faithful. -/
102+
instance : Faithful toCompHaus := {}
103+
104+
/-- Stonean spaces are a concrete category. -/
105+
instance : ConcreteCategory Stonean where
106+
forget := toCompHaus ⋙ forget _
107+
108+
instance : CoeSort Stonean.{u} (Type u) := ConcreteCategory.hasCoeToSort _
109+
instance {X Y : Stonean.{u}} : FunLike (X ⟶ Y) X (fun _ => Y) := ConcreteCategory.funLike
110+
111+
/-- Stonean spaces are topological spaces. -/
112+
instance instTopologicalSpace (X : Stonean.{u}) : TopologicalSpace X :=
113+
show TopologicalSpace X.compHaus from inferInstance
114+
115+
/-- Stonean spaces are compact. -/
116+
instance (X : Stonean.{u}) : CompactSpace X :=
117+
show CompactSpace X.compHaus from inferInstance
118+
119+
/-- Stonean spaces are Hausdorff. -/
120+
instance (X : Stonean.{u}) : T2Space X :=
121+
show T2Space X.compHaus from inferInstance
122+
123+
instance (X : Stonean.{u}) : ExtremallyDisconnected X :=
124+
X.2
125+
126+
/-- The functor from Stonean spaces to profinite spaces. -/
127+
@[simps]
128+
def toProfinite : Stonean.{u} ⥤ Profinite.{u} where
129+
obj X :=
130+
{ toCompHaus := X.compHaus,
131+
IsTotallyDisconnected := show TotallyDisconnectedSpace X from inferInstance }
132+
map f := f
133+
134+
/-- The functor from Stonean spaces to profinite spaces is full. -/
135+
instance : Full toProfinite where
136+
preimage f := f
137+
138+
/-- The functor from Stonean spaces to profinite spaces is faithful. -/
139+
instance : Faithful toProfinite := {}
140+
141+
/-- The functor from Stonean spaces to compact Hausdorff spaces
142+
factors through profinite spaces. -/
143+
example : toProfinite ⋙ profiniteToCompHaus = toCompHaus :=
144+
rfl
145+
146+
end Stonean
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
/-
2+
Copyright (c) 2023 Adam Topaz. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Adam Topaz
5+
-/
6+
import Mathlib.Topology.Category.Stonean.Basic
7+
/-!
8+
# Explicit (co)limits in Extremally disconnected sets
9+
10+
This file describes some explicit (co)limits in `Stonean`
11+
12+
## Overview
13+
14+
We define explicit finite coproducts in `Stonean` as sigma types (disjoint unions).
15+
16+
TODO: Define pullbacks of open embeddings.
17+
18+
-/
19+
20+
open CategoryTheory
21+
22+
namespace Stonean
23+
24+
/-!
25+
This section defines the finite Coproduct of a finite family
26+
of profinite spaces `X : α → Stonean.{u}`
27+
28+
Notes: The content is mainly copied from
29+
`Mathlib/Topology/Category/CompHaus/ExplicitLimits.lean`
30+
-/
31+
section FiniteCoproducts
32+
33+
open Limits
34+
35+
variable {α : Type} [Fintype α] {B : Stonean.{u}}
36+
(X : α → Stonean.{u})
37+
38+
/--
39+
The coproduct of a finite family of objects in `Stonean`, constructed as the disjoint
40+
union with its usual topology.
41+
-/
42+
def finiteCoproduct : Stonean := Stonean.of <| Σ (a : α), X a
43+
44+
/-- The inclusion of one of the factors into the explicit finite coproduct. -/
45+
def finiteCoproduct.ι (a : α) : X a ⟶ finiteCoproduct X where
46+
toFun := fun x => ⟨a,x⟩
47+
continuous_toFun := continuous_sigmaMk (σ := fun a => X a)
48+
49+
/--
50+
To construct a morphism from the explicit finite coproduct, it suffices to
51+
specify a morphism from each of its factors.
52+
This is essentially the universal property of the coproduct.
53+
-/
54+
def finiteCoproduct.desc {B : Stonean.{u}} (e : (a : α) → (X a ⟶ B)) :
55+
finiteCoproduct X ⟶ B where
56+
toFun := fun ⟨a,x⟩ => e a x
57+
continuous_toFun := by
58+
apply continuous_sigma
59+
intro a; exact (e a).continuous
60+
61+
@[reassoc (attr := simp)]
62+
lemma finiteCoproduct.ι_desc {B : Stonean.{u}} (e : (a : α) → (X a ⟶ B)) (a : α) :
63+
finiteCoproduct.ι X a ≫ finiteCoproduct.desc X e = e a := rfl
64+
65+
lemma finiteCoproduct.hom_ext {B : Stonean.{u}} (f g : finiteCoproduct X ⟶ B)
66+
(h : ∀ a : α, finiteCoproduct.ι X a ≫ f = finiteCoproduct.ι X a ≫ g) : f = g := by
67+
ext ⟨a,x⟩
68+
specialize h a
69+
apply_fun (fun q => q x) at h
70+
exact h
71+
72+
/-- The coproduct cocone associated to the explicit finite coproduct. -/
73+
@[simps]
74+
def finiteCoproduct.cocone (F : Discrete α ⥤ Stonean) :
75+
Cocone F where
76+
pt := finiteCoproduct F.obj
77+
ι := Discrete.natTrans fun a => finiteCoproduct.ι F.obj a
78+
79+
/-- The explicit finite coproduct cocone is a colimit cocone. -/
80+
@[simps]
81+
def finiteCoproduct.isColimit (F : Discrete α ⥤ Stonean) :
82+
IsColimit (finiteCoproduct.cocone F) where
83+
desc := fun s => finiteCoproduct.desc _ fun a => s.ι.app a
84+
fac := fun s ⟨a⟩ => finiteCoproduct.ι_desc _ _ _
85+
uniq := fun s m hm => finiteCoproduct.hom_ext _ _ _ fun a => by
86+
specialize hm a
87+
ext t
88+
apply_fun (fun q => q t) at hm
89+
exact hm
90+
91+
/-- The category of extremally disconnected spaces has finite coproducts.
92+
-/
93+
instance hasFiniteCoproducts : HasFiniteCoproducts Stonean.{u} where
94+
out _ := {
95+
has_colimit := fun F => {
96+
exists_colimit := ⟨{
97+
cocone := finiteCoproduct.cocone F
98+
isColimit := finiteCoproduct.isColimit F }⟩ } }
99+
100+
end FiniteCoproducts
101+
102+
end Stonean

Mathlib/Topology/ExtremallyDisconnected.lean

Lines changed: 50 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ spaces.
3434
-/
3535

3636

37-
noncomputable section
38-
3937
open Set
4038

4139
open Classical
@@ -52,6 +50,29 @@ class ExtremallyDisconnected : Prop where
5250
open_closure : ∀ U : Set X, IsOpen U → IsOpen (closure U)
5351
#align extremally_disconnected ExtremallyDisconnected
5452

53+
section TotallySeparated
54+
55+
/-- Extremally disconnected spaces are totally separated. -/
56+
instance [ExtremallyDisconnected X] [T2Space X] : TotallySeparatedSpace X :=
57+
{ isTotallySeparated_univ := by
58+
intro x _ y _ hxy
59+
obtain ⟨U, V, hUV⟩ := T2Space.t2 x y hxy
60+
use closure U
61+
use (closure U)ᶜ
62+
refine ⟨ExtremallyDisconnected.open_closure U hUV.1,
63+
by simp only [isOpen_compl_iff, isClosed_closure], subset_closure hUV.2.2.1, ?_,
64+
by simp only [Set.union_compl_self, Set.subset_univ], disjoint_compl_right⟩
65+
simp only [Set.mem_compl_iff]
66+
rw [mem_closure_iff]
67+
push_neg
68+
refine' ⟨V, ⟨hUV.2.1, hUV.2.2.2.1, _⟩⟩
69+
rw [Set.nonempty_iff_ne_empty]
70+
simp only [not_not]
71+
rw [← Set.disjoint_iff_inter_eq_empty, disjoint_comm]
72+
exact hUV.2.2.2.2 }
73+
74+
end TotallySeparated
75+
5576
section
5677

5778
/-- The assertion `CompactT2.Projective` states that given continuous maps
@@ -117,3 +138,30 @@ protected theorem CompactT2.Projective.extremallyDisconnected [CompactSpace X] [
117138
· rw [← hφ₁ x]
118139
exact hx.1
119140
#align compact_t2.projective.extremally_disconnected CompactT2.Projective.extremallyDisconnected
141+
142+
-- Note: It might be possible to use Gleason for this instead
143+
/-- The sigma-type of extremally disconneted spaces is extremally disconnected -/
144+
instance instExtremallyDisconnected
145+
{π : ι → Type _} [∀ i, TopologicalSpace (π i)] [h₀ : ∀ i, ExtremallyDisconnected (π i)] :
146+
ExtremallyDisconnected (Σi, π i) := by
147+
constructor
148+
intro s hs
149+
rw [isOpen_sigma_iff] at hs ⊢
150+
intro i
151+
rcases h₀ i with ⟨h₀⟩
152+
have h₁ : IsOpen (closure (Sigma.mk i ⁻¹' s))
153+
· apply h₀
154+
exact hs i
155+
suffices h₂ : Sigma.mk i ⁻¹' closure s = closure (Sigma.mk i ⁻¹' s)
156+
· rwa [h₂]
157+
apply IsOpenMap.preimage_closure_eq_closure_preimage
158+
intro U _
159+
· rw [isOpen_sigma_iff]
160+
intro j
161+
by_cases ij : i = j
162+
· rw [← ij]
163+
rw [sigma_mk_preimage_image_eq_self]
164+
assumption
165+
· rw [sigma_mk_preimage_image' ij]
166+
apply isOpen_empty
167+
· continuity

0 commit comments

Comments
 (0)