Theorem: PresheafOfModules.forgetToPresheafModuleCatObj_map_apply
File: Mathlib/Algebra/Category/ModuleCat/Presheaf.lean

Proof steps:
state_before: C : Type u₁
inst✝ : Category.{v₁, u₁} C
R : Cᵒᵖ ⥤ RingCat
X : Cᵒᵖ
hX : Limits.IsInitial X
M : PresheafOfModules R
c₁ c₂ : Cᵒᵖ
f : c₁ ⟶ c₂
r : ↑(R.obj X)
m : ↑((ModuleCat.restrictScalars (R.map (hX.to c₁))).obj (M.obj c₁))
⊢ { toFun := fun x => (M.presheaf.map f) x, map_add' := ⋯ }.toFun (r • m) =
    (RingHom.id ↑(R.obj X)) r • { toFun := fun x => (M.presheaf.map f) x, map_add' := ⋯ }.toFun m
state_after: C : Type u₁
inst✝ : Category.{v₁, u₁} C
R : Cᵒᵖ ⥤ RingCat
X : Cᵒᵖ
hX : Limits.IsInitial X
M : PresheafOfModules R
c₁ c₂ : Cᵒᵖ
f : c₁ ⟶ c₂
r : ↑(R.obj X)
m : ↑((ModuleCat.restrictScalars (R.map (hX.to c₁))).obj (M.obj c₁))
⊢ (R.map f) ((R.map (hX.to c₁)) r) • (M.presheaf.map f) m = r • (M.presheaf.map f) m
tactic: simp only [ModuleCat.restrictScalars.smul_def, RingHom.id_apply, M.map_smul]
state_before: C : Type u₁
inst✝ : Category.{v₁, u₁} C
R : Cᵒᵖ ⥤ RingCat
X : Cᵒᵖ
hX : Limits.IsInitial X
M : PresheafOfModules R
c₁ c₂ : Cᵒᵖ
f : c₁ ⟶ c₂
r : ↑(R.obj X)
m : ↑((ModuleCat.restrictScalars (R.map (hX.to c₁))).obj (M.obj c₁))
⊢ (R.map f) ((R.map (hX.to c₁)) r) • (M.presheaf.map f) m = r • (M.presheaf.map f) m
state_after: C : Type u₁
inst✝ : Category.{v₁, u₁} C
R : Cᵒᵖ ⥤ RingCat
X : Cᵒᵖ
hX : Limits.IsInitial X
M : PresheafOfModules R
c₁ c₂ : Cᵒᵖ
f : c₁ ⟶ c₂
r : ↑(R.obj X)
m : ↑((ModuleCat.restrictScalars (R.map (hX.to c₁))).obj (M.obj c₁))
⊢ (R.map (hX.to c₁ ≫ f)) r • (M.presheaf.map f) m = r • (M.presheaf.map f) m
tactic: rw [← CategoryTheory.comp_apply, ← R.map_comp]
state_before: C : Type u₁
inst✝ : Category.{v₁, u₁} C
R : Cᵒᵖ ⥤ RingCat
X : Cᵒᵖ
hX : Limits.IsInitial X
M : PresheafOfModules R
c₁ c₂ : Cᵒᵖ
f : c₁ ⟶ c₂
r : ↑(R.obj X)
m : ↑((ModuleCat.restrictScalars (R.map (hX.to c₁))).obj (M.obj c₁))
⊢ (R.map (hX.to c₁ ≫ f)) r • (M.presheaf.map f) m = r • (M.presheaf.map f) m
state_after: case e_a.e_a.e_a
C : Type u₁
inst✝ : Category.{v₁, u₁} C
R : Cᵒᵖ ⥤ RingCat
X : Cᵒᵖ
hX : Limits.IsInitial X
M : PresheafOfModules R
c₁ c₂ : Cᵒᵖ
f : c₁ ⟶ c₂
r : ↑(R.obj X)
m : ↑((ModuleCat.restrictScalars (R.map (hX.to c₁))).obj (M.obj c₁))
⊢ hX.to c₁ ≫ f = hX.to c₂
tactic: congr
state_before: case e_a.e_a.e_a
C : Type u₁
inst✝ : Category.{v₁, u₁} C
R : Cᵒᵖ ⥤ RingCat
X : Cᵒᵖ
hX : Limits.IsInitial X
M : PresheafOfModules R
c₁ c₂ : Cᵒᵖ
f : c₁ ⟶ c₂
r : ↑(R.obj X)
m : ↑((ModuleCat.restrictScalars (R.map (hX.to c₁))).obj (M.obj c₁))
⊢ hX.to c₁ ≫ f = hX.to c₂
state_after: no goals
tactic: apply hX.hom_ext
state_before: C : Type u₁
inst✝ : Category.{v₁, u₁} C
R : Cᵒᵖ ⥤ RingCat
X : Cᵒᵖ
hX : Limits.IsInitial X
M : PresheafOfModules R
c : Cᵒᵖ
⊢ { obj := fun c => (ModuleCat.restrictScalars (R.map (hX.to c))).obj (M.obj c),
          map := fun {c₁ c₂} f => { toFun := fun x => (M.presheaf.map f) x, map_add' := ⋯, map_smul' := ⋯ } }.map
      (𝟙 c) =
    𝟙
      ({ obj := fun c => (ModuleCat.restrictScalars (R.map (hX.to c))).obj (M.obj c),
            map := fun {c₁ c₂} f => { toFun := fun x => (M.presheaf.map f) x, map_add' := ⋯, map_smul' := ⋯ } }.obj
        c)
state_after: case h
C : Type u₁
inst✝ : Category.{v₁, u₁} C
R : Cᵒᵖ ⥤ RingCat
X : Cᵒᵖ
hX : Limits.IsInitial X
M : PresheafOfModules R
c : Cᵒᵖ
x✝ :
  ↑({ obj := fun c => (ModuleCat.restrictScalars (R.map (hX.to c))).obj (M.obj c),
          map := fun {c₁ c₂} f => { toFun := fun x => (M.presheaf.map f) x, map_add' := ⋯, map_smul' := ⋯ } }.obj
      c)
⊢ ({ obj := fun c => (ModuleCat.restrictScalars (R.map (hX.to c))).obj (M.obj c),
            map := fun {c₁ c₂} f => { toFun := fun x => (M.presheaf.map f) x, map_add' := ⋯, map_smul' := ⋯ } }.map
        (𝟙 c))
      x✝ =
    (𝟙
        ({ obj := fun c => (ModuleCat.restrictScalars (R.map (hX.to c))).obj (M.obj c),
              map := fun {c₁ c₂} f => { toFun := fun x => (M.presheaf.map f) x, map_add' := ⋯, map_smul' := ⋯ } }.obj
          c))
      x✝
tactic: ext
state_before: case h
C : Type u₁
inst✝ : Category.{v₁, u₁} C
R : Cᵒᵖ ⥤ RingCat
X : Cᵒᵖ
hX : Limits.IsInitial X
M : PresheafOfModules R
c : Cᵒᵖ
x✝ :
  ↑({ obj := fun c => (ModuleCat.restrictScalars (R.map (hX.to c))).obj (M.obj c),
          map := fun {c₁ c₂} f => { toFun := fun x => (M.presheaf.map f) x, map_add' := ⋯, map_smul' := ⋯ } }.obj
      c)
⊢ ({ obj := fun c => (ModuleCat.restrictScalars (R.map (hX.to c))).obj (M.obj c),
            map := fun {c₁ c₂} f => { toFun := fun x => (M.presheaf.map f) x, map_add' := ⋯, map_smul' := ⋯ } }.map
        (𝟙 c))
      x✝ =
    (𝟙
        ({ obj := fun c => (ModuleCat.restrictScalars (R.map (hX.to c))).obj (M.obj c),
              map := fun {c₁ c₂} f => { toFun := fun x => (M.presheaf.map f) x, map_add' := ⋯, map_smul' := ⋯ } }.obj
          c))
      x✝
state_after: case h
C : Type u₁
inst✝ : Category.{v₁, u₁} C
R : Cᵒᵖ ⥤ RingCat
X : Cᵒᵖ
hX : Limits.IsInitial X
M : PresheafOfModules R
c : Cᵒᵖ
x✝ :
  ↑({ obj := fun c => (ModuleCat.restrictScalars (R.map (hX.to c))).obj (M.obj c),
          map := fun {c₁ c₂} f => { toFun := fun x => (M.presheaf.map f) x, map_add' := ⋯, map_smul' := ⋯ } }.obj
      c)
⊢ { toFun := fun x => (𝟙 (M.presheaf.obj c)) x, map_add' := ⋯, map_smul' := ⋯ } x✝ =
    (𝟙 ((ModuleCat.restrictScalars (R.map (hX.to c))).obj (M.obj c))) x✝
tactic: simp_rw [M.presheaf.map_id]
state_before: case h
C : Type u₁
inst✝ : Category.{v₁, u₁} C
R : Cᵒᵖ ⥤ RingCat
X : Cᵒᵖ
hX : Limits.IsInitial X
M : PresheafOfModules R
c : Cᵒᵖ
x✝ :
  ↑({ obj := fun c => (ModuleCat.restrictScalars (R.map (hX.to c))).obj (M.obj c),
          map := fun {c₁ c₂} f => { toFun := fun x => (M.presheaf.map f) x, map_add' := ⋯, map_smul' := ⋯ } }.obj
      c)
⊢ { toFun := fun x => (𝟙 (M.presheaf.obj c)) x, map_add' := ⋯, map_smul' := ⋯ } x✝ =
    (𝟙 ((ModuleCat.restrictScalars (R.map (hX.to c))).obj (M.obj c))) x✝
state_after: no goals
tactic: rfl
state_before: C : Type u₁
inst✝ : Category.{v₁, u₁} C
R : Cᵒᵖ ⥤ RingCat
X : Cᵒᵖ
hX : Limits.IsInitial X
M : PresheafOfModules R
c₁ c₂ c₃ : Cᵒᵖ
f : c₁ ⟶ c₂
g : c₂ ⟶ c₃
⊢ { obj := fun c => (ModuleCat.restrictScalars (R.map (hX.to c))).obj (M.obj c),
          map := fun {c₁ c₂} f => { toFun := fun x => (M.presheaf.map f) x, map_add' := ⋯, map_smul' := ⋯ } }.map
      (f ≫ g) =
    { obj := fun c => (ModuleCat.restrictScalars (R.map (hX.to c))).obj (M.obj c),
            map := fun {c₁ c₂} f => { toFun := fun x => (M.presheaf.map f) x, map_add' := ⋯, map_smul' := ⋯ } }.map
        f ≫
      { obj := fun c => (ModuleCat.restrictScalars (R.map (hX.to c))).obj (M.obj c),
            map := fun {c₁ c₂} f => { toFun := fun x => (M.presheaf.map f) x, map_add' := ⋯, map_smul' := ⋯ } }.map
        g
state_after: case h
C : Type u₁
inst✝ : Category.{v₁, u₁} C
R : Cᵒᵖ ⥤ RingCat
X : Cᵒᵖ
hX : Limits.IsInitial X
M : PresheafOfModules R
c₁ c₂ c₃ : Cᵒᵖ
f : c₁ ⟶ c₂
g : c₂ ⟶ c₃
x :
  ↑({ obj := fun c => (ModuleCat.restrictScalars (R.map (hX.to c))).obj (M.obj c),
          map := fun {c₁ c₂} f => { toFun := fun x => (M.presheaf.map f) x, map_add' := ⋯, map_smul' := ⋯ } }.obj
      c₁)
⊢ ({ obj := fun c => (ModuleCat.restrictScalars (R.map (hX.to c))).obj (M.obj c),
            map := fun {c₁ c₂} f => { toFun := fun x => (M.presheaf.map f) x, map_add' := ⋯, map_smul' := ⋯ } }.map
        (f ≫ g))
      x =
    ({ obj := fun c => (ModuleCat.restrictScalars (R.map (hX.to c))).obj (M.obj c),
              map := fun {c₁ c₂} f => { toFun := fun x => (M.presheaf.map f) x, map_add' := ⋯, map_smul' := ⋯ } }.map
          f ≫
        { obj := fun c => (ModuleCat.restrictScalars (R.map (hX.to c))).obj (M.obj c),
              map := fun {c₁ c₂} f => { toFun := fun x => (M.presheaf.map f) x, map_add' := ⋯, map_smul' := ⋯ } }.map
          g)
      x
tactic: ext x
state_before: case h
C : Type u₁
inst✝ : Category.{v₁, u₁} C
R : Cᵒᵖ ⥤ RingCat
X : Cᵒᵖ
hX : Limits.IsInitial X
M : PresheafOfModules R
c₁ c₂ c₃ : Cᵒᵖ
f : c₁ ⟶ c₂
g : c₂ ⟶ c₃
x :
  ↑({ obj := fun c => (ModuleCat.restrictScalars (R.map (hX.to c))).obj (M.obj c),
          map := fun {c₁ c₂} f => { toFun := fun x => (M.presheaf.map f) x, map_add' := ⋯, map_smul' := ⋯ } }.obj
      c₁)
⊢ ({ obj := fun c => (ModuleCat.restrictScalars (R.map (hX.to c))).obj (M.obj c),
            map := fun {c₁ c₂} f => { toFun := fun x => (M.presheaf.map f) x, map_add' := ⋯, map_smul' := ⋯ } }.map
        (f ≫ g))
      x =
    ({ obj := fun c => (ModuleCat.restrictScalars (R.map (hX.to c))).obj (M.obj c),
              map := fun {c₁ c₂} f => { toFun := fun x => (M.presheaf.map f) x, map_add' := ⋯, map_smul' := ⋯ } }.map
          f ≫
        { obj := fun c => (ModuleCat.restrictScalars (R.map (hX.to c))).obj (M.obj c),
              map := fun {c₁ c₂} f => { toFun := fun x => (M.presheaf.map f) x, map_add' := ⋯, map_smul' := ⋯ } }.map
          g)
      x
state_after: case h
C : Type u₁
inst✝ : Category.{v₁, u₁} C
R : Cᵒᵖ ⥤ RingCat
X : Cᵒᵖ
hX : Limits.IsInitial X
M : PresheafOfModules R
c₁ c₂ c₃ : Cᵒᵖ
f : c₁ ⟶ c₂
g : c₂ ⟶ c₃
x :
  ↑({ obj := fun c => (ModuleCat.restrictScalars (R.map (hX.to c))).obj (M.obj c),
          map := fun {c₁ c₂} f => { toFun := fun x => (M.presheaf.map f) x, map_add' := ⋯, map_smul' := ⋯ } }.obj
      c₁)
⊢ { toFun := fun x => (M.presheaf.map f ≫ M.presheaf.map g) x, map_add' := ⋯, map_smul' := ⋯ } x =
    ({ toFun := fun x => (M.presheaf.map f) x, map_add' := ⋯, map_smul' := ⋯ } ≫
        { toFun := fun x => (M.presheaf.map g) x, map_add' := ⋯, map_smul' := ⋯ })
      x
tactic: simp_rw [M.presheaf.map_comp]
state_before: case h
C : Type u₁
inst✝ : Category.{v₁, u₁} C
R : Cᵒᵖ ⥤ RingCat
X : Cᵒᵖ
hX : Limits.IsInitial X
M : PresheafOfModules R
c₁ c₂ c₃ : Cᵒᵖ
f : c₁ ⟶ c₂
g : c₂ ⟶ c₃
x :
  ↑({ obj := fun c => (ModuleCat.restrictScalars (R.map (hX.to c))).obj (M.obj c),
          map := fun {c₁ c₂} f => { toFun := fun x => (M.presheaf.map f) x, map_add' := ⋯, map_smul' := ⋯ } }.obj
      c₁)
⊢ { toFun := fun x => (M.presheaf.map f ≫ M.presheaf.map g) x, map_add' := ⋯, map_smul' := ⋯ } x =
    ({ toFun := fun x => (M.presheaf.map f) x, map_add' := ⋯, map_smul' := ⋯ } ≫
        { toFun := fun x => (M.presheaf.map g) x, map_add' := ⋯, map_smul' := ⋯ })
      x
state_after: no goals
tactic: rfl