Skip to content

Commit cb07be6

Browse files
committed
feat(Algebra/Category): IsQuasicoherent from a cover (#35168)
Co-authored-by: Florian Kaufmann Co-authored-by: Ben Eltschig
1 parent 3bc3642 commit cb07be6

File tree

4 files changed

+130
-3
lines changed

4 files changed

+130
-3
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ lemma opEpi_id (σ : M.GeneratingSections) :
7575
lemma opEpi_comp (σ : M.GeneratingSections) (p : M ⟶ N) (q : N ⟶ P) [Epi p] [Epi q] :
7676
σ.ofEpi (p ≫ q) = (σ.ofEpi p).ofEpi q := rfl
7777

78+
@[simp]
79+
lemma ofEpi_π (σ : M.GeneratingSections) (p : M ⟶ N) [Epi p] :
80+
(σ.ofEpi p).π = σ.π ≫ p := by
81+
simp [ofEpi, freeHomEquiv_symm_comp]
82+
7883
/-- Two isomorphic sheaves of modules have equivalent families of generating sections. -/
7984
def equivOfIso (e : M ≅ N) :
8085
M.GeneratingSections ≃ N.GeneratingSections where

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

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,4 +282,48 @@ end
282282

283283
end Adjunction
284284

285+
section Equivalence
286+
287+
variable {C : Type u₁} [Category.{v₁} C] {D : Type u₂} [Category.{v₂} D]
288+
{J : GrothendieckTopology C} {K : GrothendieckTopology D} (eqv : C ≌ D)
289+
{S : Sheaf J RingCat.{u}} {R : Sheaf K RingCat.{u}}
290+
[Functor.IsContinuous.{u} eqv.functor J K] [Functor.IsContinuous.{v} eqv.functor J K]
291+
[Functor.IsContinuous.{u} eqv.inverse K J] [Functor.IsContinuous.{v} eqv.inverse K J]
292+
(φ : S ⟶ (eqv.functor.sheafPushforwardContinuous RingCat.{u} J K).obj R)
293+
(ψ : R ⟶ (eqv.inverse.sheafPushforwardContinuous RingCat.{u} K J).obj S)
294+
(H₁ : Functor.whiskerRight (NatTrans.op eqv.counit) R.val =
295+
ψ.val ≫ eqv.inverse.op.whiskerLeft φ.val)
296+
(H₂ : φ.val ≫ eqv.functor.op.whiskerLeft ψ.val ≫
297+
Functor.whiskerRight (NatTrans.op eqv.unit) S.val = 𝟙 S.val)
298+
299+
/-- If `e : C ≌ D`, then the pushforwards along `e.functor` and `e.inverse` forms an equivalence. -/
300+
noncomputable
301+
def pushforwardPushforwardEquivalence : SheafOfModules R ≌ SheafOfModules S where
302+
functor := pushforward.{v} φ
303+
inverse := pushforward.{v} ψ
304+
unitIso :=
305+
letI := CategoryTheory.Functor.isContinuous_comp.{v} eqv.inverse eqv.functor K J K
306+
letI := CategoryTheory.Functor.isContinuous_comp.{u} eqv.inverse eqv.functor K J K
307+
(pushforwardId _).symm ≪≫ pushforwardNatIso _ eqv.counitIso ≪≫
308+
pushforwardCongr (by ext1; simpa) ≪≫ (pushforwardComp _ _).symm
309+
counitIso :=
310+
letI := CategoryTheory.Functor.isContinuous_comp.{v} eqv.functor eqv.inverse J K J
311+
letI := CategoryTheory.Functor.isContinuous_comp.{u} eqv.functor eqv.inverse J K J
312+
pushforwardComp _ _ ≪≫ pushforwardNatIso _ eqv.unitIso ≪≫
313+
pushforwardCongr (by ext1; simpa) ≪≫ pushforwardId _
314+
functor_unitIso_comp :=
315+
(pushforwardPushforwardAdj eqv.toAdjunction φ ψ H₁ H₂).left_triangle_components
316+
317+
-- Not a simp because the type of the LHS is dsimp-able
318+
lemma pushforwardPushforwardEquivalence_unit_app_val_app (M U x) :
319+
((pushforwardPushforwardEquivalence eqv φ ψ H₁ H₂).unit.app M).val.app U x =
320+
M.val.map (eqv.counit.app U.unop).op x := rfl
321+
322+
-- Not a simp because the type of the LHS is dsimp-able
323+
lemma pushforwardPushforwardEquivalence_counit_app_val_app (M U x) :
324+
((pushforwardPushforwardEquivalence eqv φ ψ H₁ H₂).counit.app M).val.app U x =
325+
M.val.map (eqv.unit.app U.unop).op x := rfl
326+
327+
end Equivalence
328+
285329
end SheafOfModules

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

Lines changed: 62 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ module
77

88
public import Mathlib.Algebra.Category.ModuleCat.Sheaf.Generators
99
public import Mathlib.Algebra.Category.ModuleCat.Sheaf.Abelian
10+
public import Mathlib.Algebra.Category.ModuleCat.Sheaf.PullbackContinuous
1011
public import Mathlib.CategoryTheory.FiberedCategory.HomLift
1112
public import Mathlib.CategoryTheory.Comma.Over.Pullback
1213

@@ -123,6 +124,13 @@ def Presentation.isColimit {M : SheafOfModules.{u} R} (P : Presentation M) :
123124
isCokernelEpiComp (c := CokernelCofork.ofπ _ (kernel.condition P.generators.π))
124125
(Abelian.epiIsCokernelOfKernel _ <| limit.isLimit _) _ rfl
125126

127+
/-- Mapping a presentation under an isomorphism. -/
128+
@[simps]
129+
noncomputable def Presentation.of_isIso {M N : SheafOfModules.{u} R} (f : M ⟶ N) [IsIso f]
130+
(σ : M.Presentation) : N.Presentation where
131+
generators := σ.generators.ofEpi f
132+
relations := σ.relations.ofEpi ((kernelCompMono _ f).symm.trans <| eqToIso (by simp)).hom
133+
126134
variable {C' : Type u₂} [Category.{v₂} C'] {J' : GrothendieckTopology C'} {S : Sheaf J' RingCat.{u}}
127135
[HasSheafify J' AddCommGrpCat] [J'.WEqualsLocallyBijective AddCommGrpCat]
128136
[J'.HasSheafCompose (forget₂ RingCat AddCommGrpCat)]
@@ -182,7 +190,7 @@ variable [∀ X, (J.over X).HasSheafCompose (forget₂ RingCat.{u} AddCommGrpCat
182190
the terminal object, and of a presentation of `M.over (X i)` for all `i`. -/
183191
structure QuasicoherentData (M : SheafOfModules.{u} R) where
184192
/-- the index type of the covering -/
185-
I : Type u₁
193+
I : Type w
186194
/-- a family of objects which cover the terminal object -/
187195
X : I → C
188196
coversTop : J.CoversTop X
@@ -191,6 +199,18 @@ structure QuasicoherentData (M : SheafOfModules.{u} R) where
191199

192200
namespace QuasicoherentData
193201

202+
/-- Shrink the indexing type of `QuasicoherentData` into the universe of the site. -/
203+
noncomputable
204+
def shrink {M : SheafOfModules.{u} R} (q : M.QuasicoherentData) :
205+
QuasicoherentData.{u₁} M where
206+
I := Set.range q.X
207+
X i := q.X i.2.choose
208+
coversTop X := by
209+
refine J.superset_covering (fun Y hY H ↦ ?_) (q.coversTop X)
210+
obtain ⟨i, ⟨hi⟩⟩ := (Sieve.mem_ofObjects_iff ..).mp H
211+
exact ⟨⟨_, i, rfl⟩, ⟨hi ≫ eqToHom (by grind)⟩⟩
212+
presentation i := q.presentation i.2.choose
213+
194214
/-- If `M` is quasicoherent, it is locally generated by sections. -/
195215
@[simps]
196216
def localGeneratorsData {M : SheafOfModules.{u} R} (q : M.QuasicoherentData) :
@@ -216,7 +236,10 @@ end QuasicoherentData
216236
/-- A sheaf of modules is quasi-coherent if it is locally the cokernel of a
217237
morphism between coproducts of copies of the sheaf of rings. -/
218238
class IsQuasicoherent (M : SheafOfModules.{u} R) : Prop where
219-
nonempty_quasicoherentData : Nonempty M.QuasicoherentData := by infer_instance
239+
nonempty_quasicoherentData : Nonempty (QuasicoherentData.{u₁} M) := by infer_instance
240+
241+
lemma QuasicoherentData.isQuasicoherent {M : SheafOfModules.{u} R} (q : M.QuasicoherentData) :
242+
M.IsQuasicoherent := ⟨⟨q.shrink⟩⟩
220243

221244
variable (R) in
222245
@[inherit_doc IsQuasicoherent]
@@ -227,7 +250,7 @@ abbrev isQuasicoherent : ObjectProperty (SheafOfModules.{u} R) :=
227250
morphism between coproducts of finitely many copies of the sheaf of rings. -/
228251
class IsFinitePresentation (M : SheafOfModules.{u} R) : Prop where
229252
exists_quasicoherentData (M) :
230-
∃ (σ : M.QuasicoherentData), σ.IsFinitePresentation
253+
∃ (σ : QuasicoherentData.{u₁} M), σ.IsFinitePresentation
231254

232255
variable (R) in
233256
@[inherit_doc IsFinitePresentation]
@@ -285,5 +308,41 @@ theorem Presentation.isQuasicoherent {M : SheafOfModules.{u} R} (P : Presentatio
285308
nonempty_quasicoherentData := Nonempty.intro (Presentation.quasicoherentData P)
286309

287310
end
311+
section bind
312+
313+
variable [∀ X, (J.over X).HasSheafCompose (forget₂ RingCat.{u} AddCommGrpCat.{u})]
314+
[∀ X, HasSheafify (J.over X) AddCommGrpCat.{u}]
315+
[∀ X, (J.over X).WEqualsLocallyBijective AddCommGrpCat.{u}]
316+
[∀ X Y, ((J.over X).over Y).HasSheafCompose (forget₂ RingCat.{u} AddCommGrpCat.{u})]
317+
[∀ X Y, HasSheafify ((J.over X).over Y) AddCommGrpCat.{u}]
318+
[∀ X Y, ((J.over X).over Y).WEqualsLocallyBijective AddCommGrpCat.{u}]
319+
320+
/-- Given an cover `X` and a quasicoherent data for `M` restricted onto each `Mᵢ`, we may glue them
321+
into a quasicoherent data of `M` itself. -/
322+
noncomputable def QuasicoherentData.bind {R : Sheaf J RingCat.{u}}
323+
(M : SheafOfModules.{u} R) {I : Type u}
324+
(X : I → C) (hX : J.CoversTop X) (D : Π i, QuasicoherentData (M.over (X i))) :
325+
M.QuasicoherentData where
326+
I := Σ i, (D i).I
327+
X ij := ((D ij.1).X ij.2).left
328+
coversTop Y := J.transitive (hX Y) _ fun Z f ⟨i, ⟨g⟩⟩ ↦
329+
J.superset_covering ((Sieve.functorPushforward_ofObjects_le _ _ _).trans
330+
(Sieve.ofObjects_mono fun i' ↦ by aesop)) ((D i).coversTop (.mk g))
331+
presentation i :=
332+
letI e := pushforwardPushforwardEquivalence (Over.iteratedSliceEquiv ((D i.1).X i.2))
333+
(S := (R.over _).over _) (R := R.over _) (𝟙 _) (𝟙 _)
334+
(by ext : 2; exact R.1.map_id _) (by ext : 2; exact R.1.map_id _)
335+
(((D i.1).presentation i.2).map e.inverse (.refl _)).of_isIso
336+
(e.fullyFaithfulFunctor.preimageIso
337+
(by exact e.counitIso.app ((M.over (X i.1)).over ((D i.1).X i.2)))).hom
338+
339+
lemma IsQuasicoherent.of_coversTop {R : Sheaf J RingCat.{u}}
340+
(M : SheafOfModules.{u} R) {I : Type u}
341+
(X : I → C) (hX : J.CoversTop X) [∀ i, IsQuasicoherent (M.over (X i))] :
342+
IsQuasicoherent M :=
343+
(QuasicoherentData.bind M X hX fun _ ↦
344+
IsQuasicoherent.nonempty_quasicoherentData.some).isQuasicoherent
345+
346+
end bind
288347

289348
end SheafOfModules

Mathlib/CategoryTheory/Sites/Sieves.lean

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -747,6 +747,13 @@ lemma ofArrows_eq_ofObjects {X : C} (hX : IsTerminal X)
747747
rintro ⟨i, ⟨h⟩⟩
748748
exact ⟨i, h, hX.hom_ext _ _⟩
749749

750+
lemma ofObjects_mono {I : Type*} {X : I → C} {I' : Type*} {X' : I' → C} {Y : C}
751+
(h : Set.range X ⊆ Set.range X') :
752+
Sieve.ofObjects X Y ≤ Sieve.ofObjects X' Y := by
753+
rintro Z f ⟨i, ⟨g⟩⟩
754+
obtain ⟨i', h⟩ := h ⟨i, rfl⟩
755+
exact ⟨i', ⟨h ▸ g⟩⟩
756+
750757
/-- Given a morphism `h : Y ⟶ X`, send a sieve S on X to a sieve on Y
751758
as the inverse image of S with `_ ≫ h`. That is, `Sieve.pullback S h := (≫ h) '⁻¹ S`. -/
752759
@[simps]
@@ -794,6 +801,12 @@ lemma pullback_ofObjects_eq_top
794801
rw [mem_ofObjects_iff]
795802
exact ⟨i, ⟨h ≫ g⟩⟩
796803

804+
@[simp]
805+
lemma pullback_ofObjects {I : Type*} (X : I → C) {Y Z : C} (f : Z ⟶ Y) :
806+
(ofObjects X Y).pullback f = ofObjects X Z := by
807+
ext
808+
simp [Sieve.ofObjects]
809+
797810
/-- Push a sieve `R` on `Y` forward along an arrow `f : Y ⟶ X`: `gf : Z ⟶ X` is in the sieve if `gf`
798811
factors through some `g : Z ⟶ Y` which is in `R`.
799812
-/
@@ -1092,6 +1105,12 @@ lemma mem_functorPushforward_iff_of_full_of_faithful [F.Full] [F.Faithful]
10921105
refine ⟨fun ⟨g, hcomp, hg⟩ ↦ ?_, fun hf ↦ ⟨f, rfl, hf⟩⟩
10931106
rwa [← F.map_injective hcomp]
10941107

1108+
lemma functorPushforward_ofObjects_le
1109+
{I : Type*} (X : I → C) (Y : C) :
1110+
(ofObjects X Y).functorPushforward F ≤ ofObjects (F.obj ∘ X) (F.obj Y) := by
1111+
rintro Z f ⟨W, g₁, g₂, ⟨i, ⟨g₃⟩⟩, hf⟩
1112+
exact ⟨i, ⟨g₂ ≫ F.map g₃⟩⟩
1113+
10951114
end Functor
10961115

10971116
/-- A sieve induces a presheaf. -/

0 commit comments

Comments
 (0)