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

Proof steps:
state_before: C : Type u'
inst✝ : Category.{v', u'} C
R R' : Cᵒᵖ ⥤ RingCat
M' : PresheafOfModules R'
α : R ⟶ R'
X Y : Cᵒᵖ
f : X ⟶ Y
r : ↑(R.obj X)
x : ↑((fun X => (ModuleCat.restrictScalars (α.app X)).obj (M'.obj X)) X)
⊢ { toFun := ⇑(M'.map f), map_add' := ⋯ }.toFun (r • x) =
    (RingHom.id ↑(R.obj X)) r • { toFun := ⇑(M'.map f), map_add' := ⋯ }.toFun x
state_after: C : Type u'
inst✝ : Category.{v', u'} C
R R' : Cᵒᵖ ⥤ RingCat
M' : PresheafOfModules R'
α : R ⟶ R'
X Y : Cᵒᵖ
f : X ⟶ Y
r : ↑(R.obj X)
x : ↑((fun X => (ModuleCat.restrictScalars (α.app X)).obj (M'.obj X)) X)
eq : (R.map f ≫ α.app Y) r = (α.app X ≫ R'.map f) r
⊢ { toFun := ⇑(M'.map f), map_add' := ⋯ }.toFun (r • x) =
    (RingHom.id ↑(R.obj X)) r • { toFun := ⇑(M'.map f), map_add' := ⋯ }.toFun x
tactic: have eq := RingHom.congr_fun (α.naturality f) r
state_before: C : Type u'
inst✝ : Category.{v', u'} C
R R' : Cᵒᵖ ⥤ RingCat
M' : PresheafOfModules R'
α : R ⟶ R'
X Y : Cᵒᵖ
f : X ⟶ Y
r : ↑(R.obj X)
x : ↑((fun X => (ModuleCat.restrictScalars (α.app X)).obj (M'.obj X)) X)
eq : (R.map f ≫ α.app Y) r = (α.app X ≫ R'.map f) r
⊢ { toFun := ⇑(M'.map f), map_add' := ⋯ }.toFun (r • x) =
    (RingHom.id ↑(R.obj X)) r • { toFun := ⇑(M'.map f), map_add' := ⋯ }.toFun x
state_after: C : Type u'
inst✝ : Category.{v', u'} C
R R' : Cᵒᵖ ⥤ RingCat
M' : PresheafOfModules R'
α : R ⟶ R'
X Y : Cᵒᵖ
f : X ⟶ Y
r : ↑(R.obj X)
x : ↑((fun X => (ModuleCat.restrictScalars (α.app X)).obj (M'.obj X)) X)
eq : (R.map f ≫ α.app Y) r = (α.app X ≫ R'.map f) r
⊢ (R'.map f) ((α.app X) r) • (M'.presheaf.map f) x =
    (RingHom.id ↑(R.obj X)) r • { toFun := ⇑(M'.map f), map_add' := ⋯ }.toFun x
tactic: apply (M'.map_smul f (α.app _ r) x).trans
state_before: C : Type u'
inst✝ : Category.{v', u'} C
R R' : Cᵒᵖ ⥤ RingCat
M' : PresheafOfModules R'
α : R ⟶ R'
X Y : Cᵒᵖ
f : X ⟶ Y
r : ↑(R.obj X)
x : ↑((fun X => (ModuleCat.restrictScalars (α.app X)).obj (M'.obj X)) X)
eq : (R.map f ≫ α.app Y) r = (α.app X ≫ R'.map f) r
⊢ (R'.map f) ((α.app X) r) • (M'.presheaf.map f) x =
    (RingHom.id ↑(R.obj X)) r • { toFun := ⇑(M'.map f), map_add' := ⋯ }.toFun x
state_after: C : Type u'
inst✝ : Category.{v', u'} C
R R' : Cᵒᵖ ⥤ RingCat
M' : PresheafOfModules R'
α : R ⟶ R'
X Y : Cᵒᵖ
f : X ⟶ Y
r : ↑(R.obj X)
x : ↑((fun X => (ModuleCat.restrictScalars (α.app X)).obj (M'.obj X)) X)
eq : (α.app Y) ((R.map f) r) = (R'.map f) ((α.app X) r)
⊢ (R'.map f) ((α.app X) r) • (M'.presheaf.map f) x = (R.map f) r • (M'.map f) x
tactic: dsimp at eq ⊢
state_before: C : Type u'
inst✝ : Category.{v', u'} C
R R' : Cᵒᵖ ⥤ RingCat
M' : PresheafOfModules R'
α : R ⟶ R'
X Y : Cᵒᵖ
f : X ⟶ Y
r : ↑(R.obj X)
x : ↑((fun X => (ModuleCat.restrictScalars (α.app X)).obj (M'.obj X)) X)
eq : (α.app Y) ((R.map f) r) = (R'.map f) ((α.app X) r)
⊢ (R'.map f) ((α.app X) r) • (M'.presheaf.map f) x = (R.map f) r • (M'.map f) x
state_after: C : Type u'
inst✝ : Category.{v', u'} C
R R' : Cᵒᵖ ⥤ RingCat
M' : PresheafOfModules R'
α : R ⟶ R'
X Y : Cᵒᵖ
f : X ⟶ Y
r : ↑(R.obj X)
x : ↑((fun X => (ModuleCat.restrictScalars (α.app X)).obj (M'.obj X)) X)
eq : (α.app Y) ((R.map f) r) = (R'.map f) ((α.app X) r)
⊢ (α.app Y) ((R.map f) r) • (M'.presheaf.map f) x = (R.map f) r • (M'.map f) x
tactic: rw [← eq]
state_before: C : Type u'
inst✝ : Category.{v', u'} C
R R' : Cᵒᵖ ⥤ RingCat
M' : PresheafOfModules R'
α : R ⟶ R'
X Y : Cᵒᵖ
f : X ⟶ Y
r : ↑(R.obj X)
x : ↑((fun X => (ModuleCat.restrictScalars (α.app X)).obj (M'.obj X)) X)
eq : (α.app Y) ((R.map f) r) = (R'.map f) ((α.app X) r)
⊢ (α.app Y) ((R.map f) r) • (M'.presheaf.map f) x = (R.map f) r • (M'.map f) x
state_after: no goals
tactic: rfl
state_before: C : Type u'
inst✝ : Category.{v', u'} C
R R' : Cᵒᵖ ⥤ RingCat
M' : PresheafOfModules R'
α : R ⟶ R'
X : Cᵒᵖ
⊢ (fun {X Y} f => { toFun := ⇑(M'.map f), map_add' := ⋯, map_smul' := ⋯ }) (𝟙 X) =
    (ModuleCat.restrictScalarsId' (R.map (𝟙 X)) ⋯).inv.app
      ((fun X => (ModuleCat.restrictScalars (α.app X)).obj (M'.obj X)) X)
state_after: case h
C : Type u'
inst✝ : Category.{v', u'} C
R R' : Cᵒᵖ ⥤ RingCat
M' : PresheafOfModules R'
α : R ⟶ R'
X : Cᵒᵖ
x : ↑((fun X => (ModuleCat.restrictScalars (α.app X)).obj (M'.obj X)) X)
⊢ ((fun {X Y} f => { toFun := ⇑(M'.map f), map_add' := ⋯, map_smul' := ⋯ }) (𝟙 X)) x =
    ((ModuleCat.restrictScalarsId' (R.map (𝟙 X)) ⋯).inv.app
        ((fun X => (ModuleCat.restrictScalars (α.app X)).obj (M'.obj X)) X))
      x
tactic: ext x
state_before: case h
C : Type u'
inst✝ : Category.{v', u'} C
R R' : Cᵒᵖ ⥤ RingCat
M' : PresheafOfModules R'
α : R ⟶ R'
X : Cᵒᵖ
x : ↑((fun X => (ModuleCat.restrictScalars (α.app X)).obj (M'.obj X)) X)
⊢ ((fun {X Y} f => { toFun := ⇑(M'.map f), map_add' := ⋯, map_smul' := ⋯ }) (𝟙 X)) x =
    ((ModuleCat.restrictScalarsId' (R.map (𝟙 X)) ⋯).inv.app
        ((fun X => (ModuleCat.restrictScalars (α.app X)).obj (M'.obj X)) X))
      x
state_after: no goals
tactic: exact LinearMap.congr_fun (M'.map_id X) x
state_before: C : Type u'
inst✝ : Category.{v', u'} C
R R' : Cᵒᵖ ⥤ RingCat
M' : PresheafOfModules R'
α : R ⟶ R'
X✝ Y✝ Z✝ : Cᵒᵖ
f : X✝ ⟶ Y✝
g : Y✝ ⟶ Z✝
⊢ (fun {X Y} f => { toFun := ⇑(M'.map f), map_add' := ⋯, map_smul' := ⋯ }) (f ≫ g) =
    (fun {X Y} f => { toFun := ⇑(M'.map f), map_add' := ⋯, map_smul' := ⋯ }) f ≫
      (ModuleCat.restrictScalars (R.map f)).map
          ((fun {X Y} f => { toFun := ⇑(M'.map f), map_add' := ⋯, map_smul' := ⋯ }) g) ≫
        (ModuleCat.restrictScalarsComp' (R.map f) (R.map g) (R.map (f ≫ g)) ⋯).inv.app
          ((fun X => (ModuleCat.restrictScalars (α.app X)).obj (M'.obj X)) Z✝)
state_after: case h
C : Type u'
inst✝ : Category.{v', u'} C
R R' : Cᵒᵖ ⥤ RingCat
M' : PresheafOfModules R'
α : R ⟶ R'
X✝ Y✝ Z✝ : Cᵒᵖ
f : X✝ ⟶ Y✝
g : Y✝ ⟶ Z✝
x : ↑((fun X => (ModuleCat.restrictScalars (α.app X)).obj (M'.obj X)) X✝)
⊢ ((fun {X Y} f => { toFun := ⇑(M'.map f), map_add' := ⋯, map_smul' := ⋯ }) (f ≫ g)) x =
    ((fun {X Y} f => { toFun := ⇑(M'.map f), map_add' := ⋯, map_smul' := ⋯ }) f ≫
        (ModuleCat.restrictScalars (R.map f)).map
            ((fun {X Y} f => { toFun := ⇑(M'.map f), map_add' := ⋯, map_smul' := ⋯ }) g) ≫
          (ModuleCat.restrictScalarsComp' (R.map f) (R.map g) (R.map (f ≫ g)) ⋯).inv.app
            ((fun X => (ModuleCat.restrictScalars (α.app X)).obj (M'.obj X)) Z✝))
      x
tactic: ext x
state_before: case h
C : Type u'
inst✝ : Category.{v', u'} C
R R' : Cᵒᵖ ⥤ RingCat
M' : PresheafOfModules R'
α : R ⟶ R'
X✝ Y✝ Z✝ : Cᵒᵖ
f : X✝ ⟶ Y✝
g : Y✝ ⟶ Z✝
x : ↑((fun X => (ModuleCat.restrictScalars (α.app X)).obj (M'.obj X)) X✝)
⊢ ((fun {X Y} f => { toFun := ⇑(M'.map f), map_add' := ⋯, map_smul' := ⋯ }) (f ≫ g)) x =
    ((fun {X Y} f => { toFun := ⇑(M'.map f), map_add' := ⋯, map_smul' := ⋯ }) f ≫
        (ModuleCat.restrictScalars (R.map f)).map
            ((fun {X Y} f => { toFun := ⇑(M'.map f), map_add' := ⋯, map_smul' := ⋯ }) g) ≫
          (ModuleCat.restrictScalarsComp' (R.map f) (R.map g) (R.map (f ≫ g)) ⋯).inv.app
            ((fun X => (ModuleCat.restrictScalars (α.app X)).obj (M'.obj X)) Z✝))
      x
state_after: no goals
tactic: exact LinearMap.congr_fun (M'.map_comp f g) x