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

Commit f384f5d

Browse files
alreadydoneerdOne
andcommitted
refactor(topology/sheaf_condition): remove has_products for restriction to open subspace (#17361)
Co-authored-by: erd1 <the.erd.one@gmail.com> Co-authored-by: Andrew Yang <36414270+erdOne@users.noreply.github.com>
1 parent 946ab79 commit f384f5d

File tree

7 files changed

+55
-121
lines changed

7 files changed

+55
-121
lines changed

src/algebraic_geometry/open_immersion.lean

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,7 @@ class PresheafedSpace.is_open_immersion {X Y : PresheafedSpace.{v} C} (f : X ⟶
7777
A morphism of SheafedSpaces is an open immersion if it is an open immersion as a morphism
7878
of PresheafedSpaces
7979
-/
80-
abbreviation SheafedSpace.is_open_immersion
81-
[has_products.{v} C] {X Y : SheafedSpace.{v} C} (f : X ⟶ Y) : Prop :=
80+
abbreviation SheafedSpace.is_open_immersion {X Y : SheafedSpace.{v} C} (f : X ⟶ Y) : Prop :=
8281
PresheafedSpace.is_open_immersion f
8382

8483
/--
@@ -539,7 +538,7 @@ open category_theory.limits.walking_cospan
539538

540539
section to_SheafedSpace
541540

542-
variables [has_products.{v} C] {X : PresheafedSpace.{v} C} (Y : SheafedSpace C)
541+
variables {X : PresheafedSpace.{v} C} (Y : SheafedSpace C)
543542
variables (f : X ⟶ Y.to_PresheafedSpace) [H : is_open_immersion f]
544543

545544
include H
@@ -630,8 +629,6 @@ end PresheafedSpace.is_open_immersion
630629

631630
namespace SheafedSpace.is_open_immersion
632631

633-
variables [has_products.{v} C]
634-
635632
@[priority 100]
636633
instance of_is_iso {X Y : SheafedSpace.{v} C} (f : X ⟶ Y) [is_iso f] :
637634
SheafedSpace.is_open_immersion f :=

src/algebraic_geometry/sheafed_space.lean

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ open opposite
2525
open category_theory.limits
2626
open category_theory.category category_theory.functor
2727

28-
variables (C : Type u) [category.{v} C] [has_products.{v} C]
28+
variables (C : Type u) [category.{v} C]
2929

3030
local attribute [tidy] tactic.op_induction'
3131

@@ -119,10 +119,7 @@ The restriction of a sheafed space along an open embedding into the space.
119119
-/
120120
def restrict {U : Top} (X : SheafedSpace C)
121121
{f : U ⟶ (X : Top.{v})} (h : open_embedding f) : SheafedSpace C :=
122-
{ is_sheaf := (is_sheaf_iff_is_sheaf_equalizer_products _).mpr $ λ ι 𝒰, ⟨is_limit.of_iso_limit
123-
((is_limit.postcompose_inv_equiv _ _).inv_fun
124-
((is_sheaf_iff_is_sheaf_equalizer_products _).mp X.is_sheaf _).some)
125-
(sheaf_condition_equalizer_products.fork.iso_of_open_embedding h 𝒰).symm⟩,
122+
{ is_sheaf := is_sheaf_of_open_embedding h X.is_sheaf,
126123
..X.to_PresheafedSpace.restrict h }
127124

128125
/--

src/category_theory/sites/cover_preserving.lean

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,18 @@ begin
162162
exact hx (c'.π.app left).right (c'.π.app right).right hg₁ hg₂ (e₁.symm.trans e₂)
163163
end
164164

165+
lemma compatible_preserving_of_downwards_closed (F : C ⥤ D) [full F] [faithful F]
166+
(hF : ∀ {c : C} {d : D} (f : d ⟶ F.obj c), Σ c', F.obj c' ≅ d) : compatible_preserving K F :=
167+
begin
168+
constructor,
169+
introv hx he,
170+
obtain ⟨X', e⟩ := hF f₁,
171+
apply (ℱ.1.map_iso e.op).to_equiv.injective,
172+
simp only [iso.op_hom, iso.to_equiv_fun, ℱ.1.map_iso_hom, ← functor_to_types.map_comp_apply],
173+
simpa using hx (F.preimage $ e.hom ≫ f₁) (F.preimage $ e.hom ≫ f₂) hg₁ hg₂
174+
(F.map_injective $ by simpa using he),
175+
end
176+
165177
/--
166178
If `G` is cover-preserving and compatible-preserving,
167179
then `G.op ⋙ _` pulls sheaves back to sheaves.

src/topology/sheaves/sheaf_condition/equalizer_products.lean

Lines changed: 0 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -146,110 +146,6 @@ begin
146146
simp [res, diagram.iso_of_iso], }
147147
end
148148

149-
section open_embedding
150-
151-
variables {V : Top.{v'}} {j : V ⟶ X} (oe : open_embedding j)
152-
variables (𝒰 : ι → opens V)
153-
154-
/--
155-
Push forward a cover along an open embedding.
156-
-/
157-
@[simp]
158-
def cover.of_open_embedding : ι → opens X := (λ i, oe.is_open_map.functor.obj (𝒰 i))
159-
160-
/--
161-
The isomorphism between `pi_opens` corresponding to an open embedding.
162-
-/
163-
@[simp]
164-
def pi_opens.iso_of_open_embedding :
165-
pi_opens (oe.is_open_map.functor.op ⋙ F) 𝒰 ≅ pi_opens F (cover.of_open_embedding oe 𝒰) :=
166-
pi.map_iso (λ X, F.map_iso (iso.refl _))
167-
168-
/--
169-
The isomorphism between `pi_inters` corresponding to an open embedding.
170-
-/
171-
@[simp]
172-
def pi_inters.iso_of_open_embedding :
173-
pi_inters (oe.is_open_map.functor.op ⋙ F) 𝒰 ≅ pi_inters F (cover.of_open_embedding oe 𝒰) :=
174-
pi.map_iso (λ X, F.map_iso
175-
begin
176-
dsimp [is_open_map.functor],
177-
exact iso.op
178-
{ hom := hom_of_le (by
179-
{ simp only [oe.to_embedding.inj, set.image_inter],
180-
exact le_rfl, }),
181-
inv := hom_of_le (by
182-
{ simp only [oe.to_embedding.inj, set.image_inter],
183-
exact le_rfl, }), },
184-
end)
185-
186-
/-- The isomorphism of sheaf condition diagrams corresponding to an open embedding. -/
187-
def diagram.iso_of_open_embedding :
188-
diagram (oe.is_open_map.functor.op ⋙ F) 𝒰 ≅ diagram F (cover.of_open_embedding oe 𝒰) :=
189-
nat_iso.of_components
190-
begin
191-
rintro ⟨⟩,
192-
exact pi_opens.iso_of_open_embedding oe 𝒰,
193-
exact pi_inters.iso_of_open_embedding oe 𝒰
194-
end
195-
begin
196-
rintro ⟨⟩ ⟨⟩ ⟨⟩,
197-
{ simp, },
198-
{ ext,
199-
dsimp [left_res, is_open_map.functor],
200-
simp only [limit.lift_π, cones.postcompose_obj_π, iso.op_hom, discrete.nat_iso_hom_app,
201-
functor.map_iso_refl, functor.map_iso_hom, lim_map_π_assoc, limit.lift_map, fan.mk_π_app,
202-
nat_trans.comp_app, category.assoc],
203-
dsimp,
204-
rw [category.id_comp, ←F.map_comp],
205-
refl, },
206-
{ ext,
207-
dsimp [right_res, is_open_map.functor],
208-
simp only [limit.lift_π, cones.postcompose_obj_π, iso.op_hom, discrete.nat_iso_hom_app,
209-
functor.map_iso_refl, functor.map_iso_hom, lim_map_π_assoc, limit.lift_map, fan.mk_π_app,
210-
nat_trans.comp_app, category.assoc],
211-
dsimp,
212-
rw [category.id_comp, ←F.map_comp],
213-
refl, },
214-
{ simp, },
215-
end.
216-
217-
/--
218-
If `F : presheaf C X` is a presheaf, and `oe : U ⟶ X` is an open embedding,
219-
then the sheaf condition fork for a cover `𝒰` in `U` for the composition of `oe` and `F` is
220-
isomorphic to sheaf condition fork for `oe '' 𝒰`, precomposed with the isomorphism
221-
of indexing diagrams `diagram.iso_of_open_embedding`.
222-
223-
We use this to show that the restriction of sheaf along an open embedding is still a sheaf.
224-
-/
225-
def fork.iso_of_open_embedding :
226-
fork (oe.is_open_map.functor.op ⋙ F) 𝒰 ≅
227-
(cones.postcompose (diagram.iso_of_open_embedding oe 𝒰).inv).obj
228-
(fork F (cover.of_open_embedding oe 𝒰)) :=
229-
begin
230-
fapply fork.ext,
231-
{ dsimp [is_open_map.functor],
232-
exact
233-
F.map_iso (iso.op
234-
{ hom := hom_of_le
235-
(by simp only [coe_supr, supr_mk, le_def, subtype.coe_mk, set.le_eq_subset, set.image_Union]),
236-
inv := hom_of_le
237-
(by simp only [coe_supr, supr_mk, le_def, subtype.coe_mk, set.le_eq_subset,
238-
set.image_Union]) }), },
239-
{ ext ⟨j⟩,
240-
dunfold fork.ι, -- Ugh, it is unpleasant that we need this.
241-
simp only [res, diagram.iso_of_open_embedding, discrete.nat_iso_inv_app, functor.map_iso_inv,
242-
limit.lift_π, cones.postcompose_obj_π, functor.comp_map,
243-
fork_π_app_walking_parallel_pair_zero, pi_opens.iso_of_open_embedding,
244-
nat_iso.of_components_inv_app, functor.map_iso_refl, functor.op_map, limit.lift_map,
245-
fan.mk_π_app, nat_trans.comp_app, quiver.hom.unop_op, category.assoc, lim_map_eq_lim_map],
246-
dsimp,
247-
rw [category.comp_id, ←F.map_comp],
248-
refl, },
249-
end
250-
251-
end open_embedding
252-
253149
end sheaf_condition_equalizer_products
254150

255151
/--

src/topology/sheaves/sheaf_condition/opens_le_cover.lean

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,9 +261,8 @@ variables {Y : opens X} (hY : Y = supr U)
261261
associated to the sieve generated by the presieve associated to `U` with indexing
262262
category changed using the above equivalence. -/
263263
@[simps] def whisker_iso_map_generate_cocone :
264-
cone.whisker (generate_equivalence_opens_le U hY).op.functor
265-
(F.map_cone (opens_le_cover_cocone U).op) ≅
266-
F.map_cone (sieve.generate (presieve_of_covering_aux U Y)).arrows.cocone.op :=
264+
(F.map_cone (opens_le_cover_cocone U).op).whisker (generate_equivalence_opens_le U hY).op.functor
265+
≅ F.map_cone (sieve.generate (presieve_of_covering_aux U Y)).arrows.cocone.op :=
267266
{ hom :=
268267
{ hom := F.map (eq_to_hom (congr_arg op hY.symm)),
269268
w' := λ j, by { erw ← F.map_comp, congr } },

src/topology/sheaves/sheaf_condition/pairwise_intersections.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ def is_sheaf_preserves_limit_pairwise_intersections (F : presheaf C X) : Prop :=
7575
end
7676

7777
/-!
78-
The remainder of this file shows that these conditions are equivalent
79-
to the usual sheaf condition.
78+
The next part of this file shows that these conditions are equivalent
79+
to the "equalizer products" sheaf condition.
8080
-/
8181

8282
variables {X : Top.{v}} [has_products.{v} C]
@@ -89,8 +89,8 @@ open sheaf_condition_equalizer_products
8989
/-- Implementation of `sheaf_condition_pairwise_intersections.cone_equiv`. -/
9090
@[simps]
9191
def cone_equiv_functor_obj (F : presheaf C X)
92-
⦃ι : Type v⦄ (U : ι → opens ↥X) (c : limits.cone ((diagram U).op ⋙ F)) :
93-
limits.cone (sheaf_condition_equalizer_products.diagram F U) :=
92+
⦃ι : Type v⦄ (U : ι → opens ↥X) (c : cone ((diagram U).op ⋙ F)) :
93+
cone (sheaf_condition_equalizer_products.diagram F U) :=
9494
{ X := c.X,
9595
π :=
9696
{ app := λ Z,

src/topology/sheaves/sheaf_condition/sites.lean

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,39 @@ lemma cover_dense_induced_functor {B : ι → opens X} (h : opens.is_basis (set.
482482

483483
end Top.opens
484484

485+
section open_embedding
486+
487+
open category_theory topological_space Top.presheaf opposite
488+
489+
variables {C : Type u} [category.{v} C]
490+
variables {X Y : Top.{w}} {f : X ⟶ Y} {F : Y.presheaf C}
491+
492+
lemma open_embedding.compatible_preserving (hf : open_embedding f) :
493+
compatible_preserving (opens.grothendieck_topology Y) hf.is_open_map.functor :=
494+
begin
495+
haveI : mono f := (Top.mono_iff_injective f).mpr hf.inj,
496+
apply compatible_preserving_of_downwards_closed,
497+
intros U V i,
498+
refine ⟨(opens.map f).obj V, eq_to_iso $ opens.ext $ set.image_preimage_eq_of_subset $ λ x h, _⟩,
499+
obtain ⟨_, _, rfl⟩ := i.le h,
500+
exact ⟨_, rfl⟩
501+
end
502+
503+
lemma is_open_map.cover_preserving (hf : is_open_map f) :
504+
cover_preserving (opens.grothendieck_topology X) (opens.grothendieck_topology Y) hf.functor :=
505+
begin
506+
constructor,
507+
rintros U S hU _ ⟨x, hx, rfl⟩,
508+
obtain ⟨V, i, hV, hxV⟩ := hU x hx,
509+
exact ⟨_, hf.functor.map i, ⟨_, i, 𝟙 _, hV, rfl⟩, set.mem_image_of_mem f hxV⟩
510+
end
511+
512+
lemma Top.presheaf.is_sheaf_of_open_embedding (h : open_embedding f)
513+
(hF : F.is_sheaf) : is_sheaf (h.is_open_map.functor.op ⋙ F) :=
514+
pullback_is_sheaf_of_cover_preserving h.compatible_preserving h.is_open_map.cover_preserving ⟨_, hF⟩
515+
516+
end open_embedding
517+
485518
namespace Top.sheaf
486519

487520
open category_theory topological_space Top opposite

0 commit comments

Comments
 (0)