File: Mathlib/Algebra/Category/ModuleCat/Presheaf.lean

full_name: PresheafOfModules.presheaf
code: /-- A presheaf of modules over a given presheaf of rings,
described as a presheaf of abelian groups, and the extra data of the action at each object,
and a condition relating functoriality and scalar multiplication. -/
structure PresheafOfModules (R : Cᵒᵖ ⥤ RingCat.{u}) where
  presheaf : Cᵒᵖ ⥤ AddCommGrp.{v}
  module : ∀ X : Cᵒᵖ, Module (R.obj X) (presheaf.obj X) := by infer_instance
  map_smul : ∀ {X Y : Cᵒᵖ} (f : X ⟶ Y) (r : R.obj X) (x : presheaf.obj X),
    presheaf.map f (r • x) = R.map f r • presheaf.map f x := by aesop_cat
goal: Cᵒᵖ ⥤ AddCommGrp

full_name: PresheafOfModules.map_smul
code: /-- A presheaf of modules over a given presheaf of rings,
described as a presheaf of abelian groups, and the extra data of the action at each object,
and a condition relating functoriality and scalar multiplication. -/
structure PresheafOfModules (R : Cᵒᵖ ⥤ RingCat.{u}) where
  presheaf : Cᵒᵖ ⥤ AddCommGrp.{v}
  module : ∀ X : Cᵒᵖ, Module (R.obj X) (presheaf.obj X) := by infer_instance
  map_smul : ∀ {X Y : Cᵒᵖ} (f : X ⟶ Y) (r : R.obj X) (x : presheaf.obj X),
    presheaf.map f (r • x) = R.map f r • presheaf.map f x := by aesop_cat
goal: (self.presheaf.map f) (r • x) = (R.map f) r • (self.presheaf.map f) x

full_name: PresheafOfModules.module
code: /-- A presheaf of modules over a given presheaf of rings,
described as a presheaf of abelian groups, and the extra data of the action at each object,
and a condition relating functoriality and scalar multiplication. -/
structure PresheafOfModules (R : Cᵒᵖ ⥤ RingCat.{u}) where
  presheaf : Cᵒᵖ ⥤ AddCommGrp.{v}
  module : ∀ X : Cᵒᵖ, Module (R.obj X) (presheaf.obj X) := by infer_instance
  map_smul : ∀ {X Y : Cᵒᵖ} (f : X ⟶ Y) (r : R.obj X) (x : presheaf.obj X),
    presheaf.map f (r • x) = R.map f r • presheaf.map f x := by aesop_cat
goal: Module ↑(R.obj X) ↑(self.presheaf.obj X)

full_name: PresheafOfModules
code: /-- A presheaf of modules over a given presheaf of rings,
described as a presheaf of abelian groups, and the extra data of the action at each object,
and a condition relating functoriality and scalar multiplication. -/
structure PresheafOfModules (R : Cᵒᵖ ⥤ RingCat.{u}) where
  presheaf : Cᵒᵖ ⥤ AddCommGrp.{v}
  module : ∀ X : Cᵒᵖ, Module (R.obj X) (presheaf.obj X) := by infer_instance
  map_smul : ∀ {X Y : Cᵒᵖ} (f : X ⟶ Y) (r : R.obj X) (x : presheaf.obj X),
    presheaf.map f (r • x) = R.map f r • presheaf.map f x := by aesop_cat
goal: Type (max (max (max u u₁) (v + 1)) v₁)

full_name: PresheafOfModules.obj
code: /-- The bundled module over an object `X`. -/
def obj (P : PresheafOfModules R) (X : Cᵒᵖ) : ModuleCat (R.obj X) 
goal: ModuleCat ↑(R.obj X)

full_name: PresheafOfModules.map
code: /--
If `P` is a presheaf of modules over a presheaf of rings `R`, both over some category `C`,
and `f : X ⟶ Y` is a morphism in `Cᵒᵖ`, we construct the `R.map f`-semilinear map
from the `R.obj X`-module `P.presheaf.obj X` to the `R.obj Y`-module `P.presheaf.obj Y`.
 -/
def map (P : PresheafOfModules R) {X Y : Cᵒᵖ} (f : X ⟶ Y) :
    P.obj X →ₛₗ[R.map f] P.obj Y 
goal: ↑(P.obj X) →ₛₗ[R.map f] ↑(P.obj Y)

full_name: PresheafOfModules.map_apply
code: theorem map_apply (P : PresheafOfModules R) {X Y : Cᵒᵖ} (f : X ⟶ Y) (x) :
    P.map f x = (P.presheaf.map f) x 
goal: (P.map f) x = (P.presheaf.map f) x

full_name: PresheafOfModules.instRingHomIdαRingObjOppositeRingCatMapId
code: instance (X : Cᵒᵖ) : RingHomId (R.map (𝟙 X)) 
goal: RingHomId (R.map (𝟙 X))

full_name: PresheafOfModules.instRingHomCompTripleαRingObjOppositeRingCatMapComp
code: instance {X Y Z : Cᵒᵖ} (f : X ⟶ Y) (g : Y ⟶ Z) :
    RingHomCompTriple (R.map f) (R.map g) (R.map (f ≫ g)) 
goal: RingHomCompTriple (R.map f) (R.map g) (R.map (f ≫ g))

full_name: PresheafOfModules.map_id
code: @[simp]
theorem map_id (P : PresheafOfModules R) (X : Cᵒᵖ) :
    P.map (𝟙 X) = LinearMap.id' 
goal: P.map (𝟙 X) = LinearMap.id'

full_name: PresheafOfModules.map_comp
code: @[simp]
theorem map_comp (P : PresheafOfModules R) {X Y Z : Cᵒᵖ} (f : X ⟶ Y) (g : Y ⟶ Z) :
    P.map (f ≫ g) = (P.map g).comp (P.map f) 
goal: P.map (f ≫ g) = (P.map g).comp (P.map f)

full_name: PresheafOfModules.Hom
code: /-- A morphism of presheaves of modules. -/
structure Hom (P Q : PresheafOfModules R) where
  hom : P.presheaf ⟶ Q.presheaf
  map_smul : ∀ (X : Cᵒᵖ) (r : R.obj X) (x : P.presheaf.obj X), hom.app X (r • x) = r • hom.app X x
goal: Type (max u_1 u₁)

full_name: PresheafOfModules.Hom.map_smul
code: /-- A morphism of presheaves of modules. -/
structure Hom (P Q : PresheafOfModules R) where
  hom : P.presheaf ⟶ Q.presheaf
  map_smul : ∀ (X : Cᵒᵖ) (r : R.obj X) (x : P.presheaf.obj X), hom.app X (r • x) = r • hom.app X x
goal: (self.hom.app X) (r • x) = r • (self.hom.app X) x

