/-- Auxiliary definition for `equivalenceModuleMonoidAlgebra`. -/
def unitIso (V : Rep k G) : V ≅ (toModuleMonoidAlgebra ⋙ ofModuleMonoidAlgebra).obj V :=
  Action.mkIso
    (LinearEquiv.toModuleIso'
      { unitIsoAddEquiv with
        map_smul' := fun r x => by
          dsimp [unitIsoAddEquiv]
/- Porting note: rest of broken proof was
          simp only [Representation.asModuleEquiv_symm_map_smul,
            RestrictScalars.addEquiv_symm_map_algebraMap_smul] -/
          -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
          erw [AddEquiv.trans_apply,
            Representation.asModuleEquiv_symm_map_smul]
          rfl })
    fun g => by 

Proof state:
k G : Type u
inst✝¹ : CommRing k
inst✝ : Monoid G
V : Rep k G
g : ↑(MonCat.of G)
⊢ V.ρ g ≫
      (LinearEquiv.toModuleIso'
          (let src := unitIsoAddEquiv;
          {
            toLinearMap :=
              {
                toAddHom :=
                  { toFun := src.toFun,
                    map_add' :=
                      (_ :
                        ∀ (x y : CoeSort.coe V),
                          Equiv.toFun src.toEquiv (x + y) = Equiv.toFun src.toEquiv x + Equiv.toFun src.toEquiv y) },
                map_smul' :=
                  (_ :
                    ∀ (r : k) (x : ↑V.V),
                      AddHom.toFun
                          { toFun := src.toFun,
                            map_add' :=
                              (_ :
                                ∀ (x y : CoeSort.coe V),
                                  Equiv.toFun src.toEquiv (x + y) =
                                    Equiv.toFun src.toEquiv x + Equiv.toFun src.toEquiv y) }
                          (r • x) =
                        (RingHom.id k) r •
                          AddHom.toFun
                            { toFun := src.toFun,
                              map_add' :=
                                (_ :
                                  ∀ (x y : CoeSort.coe V),
                                    Equiv.toFun src.toEquiv (x + y) =
                                      Equiv.toFun src.toEquiv x + Equiv.toFun src.toEquiv y) }
                            x) },
            invFun := src.invFun, left_inv := (_ : Function.LeftInverse src.invFun src.toFun),
            right_inv := (_ : Function.RightInverse src.invFun src.toFun) })).hom =
    (LinearEquiv.toModuleIso'
          (let src := unitIsoAddEquiv;
          {
            toLinearMap :=
              {
                toAddHom :=
                  { toFun := src.toFun,
                    map_add' :=
                      (_ :
                        ∀ (x y : CoeSort.coe V),
                          Equiv.toFun src.toEquiv (x + y) = Equiv.toFun src.toEquiv x + Equiv.toFun src.toEquiv y) },
                map_smul' :=
                  (_ :
                    ∀ (r : k) (x : ↑V.V),
                      AddHom.toFun
                          { toFun := src.toFun,
                            map_add' :=
                              (_ :
                                ∀ (x y : CoeSort.coe V),
                                  Equiv.toFun src.toEquiv (x + y) =
                                    Equiv.toFun src.toEquiv x + Equiv.toFun src.toEquiv y) }
                          (r • x) =
                        (RingHom.id k) r •
                          AddHom.toFun
                            { toFun := src.toFun,
                              map_add' :=
                                (_ :
                                  ∀ (x y : CoeSort.coe V),
                                    Equiv.toFun src.toEquiv (x + y) =
                                      Equiv.toFun src.toEquiv x + Equiv.toFun src.toEquiv y) }
                            x) },
            invFun := src.invFun, left_inv := (_ : Function.LeftInverse src.invFun src.toFun),
            right_inv := (_ : Function.RightInverse src.invFun src.toFun) })).hom ≫
      ((toModuleMonoidAlgebra ⋙ ofModuleMonoidAlgebra).obj V).ρ g

Next tactic:
ext