Skip to content

Commit d010c13

Browse files
committed
feat: port CategoryTheory.Sites.Spaces (#3111)
Co-authored-by: Moritz Firsching <firsching@google.com>
1 parent 780abda commit d010c13

File tree

2 files changed

+108
-0
lines changed

2 files changed

+108
-0
lines changed

Mathlib.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,7 @@ import Mathlib.CategoryTheory.SingleObj
471471
import Mathlib.CategoryTheory.Sites.Grothendieck
472472
import Mathlib.CategoryTheory.Sites.Pretopology
473473
import Mathlib.CategoryTheory.Sites.Sieves
474+
import Mathlib.CategoryTheory.Sites.Spaces
474475
import Mathlib.CategoryTheory.Skeletal
475476
import Mathlib.CategoryTheory.StructuredArrow
476477
import Mathlib.CategoryTheory.Sums.Associator
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
/-
2+
Copyright (c) 2020 Bhavik Mehta. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Bhavik Mehta
5+
6+
! This file was ported from Lean 3 source module category_theory.sites.spaces
7+
! leanprover-community/mathlib commit b6fa3beb29f035598cf0434d919694c5e98091eb
8+
! Please do not edit these lines, except to modify the commit id
9+
! if you have ported upstream changes.
10+
-/
11+
import Mathlib.CategoryTheory.Sites.Grothendieck
12+
import Mathlib.CategoryTheory.Sites.Pretopology
13+
import Mathlib.CategoryTheory.Limits.Lattice
14+
import Mathlib.Topology.Sets.Opens
15+
16+
/-!
17+
# Grothendieck topology on a topological space
18+
19+
Define the Grothendieck topology and the pretopology associated to a topological space, and show
20+
that the pretopology induces the topology.
21+
22+
The covering (pre)sieves on `X` are those for which the union of domains contains `X`.
23+
24+
## Tags
25+
26+
site, Grothendieck topology, space
27+
28+
## References
29+
30+
* [nLab, *Grothendieck topology*](https://ncatlab.org/nlab/show/Grothendieck+topology)
31+
* [S. MacLane, I. Moerdijk, *Sheaves in Geometry and Logic*][MM92]
32+
33+
## Implementation notes
34+
35+
We define the two separately, rather than defining the Grothendieck topology as that generated
36+
by the pretopology for the purpose of having nice definitional properties for the sieves.
37+
-/
38+
39+
40+
universe u
41+
42+
namespace Opens
43+
44+
variable (T : Type u) [TopologicalSpace T]
45+
46+
open CategoryTheory TopologicalSpace CategoryTheory.Limits
47+
48+
/-- The Grothendieck topology associated to a topological space. -/
49+
def grothendieckTopology : GrothendieckTopology (Opens T)
50+
where
51+
sieves X S := ∀ x ∈ X, ∃ (U : _)(f : U ⟶ X), S f ∧ x ∈ U
52+
top_mem' X x hx := ⟨_, 𝟙 _, trivial, hx⟩
53+
pullback_stable' X Y S f hf y hy :=
54+
by
55+
rcases hf y (f.le hy) with ⟨U, g, hg, hU⟩
56+
refine' ⟨U ⊓ Y, homOfLE inf_le_right, _, hU, hy⟩
57+
apply S.downward_closed hg (homOfLE inf_le_left)
58+
transitive' X S hS R hR x hx :=
59+
by
60+
rcases hS x hx with ⟨U, f, hf, hU⟩
61+
rcases hR hf _ hU with ⟨V, g, hg, hV⟩
62+
exact ⟨_, g ≫ f, hg, hV⟩
63+
#align opens.grothendieck_topology Opens.grothendieckTopology
64+
65+
/-- The Grothendieck pretopology associated to a topological space. -/
66+
def pretopology : Pretopology (Opens T)
67+
where
68+
coverings X R := ∀ x ∈ X, ∃ (U : _)(f : U ⟶ X), R f ∧ x ∈ U
69+
has_isos X Y f i x hx := ⟨_, _, Presieve.singleton_self _, (inv f).le hx⟩
70+
pullbacks X Y f S hS x hx :=
71+
by
72+
rcases hS _ (f.le hx) with ⟨U, g, hg, hU⟩
73+
refine' ⟨_, _, Presieve.pullbackArrows.mk _ _ hg, _⟩
74+
have : U ⊓ Y ≤ pullback g f
75+
refine' leOfHom (pullback.lift (homOfLE inf_le_left) (homOfLE inf_le_right) rfl)
76+
apply this ⟨hU, hx⟩
77+
Transitive X S Ti hS hTi x hx :=
78+
by
79+
rcases hS x hx with ⟨U, f, hf, hU⟩
80+
rcases hTi f hf x hU with ⟨V, g, hg, hV⟩
81+
exact ⟨_, _, ⟨_, g, f, hf, hg, rfl⟩, hV⟩
82+
#align opens.pretopology Opens.pretopology
83+
84+
/-- The pretopology associated to a space is the largest pretopology that
85+
generates the Grothendieck topology associated to the space. -/
86+
@[simp]
87+
theorem pretopology_ofGrothendieck :
88+
Pretopology.ofGrothendieck _ (Opens.grothendieckTopology T) = Opens.pretopology T := by
89+
apply le_antisymm
90+
· intro X R hR x hx
91+
rcases hR x hx with ⟨U, f, ⟨V, g₁, g₂, hg₂, _⟩, hU⟩
92+
exact ⟨V, g₂, hg₂, g₁.le hU⟩
93+
· intro X R hR x hx
94+
rcases hR x hx with ⟨U, f, hf, hU⟩
95+
exact ⟨U, f, Sieve.le_generate R U hf, hU⟩
96+
#align opens.pretopology_of_grothendieck Opens.pretopology_ofGrothendieck
97+
98+
/-- The pretopology associated to a space induces the Grothendieck topology associated to the space.
99+
-/
100+
@[simp]
101+
theorem pretopology_toGrothendieck :
102+
Pretopology.toGrothendieck _ (Opens.pretopology T) = Opens.grothendieckTopology T := by
103+
rw [← pretopology_ofGrothendieck]
104+
apply (Pretopology.gi (Opens T)).l_u_eq
105+
#align opens.pretopology_to_grothendieck Opens.pretopology_toGrothendieck
106+
107+
end Opens

0 commit comments

Comments
 (0)