Skip to content

Commit c5fdf19

Browse files
committed
feat(Algebra/Category/ModuleCat/Sheaf): O_S ⟶ f_* O_X and f^* O_S ≅ O_X (#30398)
1 parent 7a8ea2b commit c5fdf19

File tree

5 files changed

+195
-5
lines changed

5 files changed

+195
-5
lines changed

Mathlib.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ import Mathlib.Algebra.Category.ModuleCat.Sheaf.Free
185185
import Mathlib.Algebra.Category.ModuleCat.Sheaf.Generators
186186
import Mathlib.Algebra.Category.ModuleCat.Sheaf.Limits
187187
import Mathlib.Algebra.Category.ModuleCat.Sheaf.PullbackContinuous
188+
import Mathlib.Algebra.Category.ModuleCat.Sheaf.PullbackFree
188189
import Mathlib.Algebra.Category.ModuleCat.Sheaf.PushforwardContinuous
189190
import Mathlib.Algebra.Category.ModuleCat.Sheaf.Quasicoherent
190191
import Mathlib.Algebra.Category.ModuleCat.Simple

Mathlib/Algebra/Category/ModuleCat/Sheaf/Free.lean

Lines changed: 37 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ a type `I` to the coproduct of copies indexed by `I` of `unit R`.
1818
* In case the category `C` has a terminal object `X`, promote `freeHomEquiv`
1919
into an adjunction between `freeFunctor` and the evaluation functor at `X`.
2020
(Alternatively, assuming specific universe parameters, we could show that
21-
`freeHomEquiv` is a left adjoint to `SheafOfModules.sectionsFunctor`.)
21+
`freeFunctor` is a left adjoint to `SheafOfModules.sectionsFunctor`.)
2222
2323
-/
2424

@@ -34,14 +34,33 @@ namespace SheafOfModules
3434
/-- The free sheaf of modules on a certain type `I`. -/
3535
noncomputable def free (I : Type u) : SheafOfModules.{u} R := ∐ (fun (_ : I) ↦ unit R)
3636

37+
/-- The inclusions `unit R ⟶ free I`. -/
38+
noncomputable def ιFree {I : Type u} (i : I) : unit R ⟶ free I :=
39+
Sigma.ι (fun (_ : I) ↦ unit R) i
40+
41+
42+
/-- The tautological cofan with point `free I : SheafOfModules R`. -/
43+
noncomputable def freeCofan (I : Type u) : Cofan (fun (_ : I) ↦ unit R) :=
44+
Cofan.mk (P := free I) ιFree
45+
46+
@[simp]
47+
lemma freeCofan_inj {I : Type u} (i : I) :
48+
(freeCofan (R := R) I).inj i = ιFree i := rfl
49+
50+
/-- `free I` is the colimit of copies of `unit R` indexed by `I`. -/
51+
noncomputable def isColimitFreeCofan (I : Type u) :
52+
IsColimit (freeCofan (R := R) I) :=
53+
coproductIsCoproduct _
54+
3755
/-- The data of a morphism `free I ⟶ M` from a free sheaf of modules is
3856
equivalent to the data of a family `I → M.sections` of sections of `M`. -/
3957
noncomputable def freeHomEquiv (M : SheafOfModules.{u} R) {I : Type u} :
4058
(free I ⟶ M) ≃ (I → M.sections) where
41-
toFun f i := M.unitHomEquiv (Sigma.ι (fun (_ : I) ↦ unit R) i ≫ f)
42-
invFun s := Sigma.desc (fun i ↦ M.unitHomEquiv.symm (s i))
43-
left_inv s := Sigma.hom_ext _ _ (by simp)
44-
right_inv f := by ext1 i; simp
59+
toFun f i := M.unitHomEquiv (ιFree i ≫ f)
60+
invFun s := Cofan.IsColimit.desc (isColimitFreeCofan I) (fun i ↦ M.unitHomEquiv.symm (s i))
61+
left_inv s := Cofan.IsColimit.hom_ext (isColimitFreeCofan I) _ _
62+
(fun i ↦ by simp [← freeCofan_inj])
63+
right_inv f := by ext1 i; simp [← freeCofan_inj]
4564

