-- Module: Mathlib.AlgebraicGeometry.StructureSheaf
Goal:
R M : Type u
inst : CommRing R
inst_1 : AddCommGroup M
inst_2 : Module R M
s : R
f : M
n : ℕ
rw :
  Eq (α :=
    Functor.obj (C := (Opens (↑(PrimeSpectrum.Top R) : Type u))ᵒᵖ)
      (ObjectProperty.FullSubcategory.obj (P :=
        CategoryTheory.Presheaf.IsSheaf (Opens.grothendieckTopology (↑(PrimeSpectrum.Top R) : Type u)))
        (structureSheafInType R M))
      (op (basicOpen s)))
    ((((algebraMap R
                  (Module.End R
                    (Functor.obj (C := (Opens (↑(PrimeSpectrum.Top R) : Type u))ᵒᵖ)
                      (ObjectProperty.FullSubcategory.obj (P :=
                        CategoryTheory.Presheaf.IsSheaf (Opens.grothendieckTopology (↑(PrimeSpectrum.Top R) : Type u)))
                        (structureSheafInType R M))
                      (op (basicOpen s)))) :
                (a : R) → Module.End R ((structureSheafInType R M).obj.obj (op (basicOpen s))))
              (s ^ n) :
            Module.End R
              (Functor.obj (C := (Opens (↑(PrimeSpectrum.Top R) : Type u))ᵒᵖ)
                (ObjectProperty.FullSubcategory.obj (P :=
                  CategoryTheory.Presheaf.IsSheaf (Opens.grothendieckTopology (↑(PrimeSpectrum.Top R) : Type u)))
                  (structureSheafInType R M))
                (op (basicOpen s)))) :
          (a : (structureSheafInType R M).obj.obj (op (basicOpen s))) →
            (structureSheafInType R M).obj.obj (op (basicOpen s)))
        ((toBasicOpenₗ R M s : (a : LocalizedModule.Away s M) → (structureSheafInType R M).obj.obj (op (basicOpen s)))
          (LocalizedModule.mk f
            (Subtype.mk (p := fun (x : R) ↦ Membership.mem (γ := Submonoid R) (Submonoid.powers s) x)
              ((fun (x : ℕ) ↦ s ^ x) n) ⋯))) :
      Functor.obj (C := (Opens (↑(PrimeSpectrum.Top R) : Type u))ᵒᵖ)
        (ObjectProperty.FullSubcategory.obj (P :=
          CategoryTheory.Presheaf.IsSheaf (Opens.grothendieckTopology (↑(PrimeSpectrum.Top R) : Type u)))
          (structureSheafInType R M))
        (op (basicOpen s)))
    ((((algebraMap R
                  (Module.End R
                    (Functor.obj (C := (Opens (↑(PrimeSpectrum.Top R) : Type u))ᵒᵖ)
                      (ObjectProperty.FullSubcategory.obj (P :=
                        CategoryTheory.Presheaf.IsSheaf (Opens.grothendieckTopology (↑(PrimeSpectrum.Top R) : Type u)))
                        (structureSheafInType R M))
                      (op (basicOpen s)))) :
                (a : R) → Module.End R ((structureSheafInType R M).obj.obj (op (basicOpen s))))
              (s ^ n) :
            Module.End R
              (Functor.obj (C := (Opens (↑(PrimeSpectrum.Top R) : Type u))ᵒᵖ)
                (ObjectProperty.FullSubcategory.obj (P :=
                  CategoryTheory.Presheaf.IsSheaf (Opens.grothendieckTopology (↑(PrimeSpectrum.Top R) : Type u)))
                  (structureSheafInType R M))
                (op (basicOpen s)))) :
          (a : (structureSheafInType R M).obj.obj (op (basicOpen s))) →
            (structureSheafInType R M).obj.obj (op (basicOpen s)))
        (const f
          (↑(Subtype.mk (p := fun (x : R) ↦ Membership.mem (γ := Submonoid R) (Submonoid.powers s) x)
                ((fun (x : ℕ) ↦ s ^ x) n) ⋯) :
            R)
          (basicOpen s) ⋯) :
      Functor.obj (C := (Opens (↑(PrimeSpectrum.Top R) : Type u))ᵒᵖ)
        (ObjectProperty.FullSubcategory.obj (P :=
          CategoryTheory.Presheaf.IsSheaf (Opens.grothendieckTopology (↑(PrimeSpectrum.Top R) : Type u)))
          (structureSheafInType R M))
        (op (basicOpen s)))
