-- Lean 4 proof step from Mathlib.Algebra.Category.ModuleCat.ChangeOfRings (goal)
Goal:
R_1 : Type u₁
S_1 : Type u₂
inst : CommRing R_1
inst_1 : CommRing S_1
f_1 : R_1 →+* S_1
R : Type u₁
S : Type u₂
inst_2 : CommRing R
inst_3 : CommRing S
f : R →+* S
X : ModuleCat R
Y : ModuleCat S
g : (extendScalars f).obj X ⟶ Y
m1 : Module R S := Module.compHom S f
m2 : Module R (↑Y : Type (max u₂ v)) := Module.compHom (↑Y : Type (max u₂ v)) f
x y : (↑((restrictScalars f).obj (of S S)) : Type u₂) ⊗[R] (↑X : Type (max v u₂))
ih1 :
  Eq (α := (↑Y : Type (max u₂ v)))
    ((Hom.hom (HomEquiv.fromExtendScalars.{u₁, u₂, v} f (HomEquiv.toRestrictScalars.{u₁, u₂, v} f g)) :
          (a : (↑((extendScalars f).obj X) : Type (max u₂ v))) → (↑Y : Type (max u₂ v)))
        x :
      (↑Y : Type (max u₂ v)))
    ((Hom.hom g : (a : (↑((extendScalars f).obj X) : Type (max u₂ v))) → (↑Y : Type (max u₂ v))) x :
      (↑Y : Type (max u₂ v)))
ih2 :
  Eq (α := (↑Y : Type (max u₂ v)))
    ((Hom.hom (HomEquiv.fromExtendScalars.{u₁, u₂, v} f (HomEquiv.toRestrictScalars.{u₁, u₂, v} f g)) :
          (a : (↑((extendScalars f).obj X) : Type (max u₂ v))) → (↑Y : Type (max u₂ v)))
        y :
      (↑Y : Type (max u₂ v)))
    ((Hom.hom g : (a : (↑((extendScalars f).obj X) : Type (max u₂ v))) → (↑Y : Type (max u₂ v))) y :
      (↑Y : Type (max u₂ v)))
hf :
  HAdd.hAdd (α := (↑Y : Type (max u₂ v))) (β := (↑Y : Type (max u₂ v)))
      ((Hom.hom (HomEquiv.fromExtendScalars.{u₁, u₂, v} f (HomEquiv.toRestrictScalars.{u₁, u₂, v} f g)) :
            (a : (↑((extendScalars f).obj X) : Type (max u₂ v))) → (↑Y : Type (max u₂ v)))
          x :
        (↑Y : Type (max u₂ v)))
      ((Hom.hom (HomEquiv.fromExtendScalars.{u₁, u₂, v} f (HomEquiv.toRestrictScalars.{u₁, u₂, v} f g)) :
            (a : (↑((extendScalars f).obj X) : Type (max u₂ v))) → (↑Y : Type (max u₂ v)))
          y :
        (↑Y : Type (max u₂ v))) =
    (Hom.hom g : (a : (↑((extendScalars f).obj X) : Type (max u₂ v))) → (↑Y : Type (max u₂ v))) (x + y)
hf₁ :
  HAdd.hAdd (α := (↑Y : Type (max u₂ v))) (β := (↑Y : Type (max u₂ v)))
      ((Hom.hom (HomEquiv.fromExtendScalars.{u₁, u₂, v} f (HomEquiv.toRestrictScalars.{u₁, u₂, v} f g)) :
            (a : (↑((extendScalars f).obj X) : Type (max u₂ v))) → (↑Y : Type (max u₂ v)))
          x :
        (↑Y : Type (max u₂ v)))
      ((Hom.hom (HomEquiv.fromExtendScalars.{u₁, u₂, v} f (HomEquiv.toRestrictScalars.{u₁, u₂, v} f g)) :
            (a : (↑((extendScalars f).obj X) : Type (max u₂ v))) → (↑Y : Type (max u₂ v)))
          y :
        (↑Y : Type (max u₂ v))) =
    HAdd.hAdd (α := (↑Y : Type (max u₂ v))) (β := (↑Y : Type (max u₂ v)))
      ((Hom.hom g : (a : (↑((extendScalars f).obj X) : Type (max u₂ v))) → (↑Y : Type (max u₂ v))) x :
        (↑Y : Type (max u₂ v)))
      ((Hom.hom g : (a : (↑((extendScalars f).obj X) : Type (max u₂ v))) → (↑Y : Type (max u₂ v))) y :
        (↑Y : Type (max u₂ v)))
hf₂ :
  HAdd.hAdd (α := (↑Y : Type (max u₂ v))) (β := (↑Y : Type (max u₂ v)))
      ((Hom.hom g : (a : (↑((extendScalars f).obj X) : Type (max u₂ v))) → (↑Y : Type (max u₂ v))) x :
        (↑Y : Type (max u₂ v)))
      ((Hom.hom (HomEquiv.fromExtendScalars.{u₁, u₂, v} f (HomEquiv.toRestrictScalars.{u₁, u₂, v} f g)) :
            (a : (↑((extendScalars f).obj X) : Type (max u₂ v))) → (↑Y : Type (max u₂ v)))
          y :
        (↑Y : Type (max u₂ v))) =
    HAdd.hAdd (α := (↑Y : Type (max u₂ v))) (β := (↑Y : Type (max u₂ v)))
      ((Hom.hom g : (a : (↑((extendScalars f).obj X) : Type (max u₂ v))) → (↑Y : Type (max u₂ v))) x :
        (↑Y : Type (max u₂ v)))
      ((Hom.hom g : (a : (↑((extendScalars f).obj X) : Type (max u₂ v))) → (↑Y : Type (max u₂ v))) y :
        (↑Y : Type (max u₂ v)))
⊢ Eq (α := (↑Y : Type (max u₂ v)))
    ((Hom.hom (HomEquiv.fromExtendScalars.{u₁, u₂, v} f (HomEquiv.toRestrictScalars.{u₁, u₂, v} f g)) :
          (a : (↑((extendScalars f).obj X) : Type (max u₂ v))) → (↑Y : Type (max u₂ v)))
        (x + y) :
      (↑Y : Type (max u₂ v)))
    ((Hom.hom g : (a : (↑((extendScalars f).obj X) : Type (max u₂ v))) → (↑Y : Type (max u₂ v))) (x + y) :
      (↑Y : Type (max u₂ v)))
have hf₃ : HAdd.hAdd (α := (↑Y : Type (max u₂ v))) (β := (↑Y : Type (max u₂ v)))
    ((Hom.hom g : (a : (↑((extendScalars f).obj X) : Type (max u₂ v))) → (↑Y : Type (max u₂ v))) x :
      (↑Y : Type (max u₂ v)))
    ((Hom.hom g : (a : (↑((extendScalars f).obj X) : Type (max u₂ v))) → (↑Y : Type (max u₂ v))) y :
      (↑Y : Type (max u₂ v))) =
  HAdd.hAdd (α := (↑Y : Type (max u₂ v))) (β := (↑Y : Type (max u₂ v)))
    ((Hom.hom g : (a : (↑((extendScalars f).obj X) : Type (max u₂ v))) → (↑Y : Type (max u₂ v))) x :
      (↑Y : Type (max u₂ v)))
    ((Hom.hom g : (a : (↑((extendScalars f).obj X) : Type (max u₂ v))) → (↑Y : Type (max u₂ v))) y :
      (↑Y : Type (max u₂ v)))
Tactic: rw [map_add, map_add, ih1, ih2]