full_name: PresheafOfModules.Hom.hom
code: /-- A morphism of presheaves of modules. -/
structure Hom (P Q : PresheafOfModules R) where
  hom : P.presheaf ⟶ Q.presheaf
  map_smul : ∀ (X : Cᵒᵖ) (r : R.obj X) (x : P.presheaf.obj X), hom.app X (r • x) = r • hom.app X x
goal: P.presheaf ⟶ Q.presheaf

full_name: PresheafOfModules.Hom.id
code: /-- The identity morphism on a presheaf of modules. -/
def id (P : PresheafOfModules R) : Hom P P 
goal: P.Hom P

full_name: PresheafOfModules.Hom.comp
code: /-- Composition of morphisms of presheaves of modules. -/
def comp {P Q R : PresheafOfModules R} (f : Hom P Q) (g : Hom Q R) : Hom P R 
goal: {R_1 : PresheafOfModules R} → P.Hom Q → Q.Hom R_1 → P.Hom R_1

full_name: PresheafOfModules.instCategory
code: instance : Category (PresheafOfModules R) 
goal: CategoryTheory.Category.{max u₁ u_1, max (max (max u u₁) v₁) (u_1 + 1)} (PresheafOfModules R)

full_name: PresheafOfModules.Hom.id_hom
code: @[simp]
lemma id_hom : Hom.hom (𝟙 P) = 𝟙 _ 
goal: (𝟙 P).hom = 𝟙 P.presheaf

full_name: PresheafOfModules.Hom.comp_hom
code: @[simp, reassoc]
lemma comp_hom (f : P ⟶ Q) (g : Q ⟶ T) : (f ≫ g).hom = f.hom ≫ g.hom 
goal: (f ≫ g).hom = f.hom ≫ g.hom

full_name: PresheafOfModules.Hom.app
code: /--
The `(X : Cᵒᵖ)`-component of morphism between presheaves of modules
over a presheaf of rings `R`, as an `R.obj X`-linear map. -/
def app (f : Hom P Q) (X : Cᵒᵖ) : P.obj X →ₗ[R.obj X] Q.obj X 
goal: ↑(P.obj X) →ₗ[↑(R.obj X)] ↑(Q.obj X)

full_name: PresheafOfModules.Hom.comp_app
code: @[simp]
lemma comp_app (f : P ⟶ Q) (g : Q ⟶ T) (X : Cᵒᵖ) :
    (f ≫ g).app X = (g.app X).comp (f.app X) 
goal: PresheafOfModules.Hom.app (f ≫ g) X = PresheafOfModules.Hom.app g X ∘ₗ PresheafOfModules.Hom.app f X

full_name: PresheafOfModules.Hom.ext
code: @[ext]
theorem ext {f g : P ⟶ Q} (w : ∀ X, f.app X = g.app X) : f = g 
goal: f = g

full_name: PresheafOfModules.Hom.instZeroHom
code: instance : Zero (P ⟶ Q) 
goal: Zero (P ⟶ Q)

full_name: PresheafOfModules.Hom.zero_app
code: @[simp]
lemma zero_app (X : Cᵒᵖ) : (0 : P ⟶ Q).app X = 0 
goal: PresheafOfModules.Hom.app 0 X = 0

full_name: PresheafOfModules.Hom.instAddHom
code: instance : Add (P ⟶ Q) 
goal: Add (P ⟶ Q)

full_name: PresheafOfModules.Hom.add_app
code: @[simp]
lemma add_app (f g : P ⟶ Q) (X : Cᵒᵖ) : (f + g).app X = f.app X + g.app X 
goal: PresheafOfModules.Hom.app (f + g) X = PresheafOfModules.Hom.app f X + PresheafOfModules.Hom.app g X

full_name: PresheafOfModules.Hom.instSubHom
code: instance : Sub (P ⟶ Q) 
goal: Sub (P ⟶ Q)

full_name: PresheafOfModules.Hom.sub_app
code: @[simp]
lemma sub_app (f g : P ⟶ Q) (X : Cᵒᵖ) : (f - g).app X = f.app X - g.app X 
goal: PresheafOfModules.Hom.app (f - g) X = PresheafOfModules.Hom.app f X - PresheafOfModules.Hom.app g X

full_name: PresheafOfModules.Hom.instNegHom
code: instance : Neg (P ⟶ Q) 
goal: Neg (P ⟶ Q)

full_name: PresheafOfModules.Hom.neg_app
code: @[simp]
lemma neg_app (f : P ⟶ Q) (X : Cᵒᵖ) : (-f).app X = -f.app X 
goal: PresheafOfModules.Hom.app (-f) X = -PresheafOfModules.Hom.app f X

full_name: PresheafOfModules.Hom.instAddCommGroupHom
code: instance : AddCommGroup (P ⟶ Q) 
goal: AddCommGroup (P ⟶ Q)

full_name: PresheafOfModules.Hom.instPreadditive
code: instance : Preadditive (PresheafOfModules R) 
goal: CategoryTheory.Preadditive (PresheafOfModules R)

full_name: PresheafOfModules.naturality_apply
code: lemma naturality_apply {P Q : PresheafOfModules R} (f : P ⟶ Q)
    {X Y : Cᵒᵖ} (g : X ⟶ Y) (x : P.obj X) :
    f.app Y (P.map g x) = Q.map g (f.app X x) 
goal: (PresheafOfModules.Hom.app f Y) ((P.map g) x) = (Q.map g) ((PresheafOfModules.Hom.app f X) x)

full_name: PresheafOfModules.toPresheaf_obj
code: /-- The functor from presheaves of modules over a specified presheaf of rings,
to presheaves of abelian groups.
-/
@[simps obj]
def toPresheaf : PresheafOfModules.{v} R ⥤ (Cᵒᵖ ⥤ AddCommGrp.{v}) 
goal: (PresheafOfModules.toPresheaf R).obj P = P.presheaf

full_name: PresheafOfModules.toPresheaf
code: /-- The functor from presheaves of modules over a specified presheaf of rings,
to presheaves of abelian groups.
-/
@[simps obj]
def toPresheaf : PresheafOfModules.{v} R ⥤ (Cᵒᵖ ⥤ AddCommGrp.{v}) 
goal: PresheafOfModules R ⥤ Cᵒᵖ ⥤ AddCommGrp

full_name: PresheafOfModules.toPresheaf_map_app
code: @[simp]
lemma toPresheaf_map_app {P Q : PresheafOfModules R}
    (f : P ⟶ Q) (X : Cᵒᵖ) :
    ((toPresheaf R).map f).app X = (f.app X).toAddMonoidHom 
goal: ((PresheafOfModules.toPresheaf R).map f).app X = (PresheafOfModules.Hom.app f X).toAddMonoidHom

full_name: PresheafOfModules.instAdditiveFunctorOppositeAddCommGrpToPresheaf
code: instance : (toPresheaf R).Additive 
goal: (PresheafOfModules.toPresheaf R).Additive