4665
lemma freeHomEquiv_comp_apply {M N : SheafOfModules.{u} R} {I : Type u}
4766
(f : free I ⟶ M) (p : M ⟶ N) (i : I) :
@@ -56,6 +75,11 @@ lemma freeHomEquiv_symm_comp {M N : SheafOfModules.{u} R} {I : Type u} (s : I
5675
noncomputable abbrev freeSection {I : Type u} (i : I) : (free (R := R) I).sections :=
5776
(free (R := R) I).freeHomEquiv (𝟙 (free I)) i
5877

78+
lemma unitHomEquiv_symm_freeHomEquiv_apply
79+
{I : Type u} {M : SheafOfModules.{u} R} (f : free I ⟶ M) (i : I) :
80+
M.unitHomEquiv.symm (M.freeHomEquiv f i) = ιFree i ≫ f := by
81+
simp [freeHomEquiv]
82+
5983
section
6084

6185
variable {I J : Type u} (f : I → J)
@@ -75,11 +99,19 @@ lemma sectionMap_freeMap_freeSection (i : I) :
7599
sectionsMap (freeMap (R := R) f) (freeSection i) = freeSection (f i) := by
76100
simp [← freeHomEquiv_comp_apply]
77101

102+
@[reassoc (attr := simp)]
103+
lemma ιFree_freeMap (i : I) :
104+
ιFree (R := R) i ≫ freeMap f = ιFree (f i) := by
105+
rw [← unitHomEquiv_symm_freeHomEquiv_apply, freeHomEquiv_freeMap]
106+
dsimp [freeSection]
107+
rw [unitHomEquiv_symm_freeHomEquiv_apply, Category.comp_id]
108+
78109
end
79110

80111
/-- The functor `Type u ⥤ SheafOfModules.{u} R` which sends a type `I` to
81112
`free I` which is a coproduct indexed by `I` of copies of `R` (thought of as a
82113
presheaf of modules over itself). -/
114+
@[simps]
83115
noncomputable def freeFunctor : Type u ⥤ SheafOfModules.{u} R where
84116
obj := free
85117
map f := freeMap f

Mathlib/Algebra/Category/ModuleCat/Sheaf/PullbackContinuous.lean

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ of sheaves of modules. -/
5252
noncomputable def pullbackPushforwardAdjunction : pullback.{v} φ ⊣ pushforward.{v} φ :=
5353
Adjunction.ofIsRightAdjoint (pushforward φ)
5454

55+
instance : (pullback.{v} φ).IsLeftAdjoint :=
56+
(pullbackPushforwardAdjunction φ).isLeftAdjoint
57+
5558
end
5659

5760
section
Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
/-
2+
Copyright (c) 2025 Joël Riou. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Joël Riou
5+
-/
6+
import Mathlib.Algebra.Category.ModuleCat.Sheaf.Free
7+
import Mathlib.Algebra.Category.ModuleCat.Sheaf.PullbackContinuous
8+
import Mathlib.CategoryTheory.Limits.Preserves.Shapes.Products
9+
import Mathlib.CategoryTheory.Limits.Final.Type
10+
11+
/-!
12+
# Pullbacks of free sheaves of modules
13+
14+
Let `S` (resp.`R`) be a sheaf of rings on a category `C` (resp. `D`)
15+
equipped with a Grothendieck topology `J` (resp. `K`).
16+
Let `F : C ⥤ D` be a continuous functor.
17+
Let `φ` be a morphism from `S` to the direct image of `R`.
18+
19+
We introduce `unitToPushforwardObjUnit φ` which is the morphism
20+
in the category `SheafOfModules S` which corresponds to `φ`, and
21+
show that the adjoint morphism
22+
`pullbackObjUnitToUnit φ : (pullback.{u} φ).obj (unit S) ⟶ unit R`
23+
is an isomorphism when `F` is a final functor.
24+
More generally, the functor `pullback φ` sends the free sheaf
25+
of modules `free I` to `free I`, see `pullbackObjFreeIso` and
26+
`freeFunctorCompPullbackIso`.
27+
-/
28+
29+
universe v v₁ v₂ u₁ u₂ u
30+
31+
open CategoryTheory Limits
32+
33+
namespace SheafOfModules
34+
35+
variable {C : Type u₁} [Category.{v₁} C] {D : Type u₂} [Category.{v₂} D]
36+
{J : GrothendieckTopology C} {K : GrothendieckTopology D} {F : C ⥤ D}
37+
{S : Sheaf J RingCat.{u}} {R : Sheaf K RingCat.{u}}
38+
[Functor.IsContinuous.{u} F J K]
39+
(φ : S ⟶ (F.sheafPushforwardContinuous RingCat.{u} J K).obj R)
40+
41+
/-- The canonical map from the (global) sections of a sheaf of modules
42+
to the (global) sections of its pushforward. -/
43+
@[simps]
44+
def pushforwardSections [Functor.IsContinuous.{v} F J K]
45+
{M : SheafOfModules.{v} R} (s : M.sections) :
46+
((pushforward φ).obj M).sections where
47+
val _ := s.val _
48+
property _ := s.property _
49+
50+
variable (M) in
51+
lemma bijective_pushforwardSections [Functor.IsContinuous.{v} F J K] [F.Final] :
52+
Function.Bijective (pushforwardSections φ (M := M)) :=
53+
Functor.bijective_sectionsPrecomp _ _
54+
55+
variable [J.HasSheafCompose (forget₂ RingCat.{u} AddCommGrpCat.{u})]
56+
[K.HasSheafCompose (forget₂ RingCat.{u} AddCommGrpCat.{u})]
57+
58+
/-- The canonical morphism `unit S ⟶ (pushforward.{u} φ).obj (unit R)`
59+
of sheaves of modules corresponding to a continuous map between ringed sites. -/
60+
def unitToPushforwardObjUnit : unit S ⟶ (pushforward.{u} φ).obj (unit R) where
61+
val.app X := ModuleCat.homMk ((forget₂ RingCat AddCommGrpCat).map (φ.val.app X)) (fun r ↦ by
62+
ext m
63+
exact ((φ.val.app X).hom.map_mul _ _).symm)
64+
val.naturality f := by
65+
ext
66+
exact ConcreteCategory.congr_hom (φ.val.naturality f) _
67+
68+
lemma unitToPushforwardObjUnit_val_app_apply {X : Cᵒᵖ} (a : S.val.obj X) :
69+
(unitToPushforwardObjUnit φ).val.app X a = φ.val.app X a := rfl
70+
71+
lemma pushforwardSections_unitHomEquiv
72+
{M : SheafOfModules.{u} R} (f : unit R ⟶ M) :
73+
pushforwardSections φ (M.unitHomEquiv f) =
74+
((pushforward φ).obj M).unitHomEquiv
75+
(unitToPushforwardObjUnit φ ≫ (pushforward φ).map f) := by
76+
ext X
77+
have := unitToPushforwardObjUnit_val_app_apply φ (X := X) 1
78+
dsimp at this ⊢
79+
simp [this, map_one]
80+
rfl
81+
82+
variable [(pushforward.{u} φ).IsRightAdjoint]
83+
84+
/-- The canonical morphism `(pullback.{u} φ).obj (unit S) ⟶ unit R`
85+
of sheaves of modules corresponding to a continuous map between ringed sites. -/
86+
noncomputable def pullbackObjUnitToUnit :
87+
(pullback.{u} φ).obj (unit S) ⟶ unit R :=
88+
((pullbackPushforwardAdjunction.{u} φ).homEquiv _ _).symm (unitToPushforwardObjUnit φ)
89+
90+
@[simp]
91+
lemma pullbackPushforwardAdjunction_homEquiv_symm_unitToPushforwardObjUnit :
92+
((pullbackPushforwardAdjunction.{u} φ).homEquiv _ _).symm (unitToPushforwardObjUnit φ) =
93+
pullbackObjUnitToUnit φ := rfl
94+
95+
@[simp]
96+
lemma pullbackPushforwardAdjunction_homEquiv_pullbackObjUnitToUnit :
97+
(pullbackPushforwardAdjunction.{u} φ).homEquiv _ _ (pullbackObjUnitToUnit φ) =
98+
unitToPushforwardObjUnit φ :=
99+
Equiv.apply_symm_apply _ _
100+
101+
instance [F.Final] : IsIso (pullbackObjUnitToUnit φ) := by
102+
rw [isIso_iff_coyoneda_map_bijective]
103+
intro M
104+
rw [← ((pullbackPushforwardAdjunction.{u} φ).homEquiv _ _).bijective.of_comp_iff',
105+
← (unitHomEquiv _).bijective.of_comp_iff']
106+
convert (bijective_pushforwardSections φ M).comp (unitHomEquiv _).bijective
107+
ext f : 1
108+
dsimp
109+
rw [pushforwardSections_unitHomEquiv, EmbeddingLike.apply_eq_iff_eq,
110+
Adjunction.homEquiv_naturality_right,
111+
pullbackPushforwardAdjunction_homEquiv_pullbackObjUnitToUnit]
112+
113+
variable [HasWeakSheafify J AddCommGrpCat.{u}] [HasWeakSheafify K AddCommGrpCat.{u}]
114+
[J.WEqualsLocallyBijective AddCommGrpCat.{u}]
115+
[K.WEqualsLocallyBijective AddCommGrpCat.{u}] [F.Final]
116+
117+
/-- The pullback of a free sheaf of modules is a free sheaf of modules. -/
118+
noncomputable def pullbackObjFreeIso (I : Type u) :
119+
(pullback φ).obj (free I) ≅ free I :=
120+
(asIso (sigmaComparison _ _)).symm ≪≫
121+
Sigma.mapIso (fun _ ↦ asIso (pullbackObjUnitToUnit φ))
122+
123+
@[reassoc (attr := simp)]
124+
lemma pullback_map_ιFree_comp_pullbackObjFreeIso_hom {I : Type u} (i : I) :
125+
(pullback φ).map (ιFree i) ≫ (pullbackObjFreeIso φ I).hom =
126+
pullbackObjUnitToUnit φ ≫ ιFree i := by
127+
simp [pullbackObjFreeIso, ιFree]
128+
129+
@[reassoc (attr := simp)]
130+
lemma pullbackObjFreeIso_hom_naturality {I J : Type u} (f : I → J) :
131+
(pullback φ).map (freeMap f) ≫ (pullbackObjFreeIso φ J).hom =
132+
(pullbackObjFreeIso φ I).hom ≫ freeMap f :=
133+
Cofan.IsColimit.hom_ext (isColimitCofanMkObjOfIsColimit (pullback φ) _ _
134+
(isColimitFreeCofan (R := S) I)) _ _ (fun i ↦ by simp [← Functor.map_comp_assoc])
135+
136+
/-- The canonical isomorphism `freeFunctor ⋙ pullback φ ≅ freeFunctor` for a
137+
continuous map between ringed sites, when the underlying functor between the sites
138+
is final. -/
139+
noncomputable def freeFunctorCompPullbackIso : freeFunctor ⋙ pullback φ ≅ freeFunctor :=
140+
NatIso.ofComponents (pullbackObjFreeIso φ)
141+
142+
end SheafOfModules

Mathlib/CategoryTheory/Limits/Preserves/Shapes/Products.lean

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,12 @@ lemma PreservesProduct.of_iso_comparison [i : IsIso (piComparison G f)] :
7676
exact @IsLimit.ofPointIso _ _ _ _ _ _ _
7777
(limit.isLimit (Discrete.functor fun j : J => G.obj (f j))) i
7878

79+
@[reassoc (attr := simp)]
80+
lemma inv_piComparison_comp_map_π [IsIso (piComparison G f)] (j : J) :
81+
inv (piComparison G f) ≫ G.map (Pi.π _ j) =
82+
Pi.π (fun x ↦ (G.obj (f x))) j := by
83+
simp only [IsIso.inv_comp_eq, piComparison_comp_π]
84+
7985
variable [PreservesLimit (Discrete.functor f) G]
8086

8187
/--
@@ -139,6 +145,12 @@ lemma PreservesCoproduct.of_iso_comparison [i : IsIso (sigmaComparison G f)] :
139145
exact @IsColimit.ofPointIso _ _ _ _ _ _ _
140146
(colimit.isColimit (Discrete.functor fun j : J => G.obj (f j))) i
141147

148+
@[reassoc (attr := simp)]
149+
lemma map_ι_comp_inv_sigmaComparison [IsIso (sigmaComparison G f)] (j : J) :
150+
G.map (Sigma.ι _ j) ≫ inv (sigmaComparison G f) =
151+
Sigma.ι (fun x ↦ (G.obj (f x))) j := by
152+
simp
153+
142154
variable [PreservesColimit (Discrete.functor f) G]
143155

144156
/-- If `G` preserves colimits,

0 commit comments

Comments
 (0)