-- Lean 4 proof step from Mathlib.AlgebraicGeometry.Modules.Tilde (hypothesis)
Goal:
R : CommRingCat
M_1 : ModuleCat (↑R : Type u)
M N : (Spec R).Modules
f : Functor.obj modulesSpecToSheaf M ⟶ Functor.obj modulesSpecToSheaf N
U : (Opens ↥(Spec R))ᵒᵖ
t_1 :
  (↑(Functor.obj
        (ObjectProperty.FullSubcategory.obj (P :=
          CategoryTheory.Presheaf.IsSheaf (Opens.grothendieckTopology ↥(Spec R))) (Spec R).ringCatSheaf)
        U) :
    Type u)
m : (↑(M.val.1 U) : Type u)
x : ↥(Spec R)
hxU : x ∈ unop U
r : (↑R : Type u)
hxr : x ∈ (↑(basicOpen r) : Set (PrimeSpectrum (↑R : Type u)))
hrU : basicOpen r ≤ unop U
this_1 :
  ∀
    (x :
      (↑((Functor.obj modulesSpecToSheaf M).obj (P :=
                CategoryTheory.Presheaf.IsSheaf (Opens.grothendieckTopology ↥(Spec R))).obj
            (op (unop U))) :
        Type u)),
    Eq (α :=
      (↑((Functor.obj modulesSpecToSheaf N).obj (P :=
                CategoryTheory.Presheaf.IsSheaf (Opens.grothendieckTopology ↥(Spec R))).obj
            (op (basicOpen r))) :
        Type u))
      ((ConcreteCategory.hom (FC := fun (x1 x2 : ModuleCat (↑R : Type u)) ↦
              LinearMap (R := (↑R : Type u)) (RingHom.id (↑R : Type u)) (↑x1 : Type u) (↑x2 : Type u)) (CC :=
              ModuleCat.carrier) (X :=
              (Functor.obj modulesSpecToSheaf M).obj (P :=
                    CategoryTheory.Presheaf.IsSheaf (Opens.grothendieckTopology ↥(Spec R))).obj
                (op (basicOpen r)))
              (f.hom.app (op (basicOpen r))) :
            (a : (↑((modulesSpecToSheaf.obj M).obj.obj (op (basicOpen r))) : Type u)) →
              (↑((modulesSpecToSheaf.obj N).obj.obj (op (basicOpen r))) : Type u))
          ((ConcreteCategory.hom (FC :=
                  fun
                    (x1 x2 :
                      ModuleCat
                        (↑(Functor.obj
                              (ObjectProperty.FullSubcategory.obj (P :=
                                CategoryTheory.Presheaf.IsSheaf (Opens.grothendieckTopology ↥(Spec R)))
                                (Spec R).ringCatSheaf)
                              (op (unop U))) :
                          Type u)) ↦
                  LinearMap (R :=
                    (↑(Functor.obj
                          (ObjectProperty.FullSubcategory.obj (P :=
                            CategoryTheory.Presheaf.IsSheaf (Opens.grothendieckTopology ↥(Spec R)))
                            (Spec R).ringCatSheaf)
                          (op (unop U))) :
                      Type u))
                    (RingHom.id
                      (↑(Functor.obj
                            (ObjectProperty.FullSubcategory.obj (P :=
                              CategoryTheory.Presheaf.IsSheaf (Opens.grothendieckTopology ↥(Spec R)))
                              (Spec R).ringCatSheaf)
                            (op (unop U))) :
                        Type u))
                    (↑x1 : Type u) (↑x2 : Type u))
                  (CC := ModuleCat.carrier) (M.val.map (homOfLE hrU).op) :
                (a : (↑(M.val.obj (op (unop U))) : Type u)) →
                  (↑((ModuleCat.restrictScalars (RingCat.Hom.hom ((Spec R).ringCatSheaf.obj.map (homOfLE hrU).op))).obj
                        (M.val.obj (op (basicOpen r)))) :
                    Type u))
              x :
            (↑(Functor.obj (C :=
                  ModuleCat
                    (↑(Functor.obj (C := (Opens ↥(Spec R))ᵒᵖ)
                          (ObjectProperty.FullSubcategory.obj (P :=
                            CategoryTheory.Presheaf.IsSheaf (Opens.grothendieckTopology ↥(Spec R)))
                            (Spec R).ringCatSheaf)
                          (op (basicOpen r))) :
                      Type u))
                  (ModuleCat.restrictScalars
                    (RingCat.Hom.hom
                      (CategoryTheory.Functor.map
                        (ObjectProperty.FullSubcategory.obj (P :=
                          CategoryTheory.Presheaf.IsSheaf (Opens.grothendieckTopology ↥(Spec R))) (Spec R).ringCatSheaf)
                        (homOfLE hrU).op)))
                  (M.val.obj (op (basicOpen r)))) :
              Type u)) :
        (↑((Functor.obj modulesSpecToSheaf N).obj (P :=
                  CategoryTheory.Presheaf.IsSheaf (Opens.grothendieckTopology ↥(Spec R))).obj
              (op (basicOpen r))) :
          Type u))
      ((ConcreteCategory.hom (FC :=
              fun
                (x1 x2 :
                  ModuleCat
                    (↑(Functor.obj
                          (ObjectProperty.FullSubcategory.obj (P :=
                            CategoryTheory.Presheaf.IsSheaf (Opens.grothendieckTopology ↥(Spec R)))
                            (Spec R).ringCatSheaf)
                          (op (unop U))) :
                      Type u)) ↦
              LinearMap (R :=
                (↑(Functor.obj
                      (ObjectProperty.FullSubcategory.obj (P :=
                        CategoryTheory.Presheaf.IsSheaf (Opens.grothendieckTopology ↥(Spec R))) (Spec R).ringCatSheaf)
                      (op (unop U))) :
                  Type u))
                (RingHom.id
                  (↑(Functor.obj
                        (ObjectProperty.FullSubcategory.obj (P :=
                          CategoryTheory.Presheaf.IsSheaf (Opens.grothendieckTopology ↥(Spec R))) (Spec R).ringCatSheaf)
                        (op (unop U))) :
                    Type u))
                (↑x1 : Type u) (↑x2 : Type u))
              (CC := ModuleCat.carrier) (N.val.map (homOfLE hrU).op) :
            (a : (↑(N.val.obj (op (unop U))) : Type u)) →
              (↑((ModuleCat.restrictScalars (RingCat.Hom.hom ((Spec R).ringCatSheaf.obj.map (homOfLE hrU).op))).obj
                    (N.val.obj (op (basicOpen r)))) :
                Type u))
          ((ConcreteCategory.hom (FC := fun (x1 x2 : ModuleCat (↑R : Type u)) ↦
                  LinearMap (R := (↑R : Type u)) (RingHom.id (↑R : Type u)) (↑x1 : Type u) (↑x2 : Type u)) (CC :=
                  ModuleCat.carrier) (X :=
                  (Functor.obj modulesSpecToSheaf M).obj (P :=
                        CategoryTheory.Presheaf.IsSheaf (Opens.grothendieckTopology ↥(Spec R))).obj
                    (op (unop U)))
                  (f.hom.app (op (unop U))) :
                (a : (↑((modulesSpecToSheaf.obj M).obj.obj (op (unop U))) : Type u)) →
                  (↑((modulesSpecToSheaf.obj N).obj.obj (op (unop U))) : Type u))
              x :
            (↑((Functor.obj modulesSpecToSheaf N).obj (P :=
                      CategoryTheory.Presheaf.IsSheaf (Opens.grothendieckTopology ↥(Spec R))).obj
                  (op (unop U))) :
              Type u)) :
        (↑(Functor.obj (C :=
              ModuleCat
                (↑(Functor.obj (C := (Opens ↥(Spec R))ᵒᵖ)
                      (ObjectProperty.FullSubcategory.obj (P :=
                        CategoryTheory.Presheaf.IsSheaf (Opens.grothendieckTopology ↥(Spec R))) (Spec R).ringCatSheaf)
                      (op (basicOpen r))) :
                  Type u))
              (ModuleCat.restrictScalars
                (RingCat.Hom.hom
                  (CategoryTheory.Functor.map
                    (ObjectProperty.FullSubcategory.obj (P :=
                      CategoryTheory.Presheaf.IsSheaf (Opens.grothendieckTopology ↥(Spec R))) (Spec R).ringCatSheaf)
                    (homOfLE hrU).op)))
              (N.val.obj (op (basicOpen r)))) :
          Type u))
