@@ -10,9 +10,11 @@ public import Mathlib.Algebra.Category.ModuleCat.Sheaf.Colimits
1010public import Mathlib.Algebra.Category.ModuleCat.Sheaf.PullbackContinuous
1111public import Mathlib.AlgebraicGeometry.Modules.Presheaf
1212public import Mathlib.AlgebraicGeometry.OpenImmersion
13+ public import Mathlib.AlgebraicGeometry.AffineScheme
1314public import Mathlib.CategoryTheory.Bicategory.Adjunction.Adj
1415public import Mathlib.CategoryTheory.Bicategory.Adjunction.Cat
1516public import Mathlib.CategoryTheory.Bicategory.Functor.LocallyDiscrete
17+ public import Mathlib.Topology.Sheaves.Module
1618
1719/-!
1820# The category of sheaves of modules over a scheme
@@ -381,6 +383,23 @@ instead. -/
381383lemma restrict_map (M : Y.Modules) (f : X ⟶ Y) [IsOpenImmersion f] {U V} (i : U ⟶ V) :
382384 (M.restrict f).presheaf.map i.op = M.presheaf.map (f.opensFunctor.map i).op := rfl
383385
386+ /-- `Scheme.Modules.restrict` along an open immersion `X ⟶ Y` sends `𝒪_Y` to `𝒪_X`. -/
387+ def restrictUnitIso (f : X ⟶ Y) [IsOpenImmersion f] :
388+ restrict (.unit <| Y.ringCatSheaf) f ≅ .unit X.ringCatSheaf := by
389+ refine (fullyFaithfulForget _).preimageIso <| PresheafOfModules.isoMk (fun U ↦ ?_) ?_
390+ · refine ModuleCat.isoMk
391+ ((forget₂ CommRingCat RingCat ⋙ forget₂ _ Ab).mapIso (f.appIso U.unop)) ?_
392+ intro (r : Γ(X, U.unop))
393+ ext (x : Γ(Y, f ''ᵁ U.unop))
394+ change r * (f.appIso U.unop).hom x = (f.appIso U.unop).hom ((f.appIso U.unop).inv r * x)
395+ simp
396+ · intro U V g
397+ have : Y.presheaf.map (homOfLE (by grw [leOfHom g.unop])).op ≫
398+ (f.appIso _).hom = (f.appIso U.unop).hom ≫ X.presheaf.map g := by
399+ simp [Hom.appIso_hom']
400+ ext x
401+ exact congr($(this) x)
402+
384403/-- The restriction of a module along an open immersion. -/
385404def restrictFunctorAdjCounitIso : pushforward f ⋙ restrictFunctor f ≅ 𝟭 _ :=
386405 letI := CategoryTheory.Functor.isContinuous_comp.{u} f.opensFunctor (Opens.map f.base)
@@ -521,4 +540,62 @@ noncomputable def sheafComposePushforwardComp {R S : CommRingCat.{u}} (φ : R
521540 · cat_disch
522541 · cat_disch
523542
543+ /-- Sheaves of modules on `𝒪_X` restricted to `U` are equivalent to sheaves of `𝒪_U`-modules. -/
544+ noncomputable
545+ def overEquiv {X : Scheme.{u}} (U : X.Opens) :
546+ SheafOfModules (X.ringCatSheaf.over U) ≌ (U : Scheme.{u}).Modules :=
547+ TopologicalSpace.Opens.sheafOfModulesEquivOver _ _
548+
549+ set_option backward.isDefEq.respectTransparency false in
550+ /-- Up to `Scheme.Modules.overEquiv`, `SheafOfModules.overMap` is isomorphic to
551+ `Scheme.Modules.restrictFunctor`. -/
552+ noncomputable
553+ def overMapCompOverEquiv {X : Scheme.{u}} {U V : X.Opens} (f : V ⟶ U) :
554+ overMap X.ringCatSheaf f ⋙ (overEquiv V).functor ≅
555+ (overEquiv U).functor ⋙ restrictFunctor (X.homOfLE <| leOfHom f) := by
556+ haveI : (Hom.opensFunctor (X.homOfLE <| leOfHom f)).IsContinuous
557+ (Opens.grothendieckTopology V.toScheme) (Opens.grothendieckTopology U.carrier) :=
558+ inferInstanceAs <|
559+ (Hom.opensFunctor (X.homOfLE <| leOfHom f)).IsContinuous _
560+ (Opens.grothendieckTopology U.toScheme)
561+ haveI := U.instIsDenseSubsiteSubtypeMemOverGrothendieckTopologyOverInverseOverEquivalence
562+ haveI : (Hom.opensFunctor (X.homOfLE <| leOfHom f)).IsContinuous
563+ (Opens.grothendieckTopology ↥V) (Opens.grothendieckTopology U.toScheme) :=
564+ inferInstanceAs <| (X.homOfLE <| leOfHom f).opensFunctor.IsContinuous
565+ (Opens.grothendieckTopology V.toScheme) (Opens.grothendieckTopology U.toScheme)
566+ haveI : ((Opens.overEquivalence V).symm.functor ⋙ Over.map f).IsContinuous
567+ (Opens.grothendieckTopology ↥V) ((Opens.grothendieckTopology X).over U) :=
568+ Functor.isContinuous_comp _ _ _ (.over (Opens.grothendieckTopology _) _) _
569+ haveI : (Opens.overEquivalence U).symm.functor.IsContinuous (Opens.grothendieckTopology U)
570+ ((Opens.grothendieckTopology X).over U) :=
571+ inferInstanceAs <| U.overEquivalence.inverse.IsContinuous (Opens.grothendieckTopology U.carrier)
572+ ((Opens.grothendieckTopology X).over U)
573+ haveI : ((X.homOfLE (leOfHom f)).opensFunctor ⋙
574+ (Opens.overEquivalence U).symm.functor).IsContinuous (Opens.grothendieckTopology ↥V)
575+ ((Opens.grothendieckTopology ↥X).over U) :=
576+ Functor.isContinuous_comp _ _ _ (Opens.grothendieckTopology _) _
577+ refine (SheafOfModules.pushforwardComp _ _) ≪≫ ?_ ≪≫ (SheafOfModules.pushforwardComp _ _).symm
578+ refine SheafOfModules.pushforwardCongr₂ _ ?_ ?_
579+ · refine NatIso.ofComponents (fun W ↦ Over.isoMk (eqToIso ?_) ?_) ?_
580+ · suffices U.ι ''ᵁ ((X.homOfLE (leOfHom f)) ''ᵁ W) = V.ι ''ᵁ W by simpa
581+ simp [← Scheme.Hom.comp_image]
582+ · cat_disch
583+ · cat_disch
584+ · ext W x
585+ suffices X.presheaf.map _ x = ((X.homOfLE <| leOfHom f).appIso _).inv x by simpa
586+ rw [Scheme.Hom.appIso_homOfLE_inv]
587+ rfl
588+
589+ /-- Up to `Scheme.Modules.overEquiv`, `SheafOfModules.overFunctor` is isomorphic to
590+ `Scheme.Modules.restrictFunctor`. -/
591+ noncomputable
592+ def overFunctorEquiv {X : Scheme.{u}} (U : X.Opens) :
593+ overFunctor X.ringCatSheaf U ⋙ (overEquiv U).functor ≅ restrictFunctor U.ι := by
594+ have : ((Opens.overEquivalence U).symm.functor ⋙ Over.forget U).IsContinuous
595+ (Opens.grothendieckTopology ↥U) (Opens.grothendieckTopology ↥X) :=
596+ Functor.isContinuous_comp _ _ _ (.over (Opens.grothendieckTopology _) U) _
597+ refine SheafOfModules.pushforwardComp _ _ ≪≫ SheafOfModules.pushforwardCongr ?_
598+ simp only [CategoryTheory.Functor.map_id, Opposite.op_unop, Opens.ι_appIso, Iso.refl_inv]
599+ rfl
600+
524601end AlgebraicGeometry.Scheme.Modules
0 commit comments