|
| 1 | +/- |
| 2 | +Copyright (c) 2024 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.Presheaf.Sheafify |
| 7 | +import Mathlib.CategoryTheory.Sites.LocallyBijective |
| 8 | + |
| 9 | +/-! |
| 10 | +# The sheafification functor for presheaves of modules |
| 11 | +
|
| 12 | +In this file, we construct a functor |
| 13 | +`PresheafOfModules.sheafification α : PresheafOfModules R₀ ⥤ SheafOfModules R` |
| 14 | +for a locally bijective morphism `α : R₀ ⟶ R.val` where `R₀` is a presheaf of rings |
| 15 | +and `R` a sheaf of rings. |
| 16 | +In particular, if `α` is the identity of `R.val`, we obtain the |
| 17 | +sheafification functor `PresheafOfModules R.val ⥤ SheafOfModules R`. |
| 18 | +
|
| 19 | +-/ |
| 20 | + |
| 21 | +universe v v' u u' |
| 22 | + |
| 23 | +open CategoryTheory Category |
| 24 | + |
| 25 | +variable {C : Type u'} [Category.{v'} C] {J : GrothendieckTopology C} |
| 26 | + {R₀ : Cᵒᵖ ⥤ RingCat.{u}} {R : Sheaf J RingCat.{u}} (α : R₀ ⟶ R.val) |
| 27 | + [Presheaf.IsLocallyInjective J α] [Presheaf.IsLocallySurjective J α] |
| 28 | + [HasWeakSheafify J AddCommGroupCat.{v}] |
| 29 | + [J.WEqualsLocallyBijective AddCommGroupCat.{v}] |
| 30 | + |
| 31 | +namespace PresheafOfModules |
| 32 | + |
| 33 | +/-- Given a locally bijective morphism `α : R₀ ⟶ R.val` where `R₀` is a presheaf of rings |
| 34 | +and `R` a sheaf of rings (i.e. `R` identifies to the sheafification of `R₀`), this is |
| 35 | +the associated sheaf of modules functor `PresheafOfModules.{v} R₀ ⥤ SheafOfModules.{v} R`. -/ |
| 36 | +@[simps! (config := .lemmasOnly) map] |
| 37 | +noncomputable def sheafification : PresheafOfModules.{v} R₀ ⥤ SheafOfModules.{v} R where |
| 38 | + obj M₀ := sheafify α (CategoryTheory.toSheafify J M₀.presheaf) |
| 39 | + map f := sheafifyMap _ _ _ f ((presheafToSheaf J AddCommGroupCat).map f.hom) (by simp) |
| 40 | + map_id M₀ := by |
| 41 | + ext1 |
| 42 | + apply (toPresheaf _).map_injective |
| 43 | + simp [toPresheaf, sheafify] |
| 44 | + map_comp _ _ := by |
| 45 | + ext1 |
| 46 | + apply (toPresheaf _).map_injective |
| 47 | + simp [toPresheaf, sheafify] |
| 48 | + |
| 49 | +/-- The sheafification of presheaves of modules commutes with the functor which |
| 50 | +forgets the module structures. -/ |
| 51 | +noncomputable def sheafificationCompToSheaf : |
| 52 | + sheafification.{v} α ⋙ SheafOfModules.toSheaf _ ≅ |
| 53 | + toPresheaf _ ⋙ presheafToSheaf J AddCommGroupCat := |
| 54 | + Iso.refl _ |
| 55 | + |
| 56 | +/-- The sheafification of presheaves of modules commutes with the functor which |
| 57 | +forgets the module structures. -/ |
| 58 | +noncomputable def sheafificationCompForgetCompToPresheaf : |
| 59 | + sheafification.{v} α ⋙ SheafOfModules.forget _ ⋙ toPresheaf _ ≅ |
| 60 | + toPresheaf _ ⋙ presheafToSheaf J AddCommGroupCat ⋙ sheafToPresheaf J AddCommGroupCat := |
| 61 | + Iso.refl _ |
| 62 | + |
| 63 | +/-- The bijection between types of morphisms which is part of the adjunction |
| 64 | +`sheafificationAdjunction`. -/ |
| 65 | +noncomputable def sheafificationHomEquiv |
| 66 | + {P : PresheafOfModules.{v} R₀} {F : SheafOfModules.{v} R} : |
| 67 | + ((sheafification α).obj P ⟶ F) ≃ |
| 68 | + (P ⟶ (restrictScalars α).obj ((SheafOfModules.forget _).obj F)) := by |
| 69 | + apply sheafifyHomEquiv |
| 70 | + |
| 71 | +lemma sheafificationHomEquiv_hom' |
| 72 | + {P : PresheafOfModules.{v} R₀} {F : SheafOfModules.{v} R} |
| 73 | + (f : (sheafification α).obj P ⟶ F) : |
| 74 | + (sheafificationHomEquiv α f).hom = |
| 75 | + CategoryTheory.toSheafify J P.presheaf ≫ f.val.hom := rfl |
| 76 | + |
| 77 | +lemma sheafificationHomEquiv_hom |
| 78 | + {P : PresheafOfModules.{v} R₀} {F : SheafOfModules.{v} R} |
| 79 | + (f : (sheafification α).obj P ⟶ F) : |
| 80 | + (sheafificationHomEquiv α f).hom = |
| 81 | + (sheafificationAdjunction J AddCommGroupCat).homEquiv P.presheaf |
| 82 | + ((SheafOfModules.toSheaf _).obj F) ((SheafOfModules.toSheaf _).map f) := by |
| 83 | + rw [sheafificationHomEquiv_hom', Adjunction.homEquiv_unit] |
| 84 | + dsimp |
| 85 | + |
| 86 | +lemma toSheaf_map_sheafificationHomEquiv_symm |
| 87 | + {P : PresheafOfModules.{v} R₀} {F : SheafOfModules.{v} R} |
| 88 | + (g : P ⟶ (restrictScalars α).obj ((SheafOfModules.forget _).obj F)) : |
| 89 | + (SheafOfModules.toSheaf _).map ((sheafificationHomEquiv α).symm g) = |
| 90 | + (((sheafificationAdjunction J AddCommGroupCat).homEquiv |
| 91 | + P.presheaf ((SheafOfModules.toSheaf R).obj F)).symm g.hom) := by |
| 92 | + obtain ⟨f, rfl⟩ := (sheafificationHomEquiv α).surjective g |
| 93 | + apply ((sheafificationAdjunction J AddCommGroupCat).homEquiv _ _).injective |
| 94 | + rw [Equiv.apply_symm_apply, Adjunction.homEquiv_unit, Equiv.symm_apply_apply] |
| 95 | + rfl |
| 96 | + |
| 97 | +/-- Given a locally bijective morphism `α : R₀ ⟶ R.val` where `R₀` is a presheaf of rings |
| 98 | +and `R` a sheaf of rings, this is the adjunction |
| 99 | +`sheafification.{v} α ⊣ SheafOfModules.forget R ⋙ restrictScalars α`. -/ |
| 100 | +@[simps! (config := .lemmasOnly) homEquiv_apply] |
| 101 | +noncomputable def sheafificationAdjunction : |
| 102 | + sheafification.{v} α ⊣ SheafOfModules.forget R ⋙ restrictScalars α := |
| 103 | + Adjunction.mkOfHomEquiv |
| 104 | + { homEquiv := fun _ _ ↦ sheafificationHomEquiv α |
| 105 | + homEquiv_naturality_left_symm := fun {P₀ Q₀ N} f g ↦ by |
| 106 | + apply (SheafOfModules.toSheaf _).map_injective |
| 107 | + rw [Functor.map_comp] |
| 108 | + erw [toSheaf_map_sheafificationHomEquiv_symm, |
| 109 | + toSheaf_map_sheafificationHomEquiv_symm] |
| 110 | + apply Adjunction.homEquiv_naturality_left_symm |
| 111 | + homEquiv_naturality_right := fun {P₀ M N} f g ↦ by |
| 112 | + apply (toPresheaf _).map_injective |
| 113 | + dsimp [toPresheaf] |
| 114 | + erw [sheafificationHomEquiv_hom, sheafificationHomEquiv_hom] |
| 115 | + rw [Functor.map_comp] |
| 116 | + apply Adjunction.homEquiv_naturality_right } |
| 117 | + |
| 118 | +@[simp] |
| 119 | +lemma sheafificationAdjunction_unit_app_hom (M₀ : PresheafOfModules.{v} R₀) : |
| 120 | + ((sheafificationAdjunction α).unit.app M₀).hom = CategoryTheory.toSheafify J M₀.presheaf := by |
| 121 | + rfl |
| 122 | + |
| 123 | +end PresheafOfModules |
0 commit comments