set_option maxHeartbeats 500000 in
/-- The category of internal monoid objects in `ModuleCat R`
is equivalent to the category of "native" bundled `R`-algebras.
-/
def monModuleEquivalenceAlgebra : Mon_ (ModuleCat.{u} R) ≌ AlgebraCat R where
  functor := functor
  inverse := inverse
  unitIso :=
    NatIso.ofComponents
      (fun A =>
        { hom :=
            { hom :=
                { toFun := _root_.id
                  map_add' := fun x y => rfl
                  map_smul' := fun r a => rfl }
              mul_hom := by
                -- Porting note : `ext` did not pick up `TensorProduct.ext`
                refine TensorProduct.ext ?_
                dsimp at *
                rfl
              one_hom := by ext; rfl }
          inv :=
            { hom :=
                { toFun := _root_.id
                  map_add' := fun x y => rfl
                  map_smul' := fun r a => rfl }
              mul_hom := by
                -- Porting note : `ext` did not pick up `TensorProduct.ext`
                refine TensorProduct.ext ?_
                dsimp at *
                rfl
              one_hom := by ext; rfl }
          hom_inv_id := by ext; rfl
          inv_hom_id := by ext; rfl })
      (by aesop_cat)
  counitIso :=
    NatIso.ofComponents
      (fun A =>
        { hom :=
            { toFun := _root_.id
              map_zero' := rfl
              map_add' := fun x y => rfl
              map_one' := (algebraMap R A).map_one
              map_mul' := fun x y => @LinearMap.mul'_apply R _ _ _ _ _ _ x y
              commutes' := fun r => rfl }
          inv :=
            { toFun := _root_.id
              map_zero' := rfl
              map_add' := fun x y => rfl
              map_one' := (algebraMap R A).map_one.symm
              map_mul' := fun x y => (@LinearMap.mul'_apply R _ _ _ _ _ _ x y).symm
              commutes' := fun r => rfl } })
      (by intros; 

Proof state:
R : Type u
inst✝ : CommRing R
X✝ Y✝ : AlgebraCat R
f✝ : X✝ ⟶ Y✝
⊢ (MonModuleEquivalenceAlgebra.inverse ⋙ functor).map f✝ ≫
      ((fun A =>
            Iso.mk
              {
                toRingHom :=
                  {
                    toMonoidHom :=
                      { toOneHom := { toFun := _root_.id, map_one' := (_ : (_root_.algebraMap R ↑A) 1 = 1) },
                        map_mul' :=
                          (_ :
                            ∀ (x y : ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A)),
                              (mul' R ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A)) (x ⊗ₜ[R] y) = x * y) },
                    map_zero' :=
                      (_ :
                        OneHom.toFun
                            (↑{ toOneHom := { toFun := _root_.id, map_one' := (_ : (_root_.algebraMap R ↑A) 1 = 1) },
                                map_mul' :=
                                  (_ :
                                    ∀ (x y : ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A)),
                                      (mul' R ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A)) (x ⊗ₜ[R] y) =
                                        x * y) })
                            0 =
                          OneHom.toFun
                            (↑{ toOneHom := { toFun := _root_.id, map_one' := (_ : (_root_.algebraMap R ↑A) 1 = 1) },
                                map_mul' :=
                                  (_ :
                                    ∀ (x y : ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A)),
                                      (mul' R ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A)) (x ⊗ₜ[R] y) =
                                        x * y) })
                            0),
                    map_add' :=
                      (_ :
                        ∀ (x y : ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A)),
                          OneHom.toFun
                              (↑{ toOneHom := { toFun := _root_.id, map_one' := (_ : (_root_.algebraMap R ↑A) 1 = 1) },
                                  map_mul' :=
                                    (_ :
                                      ∀ (x y : ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A)),
                                        (mul' R ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A)) (x ⊗ₜ[R] y) =
                                          x * y) })
                              (x + y) =
                            OneHom.toFun
                              (↑{ toOneHom := { toFun := _root_.id, map_one' := (_ : (_root_.algebraMap R ↑A) 1 = 1) },
                                  map_mul' :=
                                    (_ :
                                      ∀ (x y : ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A)),
                                        (mul' R ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A)) (x ⊗ₜ[R] y) =
                                          x * y) })
                              (x + y)) },
                commutes' :=
                  (_ :
                    ∀ (r : R),
                      OneHom.toFun
                          (↑↑{
                                toMonoidHom :=
                                  {
                                    toOneHom :=
                                      { toFun := _root_.id, map_one' := (_ : (_root_.algebraMap R ↑A) 1 = 1) },
                                    map_mul' :=
                                      (_ :
                                        ∀ (x y : ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A)),
                                          (mul' R ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A))
                                              (x ⊗ₜ[R] y) =
                                            x * y) },
                                map_zero' :=
                                  (_ :
                                    OneHom.toFun
                                        (↑{
                                            toOneHom :=
                                              { toFun := _root_.id, map_one' := (_ : (_root_.algebraMap R ↑A) 1 = 1) },
                                            map_mul' :=
                                              (_ :
                                                ∀ (x y : ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A)),
                                                  (mul' R ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A))
                                                      (x ⊗ₜ[R] y) =
                                                    x * y) })
                                        0 =
                                      OneHom.toFun
                                        (↑{
                                            toOneHom :=
                                              { toFun := _root_.id, map_one' := (_ : (_root_.algebraMap R ↑A) 1 = 1) },
                                            map_mul' :=
                                              (_ :
                                                ∀ (x y : ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A)),
                                                  (mul' R ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A))
                                                      (x ⊗ₜ[R] y) =
                                                    x * y) })
                                        0),
                                map_add' :=
                                  (_ :
                                    ∀ (x y : ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A)),
                                      OneHom.toFun
                                          (↑{
                                              toOneHom :=
                                                { toFun := _root_.id,
                                                  map_one' := (_ : (_root_.algebraMap R ↑A) 1 = 1) },
                                              map_mul' :=
                                                (_ :
                                                  ∀ (x y : ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A)),
                                                    (mul' R ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A))
                                                        (x ⊗ₜ[R] y) =
                                                      x * y) })
                                          (x + y) =
                                        OneHom.toFun
                                          (↑{
                                              toOneHom :=
                                                { toFun := _root_.id,
                                                  map_one' := (_ : (_root_.algebraMap R ↑A) 1 = 1) },
                                              map_mul' :=
                                                (_ :
                                                  ∀ (x y : ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A)),
                                                    (mul' R ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A))
                                                        (x ⊗ₜ[R] y) =
                                                      x * y) })
                                          (x + y)) })
                          ((_root_.algebraMap R ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A)) r) =
                        OneHom.toFun
                          (↑↑{
                                toMonoidHom :=
                                  {
                                    toOneHom :=
                                      { toFun := _root_.id, map_one' := (_ : (_root_.algebraMap R ↑A) 1 = 1) },
                                    map_mul' :=
                                      (_ :
                                        ∀ (x y : ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A)),
                                          (mul' R ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A))
                                              (x ⊗ₜ[R] y) =
                                            x * y) },
                                map_zero' :=
                                  (_ :
                                    OneHom.toFun
                                        (↑{
                                            toOneHom :=
                                              { toFun := _root_.id, map_one' := (_ : (_root_.algebraMap R ↑A) 1 = 1) },
                                            map_mul' :=
                                              (_ :
                                                ∀ (x y : ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A)),
                                                  (mul' R ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A))
                                                      (x ⊗ₜ[R] y) =
                                                    x * y) })
                                        0 =
                                      OneHom.toFun
                                        (↑{
                                            toOneHom :=
                                              { toFun := _root_.id, map_one' := (_ : (_root_.algebraMap R ↑A) 1 = 1) },
                                            map_mul' :=
                                              (_ :
                                                ∀ (x y : ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A)),
                                                  (mul' R ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A))
                                                      (x ⊗ₜ[R] y) =
                                                    x * y) })
                                        0),
                                map_add' :=
                                  (_ :
                                    ∀ (x y : ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A)),
                                      OneHom.toFun
                                          (↑{
                                              toOneHom :=
                                                { toFun := _root_.id,
                                                  map_one' := (_ : (_root_.algebraMap R ↑A) 1 = 1) },
                                              map_mul' :=
                                                (_ :
                                                  ∀ (x y : ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A)),
                                                    (mul' R ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A))
                                                        (x ⊗ₜ[R] y) =
                                                      x * y) })
                                          (x + y) =
                                        OneHom.toFun
                                          (↑{
                                              toOneHom :=
                                                { toFun := _root_.id,
                                                  map_one' := (_ : (_root_.algebraMap R ↑A) 1 = 1) },
                                              map_mul' :=
                                                (_ :
                                                  ∀ (x y : ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A)),
                                                    (mul' R ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A))
                                                        (x ⊗ₜ[R] y) =
                                                      x * y) })
                                          (x + y)) })
                          ((_root_.algebraMap R ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A)) r)) }
              {
                toRingHom :=
                  {
                    toMonoidHom :=
                      { toOneHom := { toFun := _root_.id, map_one' := (_ : 1 = (_root_.algebraMap R ↑A) 1) },
                        map_mul' :=
                          (_ :
                            ∀ (x y : ↑((𝟭 (AlgebraCat R)).obj A)),
                              x * y = (mul' R ↑((𝟭 (AlgebraCat R)).obj A)) (x ⊗ₜ[R] y)) },
                    map_zero' :=
                      (_ :
                        OneHom.toFun
                            (↑{ toOneHom := { toFun := _root_.id, map_one' := (_ : 1 = (_root_.algebraMap R ↑A) 1) },
                                map_mul' :=
                                  (_ :
                                    ∀ (x y : ↑((𝟭 (AlgebraCat R)).obj A)),
                                      x * y = (mul' R ↑((𝟭 (AlgebraCat R)).obj A)) (x ⊗ₜ[R] y)) })
                            0 =
                          OneHom.toFun
                            (↑{ toOneHom := { toFun := _root_.id, map_one' := (_ : 1 = (_root_.algebraMap R ↑A) 1) },
                                map_mul' :=
                                  (_ :
                                    ∀ (x y : ↑((𝟭 (AlgebraCat R)).obj A)),
                                      x * y = (mul' R ↑((𝟭 (AlgebraCat R)).obj A)) (x ⊗ₜ[R] y)) })
                            0),
                    map_add' :=
                      (_ :
                        ∀ (x y : ↑((𝟭 (AlgebraCat R)).obj A)),
                          OneHom.toFun
                              (↑{ toOneHom := { toFun := _root_.id, map_one' := (_ : 1 = (_root_.algebraMap R ↑A) 1) },
                                  map_mul' :=
                                    (_ :
                                      ∀ (x y : ↑((𝟭 (AlgebraCat R)).obj A)),
                                        x * y = (mul' R ↑((𝟭 (AlgebraCat R)).obj A)) (x ⊗ₜ[R] y)) })
                              (x + y) =
                            OneHom.toFun
                              (↑{ toOneHom := { toFun := _root_.id, map_one' := (_ : 1 = (_root_.algebraMap R ↑A) 1) },
                                  map_mul' :=
                                    (_ :
                                      ∀ (x y : ↑((𝟭 (AlgebraCat R)).obj A)),
                                        x * y = (mul' R ↑((𝟭 (AlgebraCat R)).obj A)) (x ⊗ₜ[R] y)) })
                              (x + y)) },
                commutes' :=
                  (_ :
                    ∀ (r : R),
                      OneHom.toFun
                          (↑↑{
                                toMonoidHom :=
                                  {
                                    toOneHom :=
                                      { toFun := _root_.id, map_one' := (_ : 1 = (_root_.algebraMap R ↑A) 1) },
                                    map_mul' :=
                                      (_ :
                                        ∀ (x y : ↑((𝟭 (AlgebraCat R)).obj A)),
                                          x * y = (mul' R ↑((𝟭 (AlgebraCat R)).obj A)) (x ⊗ₜ[R] y)) },
                                map_zero' :=
                                  (_ :
                                    OneHom.toFun
                                        (↑{
                                            toOneHom :=
                                              { toFun := _root_.id, map_one' := (_ : 1 = (_root_.algebraMap R ↑A) 1) },
                                            map_mul' :=
                                              (_ :
                                                ∀ (x y : ↑((𝟭 (AlgebraCat R)).obj A)),
                                                  x * y = (mul' R ↑((𝟭 (AlgebraCat R)).obj A)) (x ⊗ₜ[R] y)) })
                                        0 =
                                      OneHom.toFun
                                        (↑{
                                            toOneHom :=
                                              { toFun := _root_.id, map_one' := (_ : 1 = (_root_.algebraMap R ↑A) 1) },
                                            map_mul' :=
                                              (_ :
                                                ∀ (x y : ↑((𝟭 (AlgebraCat R)).obj A)),
                                                  x * y = (mul' R ↑((𝟭 (AlgebraCat R)).obj A)) (x ⊗ₜ[R] y)) })
                                        0),
                                map_add' :=
                                  (_ :
                                    ∀ (x y : ↑((𝟭 (AlgebraCat R)).obj A)),
                                      OneHom.toFun
                                          (↑{
                                              toOneHom :=
                                                { toFun := _root_.id,
                                                  map_one' := (_ : 1 = (_root_.algebraMap R ↑A) 1) },
                                              map_mul' :=
                                                (_ :
                                                  ∀ (x y : ↑((𝟭 (AlgebraCat R)).obj A)),
                                                    x * y = (mul' R ↑((𝟭 (AlgebraCat R)).obj A)) (x ⊗ₜ[R] y)) })
                                          (x + y) =
                                        OneHom.toFun
                                          (↑{
                                              toOneHom :=
                                                { toFun := _root_.id,
                                                  map_one' := (_ : 1 = (_root_.algebraMap R ↑A) 1) },
                                              map_mul' :=
                                                (_ :
                                                  ∀ (x y : ↑((𝟭 (AlgebraCat R)).obj A)),
                                                    x * y = (mul' R ↑((𝟭 (AlgebraCat R)).obj A)) (x ⊗ₜ[R] y)) })
                                          (x + y)) })
                          ((_root_.algebraMap R ↑((𝟭 (AlgebraCat R)).obj A)) r) =
                        OneHom.toFun
                          (↑↑{
                                toMonoidHom :=
                                  {
                                    toOneHom :=
                                      { toFun := _root_.id, map_one' := (_ : 1 = (_root_.algebraMap R ↑A) 1) },
                                    map_mul' :=
                                      (_ :
                                        ∀ (x y : ↑((𝟭 (AlgebraCat R)).obj A)),
                                          x * y = (mul' R ↑((𝟭 (AlgebraCat R)).obj A)) (x ⊗ₜ[R] y)) },
                                map_zero' :=
                                  (_ :
                                    OneHom.toFun
                                        (↑{
                                            toOneHom :=
                                              { toFun := _root_.id, map_one' := (_ : 1 = (_root_.algebraMap R ↑A) 1) },
                                            map_mul' :=
                                              (_ :
                                                ∀ (x y : ↑((𝟭 (AlgebraCat R)).obj A)),
                                                  x * y = (mul' R ↑((𝟭 (AlgebraCat R)).obj A)) (x ⊗ₜ[R] y)) })
                                        0 =
                                      OneHom.toFun
                                        (↑{
                                            toOneHom :=
                                              { toFun := _root_.id, map_one' := (_ : 1 = (_root_.algebraMap R ↑A) 1) },
                                            map_mul' :=
                                              (_ :
                                                ∀ (x y : ↑((𝟭 (AlgebraCat R)).obj A)),
                                                  x * y = (mul' R ↑((𝟭 (AlgebraCat R)).obj A)) (x ⊗ₜ[R] y)) })
                                        0),
                                map_add' :=
                                  (_ :
                                    ∀ (x y : ↑((𝟭 (AlgebraCat R)).obj A)),
                                      OneHom.toFun
                                          (↑{
                                              toOneHom :=
                                                { toFun := _root_.id,
                                                  map_one' := (_ : 1 = (_root_.algebraMap R ↑A) 1) },
                                              map_mul' :=
                                                (_ :
                                                  ∀ (x y : ↑((𝟭 (AlgebraCat R)).obj A)),
                                                    x * y = (mul' R ↑((𝟭 (AlgebraCat R)).obj A)) (x ⊗ₜ[R] y)) })
                                          (x + y) =
                                        OneHom.toFun
                                          (↑{
                                              toOneHom :=
                                                { toFun := _root_.id,
                                                  map_one' := (_ : 1 = (_root_.algebraMap R ↑A) 1) },
                                              map_mul' :=
                                                (_ :
                                                  ∀ (x y : ↑((𝟭 (AlgebraCat R)).obj A)),
                                                    x * y = (mul' R ↑((𝟭 (AlgebraCat R)).obj A)) (x ⊗ₜ[R] y)) })
                                          (x + y)) })
                          ((_root_.algebraMap R ↑((𝟭 (AlgebraCat R)).obj A)) r)) })
          Y✝).hom =
    ((fun A =>
            Iso.mk
              {
                toRingHom :=
                  {
                    toMonoidHom :=
                      { toOneHom := { toFun := _root_.id, map_one' := (_ : (_root_.algebraMap R ↑A) 1 = 1) },
                        map_mul' :=
                          (_ :
                            ∀ (x y : ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A)),
                              (mul' R ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A)) (x ⊗ₜ[R] y) = x * y) },
                    map_zero' :=
                      (_ :
                        OneHom.toFun
                            (↑{ toOneHom := { toFun := _root_.id, map_one' := (_ : (_root_.algebraMap R ↑A) 1 = 1) },
                                map_mul' :=
                                  (_ :
                                    ∀ (x y : ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A)),
                                      (mul' R ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A)) (x ⊗ₜ[R] y) =
                                        x * y) })
                            0 =
                          OneHom.toFun
                            (↑{ toOneHom := { toFun := _root_.id, map_one' := (_ : (_root_.algebraMap R ↑A) 1 = 1) },
                                map_mul' :=
                                  (_ :
                                    ∀ (x y : ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A)),
                                      (mul' R ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A)) (x ⊗ₜ[R] y) =
                                        x * y) })
                            0),
                    map_add' :=
                      (_ :
                        ∀ (x y : ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A)),
                          OneHom.toFun
                              (↑{ toOneHom := { toFun := _root_.id, map_one' := (_ : (_root_.algebraMap R ↑A) 1 = 1) },
                                  map_mul' :=
                                    (_ :
                                      ∀ (x y : ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A)),
                                        (mul' R ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A)) (x ⊗ₜ[R] y) =
                                          x * y) })
                              (x + y) =
                            OneHom.toFun
                              (↑{ toOneHom := { toFun := _root_.id, map_one' := (_ : (_root_.algebraMap R ↑A) 1 = 1) },
                                  map_mul' :=
                                    (_ :
                                      ∀ (x y : ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A)),
                                        (mul' R ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A)) (x ⊗ₜ[R] y) =
                                          x * y) })
                              (x + y)) },
                commutes' :=
                  (_ :
                    ∀ (r : R),
                      OneHom.toFun
                          (↑↑{
                                toMonoidHom :=
                                  {
                                    toOneHom :=
                                      { toFun := _root_.id, map_one' := (_ : (_root_.algebraMap R ↑A) 1 = 1) },
                                    map_mul' :=
                                      (_ :
                                        ∀ (x y : ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A)),
                                          (mul' R ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A))
                                              (x ⊗ₜ[R] y) =
                                            x * y) },
                                map_zero' :=
                                  (_ :
                                    OneHom.toFun
                                        (↑{
                                            toOneHom :=
                                              { toFun := _root_.id, map_one' := (_ : (_root_.algebraMap R ↑A) 1 = 1) },
                                            map_mul' :=
                                              (_ :
                                                ∀ (x y : ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A)),
                                                  (mul' R ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A))
                                                      (x ⊗ₜ[R] y) =
                                                    x * y) })
                                        0 =
                                      OneHom.toFun
                                        (↑{
                                            toOneHom :=
                                              { toFun := _root_.id, map_one' := (_ : (_root_.algebraMap R ↑A) 1 = 1) },
                                            map_mul' :=
                                              (_ :
                                                ∀ (x y : ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A)),
                                                  (mul' R ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A))
                                                      (x ⊗ₜ[R] y) =
                                                    x * y) })
                                        0),
                                map_add' :=
                                  (_ :
                                    ∀ (x y : ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A)),
                                      OneHom.toFun
                                          (↑{
                                              toOneHom :=
                                                { toFun := _root_.id,
                                                  map_one' := (_ : (_root_.algebraMap R ↑A) 1 = 1) },
                                              map_mul' :=
                                                (_ :
                                                  ∀ (x y : ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A)),
                                                    (mul' R ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A))
                                                        (x ⊗ₜ[R] y) =
                                                      x * y) })
                                          (x + y) =
                                        OneHom.toFun
                                          (↑{
                                              toOneHom :=
                                                { toFun := _root_.id,
                                                  map_one' := (_ : (_root_.algebraMap R ↑A) 1 = 1) },
                                              map_mul' :=
                                                (_ :
                                                  ∀ (x y : ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A)),
                                                    (mul' R ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A))
                                                        (x ⊗ₜ[R] y) =
                                                      x * y) })
                                          (x + y)) })
                          ((_root_.algebraMap R ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A)) r) =
                        OneHom.toFun
                          (↑↑{
                                toMonoidHom :=
                                  {
                                    toOneHom :=
                                      { toFun := _root_.id, map_one' := (_ : (_root_.algebraMap R ↑A) 1 = 1) },
                                    map_mul' :=
                                      (_ :
                                        ∀ (x y : ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A)),
                                          (mul' R ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A))
                                              (x ⊗ₜ[R] y) =
                                            x * y) },
                                map_zero' :=
                                  (_ :
                                    OneHom.toFun
                                        (↑{
                                            toOneHom :=
                                              { toFun := _root_.id, map_one' := (_ : (_root_.algebraMap R ↑A) 1 = 1) },
                                            map_mul' :=
                                              (_ :
                                                ∀ (x y : ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A)),
                                                  (mul' R ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A))
                                                      (x ⊗ₜ[R] y) =
                                                    x * y) })
                                        0 =
                                      OneHom.toFun
                                        (↑{
                                            toOneHom :=
                                              { toFun := _root_.id, map_one' := (_ : (_root_.algebraMap R ↑A) 1 = 1) },
                                            map_mul' :=
                                              (_ :
                                                ∀ (x y : ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A)),
                                                  (mul' R ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A))
                                                      (x ⊗ₜ[R] y) =
                                                    x * y) })
                                        0),
                                map_add' :=
                                  (_ :
                                    ∀ (x y : ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A)),
                                      OneHom.toFun
                                          (↑{
                                              toOneHom :=
                                                { toFun := _root_.id,
                                                  map_one' := (_ : (_root_.algebraMap R ↑A) 1 = 1) },
                                              map_mul' :=
                                                (_ :
                                                  ∀ (x y : ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A)),
                                                    (mul' R ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A))
                                                        (x ⊗ₜ[R] y) =
                                                      x * y) })
                                          (x + y) =
                                        OneHom.toFun
                                          (↑{
                                              toOneHom :=
                                                { toFun := _root_.id,
                                                  map_one' := (_ : (_root_.algebraMap R ↑A) 1 = 1) },
                                              map_mul' :=
                                                (_ :
                                                  ∀ (x y : ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A)),
                                                    (mul' R ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A))
                                                        (x ⊗ₜ[R] y) =
                                                      x * y) })
                                          (x + y)) })
                          ((_root_.algebraMap R ↑((MonModuleEquivalenceAlgebra.inverse ⋙ functor).obj A)) r)) }
              {
                toRingHom :=
                  {
                    toMonoidHom :=
                      { toOneHom := { toFun := _root_.id, map_one' := (_ : 1 = (_root_.algebraMap R ↑A) 1) },
                        map_mul' :=
                          (_ :
                            ∀ (x y : ↑((𝟭 (AlgebraCat R)).obj A)),
                              x * y = (mul' R ↑((𝟭 (AlgebraCat R)).obj A)) (x ⊗ₜ[R] y)) },
                    map_zero' :=
                      (_ :
                        OneHom.toFun
                            (↑{ toOneHom := { toFun := _root_.id, map_one' := (_ : 1 = (_root_.algebraMap R ↑A) 1) },
                                map_mul' :=
                                  (_ :
                                    ∀ (x y : ↑((𝟭 (AlgebraCat R)).obj A)),
                                      x * y = (mul' R ↑((𝟭 (AlgebraCat R)).obj A)) (x ⊗ₜ[R] y)) })
                            0 =
                          OneHom.toFun
                            (↑{ toOneHom := { toFun := _root_.id, map_one' := (_ : 1 = (_root_.algebraMap R ↑A) 1) },
                                map_mul' :=
                                  (_ :
                                    ∀ (x y : ↑((𝟭 (AlgebraCat R)).obj A)),
                                      x * y = (mul' R ↑((𝟭 (AlgebraCat R)).obj A)) (x ⊗ₜ[R] y)) })
                            0),
                    map_add' :=
                      (_ :
                        ∀ (x y : ↑((𝟭 (AlgebraCat R)).obj A)),
                          OneHom.toFun
                              (↑{ toOneHom := { toFun := _root_.id, map_one' := (_ : 1 = (_root_.algebraMap R ↑A) 1) },
                                  map_mul' :=
                                    (_ :
                                      ∀ (x y : ↑((𝟭 (AlgebraCat R)).obj A)),
                                        x * y = (mul' R ↑((𝟭 (AlgebraCat R)).obj A)) (x ⊗ₜ[R] y)) })
                              (x + y) =
                            OneHom.toFun
                              (↑{ toOneHom := { toFun := _root_.id, map_one' := (_ : 1 = (_root_.algebraMap R ↑A) 1) },
                                  map_mul' :=
                                    (_ :
                                      ∀ (x y : ↑((𝟭 (AlgebraCat R)).obj A)),
                                        x * y = (mul' R ↑((𝟭 (AlgebraCat R)).obj A)) (x ⊗ₜ[R] y)) })
                              (x + y)) },
                commutes' :=
                  (_ :
                    ∀ (r : R),
                      OneHom.toFun
                          (↑↑{
                                toMonoidHom :=
                                  {
                                    toOneHom :=
                                      { toFun := _root_.id, map_one' := (_ : 1 = (_root_.algebraMap R ↑A) 1) },
                                    map_mul' :=
                                      (_ :
                                        ∀ (x y : ↑((𝟭 (AlgebraCat R)).obj A)),
                                          x * y = (mul' R ↑((𝟭 (AlgebraCat R)).obj A)) (x ⊗ₜ[R] y)) },
                                map_zero' :=
                                  (_ :
                                    OneHom.toFun
                                        (↑{
                                            toOneHom :=
                                              { toFun := _root_.id, map_one' := (_ : 1 = (_root_.algebraMap R ↑A) 1) },
                                            map_mul' :=
                                              (_ :
                                                ∀ (x y : ↑((𝟭 (AlgebraCat R)).obj A)),
                                                  x * y = (mul' R ↑((𝟭 (AlgebraCat R)).obj A)) (x ⊗ₜ[R] y)) })
                                        0 =
                                      OneHom.toFun
                                        (↑{
                                            toOneHom :=
                                              { toFun := _root_.id, map_one' := (_ : 1 = (_root_.algebraMap R ↑A) 1) },
                                            map_mul' :=
                                              (_ :
                                                ∀ (x y : ↑((𝟭 (AlgebraCat R)).obj A)),
                                                  x * y = (mul' R ↑((𝟭 (AlgebraCat R)).obj A)) (x ⊗ₜ[R] y)) })
                                        0),
                                map_add' :=
                                  (_ :
                                    ∀ (x y : ↑((𝟭 (AlgebraCat R)).obj A)),
                                      OneHom.toFun
                                          (↑{
                                              toOneHom :=
                                                { toFun := _root_.id,
                                                  map_one' := (_ : 1 = (_root_.algebraMap R ↑A) 1) },
                                              map_mul' :=
                                                (_ :
                                                  ∀ (x y : ↑((𝟭 (AlgebraCat R)).obj A)),
                                                    x * y = (mul' R ↑((𝟭 (AlgebraCat R)).obj A)) (x ⊗ₜ[R] y)) })
                                          (x + y) =
                                        OneHom.toFun
                                          (↑{
                                              toOneHom :=
                                                { toFun := _root_.id,
                                                  map_one' := (_ : 1 = (_root_.algebraMap R ↑A) 1) },
                                              map_mul' :=
                                                (_ :
                                                  ∀ (x y : ↑((𝟭 (AlgebraCat R)).obj A)),
                                                    x * y = (mul' R ↑((𝟭 (AlgebraCat R)).obj A)) (x ⊗ₜ[R] y)) })
                                          (x + y)) })
                          ((_root_.algebraMap R ↑((𝟭 (AlgebraCat R)).obj A)) r) =
                        OneHom.toFun
                          (↑↑{
                                toMonoidHom :=
                                  {
                                    toOneHom :=
                                      { toFun := _root_.id, map_one' := (_ : 1 = (_root_.algebraMap R ↑A) 1) },
                                    map_mul' :=
                                      (_ :
                                        ∀ (x y : ↑((𝟭 (AlgebraCat R)).obj A)),
                                          x * y = (mul' R ↑((𝟭 (AlgebraCat R)).obj A)) (x ⊗ₜ[R] y)) },
                                map_zero' :=
                                  (_ :
                                    OneHom.toFun
                                        (↑{
                                            toOneHom :=
                                              { toFun := _root_.id, map_one' := (_ : 1 = (_root_.algebraMap R ↑A) 1) },
                                            map_mul' :=
                                              (_ :
                                                ∀ (x y : ↑((𝟭 (AlgebraCat R)).obj A)),
                                                  x * y = (mul' R ↑((𝟭 (AlgebraCat R)).obj A)) (x ⊗ₜ[R] y)) })
                                        0 =
                                      OneHom.toFun
                                        (↑{
                                            toOneHom :=
                                              { toFun := _root_.id, map_one' := (_ : 1 = (_root_.algebraMap R ↑A) 1) },
                                            map_mul' :=
                                              (_ :
                                                ∀ (x y : ↑((𝟭 (AlgebraCat R)).obj A)),
                                                  x * y = (mul' R ↑((𝟭 (AlgebraCat R)).obj A)) (x ⊗ₜ[R] y)) })
                                        0),
                                map_add' :=
                                  (_ :
                                    ∀ (x y : ↑((𝟭 (AlgebraCat R)).obj A)),
                                      OneHom.toFun
                                          (↑{
                                              toOneHom :=
                                                { toFun := _root_.id,
                                                  map_one' := (_ : 1 = (_root_.algebraMap R ↑A) 1) },
                                              map_mul' :=
                                                (_ :
                                                  ∀ (x y : ↑((𝟭 (AlgebraCat R)).obj A)),
                                                    x * y = (mul' R ↑((𝟭 (AlgebraCat R)).obj A)) (x ⊗ₜ[R] y)) })
                                          (x + y) =
                                        OneHom.toFun
                                          (↑{
                                              toOneHom :=
                                                { toFun := _root_.id,
                                                  map_one' := (_ : 1 = (_root_.algebraMap R ↑A) 1) },
                                              map_mul' :=
                                                (_ :
                                                  ∀ (x y : ↑((𝟭 (AlgebraCat R)).obj A)),
                                                    x * y = (mul' R ↑((𝟭 (AlgebraCat R)).obj A)) (x ⊗ₜ[R] y)) })
                                          (x + y)) })
                          ((_root_.algebraMap R ↑((𝟭 (AlgebraCat R)).obj A)) r)) })
          X✝).hom ≫
      (𝟭 (AlgebraCat R)).map f✝

Next tactic:
rfl