full_name: PresheafOfModules.instFaithfulFunctorOppositeAddCommGrpToPresheaf
code: instance : (toPresheaf R).Faithful 
goal: (PresheafOfModules.toPresheaf R).Faithful

full_name: PresheafOfModules.evaluation
code: /-- Evaluation on an object `X` gives a functor
`PresheafOfModules R ⥤ ModuleCat (R.obj X)`. -/
@[simps]
def evaluation (X : Cᵒᵖ) : PresheafOfModules.{v} R ⥤ ModuleCat (R.obj X) 
goal: PresheafOfModules R ⥤ ModuleCat ↑(R.obj X)

full_name: PresheafOfModules.evaluation_obj
code: /-- Evaluation on an object `X` gives a functor
`PresheafOfModules R ⥤ ModuleCat (R.obj X)`. -/
@[simps]
def evaluation (X : Cᵒᵖ) : PresheafOfModules.{v} R ⥤ ModuleCat (R.obj X) 
goal: (PresheafOfModules.evaluation R X).obj M = M.obj X

full_name: PresheafOfModules.evaluation_map
code: /-- Evaluation on an object `X` gives a functor
`PresheafOfModules R ⥤ ModuleCat (R.obj X)`. -/
@[simps]
def evaluation (X : Cᵒᵖ) : PresheafOfModules.{v} R ⥤ ModuleCat (R.obj X) 
goal: ∀ {X_1 Y : PresheafOfModules R} (f : X_1 ⟶ Y), (PresheafOfModules.evaluation R X).map f = PresheafOfModules.Hom.app f X

full_name: PresheafOfModules.instAdditiveModuleCatαRingObjOppositeRingCatEvaluation
code: instance (X : Cᵒᵖ) : (evaluation R X).Additive 
goal: (PresheafOfModules.evaluation R X).Additive

full_name: PresheafOfModules.restrictionApp
code: /-- Given a presheaf of modules `M` on a category `C` and `f : X ⟶ Y` in `Cᵒᵖ`, this
is the restriction map `M.obj X ⟶ M.obj Y`, considered as a linear map to
the restriction of scalars of `M.obj Y`. -/
noncomputable def restrictionApp {X Y : Cᵒᵖ} (f : X ⟶ Y) (M : PresheafOfModules.{v} R) :
    M.obj X ⟶ (ModuleCat.restrictScalars (R.map f)).obj (M.obj Y) 
goal: M.obj X ⟶ (ModuleCat.restrictScalars (R.map f)).obj (M.obj Y)

full_name: PresheafOfModules.restrictionApp_apply
code: lemma restrictionApp_apply {X Y : Cᵒᵖ} (f : X ⟶ Y) (M : PresheafOfModules R) (x : M.obj X) :
    restrictionApp f M x = M.map f x 
goal: (PresheafOfModules.restrictionApp f M) x = (M.map f) x

full_name: PresheafOfModules.restriction
code: /-- The restriction natural transformation on presheaves of modules, considered as linear maps
to restriction of scalars. -/
@[simps]
noncomputable def restriction {X Y : Cᵒᵖ} (f : X ⟶ Y) :
    evaluation R X ⟶ evaluation R Y ⋙ ModuleCat.restrictScalars (R.map f) 
goal: PresheafOfModules.evaluation R X ⟶ PresheafOfModules.evaluation R Y ⋙ ModuleCat.restrictScalars (R.map f)

full_name: PresheafOfModules.restriction_app
code: /-- The restriction natural transformation on presheaves of modules, considered as linear maps
to restriction of scalars. -/
@[simps]
noncomputable def restriction {X Y : Cᵒᵖ} (f : X ⟶ Y) :
    evaluation R X ⟶ evaluation R Y ⋙ ModuleCat.restrictScalars (R.map f) 
goal: (PresheafOfModules.restriction R f).app M = PresheafOfModules.restrictionApp f M

full_name: PresheafOfModules.restrictionApp_naturality
code: @[reassoc (attr := simp)]
lemma restrictionApp_naturality {X Y : Cᵒᵖ} (f : X ⟶ Y)
    {M N : PresheafOfModules R} (φ : M ⟶ N) :
    restrictionApp f M ≫ (ModuleCat.restrictScalars (R.map f)).map (Hom.app φ Y) =
      ModuleCat.ofHom (Hom.app φ X) ≫ restrictionApp f N 
goal: PresheafOfModules.restrictionApp f M ≫ (ModuleCat.restrictScalars (R.map f)).map (PresheafOfModules.Hom.app φ Y) =
  ModuleCat.ofHom (PresheafOfModules.Hom.app φ X) ≫ PresheafOfModules.restrictionApp f N

