77
88public import Mathlib.Algebra.Category.ModuleCat.Sheaf.Generators
99public import Mathlib.Algebra.Category.ModuleCat.Sheaf.Abelian
10+ public import Mathlib.Algebra.Category.ModuleCat.Sheaf.PullbackContinuous
1011public import Mathlib.CategoryTheory.FiberedCategory.HomLift
1112public 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+
126134variable {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
182190the terminal object, and of a presentation of `M.over (X i)` for all `i`. -/
183191structure 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
192200namespace 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]
196216def 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
217237morphism between coproducts of copies of the sheaf of rings. -/
218238class 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
221244variable (R) in
222245@ [inherit_doc IsQuasicoherent]
@@ -227,7 +250,7 @@ abbrev isQuasicoherent : ObjectProperty (SheafOfModules.{u} R) :=
227250morphism between coproducts of finitely many copies of the sheaf of rings. -/
228251class IsFinitePresentation (M : SheafOfModules.{u} R) : Prop where
229252 exists_quasicoherentData (M) :
230- ∃ (σ : M. QuasicoherentData), σ.IsFinitePresentation
253+ ∃ (σ : QuasicoherentData.{u₁} M ), σ.IsFinitePresentation
231254
232255variable (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
287310end
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
289348end SheafOfModules
0 commit comments