/-- A multiplicative analogue of `Equiv.arrowCongr`,
for multiplicative maps from a monoid to a commutative monoid.
-/
@[to_additive (attr := simps apply)
  "An additive analogue of `Equiv.arrowCongr`,
  for additive maps from an additive monoid to a commutative additive monoid."]
-- porting note: @[simps apply] removed because it was making a lemma which
-- wasn't in simp normal form.
def monoidHomCongr {M N P Q} [MulOneClass M] [MulOneClass N] [CommMonoid P] [CommMonoid Q]
    (f : M ≃* N) (g : P ≃* Q) : (M →* P) ≃* (N →* Q) where
  toFun h := g.toMonoidHom.comp (h.comp f.symm.toMonoidHom)
  invFun k := g.symm.toMonoidHom.comp (k.comp f.toMonoidHom)
  left_inv h := by ext; simp
  right_inv k := by ext; simp
  map_mul' h k := by ext; 

Proof state:
case h
F : Type u_1
α : Type u_2
β : Type u_3
A : Type u_4
B : Type u_5
M✝ : Type u_6
N✝ : Type u_7
P✝ : Type u_8
Q✝ : Type u_9
G : Type u_10
H : Type u_11
inst✝⁷ : Mul M✝
inst✝⁶ : Mul N✝
inst✝⁵ : Mul P✝
inst✝⁴ : Mul Q✝
M : Type ?u.65294
N : Type ?u.65297
P : Type ?u.65300
Q : Type ?u.65303
inst✝³ : MulOneClass M
inst✝² : MulOneClass N
inst✝¹ : CommMonoid P
inst✝ : CommMonoid Q
f : M ≃* N
g : P ≃* Q
h k : M →* P
x✝ : N
⊢ (Equiv.toFun
        { toFun := fun h => MonoidHom.comp (toMonoidHom g) (MonoidHom.comp h (toMonoidHom (symm f))),
          invFun := fun k => MonoidHom.comp (toMonoidHom (symm g)) (MonoidHom.comp k (toMonoidHom f)),
          left_inv :=
            (_ :
              ∀ (h : M →* P),
                (fun k => MonoidHom.comp (toMonoidHom (symm g)) (MonoidHom.comp k (toMonoidHom f)))
                    ((fun h => MonoidHom.comp (toMonoidHom g) (MonoidHom.comp h (toMonoidHom (symm f)))) h) =
                  h),
          right_inv :=
            (_ :
              ∀ (k : N →* Q),
                (fun h => MonoidHom.comp (toMonoidHom g) (MonoidHom.comp h (toMonoidHom (symm f))))
                    ((fun k => MonoidHom.comp (toMonoidHom (symm g)) (MonoidHom.comp k (toMonoidHom f))) k) =
                  k) }
        (h * k))
      x✝ =
    (Equiv.toFun
          { toFun := fun h => MonoidHom.comp (toMonoidHom g) (MonoidHom.comp h (toMonoidHom (symm f))),
            invFun := fun k => MonoidHom.comp (toMonoidHom (symm g)) (MonoidHom.comp k (toMonoidHom f)),
            left_inv :=
              (_ :
                ∀ (h : M →* P),
                  (fun k => MonoidHom.comp (toMonoidHom (symm g)) (MonoidHom.comp k (toMonoidHom f)))
                      ((fun h => MonoidHom.comp (toMonoidHom g) (MonoidHom.comp h (toMonoidHom (symm f)))) h) =
                    h),
            right_inv :=
              (_ :
                ∀ (k : N →* Q),
                  (fun h => MonoidHom.comp (toMonoidHom g) (MonoidHom.comp h (toMonoidHom (symm f))))
                      ((fun k => MonoidHom.comp (toMonoidHom (symm g)) (MonoidHom.comp k (toMonoidHom f))) k) =
                    k) }
          h *
        Equiv.toFun
          { toFun := fun h => MonoidHom.comp (toMonoidHom g) (MonoidHom.comp h (toMonoidHom (symm f))),
            invFun := fun k => MonoidHom.comp (toMonoidHom (symm g)) (MonoidHom.comp k (toMonoidHom f)),
            left_inv :=
              (_ :
                ∀ (h : M →* P),
                  (fun k => MonoidHom.comp (toMonoidHom (symm g)) (MonoidHom.comp k (toMonoidHom f)))
                      ((fun h => MonoidHom.comp (toMonoidHom g) (MonoidHom.comp h (toMonoidHom (symm f)))) h) =
                    h),
            right_inv :=
              (_ :
                ∀ (k : N →* Q),
                  (fun h => MonoidHom.comp (toMonoidHom g) (MonoidHom.comp h (toMonoidHom (symm f))))
                      ((fun k => MonoidHom.comp (toMonoidHom (symm g)) (MonoidHom.comp k (toMonoidHom f))) k) =
                    k) }
          k)
      x✝

Next tactic:
simp