⊢ Eq (α :=
    Functor.obj (C := (Opens (↑(PrimeSpectrum.Top R) : Type u))ᵒᵖ)
      (ObjectProperty.FullSubcategory.obj (P :=
        CategoryTheory.Presheaf.IsSheaf (Opens.grothendieckTopology (↑(PrimeSpectrum.Top R) : Type u)))
        (structureSheafInType R M))
      (op (basicOpen s)))
    ((HPow.hPow (α :=
            Module.End R
              (Functor.obj (C := (Opens (↑(PrimeSpectrum.Top R) : Type u))ᵒᵖ)
                (ObjectProperty.FullSubcategory.obj (P :=
                  CategoryTheory.Presheaf.IsSheaf (Opens.grothendieckTopology (↑(PrimeSpectrum.Top R) : Type u)))
                  (structureSheafInType R M))
                (op (basicOpen s))))
            ((algebraMap R
                    (Module.End R
                      (Functor.obj (C := (Opens (↑(PrimeSpectrum.Top R) : Type u))ᵒᵖ)
                        (ObjectProperty.FullSubcategory.obj (P :=
                          CategoryTheory.Presheaf.IsSheaf
                            (Opens.grothendieckTopology (↑(PrimeSpectrum.Top R) : Type u)))
                          (structureSheafInType R M))
                        (op (basicOpen s)))) :
                  (a : R) → Module.End R ((structureSheafInType R M).obj.obj (op (basicOpen s))))
                s :
              Module.End R
                (Functor.obj (C := (Opens (↑(PrimeSpectrum.Top R) : Type u))ᵒᵖ)
                  (ObjectProperty.FullSubcategory.obj (P :=
                    CategoryTheory.Presheaf.IsSheaf (Opens.grothendieckTopology (↑(PrimeSpectrum.Top R) : Type u)))
                    (structureSheafInType R M))
                  (op (basicOpen s))))
            n :
          (a : (structureSheafInType R M).obj.obj (op (basicOpen s))) →
            (structureSheafInType R M).obj.obj (op (basicOpen s)))
        ((toBasicOpenₗ R M s : (a : LocalizedModule.Away s M) → (structureSheafInType R M).obj.obj (op (basicOpen s)))
          (LocalizedModule.mk f
            (Subtype.mk (p := fun (x : R) ↦ Membership.mem (γ := Submonoid R) (Submonoid.powers s) x)
              ((fun (x : ℕ) ↦ s ^ x) n) ⋯))) :
      Functor.obj (C := (Opens (↑(PrimeSpectrum.Top R) : Type u))ᵒᵖ)
        (ObjectProperty.FullSubcategory.obj (P :=
          CategoryTheory.Presheaf.IsSheaf (Opens.grothendieckTopology (↑(PrimeSpectrum.Top R) : Type u)))
          (structureSheafInType R M))
        (op (basicOpen s)))
    ((HPow.hPow (α :=
            Module.End R
              (Functor.obj (C := (Opens (↑(PrimeSpectrum.Top R) : Type u))ᵒᵖ)
                (ObjectProperty.FullSubcategory.obj (P :=
                  CategoryTheory.Presheaf.IsSheaf (Opens.grothendieckTopology (↑(PrimeSpectrum.Top R) : Type u)))
                  (structureSheafInType R M))
                (op (basicOpen s))))
            ((algebraMap R
                    (Module.End R
                      (Functor.obj (C := (Opens (↑(PrimeSpectrum.Top R) : Type u))ᵒᵖ)
                        (ObjectProperty.FullSubcategory.obj (P :=
                          CategoryTheory.Presheaf.IsSheaf
                            (Opens.grothendieckTopology (↑(PrimeSpectrum.Top R) : Type u)))
                          (structureSheafInType R M))
                        (op (basicOpen s)))) :
                  (a : R) → Module.End R ((structureSheafInType R M).obj.obj (op (basicOpen s))))
                s :
              Module.End R
                (Functor.obj (C := (Opens (↑(PrimeSpectrum.Top R) : Type u))ᵒᵖ)
                  (ObjectProperty.FullSubcategory.obj (P :=
                    CategoryTheory.Presheaf.IsSheaf (Opens.grothendieckTopology (↑(PrimeSpectrum.Top R) : Type u)))
                    (structureSheafInType R M))
                  (op (basicOpen s))))
            n :
          (a : (structureSheafInType R M).obj.obj (op (basicOpen s))) →
            (structureSheafInType R M).obj.obj (op (basicOpen s)))
        (const f
          (↑(Subtype.mk (p := fun (x : R) ↦ Membership.mem (γ := Submonoid R) (Submonoid.powers s) x)
                ((fun (x : ℕ) ↦ s ^ x) n) ⋯) :
            R)
          (basicOpen s) ⋯) :
      Functor.obj (C := (Opens (↑(PrimeSpectrum.Top R) : Type u))ᵒᵖ)
        (ObjectProperty.FullSubcategory.obj (P :=
          CategoryTheory.Presheaf.IsSheaf (Opens.grothendieckTopology (↑(PrimeSpectrum.Top R) : Type u)))
          (structureSheafInType R M))
        (op (basicOpen s)))

Tactic:
rw [← map_pow]

Premises used: map_pow