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

Commit 58d0bfc

Browse files
committed
feat(topology/sheaves): alternate formulation of the sheaf condition (#4190)
Currently the sheaf condition is stated as it often is in textbooks, e.g. https://stacks.math.columbia.edu/tag/0072. That is, it is about an equalizer of the two maps `∏ F.obj (U i) ⟶ ∏ F.obj (U i) ⊓ (U j)`. This PR adds an equivalent formulation, saying that `F.obj (supr U)` (with its natural projection maps) is the limit of the diagram consisting of the `F.obj (U i)` and the `F.obj (U i ⊓ U j)`. I'd like to add further reformulations in subsequent PRs, in particular the nice one I saw in Lurie's SAG, just saying that `F.obj (supr U)` is the limit over the diagram of all `F.obj V` where `V` is an open subset of *some* `U i`. This version is actually much nicer to formalise, and I'm hoping we can translate over quite a lot of what we've already done about the sheaf condition to that version Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
1 parent b4641ef commit 58d0bfc

File tree

10 files changed

+789
-240
lines changed

10 files changed

+789
-240
lines changed

src/algebraic_geometry/sheafed_space.lean

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ namespace algebraic_geometry
3333

3434
/-- A `SheafedSpace C` is a topological space equipped with a sheaf of `C`s. -/
3535
structure SheafedSpace extends PresheafedSpace C :=
36-
(sheaf_condition : sheaf_condition presheaf)
36+
(sheaf_condition : presheaf.sheaf_condition)
3737

3838
variables {C}
3939

@@ -55,7 +55,7 @@ instance (X : SheafedSpace.{v} C) : topological_space X := X.carrier.str
5555
/-- The trivial `punit` valued sheaf on any topological space. -/
5656
noncomputable
5757
def punit (X : Top) : SheafedSpace (discrete punit) :=
58-
{ sheaf_condition := sheaf_condition_punit _,
58+
{ sheaf_condition := presheaf.sheaf_condition_punit _,
5959
..@PresheafedSpace.const (discrete punit) _ X punit.star }
6060

6161
noncomputable
@@ -101,6 +101,8 @@ def forget : SheafedSpace C ⥤ Top :=
101101

102102
end
103103

104+
open Top.presheaf
105+
104106
/--
105107
The restriction of a sheafed space along an open embedding into the space.
106108
-/
@@ -109,7 +111,7 @@ def restrict {U : Top} (X : SheafedSpace C)
109111
(f : U ⟶ (X : Top.{v})) (h : open_embedding f) : SheafedSpace C :=
110112
{ sheaf_condition := λ ι 𝒰, is_limit.of_iso_limit
111113
((is_limit.postcompose_inv_equiv _ _).inv_fun (X.sheaf_condition _))
112-
(sheaf_condition.fork.iso_of_open_embedding h 𝒰).symm,
114+
(sheaf_condition_equalizer_products.fork.iso_of_open_embedding h 𝒰).symm,
113115
..X.to_PresheafedSpace.restrict f h }
114116

115117
/--

src/algebraic_geometry/structure_sheaf.lean

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,8 @@ nat_iso.of_components
307307
(λ U, iso.refl _)
308308
(by tidy)
309309

310+
open Top.presheaf
311+
310312
/--
311313
The structure sheaf on $Spec R$, valued in `CommRing`.
312314
Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
import topology.sheaves.sheaf
2+
import category_theory.limits.preserves.basic
3+
4+
/-!
5+
# The category of "pairwise intersections".
6+
7+
Given `ι : Type v`, we build the diagram category `pairwise ι`
8+
with objects `single i` and `pair i j`, for `i j : ι`,
9+
whose only non-identity morphisms are
10+
`left : single i ⟶ pair i j` and `right : single j ⟶ pair i j`.
11+
12+
We use this later in describing the sheaf condition.
13+
14+
Given any function `U : ι → α`, where `α` is some complete lattice (e.g. `opens X`),
15+
we produce a functor `pairwise ι ⥤ αᵒᵖ` in the obvious way,
16+
and show that `supr U` provides a limit cone over this functor.
17+
-/
18+
19+
noncomputable theory
20+
21+
universes v u
22+
23+
open topological_space
24+
open Top
25+
open opposite
26+
open category_theory
27+
open category_theory.limits
28+
29+
namespace category_theory
30+
31+
/--
32+
An inductive type representing either a single term of a type `ι`, or a pair of terms.
33+
We use this as the objects of a category to describe the sheaf condition.
34+
-/
35+
inductive pairwise (ι : Type v)
36+
| single : ι → pairwise
37+
| pair : ι → ι → pairwise
38+
39+
variables {ι : Type v}
40+
41+
namespace pairwise
42+
43+
instance pairwise_inhabited [inhabited ι] : inhabited (pairwise ι) := ⟨single (default ι)⟩
44+
45+
/--
46+
Morphisms in the category `pairwise ι`. The only non-identity morphisms are
47+
`left i j : single i ⟶ pair i j` and `right i j : single j ⟶ pair i j`.
48+
-/
49+
inductive hom : pairwise ι → pairwise ι → Type v
50+
| id_single : Π i, hom (single i) (single i)
51+
| id_pair : Π i j, hom (pair i j) (pair i j)
52+
| left : Π i j, hom (single i) (pair i j)
53+
| right : Π i j, hom (single j) (pair i j)
54+
55+
open hom
56+
57+
instance hom_inhabited [inhabited ι] : inhabited (hom (single (default ι)) (single (default ι))) :=
58+
⟨id_single (default ι)⟩
59+
60+
/--
61+
The identity morphism in `pairwise ι`.
62+
-/
63+
def id : Π (o : pairwise ι), hom o o
64+
| (single i) := id_single i
65+
| (pair i j) := id_pair i j
66+
67+
/-- Composition of morphisms in `pairwise ι`. -/
68+
def comp : Π {o₁ o₂ o₃ : pairwise ι} (f : hom o₁ o₂) (g : hom o₂ o₃), hom o₁ o₃
69+
| _ _ _ (id_single i) g := g
70+
| _ _ _ (id_pair i j) g := g
71+
| _ _ _ (left i j) (id_pair _ _) := left i j
72+
| _ _ _ (right i j) (id_pair _ _) := right i j
73+
74+
section
75+
local attribute [tidy] tactic.case_bash
76+
77+
instance : category (pairwise ι) :=
78+
{ hom := hom,
79+
id := id,
80+
comp := λ X Y Z f g, comp f g, }
81+
82+
end
83+
84+
variables {α : Type v} (U : ι → α)
85+
86+
section
87+
variables [semilattice_inf α]
88+
89+
/-- Auxilliary definition for `diagram`. -/
90+
@[simp]
91+
def diagram_obj : pairwise ι → αᵒᵖ
92+
| (single i) := op (U i)
93+
| (pair i j) := op (U i ⊓ U j)
94+
95+
/-- Auxilliary definition for `diagram`. -/
96+
@[simp]
97+
def diagram_map : Π {o₁ o₂ : pairwise ι} (f : o₁ ⟶ o₂), diagram_obj U o₁ ⟶ diagram_obj U o₂
98+
| _ _ (id_single i) := 𝟙 _
99+
| _ _ (id_pair i j) := 𝟙 _
100+
| _ _ (left i j) := (hom_of_le inf_le_left).op
101+
| _ _ (right i j) := (hom_of_le inf_le_right).op
102+
103+
/--
104+
Given a function `U : ι → α` for `[semilattice_inf α]`, we obtain a functor `pairwise ι ⥤ αᵒᵖ`,
105+
sending `single i` to `op (U i)` and `pair i j` to `op (U i ⊓ U j)`,
106+
and the morphisms to the obvious inequalities.
107+
-/
108+
@[simps]
109+
def diagram : pairwise ι ⥤ αᵒᵖ :=
110+
{ obj := diagram_obj U,
111+
map := λ X Y f, diagram_map U f, }
112+
113+
end
114+
115+
section
116+
-- `complete_lattice` is not really needed, as we only ever use `inf`,
117+
-- but the appropriate structure has not been defined.
118+
variables [complete_lattice α]
119+
120+
/-- Auxilliary definition for `cone`. -/
121+
def cone_π_app : Π (o : pairwise ι), op (supr U) ⟶ diagram_obj U o
122+
| (single i) := (hom_of_le (le_supr _ _)).op
123+
| (pair i j) := (hom_of_le inf_le_left ≫ hom_of_le (le_supr U i)).op
124+
125+
/--
126+
Given a function `U : ι → α` for `[complete_lattice α]`,
127+
`supr U` provides a cone over `diagram U`.
128+
-/
129+
@[simps]
130+
def cone : cone (diagram U) :=
131+
{ X := op (supr U),
132+
π := { app := cone_π_app U, } }
133+
134+
/--
135+
Given a function `U : ι → α` for `[complete_lattice α]`,
136+
`supr U` provides a limit cone over `diagram U`.
137+
-/
138+
def cone_is_limit : is_limit (cone U) :=
139+
{ lift := λ s, op_hom_of_le
140+
begin
141+
apply complete_lattice.Sup_le,
142+
rintros _ ⟨j, rfl⟩,
143+
exact le_of_op_hom (s.π.app (single j))
144+
end }
145+
146+
end
147+
148+
end pairwise
149+
150+
end category_theory

src/category_theory/opposites.lean

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,4 +303,14 @@ rfl
303303
lemma op_equiv_symm_apply (A B : Cᵒᵖ) (f : B.unop ⟶ A.unop) : (op_equiv _ _).symm f = f.op :=
304304
rfl
305305

306+
universes v
307+
variables {α : Type v} [preorder α]
308+
309+
/-- Construct a morphism in the opposite of a preorder category from an inequality. -/
310+
def op_hom_of_le {U V : αᵒᵖ} (h : unop V ≤ unop U) : U ⟶ V :=
311+
has_hom.hom.op (hom_of_le h)
312+
313+
lemma le_of_op_hom {U V : αᵒᵖ} (h : U ⟶ V) : unop V ≤ unop U :=
314+
le_of_hom (h.unop)
315+
306316
end category_theory

src/topology/sheaves/forget.lean

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,12 @@ open opposite
3434

3535
namespace Top
3636

37+
namespace presheaf
38+
3739
namespace sheaf_condition
3840

41+
open sheaf_condition_equalizer_products
42+
3943
universes v u₁ u₂
4044

4145
variables {C : Type u₁} [category.{v} C] [has_limits C]
@@ -44,15 +48,14 @@ variables (G : C ⥤ D) [preserves_limits G]
4448
variables {X : Top.{v}} (F : presheaf C X)
4549
variables {ι : Type v} (U : ι → opens X)
4650

47-
local attribute [reducible] sheaf_condition.diagram
48-
local attribute [reducible] sheaf_condition.left_res sheaf_condition.right_res
51+
local attribute [reducible] diagram left_res right_res
4952

5053
/--
5154
When `G` preserves limits, the sheaf condition diagram for `F` composed with `G` is
5255
naturally isomorphic to the sheaf condition diagram for `F ⋙ G`.
5356
-/
5457
def diagram_comp_preserves_limits :
55-
sheaf_condition.diagram F U ⋙ G ≅ sheaf_condition.diagram (F ⋙ G) U :=
58+
diagram F U ⋙ G ≅ diagram (F ⋙ G) U :=
5659
begin
5760
fapply nat_iso.of_components,
5861
rintro ⟨j⟩,
@@ -71,16 +74,15 @@ begin
7174
{ ext, simp, dsimp, simp, },
7275
end
7376

74-
local attribute [reducible] sheaf_condition.res
77+
local attribute [reducible] res
7578

7679
/--
7780
When `G` preserves limits, the image under `G` of the sheaf condition fork for `F`
7881
is the sheaf condition fork for `F ⋙ G`,
7982
postcomposed with the inverse of the natural isomorphism `diagram_comp_preserves_limits`.
8083
-/
81-
def map_cone_fork : G.map_cone (sheaf_condition.fork F U) ≅
82-
(cones.postcompose (diagram_comp_preserves_limits G F U).inv).obj
83-
(sheaf_condition.fork (F ⋙ G) U) :=
84+
def map_cone_fork : G.map_cone (fork F U) ≅
85+
(cones.postcompose (diagram_comp_preserves_limits G F U).inv).obj (fork (F ⋙ G) U) :=
8486
cones.ext (iso.refl _) (λ j,
8587
begin
8688
dsimp, simp [diagram_comp_preserves_limits], cases j; dsimp,
@@ -98,7 +100,7 @@ end sheaf_condition
98100

99101
universes v u₁ u₂
100102

101-
open sheaf_condition
103+
open sheaf_condition sheaf_condition_equalizer_products
102104

103105
variables {C : Type u₁} [category.{v} C] {D : Type u₂} [category.{v} D]
104106
variables (G : C ⥤ D)
@@ -158,7 +160,7 @@ begin
158160
-- we note that `G.map f` is almost but not quite (see below) a morphism
159161
-- from the sheaf condition cone for `F ⋙ G` to the
160162
-- image under `G` of the equalizer cone for the sheaf condition diagram.
161-
let c := sheaf_condition.fork (F ⋙ G) U,
163+
let c := fork (F ⋙ G) U,
162164
have hc : is_limit c := S U,
163165
let d := G.map_cone (equalizer.fork (left_res F U) (right_res F U)),
164166
have hd : is_limit d := preserves_limit.preserves (limit.is_limit _),
@@ -202,4 +204,6 @@ example (X : Top) (F : presheaf CommRing X) (h : sheaf_condition (F ⋙ (forget
202204
```
203205
-/
204206

207+
end presheaf
208+
205209
end Top

src/topology/sheaves/local_predicate.lean

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,8 @@ into the presheaf of all functions.
159159
def subtype : subpresheaf_to_Types P ⟶ presheaf_to_Types X T :=
160160
{ app := λ U f, f.1 }
161161

162-
open Top.sheaf_condition
162+
open Top.presheaf
163+
open Top.presheaf.sheaf_condition_equalizer_products
163164

164165
/--
165166
The natural transformation
@@ -285,8 +286,8 @@ begin
285286
-- the fact that the underlying presheaf is a presheaf of functions satisfying the predicate.
286287
let s' := (cones.postcompose (diagram_subtype P.to_prelocal_predicate U)).obj s,
287288
have fac_i := ((to_Types X T U).fac s' walking_parallel_pair.zero) =≫ pi.π _ i,
288-
simp only [sheaf_condition.res, limit.lift_π, cones.postcompose_obj_π,
289-
sheaf_condition.fork_π_app_walking_parallel_pair_zero, fan.mk_π_app,
289+
simp only [sheaf_condition_equalizer_products.res, limit.lift_π, cones.postcompose_obj_π,
290+
sheaf_condition_equalizer_products.fork_π_app_walking_parallel_pair_zero, fan.mk_π_app,
290291
nat_trans.comp_app, category.assoc] at fac_i,
291292
have fac_i_f := congr_fun fac_i f,
292293
simp only [diagram_subtype, discrete.nat_trans_app, types_comp_apply,
@@ -406,7 +407,7 @@ The sheaf of continuous functions on `X` with values in a space `T`.
406407
def sheaf_to_Top (T : Top.{v}) : sheaf (Type v) X :=
407408
{ presheaf := presheaf_to_Top X T,
408409
sheaf_condition :=
409-
sheaf_condition_equiv_of_iso (subpresheaf_continuous_prelocal_iso_presheaf_to_Top T)
410+
presheaf.sheaf_condition_equiv_of_iso (subpresheaf_continuous_prelocal_iso_presheaf_to_Top T)
410411
(subpresheaf_to_Types.sheaf_condition (continuous_local X T)), }
411412

412413
end Top

0 commit comments

Comments
 (0)