t :
  (↑(Functor.obj (C := (Opens ↥(Spec R))ᵒᵖ)
        (ObjectProperty.FullSubcategory.obj (P :=
          CategoryTheory.Presheaf.IsSheaf (Opens.grothendieckTopology ↥(Spec R))) (Spec R).ringCatSheaf)
        (op (basicOpen r))) :
    Type u)
this_2 : Module (↑R : Type u) (↑Γ(M, basicOpen r) : Type u) :=
  Module.compHom (R := (↑Γ(Spec R, basicOpen r) : Type u)) (↑Γ(M, basicOpen r) : Type u)
    (algebraMap (↑R : Type u) (↑Γ(Spec R, basicOpen r) : Type u))
this_3 : IsScalarTower.{u, u, u} (↑R : Type u) (↑Γ(Spec R, basicOpen r) : Type u) (↑Γ(M, basicOpen r) : Type u)
this : Module (↑R : Type u) (↑Γ(N, basicOpen r) : Type u) :=
  Module.compHom (R := (↑Γ(Spec R, basicOpen r) : Type u)) (↑Γ(N, basicOpen r) : Type u)
    (algebraMap (↑R : Type u) (↑Γ(Spec R, basicOpen r) : Type u))
⊢ (ConcreteCategory.hom (FC := fun (x1 x2 : ModuleCat (↑R : Type u)) ↦
          LinearMap (R := (↑R : Type u)) (RingHom.id (↑R : Type u)) (↑x1 : Type u) (↑x2 : Type u)) (CC :=
          ModuleCat.carrier) (X :=
          (Functor.obj modulesSpecToSheaf M).obj (P :=
                CategoryTheory.Presheaf.IsSheaf (Opens.grothendieckTopology ↥(Spec R))).obj
            (op (basicOpen r)))
          (f.hom.app (op (basicOpen r))) :
        (a : (↑((modulesSpecToSheaf.obj M).obj.obj (op (basicOpen r))) : Type u)) →
          (↑((modulesSpecToSheaf.obj N).obj.obj (op (basicOpen r))) : Type u))
      (HSMul.hSMul (β :=
        (↑(Functor.obj (C :=
              ModuleCat
                (↑(Functor.obj (C := (Opens ↥(Spec R))ᵒᵖ)
                      (ObjectProperty.FullSubcategory.obj (P :=
                        CategoryTheory.Presheaf.IsSheaf (Opens.grothendieckTopology ↥(Spec R))) (Spec R).ringCatSheaf)
                      (op (basicOpen r))) :
                  Type u))
              (ModuleCat.restrictScalars
                (RingCat.Hom.hom
                  (CategoryTheory.Functor.map
                    (ObjectProperty.FullSubcategory.obj (P :=
                      CategoryTheory.Presheaf.IsSheaf (Opens.grothendieckTopology ↥(Spec R))) (Spec R).ringCatSheaf)
                    (homOfLE hrU).op)))
              (M.val.obj (op (basicOpen r)))) :
          Type u))
        t
        ((ConcreteCategory.hom (FC :=
                fun
                  (x1 x2 :
                    ModuleCat
                      (↑(Functor.obj
                            (ObjectProperty.FullSubcategory.obj (P :=
                              CategoryTheory.Presheaf.IsSheaf (Opens.grothendieckTopology ↥(Spec R)))
                              (Spec R).ringCatSheaf)
                            (op (unop U))) :
                        Type u)) ↦
                LinearMap (R :=
                  (↑(Functor.obj
                        (ObjectProperty.FullSubcategory.obj (P :=
                          CategoryTheory.Presheaf.IsSheaf (Opens.grothendieckTopology ↥(Spec R))) (Spec R).ringCatSheaf)
                        (op (unop U))) :
                    Type u))
                  (RingHom.id
                    (↑(Functor.obj
                          (ObjectProperty.FullSubcategory.obj (P :=
                            CategoryTheory.Presheaf.IsSheaf (Opens.grothendieckTopology ↥(Spec R)))
                            (Spec R).ringCatSheaf)
                          (op (unop U))) :
                      Type u))
                  (↑x1 : Type u) (↑x2 : Type u))
                (CC := ModuleCat.carrier) (M.val.map (homOfLE hrU).op) :
              (a : (↑(M.val.obj (op (unop U))) : Type u)) →
                (↑((ModuleCat.restrictScalars (RingCat.Hom.hom ((Spec R).ringCatSheaf.obj.map (homOfLE hrU).op))).obj
                      (M.val.obj (op (basicOpen r)))) :
                  Type u))
            m :
          (↑(Functor.obj (C :=
                ModuleCat
                  (↑(Functor.obj (C := (Opens ↥(Spec R))ᵒᵖ)
                        (ObjectProperty.FullSubcategory.obj (P :=
                          CategoryTheory.Presheaf.IsSheaf (Opens.grothendieckTopology ↥(Spec R))) (Spec R).ringCatSheaf)
                        (op (basicOpen r))) :
                    Type u))
                (ModuleCat.restrictScalars
                  (RingCat.Hom.hom
                    (CategoryTheory.Functor.map
                      (ObjectProperty.FullSubcategory.obj (P :=
                        CategoryTheory.Presheaf.IsSheaf (Opens.grothendieckTopology ↥(Spec R))) (Spec R).ringCatSheaf)
                      (homOfLE hrU).op)))
                (M.val.obj (op (basicOpen r)))) :
            Type u))) =
    HSMul.hSMul (β :=
      (↑(Functor.obj (C :=
            ModuleCat
              (↑(Functor.obj (C := (Opens ↥(Spec R))ᵒᵖ)
                    (ObjectProperty.FullSubcategory.obj (P :=
                      CategoryTheory.Presheaf.IsSheaf (Opens.grothendieckTopology ↥(Spec R))) (Spec R).ringCatSheaf)
                    (op (basicOpen r))) :
                Type u))
            (ModuleCat.restrictScalars
              (RingCat.Hom.hom
                (CategoryTheory.Functor.map
                  (ObjectProperty.FullSubcategory.obj (P :=
                    CategoryTheory.Presheaf.IsSheaf (Opens.grothendieckTopology ↥(Spec R))) (Spec R).ringCatSheaf)
                  (homOfLE hrU).op)))
            (N.val.obj (op (basicOpen r)))) :
        Type u))
      t
      ((ConcreteCategory.hom (FC := fun (x1 x2 : ModuleCat (↑R : Type u)) ↦
              LinearMap (R := (↑R : Type u)) (RingHom.id (↑R : Type u)) (↑x1 : Type u) (↑x2 : Type u)) (CC :=
              ModuleCat.carrier) (X :=
              (Functor.obj modulesSpecToSheaf M).obj (P :=
                    CategoryTheory.Presheaf.IsSheaf (Opens.grothendieckTopology ↥(Spec R))).obj
                (op (basicOpen r)))
              (f.hom.app (op (basicOpen r))) :
            (a : (↑((modulesSpecToSheaf.obj M).obj.obj (op (basicOpen r))) : Type u)) →
              (↑((modulesSpecToSheaf.obj N).obj.obj (op (basicOpen r))) : Type u))
          ((ConcreteCategory.hom (FC :=
                  fun
                    (x1 x2 :
                      ModuleCat
                        (↑(Functor.obj
                              (ObjectProperty.FullSubcategory.obj (P :=
                                CategoryTheory.Presheaf.IsSheaf (Opens.grothendieckTopology ↥(Spec R)))
                                (Spec R).ringCatSheaf)
                              (op (unop U))) :
                          Type u)) ↦
                  LinearMap (R :=
                    (↑(Functor.obj
                          (ObjectProperty.FullSubcategory.obj (P :=
                            CategoryTheory.Presheaf.IsSheaf (Opens.grothendieckTopology ↥(Spec R)))
                            (Spec R).ringCatSheaf)
                          (op (unop U))) :
                      Type u))
                    (RingHom.id
                      (↑(Functor.obj
                            (ObjectProperty.FullSubcategory.obj (P :=
                              CategoryTheory.Presheaf.IsSheaf (Opens.grothendieckTopology ↥(Spec R)))
                              (Spec R).ringCatSheaf)
                            (op (unop U))) :
                        Type u))
                    (↑x1 : Type u) (↑x2 : Type u))
                  (CC := ModuleCat.carrier) (M.val.map (homOfLE hrU).op) :
                (a : (↑(M.val.obj (op (unop U))) : Type u)) →
                  (↑((ModuleCat.restrictScalars (RingCat.Hom.hom ((Spec R).ringCatSheaf.obj.map (homOfLE hrU).op))).obj
                        (M.val.obj (op (basicOpen r)))) :
                    Type u))
              m :
            (↑(Functor.obj (C :=
                  ModuleCat
                    (↑(Functor.obj (C := (Opens ↥(Spec R))ᵒᵖ)
                          (ObjectProperty.FullSubcategory.obj (P :=
                            CategoryTheory.Presheaf.IsSheaf (Opens.grothendieckTopology ↥(Spec R)))
                            (Spec R).ringCatSheaf)
                          (op (basicOpen r))) :
                      Type u))
                  (ModuleCat.restrictScalars
                    (RingCat.Hom.hom
                      (CategoryTheory.Functor.map
                        (ObjectProperty.FullSubcategory.obj (P :=
                          CategoryTheory.Presheaf.IsSheaf (Opens.grothendieckTopology ↥(Spec R))) (Spec R).ringCatSheaf)
                        (homOfLE hrU).op)))
                  (M.val.obj (op (basicOpen r)))) :
              Type u)) :
        (↑((Functor.obj modulesSpecToSheaf N).obj (P :=
                  CategoryTheory.Presheaf.IsSheaf (Opens.grothendieckTopology ↥(Spec R))).obj
              (op (basicOpen r))) :
          Type u))
have this₁ : IsScalarTower.{u, u, u} (↑R : Type u) (↑Γ(Spec R, basicOpen r) : Type u) (↑Γ(N, basicOpen r) : Type u)
Tactic: haveI : IsScalarTower R Γ(Spec R, basicOpen r) Γ(N, basicOpen r) :=
      .of_algebraMap_smul fun _ _ ↦ rfl