full_name: PresheafOfModules.restrictionApp_id
code: lemma restrictionApp_id (M : PresheafOfModules R) (X : Cᵒᵖ) :
    restrictionApp (𝟙 X) M =
      (ModuleCat.restrictScalarsId' (R.map (𝟙 X)) (R.map_id X)).inv.app (M.obj X) 
goal: PresheafOfModules.restrictionApp (𝟙 X) M = (ModuleCat.restrictScalarsId' (R.map (𝟙 X)) ⋯).inv.app (M.obj X)

full_name: PresheafOfModules.restrictionApp_comp
code: lemma restrictionApp_comp (M : PresheafOfModules R) {X Y Z : Cᵒᵖ} (f : X ⟶ Y) (g : Y ⟶ Z) :
    restrictionApp (f ≫ g) M =
      restrictionApp f M ≫
        (ModuleCat.restrictScalars (R.map f)).map (restrictionApp g M) ≫
        (ModuleCat.restrictScalarsComp' _ _ _ (R.map_comp f g)).inv.app (M.obj Z) 
goal: PresheafOfModules.restrictionApp (f ≫ g) M =
  PresheafOfModules.restrictionApp f M ≫
    (ModuleCat.restrictScalars (R.map f)).map (PresheafOfModules.restrictionApp g M) ≫
      (ModuleCat.restrictScalarsComp' (R.map f) (R.map g) (R.map (f ≫ g)) ⋯).inv.app (M.obj Z)

full_name: PresheafOfModules.Hom.mk'
code: /-- A constructor for morphisms in `PresheafOfModules R` that is based on the data
of a family of linear maps over the various rings `R.obj X`. -/
def mk' : P ⟶ Q 
goal: P ⟶ Q

full_name: PresheafOfModules.Hom.mk'_app
code: @[simp]
lemma mk'_app : (mk' app naturality).app = app 
goal: PresheafOfModules.Hom.app (PresheafOfModules.Hom.mk' app naturality) = app

full_name: PresheafOfModules.Hom.mk''
code: /-- A constructor for morphisms in `PresheafOfModules R` that is based on the data
of a family of linear maps over the various rings `R.obj X`, and for which the
naturality condition is stated using the restriction of scalars. -/
abbrev mk''
    (naturality : ∀ ⦃X Y : Cᵒᵖ⦄ (f : X ⟶ Y),
      restrictionApp f P ≫ (ModuleCat.restrictScalars (R.map f)).map (app Y) =
        ModuleCat.ofHom (app X) ≫ restrictionApp f Q) :
    P ⟶ Q 
goal: P ⟶ Q

full_name: CorePresheafOfModules
code: /-- This structure contains the data and axioms in order to
produce a `PresheafOfModules R` from a collection of types
equipped with module structures over the various rings `R.obj X`.
(See the constructor `PresheafOfModules.mk'`.) -/
structure CorePresheafOfModules where
  /-- the datum of a type for each object in `Cᵒᵖ` -/
  obj (X : Cᵒᵖ) : Type v
  /-- the abelian group structure on the types `obj X` -/
  addCommGroup (X : Cᵒᵖ) : AddCommGroup (obj X) := by infer_instance
  /-- the module structure on the types `obj X` over the various rings `R.obj X` -/
  module (X : Cᵒᵖ) : Module (R.obj X) (obj X) := by infer_instance
  /-- the semi-linear restriction maps -/
  map {X Y : Cᵒᵖ} (f : X ⟶ Y) : obj X →ₛₗ[R.map f] obj Y
  /-- `map` is compatible with the identities -/
  map_id (X : Cᵒᵖ) (x : obj X) : map (𝟙 X) x = x := by aesop_cat
  /-- `map` is compatible with the composition -/
  map_comp {X Y Z : Cᵒᵖ} (f : X ⟶ Y) (g : Y ⟶ Z) (x : obj X) :
    map (f ≫ g) x = map g (map f x) := by aesop_cat
goal: Type (max (max (max u u₁) (v + 1)) v₁)

full_name: CorePresheafOfModules.obj
code: /-- This structure contains the data and axioms in order to
produce a `PresheafOfModules R` from a collection of types
equipped with module structures over the various rings `R.obj X`.
(See the constructor `PresheafOfModules.mk'`.) -/
structure CorePresheafOfModules where
  /-- the datum of a type for each object in `Cᵒᵖ` -/
  obj (X : Cᵒᵖ) : Type v
  /-- the abelian group structure on the types `obj X` -/
  addCommGroup (X : Cᵒᵖ) : AddCommGroup (obj X) := by infer_instance
  /-- the module structure on the types `obj X` over the various rings `R.obj X` -/
  module (X : Cᵒᵖ) : Module (R.obj X) (obj X) := by infer_instance
  /-- the semi-linear restriction maps -/
  map {X Y : Cᵒᵖ} (f : X ⟶ Y) : obj X →ₛₗ[R.map f] obj Y
  /-- `map` is compatible with the identities -/
  map_id (X : Cᵒᵖ) (x : obj X) : map (𝟙 X) x = x := by aesop_cat
  /-- `map` is compatible with the composition -/
  map_comp {X Y Z : Cᵒᵖ} (f : X ⟶ Y) (g : Y ⟶ Z) (x : obj X) :
    map (f ≫ g) x = map g (map f x) := by aesop_cat
goal: Type v

full_name: CorePresheafOfModules.addCommGroup
code: /-- This structure contains the data and axioms in order to
produce a `PresheafOfModules R` from a collection of types
equipped with module structures over the various rings `R.obj X`.
(See the constructor `PresheafOfModules.mk'`.) -/
structure CorePresheafOfModules where
  /-- the datum of a type for each object in `Cᵒᵖ` -/
  obj (X : Cᵒᵖ) : Type v
  /-- the abelian group structure on the types `obj X` -/
  addCommGroup (X : Cᵒᵖ) : AddCommGroup (obj X) := by infer_instance
  /-- the module structure on the types `obj X` over the various rings `R.obj X` -/
  module (X : Cᵒᵖ) : Module (R.obj X) (obj X) := by infer_instance
  /-- the semi-linear restriction maps -/
  map {X Y : Cᵒᵖ} (f : X ⟶ Y) : obj X →ₛₗ[R.map f] obj Y
  /-- `map` is compatible with the identities -/
  map_id (X : Cᵒᵖ) (x : obj X) : map (𝟙 X) x = x := by aesop_cat
  /-- `map` is compatible with the composition -/
  map_comp {X Y Z : Cᵒᵖ} (f : X ⟶ Y) (g : Y ⟶ Z) (x : obj X) :
    map (f ≫ g) x = map g (map f x) := by aesop_cat
goal: AddCommGroup (self.obj X)

full_name: CorePresheafOfModules.map_comp
code: /-- This structure contains the data and axioms in order to
produce a `PresheafOfModules R` from a collection of types
equipped with module structures over the various rings `R.obj X`.
(See the constructor `PresheafOfModules.mk'`.) -/
structure CorePresheafOfModules where
  /-- the datum of a type for each object in `Cᵒᵖ` -/
  obj (X : Cᵒᵖ) : Type v
  /-- the abelian group structure on the types `obj X` -/
  addCommGroup (X : Cᵒᵖ) : AddCommGroup (obj X) := by infer_instance
  /-- the module structure on the types `obj X` over the various rings `R.obj X` -/
  module (X : Cᵒᵖ) : Module (R.obj X) (obj X) := by infer_instance
  /-- the semi-linear restriction maps -/
  map {X Y : Cᵒᵖ} (f : X ⟶ Y) : obj X →ₛₗ[R.map f] obj Y
  /-- `map` is compatible with the identities -/
  map_id (X : Cᵒᵖ) (x : obj X) : map (𝟙 X) x = x := by aesop_cat
  /-- `map` is compatible with the composition -/
  map_comp {X Y Z : Cᵒᵖ} (f : X ⟶ Y) (g : Y ⟶ Z) (x : obj X) :
    map (f ≫ g) x = map g (map f x) := by aesop_cat
goal: (self.map (f ≫ g)) x = (self.map g) ((self.map f) x)

full_name: CorePresheafOfModules.map_id
code: /-- This structure contains the data and axioms in order to
produce a `PresheafOfModules R` from a collection of types
equipped with module structures over the various rings `R.obj X`.
(See the constructor `PresheafOfModules.mk'`.) -/
structure CorePresheafOfModules where
  /-- the datum of a type for each object in `Cᵒᵖ` -/
  obj (X : Cᵒᵖ) : Type v
  /-- the abelian group structure on the types `obj X` -/
  addCommGroup (X : Cᵒᵖ) : AddCommGroup (obj X) := by infer_instance
  /-- the module structure on the types `obj X` over the various rings `R.obj X` -/
  module (X : Cᵒᵖ) : Module (R.obj X) (obj X) := by infer_instance
  /-- the semi-linear restriction maps -/
  map {X Y : Cᵒᵖ} (f : X ⟶ Y) : obj X →ₛₗ[R.map f] obj Y
  /-- `map` is compatible with the identities -/
  map_id (X : Cᵒᵖ) (x : obj X) : map (𝟙 X) x = x := by aesop_cat
  /-- `map` is compatible with the composition -/
  map_comp {X Y Z : Cᵒᵖ} (f : X ⟶ Y) (g : Y ⟶ Z) (x : obj X) :
    map (f ≫ g) x = map g (map f x) := by aesop_cat
goal: (self.map (𝟙 X)) x = x

full_name: CorePresheafOfModules.module
code: /-- This structure contains the data and axioms in order to
produce a `PresheafOfModules R` from a collection of types
equipped with module structures over the various rings `R.obj X`.
(See the constructor `PresheafOfModules.mk'`.) -/
structure CorePresheafOfModules where
  /-- the datum of a type for each object in `Cᵒᵖ` -/
  obj (X : Cᵒᵖ) : Type v
  /-- the abelian group structure on the types `obj X` -/
  addCommGroup (X : Cᵒᵖ) : AddCommGroup (obj X) := by infer_instance
  /-- the module structure on the types `obj X` over the various rings `R.obj X` -/
  module (X : Cᵒᵖ) : Module (R.obj X) (obj X) := by infer_instance
  /-- the semi-linear restriction maps -/
  map {X Y : Cᵒᵖ} (f : X ⟶ Y) : obj X →ₛₗ[R.map f] obj Y
  /-- `map` is compatible with the identities -/
  map_id (X : Cᵒᵖ) (x : obj X) : map (𝟙 X) x = x := by aesop_cat
  /-- `map` is compatible with the composition -/
  map_comp {X Y Z : Cᵒᵖ} (f : X ⟶ Y) (g : Y ⟶ Z) (x : obj X) :
    map (f ≫ g) x = map g (map f x) := by aesop_cat
goal: Module (↑(R.obj X)) (self.obj X)

full_name: CorePresheafOfModules.map
code: /-- This structure contains the data and axioms in order to
produce a `PresheafOfModules R` from a collection of types
equipped with module structures over the various rings `R.obj X`.
(See the constructor `PresheafOfModules.mk'`.) -/
structure CorePresheafOfModules where
  /-- the datum of a type for each object in `Cᵒᵖ` -/
  obj (X : Cᵒᵖ) : Type v
  /-- the abelian group structure on the types `obj X` -/
  addCommGroup (X : Cᵒᵖ) : AddCommGroup (obj X) := by infer_instance
  /-- the module structure on the types `obj X` over the various rings `R.obj X` -/
  module (X : Cᵒᵖ) : Module (R.obj X) (obj X) := by infer_instance
  /-- the semi-linear restriction maps -/
  map {X Y : Cᵒᵖ} (f : X ⟶ Y) : obj X →ₛₗ[R.map f] obj Y
  /-- `map` is compatible with the identities -/
  map_id (X : Cᵒᵖ) (x : obj X) : map (𝟙 X) x = x := by aesop_cat
  /-- `map` is compatible with the composition -/
  map_comp {X Y Z : Cᵒᵖ} (f : X ⟶ Y) (g : Y ⟶ Z) (x : obj X) :
    map (f ≫ g) x = map g (map f x) := by aesop_cat
goal: self.obj X →ₛₗ[R.map f] self.obj Y

full_name: CorePresheafOfModules.presheaf_obj
code: /-- The presheaf of abelian groups attached to a `CorePresheafOfModules R`. -/
@[simps]
def presheaf : Cᵒᵖ ⥤ AddCommGrp.{v} 
goal: M.presheaf.obj X = AddCommGrp.of (M.obj X)

full_name: CorePresheafOfModules.presheaf_map
code: /-- The presheaf of abelian groups attached to a `CorePresheafOfModules R`. -/
@[simps]
def presheaf : Cᵒᵖ ⥤ AddCommGrp.{v} 
goal: ∀ {X Y : Cᵒᵖ} (f : X ⟶ Y), M.presheaf.map f = AddCommGrp.ofHom (M.map f).toAddMonoidHom

full_name: CorePresheafOfModules.presheaf
code: /-- The presheaf of abelian groups attached to a `CorePresheafOfModules R`. -/
@[simps]
def presheaf : Cᵒᵖ ⥤ AddCommGrp.{v} 
goal: Cᵒᵖ ⥤ AddCommGrp

full_name: CorePresheafOfModules.instModuleαRingObjOppositeRingCatAddCommGroupAddCommGrpPresheaf
code: instance (X : Cᵒᵖ) : Module (R.obj X) (M.presheaf.obj X) 
goal: Module ↑(R.obj X) ↑(M.presheaf.obj X)

full_name: CorePresheafOfModules.toPresheafOfModules
code: /-- Constructor for `PresheafOfModules R` based on a collection of types
equipped with module structures over the various rings `R.obj X`, see
the structure `CorePresheafOfModules`. -/
def toPresheafOfModules : PresheafOfModules R 
goal: PresheafOfModules R

full_name: CorePresheafOfModules.toPresheafOfModules_obj
code: @[simp]
lemma toPresheafOfModules_obj (X : Cᵒᵖ) :
    M.toPresheafOfModules.obj X = ModuleCat.of _ (M.obj X) 
goal: M.toPresheafOfModules.obj X = ModuleCat.of (↑(R.obj X)) (M.obj X)

full_name: CorePresheafOfModules.toPresheafOfModules_presheaf_map_apply
code: @[simp]
lemma toPresheafOfModules_presheaf_map_apply {X Y : Cᵒᵖ} (f : X ⟶ Y) (x : M.obj X) :
    M.toPresheafOfModules.presheaf.map f x = M.map f x 
goal: (M.toPresheafOfModules.presheaf.map f) x = (M.map f) x

full_name: BundledCorePresheafOfModules.map
code: /-- This structure contains the data and axioms in order to
produce a `PresheafOfModules R` from a collection of objects
of type `ModuleCat (R.obj X)` for all `X`, and restriction
maps expressed as linear maps to restriction of scalars.
(See the constructor `PresheafOfModules.mk''`.) -/
structure BundledCorePresheafOfModules where
  /-- the datum of a `ModuleCat (R.obj X)` for each object in `Cᵒᵖ` -/
  obj (X : Cᵒᵖ) : ModuleCat.{v} (R.obj X)
  /-- the restriction maps as linear maps to restriction of scalars -/
  map {X Y : Cᵒᵖ} (f : X ⟶ Y) : obj X ⟶ (ModuleCat.restrictScalars (R.map f)).obj (obj Y)
  /-- `map` is compatible with the identities -/
  map_id (X : Cᵒᵖ) :
    map (𝟙 X) = (ModuleCat.restrictScalarsId' (R.map (𝟙 X)) (R.map_id X)).inv.app (obj X) := by
      aesop
  /-- `map` is compatible with the composition -/
  map_comp {X Y Z : Cᵒᵖ} (f : X ⟶ Y) (g : Y ⟶ Z) :
    map (f ≫ g) = map f ≫ (ModuleCat.restrictScalars (R.map f)).map (map g) ≫
      (ModuleCat.restrictScalarsComp' (R.map f) (R.map g) (R.map (f ≫ g))
        (R.map_comp f g)).inv.app (obj Z) := by aesop
goal: self.obj X ⟶ (ModuleCat.restrictScalars (R.map f)).obj (self.obj Y)

full_name: BundledCorePresheafOfModules
code: /-- This structure contains the data and axioms in order to
produce a `PresheafOfModules R` from a collection of objects
of type `ModuleCat (R.obj X)` for all `X`, and restriction
maps expressed as linear maps to restriction of scalars.
(See the constructor `PresheafOfModules.mk''`.) -/
structure BundledCorePresheafOfModules where
  /-- the datum of a `ModuleCat (R.obj X)` for each object in `Cᵒᵖ` -/
  obj (X : Cᵒᵖ) : ModuleCat.{v} (R.obj X)
  /-- the restriction maps as linear maps to restriction of scalars -/
  map {X Y : Cᵒᵖ} (f : X ⟶ Y) : obj X ⟶ (ModuleCat.restrictScalars (R.map f)).obj (obj Y)
  /-- `map` is compatible with the identities -/
  map_id (X : Cᵒᵖ) :
    map (𝟙 X) = (ModuleCat.restrictScalarsId' (R.map (𝟙 X)) (R.map_id X)).inv.app (obj X) := by
      aesop
  /-- `map` is compatible with the composition -/
  map_comp {X Y Z : Cᵒᵖ} (f : X ⟶ Y) (g : Y ⟶ Z) :
    map (f ≫ g) = map f ≫ (ModuleCat.restrictScalars (R.map f)).map (map g) ≫
      (ModuleCat.restrictScalarsComp' (R.map f) (R.map g) (R.map (f ≫ g))
        (R.map_comp f g)).inv.app (obj Z) := by aesop
goal: Type (max (max (max u u₁) (v + 1)) v₁)

full_name: BundledCorePresheafOfModules.map_id
code: /-- This structure contains the data and axioms in order to
produce a `PresheafOfModules R` from a collection of objects
of type `ModuleCat (R.obj X)` for all `X`, and restriction
maps expressed as linear maps to restriction of scalars.
(See the constructor `PresheafOfModules.mk''`.) -/
structure BundledCorePresheafOfModules where
  /-- the datum of a `ModuleCat (R.obj X)` for each object in `Cᵒᵖ` -/
  obj (X : Cᵒᵖ) : ModuleCat.{v} (R.obj X)
  /-- the restriction maps as linear maps to restriction of scalars -/
  map {X Y : Cᵒᵖ} (f : X ⟶ Y) : obj X ⟶ (ModuleCat.restrictScalars (R.map f)).obj (obj Y)
  /-- `map` is compatible with the identities -/
  map_id (X : Cᵒᵖ) :
    map (𝟙 X) = (ModuleCat.restrictScalarsId' (R.map (𝟙 X)) (R.map_id X)).inv.app (obj X) := by
      aesop
  /-- `map` is compatible with the composition -/
  map_comp {X Y Z : Cᵒᵖ} (f : X ⟶ Y) (g : Y ⟶ Z) :
    map (f ≫ g) = map f ≫ (ModuleCat.restrictScalars (R.map f)).map (map g) ≫
      (ModuleCat.restrictScalarsComp' (R.map f) (R.map g) (R.map (f ≫ g))
        (R.map_comp f g)).inv.app (obj Z) := by aesop
goal: self.map (𝟙 X) = (ModuleCat.restrictScalarsId' (R.map (𝟙 X)) ⋯).inv.app (self.obj X)

full_name: BundledCorePresheafOfModules.map_comp
code: /-- This structure contains the data and axioms in order to
produce a `PresheafOfModules R` from a collection of objects
of type `ModuleCat (R.obj X)` for all `X`, and restriction
maps expressed as linear maps to restriction of scalars.
(See the constructor `PresheafOfModules.mk''`.) -/
structure BundledCorePresheafOfModules where
  /-- the datum of a `ModuleCat (R.obj X)` for each object in `Cᵒᵖ` -/
  obj (X : Cᵒᵖ) : ModuleCat.{v} (R.obj X)
  /-- the restriction maps as linear maps to restriction of scalars -/
  map {X Y : Cᵒᵖ} (f : X ⟶ Y) : obj X ⟶ (ModuleCat.restrictScalars (R.map f)).obj (obj Y)
  /-- `map` is compatible with the identities -/
  map_id (X : Cᵒᵖ) :
    map (𝟙 X) = (ModuleCat.restrictScalarsId' (R.map (𝟙 X)) (R.map_id X)).inv.app (obj X) := by
      aesop
  /-- `map` is compatible with the composition -/
  map_comp {X Y Z : Cᵒᵖ} (f : X ⟶ Y) (g : Y ⟶ Z) :
    map (f ≫ g) = map f ≫ (ModuleCat.restrictScalars (R.map f)).map (map g) ≫
      (ModuleCat.restrictScalarsComp' (R.map f) (R.map g) (R.map (f ≫ g))
        (R.map_comp f g)).inv.app (obj Z) := by aesop
goal: self.map (f ≫ g) =
  self.map f ≫
    (ModuleCat.restrictScalars (R.map f)).map (self.map g) ≫
      (ModuleCat.restrictScalarsComp' (R.map f) (R.map g) (R.map (f ≫ g)) ⋯).inv.app (self.obj Z)

full_name: BundledCorePresheafOfModules.obj
code: /-- This structure contains the data and axioms in order to
produce a `PresheafOfModules R` from a collection of objects
of type `ModuleCat (R.obj X)` for all `X`, and restriction
maps expressed as linear maps to restriction of scalars.
(See the constructor `PresheafOfModules.mk''`.) -/
structure BundledCorePresheafOfModules where
  /-- the datum of a `ModuleCat (R.obj X)` for each object in `Cᵒᵖ` -/
  obj (X : Cᵒᵖ) : ModuleCat.{v} (R.obj X)
  /-- the restriction maps as linear maps to restriction of scalars -/
  map {X Y : Cᵒᵖ} (f : X ⟶ Y) : obj X ⟶ (ModuleCat.restrictScalars (R.map f)).obj (obj Y)
  /-- `map` is compatible with the identities -/
  map_id (X : Cᵒᵖ) :
    map (𝟙 X) = (ModuleCat.restrictScalarsId' (R.map (𝟙 X)) (R.map_id X)).inv.app (obj X) := by
      aesop
  /-- `map` is compatible with the composition -/
  map_comp {X Y Z : Cᵒᵖ} (f : X ⟶ Y) (g : Y ⟶ Z) :
    map (f ≫ g) = map f ≫ (ModuleCat.restrictScalars (R.map f)).map (map g) ≫
      (ModuleCat.restrictScalarsComp' (R.map f) (R.map g) (R.map (f ≫ g))
        (R.map_comp f g)).inv.app (obj Z) := by aesop
goal: ModuleCat ↑(R.obj X)

full_name: BundledCorePresheafOfModules.toCorePresheafOfModules
code: /-- The obvious map `BundledCorePresheafOfModules R → CorePresheafOfModules R`. -/
noncomputable def toCorePresheafOfModules : CorePresheafOfModules R 
goal: CorePresheafOfModules R

full_name: BundledCorePresheafOfModules.toPresheafOfModules
code: /-- Constructor for `PresheafOfModules R` based on a collection of objects
of type `ModuleCat (R.obj X)` for all `X`, and restriction maps expressed
as linear maps to restriction of scalars, see
the structure `BundledCorePresheafOfModules`. -/
noncomputable def toPresheafOfModules : PresheafOfModules R 
goal: PresheafOfModules R

full_name: BundledCorePresheafOfModules.toPresheafOfModules_obj
code: @[simp]
lemma toPresheafOfModules_obj (X : Cᵒᵖ) :
    M.toPresheafOfModules.obj X = (M.obj X).carrier 
goal: ↑(M.toPresheafOfModules.obj X) = ↑(M.obj X)

full_name: BundledCorePresheafOfModules.toPresheafOfModules_presheaf_map_apply
code: @[simp]
lemma toPresheafOfModules_presheaf_map_apply {X Y : Cᵒᵖ} (f : X ⟶ Y) (x : M.obj X) :
    M.toPresheafOfModules.presheaf.map f x = M.map f x 
goal: (M.toPresheafOfModules.presheaf.map f) x = (M.map f) x

full_name: BundledCorePresheafOfModules.restrictionApp_toPresheafOfModules
code: @[simp]
lemma restrictionApp_toPresheafOfModules {X Y : Cᵒᵖ} (f : X ⟶ Y) :
    PresheafOfModules.restrictionApp f M.toPresheafOfModules = M.map f 
goal: PresheafOfModules.restrictionApp f M.toPresheafOfModules = M.map f

full_name: PresheafOfModules.unitCore
code: /-- Auxiliary definition for `unit`. -/
def unitCore : CorePresheafOfModules R 
goal: CorePresheafOfModules R

full_name: PresheafOfModules.unit
code: /-- The obvious free presheaf of modules of rank `1`. -/
abbrev unit : PresheafOfModules R 
goal: PresheafOfModules R

full_name: PresheafOfModules.unit_map_one
code: lemma unit_map_one {X Y : Cᵒᵖ} (f : X ⟶ Y) : (unit R).map f (1 : R.obj X) = (1 : R.obj Y) 
goal: ((PresheafOfModules.unit R).map f) 1 = 1

full_name: PresheafOfModules.sections
code: /-- The type of sections of a presheaf of modules. -/
def sections (M : PresheafOfModules.{v} R) : Type _ 
goal: Type (max u₁ v)

full_name: PresheafOfModules.sections_property
code: @[simp]
lemma sections_property {M : PresheafOfModules.{v} R} (s : M.sections)
    {X Y : Cᵒᵖ} (f : X ⟶ Y) : M.map f (s.1 X) = s.1 Y 
goal: (M.map f) (↑s X) = ↑s Y

full_name: PresheafOfModules.sectionsMk
code: /-- Constructor for sections of a presheaf of modules. -/
@[simps]
def sectionsMk {M : PresheafOfModules.{v} R} (s : ∀ X, M.obj X)
    (hs : ∀ ⦃X Y : Cᵒᵖ⦄ (f : X ⟶ Y), M.map f (s X) = s Y) : M.sections 
goal: M.sections

full_name: PresheafOfModules.sectionsMk_coe
code: /-- Constructor for sections of a presheaf of modules. -/
@[simps]
def sectionsMk {M : PresheafOfModules.{v} R} (s : ∀ X, M.obj X)
    (hs : ∀ ⦃X Y : Cᵒᵖ⦄ (f : X ⟶ Y), M.map f (s X) = s Y) : M.sections 
goal: ↑(PresheafOfModules.sectionsMk s hs) X = s X

full_name: PresheafOfModules.sections_ext
code: @[ext]
lemma sections_ext {M : PresheafOfModules.{v} R} (s t : M.sections)
    (h : ∀ (X : Cᵒᵖ), s.val X = t.val X) : s = t 
goal: s = t

full_name: PresheafOfModules.sectionsMap_coe
code: /-- The map `M.sections → N.sections` induced by a morphisms `M ⟶ N` of presheaves of modules. -/
@[simps!]
def sectionsMap {M N : PresheafOfModules.{v} R} (f : M ⟶ N) (s : M.sections) : N.sections 
goal: ↑(PresheafOfModules.sectionsMap f s) X = (PresheafOfModules.Hom.app f X) (↑s X)

full_name: PresheafOfModules.sectionsMap
code: /-- The map `M.sections → N.sections` induced by a morphisms `M ⟶ N` of presheaves of modules. -/
@[simps!]
def sectionsMap {M N : PresheafOfModules.{v} R} (f : M ⟶ N) (s : M.sections) : N.sections 
goal: N.sections

full_name: PresheafOfModules.sectionsMap_comp
code: @[simp]
lemma sectionsMap_comp {M N P : PresheafOfModules.{v} R} (f : M ⟶ N) (g : N ⟶ P) (s : M.sections) :
    sectionsMap (f ≫ g) s = sectionsMap g (sectionsMap f s) 
goal: PresheafOfModules.sectionsMap (f ≫ g) s = PresheafOfModules.sectionsMap g (PresheafOfModules.sectionsMap f s)

full_name: PresheafOfModules.sectionsMap_id
code: @[simp]
lemma sectionsMap_id {M : PresheafOfModules.{v} R} (s : M.sections) :
    sectionsMap (𝟙 M) s = s 
goal: PresheafOfModules.sectionsMap (𝟙 M) s = s

full_name: PresheafOfModules.unitHomEquiv
code: /-- The bijection `(unit R ⟶ M) ≃ M.sections` for `M : PresheafOfModules R`. -/
@[simps! apply_coe]
def unitHomEquiv (M : PresheafOfModules R) :
    (unit R ⟶ M) ≃ M.sections 
goal: (PresheafOfModules.unit R ⟶ M) ≃ M.sections

full_name: PresheafOfModules.unitHomEquiv_apply_coe
code: /-- The bijection `(unit R ⟶ M) ≃ M.sections` for `M : PresheafOfModules R`. -/
@[simps! apply_coe]
def unitHomEquiv (M : PresheafOfModules R) :
    (unit R ⟶ M) ≃ M.sections 
goal: ↑(M.unitHomEquiv f) X = (PresheafOfModules.Hom.app f X) 1

full_name: PresheafOfModules.forgetToPresheafModuleCatObj
code: /--
Implementation of the functor `PresheafOfModules R ⥤ Cᵒᵖ ⥤ ModuleCat (R.obj X)`
when `X` is initial.

The functor is implemented as, on object level `M ↦ (c ↦ M(c))` where the `R(X)`-module structure
on `M(c)` is given by restriction of scalars along the unique morphism `R(c) ⟶ R(X)`; and on
morphism level `(f : M ⟶ N) ↦ (c ↦ f(c))`.
-/
@[simps]
noncomputable def forgetToPresheafModuleCatObj
    (X : Cᵒᵖ) (hX : Limits.IsInitial X) (M : PresheafOfModules.{v} R) :
    Cᵒᵖ ⥤ ModuleCat (R.1.obj X) 
goal: Cᵒᵖ ⥤ ModuleCat ↑(R.obj X)

full_name: PresheafOfModules.forgetToPresheafModuleCatObj_map_apply
code: /--
Implementation of the functor `PresheafOfModules R ⥤ Cᵒᵖ ⥤ ModuleCat (R.obj X)`
when `X` is initial.

The functor is implemented as, on object level `M ↦ (c ↦ M(c))` where the `R(X)`-module structure
on `M(c)` is given by restriction of scalars along the unique morphism `R(c) ⟶ R(X)`; and on
morphism level `(f : M ⟶ N) ↦ (c ↦ f(c))`.
-/
@[simps]
noncomputable def forgetToPresheafModuleCatObj
    (X : Cᵒᵖ) (hX : Limits.IsInitial X) (M : PresheafOfModules.{v} R) :
    Cᵒᵖ ⥤ ModuleCat (R.1.obj X) 
goal: ((PresheafOfModules.forgetToPresheafModuleCatObj X hX M).map f) x = (M.presheaf.map f) x

full_name: PresheafOfModules.forgetToPresheafModuleCatObj_obj
code: /--
Implementation of the functor `PresheafOfModules R ⥤ Cᵒᵖ ⥤ ModuleCat (R.obj X)`
when `X` is initial.

The functor is implemented as, on object level `M ↦ (c ↦ M(c))` where the `R(X)`-module structure
on `M(c)` is given by restriction of scalars along the unique morphism `R(c) ⟶ R(X)`; and on
morphism level `(f : M ⟶ N) ↦ (c ↦ f(c))`.
-/
@[simps]
noncomputable def forgetToPresheafModuleCatObj
    (X : Cᵒᵖ) (hX : Limits.IsInitial X) (M : PresheafOfModules.{v} R) :
    Cᵒᵖ ⥤ ModuleCat (R.1.obj X) 
goal: (PresheafOfModules.forgetToPresheafModuleCatObj X hX M).obj c =
  (ModuleCat.restrictScalars (R.map (hX.to c))).obj (M.obj c)

full_name: PresheafOfModules.forgetToPresheafModuleCatMap
code: /--
Implementation of the functor `PresheafOfModules R ⥤ Cᵒᵖ ⥤ ModuleCat (R.obj X)`
when `X` is initial.

The functor is implemented as, on object level `M ↦ (c ↦ M(c))` where the `R(X)`-module structure
on `M(c)` is given by restriction of scalars along the unique morphism `R(c) ⟶ R(X)`; and on
morphism level `(f : M ⟶ N) ↦ (c ↦ f(c))`.
-/
noncomputable def forgetToPresheafModuleCatMap
    (X : Cᵒᵖ) (hX : Limits.IsInitial X) {M N : PresheafOfModules.{v} R}
    (f : M ⟶ N) :
    forgetToPresheafModuleCatObj X hX M ⟶
    forgetToPresheafModuleCatObj X hX N 
goal: PresheafOfModules.forgetToPresheafModuleCatObj X hX M ⟶ PresheafOfModules.forgetToPresheafModuleCatObj X hX N

full_name: PresheafOfModules.forgetToPresheafModuleCat
code: /--
The forgetful functor from presheaves of modules over a presheaf of rings `R` to presheaves of
`R(X)`-modules where `X` is an initial object.

The functor is implemented as, on object level `M ↦ (c ↦ M(c))` where the `R(X)`-module structure
on `M(c)` is given by restriction of scalars along the unique morphism `R(c) ⟶ R(X)`; and on
morphism level `(f : M ⟶ N) ↦ (c ↦ f(c))`.
-/
@[simps]
noncomputable def forgetToPresheafModuleCat (X : Cᵒᵖ) (hX : Limits.IsInitial X) :
    PresheafOfModules.{v} R ⥤ Cᵒᵖ ⥤ ModuleCat (R.1.obj X) 
goal: PresheafOfModules R ⥤ Cᵒᵖ ⥤ ModuleCat ↑(R.obj X)

full_name: PresheafOfModules.forgetToPresheafModuleCat_obj
code: /--
The forgetful functor from presheaves of modules over a presheaf of rings `R` to presheaves of
`R(X)`-modules where `X` is an initial object.

The functor is implemented as, on object level `M ↦ (c ↦ M(c))` where the `R(X)`-module structure
on `M(c)` is given by restriction of scalars along the unique morphism `R(c) ⟶ R(X)`; and on
morphism level `(f : M ⟶ N) ↦ (c ↦ f(c))`.
-/
@[simps]
noncomputable def forgetToPresheafModuleCat (X : Cᵒᵖ) (hX : Limits.IsInitial X) :
    PresheafOfModules.{v} R ⥤ Cᵒᵖ ⥤ ModuleCat (R.1.obj X) 
goal: (PresheafOfModules.forgetToPresheafModuleCat X hX).obj M = PresheafOfModules.forgetToPresheafModuleCatObj X hX M

full_name: PresheafOfModules.forgetToPresheafModuleCat_map
code: /--
The forgetful functor from presheaves of modules over a presheaf of rings `R` to presheaves of
`R(X)`-modules where `X` is an initial object.

The functor is implemented as, on object level `M ↦ (c ↦ M(c))` where the `R(X)`-module structure
on `M(c)` is given by restriction of scalars along the unique morphism `R(c) ⟶ R(X)`; and on
morphism level `(f : M ⟶ N) ↦ (c ↦ f(c))`.
-/
@[simps]
noncomputable def forgetToPresheafModuleCat (X : Cᵒᵖ) (hX : Limits.IsInitial X) :
    PresheafOfModules.{v} R ⥤ Cᵒᵖ ⥤ ModuleCat (R.1.obj X) 
goal: ∀ {X_1 Y : PresheafOfModules R} (f : X_1 ⟶ Y),
  (PresheafOfModules.forgetToPresheafModuleCat X hX).map f = PresheafOfModules.forgetToPresheafModuleCatMap X hX f