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

full_name: CategoryTheory.Presieve.FamilyOfElements.smul
code: /-- The scalar multiplication of family of elements of a presheaf of modules `M` over `R`
by a family of elements of `R`. -/
def smul : FamilyOfElements (M.presheaf ⋙ forget _) P 
goal: CategoryTheory.Presieve.FamilyOfElements (M.presheaf ⋙ CategoryTheory.forget AddCommGrp) P

full_name: PresheafOfModules.Sheafify.app_eq_of_isLocallyInjective
code: lemma _root_.PresheafOfModules.Sheafify.app_eq_of_isLocallyInjective
    {Y : C} (r₀ r₀' : R₀.obj (Opposite.op Y))
    (m₀ m₀' : M₀.presheaf.obj (Opposite.op Y))
    (hr₀ : α.app _ r₀ = α.app _ r₀')
    (hm₀ : φ.app _ m₀ = φ.app _ m₀') :
    φ.app _ (r₀ • m₀) = φ.app _ (r₀' • m₀') 
goal: (φ.app (Opposite.op Y)) (r₀ • m₀) = (φ.app (Opposite.op Y)) (r₀' • m₀')

full_name: CategoryTheory.Presieve.FamilyOfElements.isCompatible_map_smul_aux
code: lemma isCompatible_map_smul_aux {Y Z : C} (f : Y ⟶ X) (g : Z ⟶ Y)
    (r₀ : R₀.obj (Opposite.op Y)) (r₀' : R₀.obj (Opposite.op Z))
    (m₀ : M₀.presheaf.obj (Opposite.op Y)) (m₀' : M₀.presheaf.obj (Opposite.op Z))
    (hr₀ : α.app _ r₀ = R.map f.op r) (hr₀' : α.app _ r₀' = R.map (f.op ≫ g.op) r)
    (hm₀ : φ.app _ m₀ = A.map f.op m) (hm₀' : φ.app _ m₀' = A.map (f.op ≫ g.op) m) :
    φ.app _ (M₀.presheaf.map g.op (r₀ • m₀)) = φ.app _ (r₀' • m₀') 
goal: (φ.app (Opposite.op Z)) ((M₀.presheaf.map g.op) (r₀ • m₀)) = (φ.app (Opposite.op Z)) (r₀' • m₀')

full_name: CategoryTheory.Presieve.FamilyOfElements.isCompatible_map_smul
code: lemma isCompatible_map_smul : ((r₀.smul m₀).map (whiskerRight φ (forget _))).Compatible 
goal: ((r₀.smul m₀).map (CategoryTheory.whiskerRight φ (CategoryTheory.forget AddCommGrp))).Compatible

full_name: PresheafOfModules.Sheafify.SMulCandidate.x
code: /-- Assuming `α : R₀ ⟶ R.val` is the sheafification map of a presheaf of rings `R₀`
and `φ : M₀.presheaf ⟶ A.val` is the sheafification map of the underlying
sheaf of abelian groups of a presheaf of modules `M₀` over `R₀`, then given
`r : R.val.obj X` and `m : A.val.obj X`, this structure contains the data
of `x : A.val.obj X` along with the property which makes `x` a good candidate
for the definition of the scalar multiplication `r • m`. -/
structure SMulCandidate where
  /-- The candidate for the scalar product `r • m`. -/
  x : A.val.obj X
  h ⦃Y : Cᵒᵖ⦄ (f : X ⟶ Y) (r₀ : R₀.obj Y) (hr₀ : α.app Y r₀ = R.val.map f r)
    (m₀ : M₀.obj Y) (hm₀ : φ.app Y m₀ = A.val.map f m) : A.val.map f x = φ.app Y (r₀ • m₀)
goal: ↑(A.val.obj X)

full_name: PresheafOfModules.Sheafify.SMulCandidate.h
code: /-- Assuming `α : R₀ ⟶ R.val` is the sheafification map of a presheaf of rings `R₀`
and `φ : M₀.presheaf ⟶ A.val` is the sheafification map of the underlying
sheaf of abelian groups of a presheaf of modules `M₀` over `R₀`, then given
`r : R.val.obj X` and `m : A.val.obj X`, this structure contains the data
of `x : A.val.obj X` along with the property which makes `x` a good candidate
for the definition of the scalar multiplication `r • m`. -/
structure SMulCandidate where
  /-- The candidate for the scalar product `r • m`. -/
  x : A.val.obj X
  h ⦃Y : Cᵒᵖ⦄ (f : X ⟶ Y) (r₀ : R₀.obj Y) (hr₀ : α.app Y r₀ = R.val.map f r)
    (m₀ : M₀.obj Y) (hm₀ : φ.app Y m₀ = A.val.map f m) : A.val.map f x = φ.app Y (r₀ • m₀)
goal: (A.val.map f) self.x = (φ.app Y) (r₀ • m₀)

full_name: PresheafOfModules.Sheafify.SMulCandidate
code: /-- Assuming `α : R₀ ⟶ R.val` is the sheafification map of a presheaf of rings `R₀`
and `φ : M₀.presheaf ⟶ A.val` is the sheafification map of the underlying
sheaf of abelian groups of a presheaf of modules `M₀` over `R₀`, then given
`r : R.val.obj X` and `m : A.val.obj X`, this structure contains the data
of `x : A.val.obj X` along with the property which makes `x` a good candidate
for the definition of the scalar multiplication `r • m`. -/
structure SMulCandidate where
  /-- The candidate for the scalar product `r • m`. -/
  x : A.val.obj X
  h ⦃Y : Cᵒᵖ⦄ (f : X ⟶ Y) (r₀ : R₀.obj Y) (hr₀ : α.app Y r₀ = R.val.map f r)
    (m₀ : M₀.obj Y) (hm₀ : φ.app Y m₀ = A.val.map f m) : A.val.map f x = φ.app Y (r₀ • m₀)
goal: Type v

full_name: PresheafOfModules.Sheafify.SMulCandidate.mk'
code: /-- Constructor for `SMulCandidate`. -/
def SMulCandidate.mk' (S : Sieve X.unop) (hS : S ∈ J X.unop)
    (r₀ : Presieve.FamilyOfElements (R₀ ⋙ forget _) S.arrows)
    (m₀ : Presieve.FamilyOfElements (M₀.presheaf ⋙ forget _) S.arrows)
    (hr₀ : (r₀.map (whiskerRight α (forget _))).IsAmalgamation r)
    (hm₀ : (m₀.map (whiskerRight φ (forget _))).IsAmalgamation m)
    (a : A.val.obj X)
    (ha : ((r₀.smul m₀).map (whiskerRight φ (forget _))).IsAmalgamation a) :
    SMulCandidate α φ r m 
goal: PresheafOfModules.Sheafify.SMulCandidate α φ r m

full_name: PresheafOfModules.Sheafify.instNonemptySMulCandidate
code: instance : Nonempty (SMulCandidate α φ r m) 
goal: Nonempty (PresheafOfModules.Sheafify.SMulCandidate α φ r m)

full_name: PresheafOfModules.Sheafify.instSubsingletonSMulCandidate
code: instance : Subsingleton (SMulCandidate α φ r m) 
goal: Subsingleton (PresheafOfModules.Sheafify.SMulCandidate α φ r m)

full_name: PresheafOfModules.Sheafify.instUniqueSMulCandidate
code: noncomputable instance : Unique (SMulCandidate α φ r m) 
goal: Unique (PresheafOfModules.Sheafify.SMulCandidate α φ r m)

full_name: PresheafOfModules.Sheafify.smulCandidate
code: /-- The (unique) element in `SMulCandidate α φ r m`. -/
noncomputable def smulCandidate : SMulCandidate α φ r m 
goal: PresheafOfModules.Sheafify.SMulCandidate α φ r m

full_name: PresheafOfModules.Sheafify.smul
code: /-- The scalar multiplication on the sheafification of a presheaf of modules. -/
noncomputable def smul : A.val.obj X 
goal: ↑(A.val.obj X)

full_name: PresheafOfModules.Sheafify.map_smul_eq
code: lemma map_smul_eq {Y : Cᵒᵖ} (f : X ⟶ Y) (r₀ : R₀.obj Y) (hr₀ : α.app Y r₀ = R.val.map f r)
    (m₀ : M₀.obj Y) (hm₀ : φ.app Y m₀ = A.val.map f m) :
    A.val.map f (smul α φ r m) = φ.app Y (r₀ • m₀) 
goal: (A.val.map f) (PresheafOfModules.Sheafify.smul α φ r m) = (φ.app Y) (r₀ • m₀)

full_name: PresheafOfModules.Sheafify.one_smul
code: protected lemma one_smul : smul α φ 1 m = m 
goal: PresheafOfModules.Sheafify.smul α φ 1 m = m

full_name: PresheafOfModules.Sheafify.zero_smul
code: protected lemma zero_smul : smul α φ 0 m = 0 
goal: PresheafOfModules.Sheafify.smul α φ 0 m = 0

full_name: PresheafOfModules.Sheafify.smul_zero
code: protected lemma smul_zero : smul α φ r 0 = 0 
goal: PresheafOfModules.Sheafify.smul α φ r 0 = 0

full_name: PresheafOfModules.Sheafify.smul_add
code: protected lemma smul_add : smul α φ r (m + m') = smul α φ r m + smul α φ r m' 
goal: PresheafOfModules.Sheafify.smul α φ r (m + m') =
  PresheafOfModules.Sheafify.smul α φ r m + PresheafOfModules.Sheafify.smul α φ r m'

full_name: PresheafOfModules.Sheafify.add_smul
code: protected lemma add_smul : smul α φ (r + r') m = smul α φ r m + smul α φ r' m 
goal: PresheafOfModules.Sheafify.smul α φ (r + r') m =
  PresheafOfModules.Sheafify.smul α φ r m + PresheafOfModules.Sheafify.smul α φ r' m

full_name: PresheafOfModules.Sheafify.mul_smul
code: protected lemma mul_smul : smul α φ (r * r') m = smul α φ r (smul α φ r' m) 
goal: PresheafOfModules.Sheafify.smul α φ (r * r') m =
  PresheafOfModules.Sheafify.smul α φ r (PresheafOfModules.Sheafify.smul α φ r' m)

full_name: PresheafOfModules.Sheafify.module
code: /-- The module structure on the sections of the sheafification of the underlying
presheaf of abelian groups of a presheaf of modules. -/
noncomputable def module : Module (R.val.obj X) (A.val.obj X) 
goal: Module ↑(R.val.obj X) ↑(A.val.obj X)

full_name: PresheafOfModules.Sheafify.map_smul
code: lemma map_smul :
    A.val.map π (smul α φ r m) = smul α φ (R.val.map π r) (A.val.map π m) 
goal: (A.val.map π) (PresheafOfModules.Sheafify.smul α φ r m) =
  PresheafOfModules.Sheafify.smul α φ ((R.val.map π) r) ((A.val.map π) m)

full_name: PresheafOfModules.sheafify
code: /-- Assuming `α : R₀ ⟶ R.val` is the sheafification map of a presheaf of rings `R₀`
and `φ : M₀.presheaf ⟶ A.val` is the sheafification map of the underlying
sheaf of abelian groups of a presheaf of modules `M₀` over `R₀`, this is
the sheaf of modules over `R` which is obtained by endowing the sections of
`A.val` with a scalar multiplication. -/
noncomputable def sheafify : SheafOfModules.{v} R 
goal: SheafOfModules R

full_name: PresheafOfModules.toSheafify
code: /-- The canonical morphism from a presheaf of modules to its associated sheaf. -/
@[simps]
def toSheafify : M₀ ⟶ (restrictScalars α).obj (sheafify α φ).val 
goal: M₀ ⟶ (PresheafOfModules.restrictScalars α).obj (PresheafOfModules.sheafify α φ).val

full_name: PresheafOfModules.toSheafify_hom
code: /-- The canonical morphism from a presheaf of modules to its associated sheaf. -/
@[simps]
def toSheafify : M₀ ⟶ (restrictScalars α).obj (sheafify α φ).val 
goal: (PresheafOfModules.toSheafify α φ).hom = φ

full_name: PresheafOfModules.instIsLocallyInjectiveAddCommGrpHomToSheafify
code: instance : Presheaf.IsLocallyInjective J (toSheafify α φ).hom 
goal: CategoryTheory.Presheaf.IsLocallyInjective J (PresheafOfModules.toSheafify α φ).hom

full_name: PresheafOfModules.instIsLocallySurjectiveAddCommGrpHomToSheafify
code: instance : Presheaf.IsLocallySurjective J (toSheafify α φ).hom 
goal: CategoryTheory.Presheaf.IsLocallySurjective J (PresheafOfModules.toSheafify α φ).hom

full_name: PresheafOfModules.sheafifyHomEquiv'
code: /-- The bijection `((sheafify α φ).val ⟶ F) ≃ (M₀ ⟶ (restrictScalars α).obj F)` which
is part of the universal property of the sheafification of the presheaf of modules `M₀`,
when `F` is a presheaf of modules which is a sheaf. -/
noncomputable def sheafifyHomEquiv' {F : PresheafOfModules.{v} R.val}
    (hF : Presheaf.IsSheaf J F.presheaf) :
    ((sheafify α φ).val ⟶ F) ≃ (M₀ ⟶ (restrictScalars α).obj F) 
goal: ((PresheafOfModules.sheafify α φ).val ⟶ F) ≃ (M₀ ⟶ (PresheafOfModules.restrictScalars α).obj F)

full_name: PresheafOfModules.comp_sheafifyHomEquiv'_symm_hom
code: lemma comp_sheafifyHomEquiv'_symm_hom {F : PresheafOfModules.{v} R.val}
    (hF : Presheaf.IsSheaf J F.presheaf) (f : M₀ ⟶ (restrictScalars α).obj F) :
    φ ≫ ((sheafifyHomEquiv' α φ hF).symm f).hom = f.hom 
goal: φ ≫ ((PresheafOfModules.sheafifyHomEquiv' α φ hF).symm f).hom = f.hom

full_name: PresheafOfModules.sheafifyHomEquiv
code: /-- The bijection
`(sheafify α φ ⟶ F) ≃ (M₀ ⟶ (restrictScalars α).obj ((SheafOfModules.forget _).obj F))`
which is part of the universal property of the sheafification of the presheaf of modules `M₀`,
for any sheaf of modules `F`, see `PresheafOfModules.sheafificationAdjunction` -/
noncomputable def sheafifyHomEquiv {F : SheafOfModules.{v} R} :
    (sheafify α φ ⟶ F) ≃
      (M₀ ⟶ (restrictScalars α).obj ((SheafOfModules.forget _).obj F)) 
goal: (PresheafOfModules.sheafify α φ ⟶ F) ≃
  (M₀ ⟶ (PresheafOfModules.restrictScalars α).obj ((SheafOfModules.forget R).obj F))

full_name: PresheafOfModules.sheafifyMap_val_hom
code: /-- The morphism of sheaves of modules `sheafify α φ ⟶ sheafify α φ'`
induced by morphisms `τ₀ : M₀ ⟶ M₀'` and `τ : A ⟶ A'`
which satisfy `τ₀.hom ≫ φ' = φ ≫ τ.val`. -/
@[simps]
def sheafifyMap : sheafify α φ ⟶ sheafify α φ' 
goal: (PresheafOfModules.sheafifyMap α φ φ' τ₀ τ fac).val.hom = τ.val

full_name: PresheafOfModules.sheafifyMap
code: /-- The morphism of sheaves of modules `sheafify α φ ⟶ sheafify α φ'`
induced by morphisms `τ₀ : M₀ ⟶ M₀'` and `τ : A ⟶ A'`
which satisfy `τ₀.hom ≫ φ' = φ ≫ τ.val`. -/
@[simps]
def sheafifyMap : sheafify α φ ⟶ sheafify α φ' 
goal: PresheafOfModules.sheafify α φ ⟶ PresheafOfModules.sheafify α φ'