-- Module: Mathlib.CategoryTheory.Monoidal.Bimod
Goal:
C : Type u₁
inst : Category.{v₁, u₁} C
inst_1 : MonoidalCategory.{v₁, u₁} C
inst_2 : HasCoequalizers.{v₁, u₁} C
R S : Mon.{v₁, u₁} C
P : Bimod R S
inst_3 : ∀ (X : C), PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorLeft X)
inst_4 : ∀ (X : C), PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorRight X)
refine :
  CategoryStruct.comp (Y :=
      Functor.obj.{v₁, v₁, u₁, u₁} (tensorRight S.X)
        (coequalizer
          ({ X := R.X, actLeft := μ, one_actLeft := ⋯, left_assoc := ⋯, actRight := μ, actRight_one := ⋯,
                right_assoc := ⋯, middle_assoc := ⋯ : Bimod R R }.actRight ▷
            P.X)
          (Iso.hom
              (α_
                { X := R.X, actLeft := μ, one_actLeft := ⋯, left_assoc := ⋯, actRight := μ, actRight_one := ⋯,
                    right_assoc := ⋯, middle_assoc := ⋯ : Bimod R R }.X
                R.X P.X) ≫
            { X := R.X, actLeft := μ, one_actLeft := ⋯, left_assoc := ⋯, actRight := μ, actRight_one := ⋯,
                  right_assoc := ⋯, middle_assoc := ⋯ : Bimod R R }.X ◁
              P.actLeft)))
      (CategoryTheory.Functor.map (tensorRight S.X)
        (coequalizer.π
          ({ X := R.X, actLeft := μ, one_actLeft := ⋯, left_assoc := ⋯, actRight := μ, actRight_one := ⋯,
                right_assoc := ⋯, middle_assoc := ⋯ : Bimod R R }.actRight ▷
            P.X)
          (Iso.hom
              (α_
                { X := R.X, actLeft := μ, one_actLeft := ⋯, left_assoc := ⋯, actRight := μ, actRight_one := ⋯,
                    right_assoc := ⋯, middle_assoc := ⋯ : Bimod R R }.X
                R.X P.X) ≫
            { X := R.X, actLeft := μ, one_actLeft := ⋯, left_assoc := ⋯, actRight := μ, actRight_one := ⋯,
                  right_assoc := ⋯, middle_assoc := ⋯ : Bimod R R }.X ◁
              P.actLeft)))
      (CategoryStruct.comp (Y :=
        TensorBimod.X
          { X := R.X, actLeft := μ, one_actLeft := ⋯, left_assoc := ⋯, actRight := μ, actRight_one := ⋯,
            right_assoc := ⋯, middle_assoc := ⋯ : Bimod R R }
          P)
        (CategoryStruct.comp (Y :=
          coequalizer (X :=
            tensorObj.{v₁, u₁} (𝒞 := inst) (tensorObj.{v₁, u₁} (𝒞 := inst) (tensorObj.{v₁, u₁} (𝒞 := inst) R.X R.X) P.X)
              S.X)
            (μ ▷ P.X ▷ S.X) ((Iso.hom (α_ R.X R.X P.X) ≫ R.X ◁ P.actLeft) ▷ S.X))
          (Iso.inv (PreservesCoequalizer.iso (tensorRight S.X) (μ ▷ P.X) (Iso.hom (α_ R.X R.X P.X) ≫ R.X ◁ P.actLeft)))
          (colimMap
            (parallelPairHom (μ ▷ P.X ▷ S.X) ((Iso.hom (α_ R.X R.X P.X) ≫ R.X ◁ P.actLeft) ▷ S.X) (μ ▷ P.X)
              (Iso.hom (α_ R.X R.X P.X) ≫ R.X ◁ P.actLeft)
              (Iso.hom (α_ (tensorObj.{v₁, u₁} (𝒞 := inst) R.X R.X) P.X S.X) ≫
                Iso.hom (α_ R.X R.X (tensorObj.{v₁, u₁} (𝒞 := inst) P.X S.X)) ≫
                  R.X ◁ R.X ◁ P.actRight ≫ Iso.inv (α_ R.X R.X P.X))
              (Iso.hom (α_ R.X P.X S.X) ≫ R.X ◁ P.actRight) ⋯ ⋯)))
        (coequalizer.desc P.actLeft ⋯)) =
    CategoryStruct.comp (Y :=
      Functor.obj.{v₁, v₁, u₁, u₁} (tensorRight S.X)
        (coequalizer
          ({ X := R.X, actLeft := μ, one_actLeft := ⋯, left_assoc := ⋯, actRight := μ, actRight_one := ⋯,
                right_assoc := ⋯, middle_assoc := ⋯ : Bimod R R }.actRight ▷
            P.X)
          (Iso.hom
              (α_
                { X := R.X, actLeft := μ, one_actLeft := ⋯, left_assoc := ⋯, actRight := μ, actRight_one := ⋯,
                    right_assoc := ⋯, middle_assoc := ⋯ : Bimod R R }.X
                R.X P.X) ≫
            { X := R.X, actLeft := μ, one_actLeft := ⋯, left_assoc := ⋯, actRight := μ, actRight_one := ⋯,
                  right_assoc := ⋯, middle_assoc := ⋯ : Bimod R R }.X ◁
              P.actLeft)))
      (CategoryTheory.Functor.map (tensorRight S.X)
        (coequalizer.π
          ({ X := R.X, actLeft := μ, one_actLeft := ⋯, left_assoc := ⋯, actRight := μ, actRight_one := ⋯,
                right_assoc := ⋯, middle_assoc := ⋯ }.actRight ▷
            P.X)
          (Iso.hom
              (α_
                { X := R.X, actLeft := μ, one_actLeft := ⋯, left_assoc := ⋯, actRight := μ, actRight_one := ⋯,
                    right_assoc := ⋯, middle_assoc := ⋯ : Bimod R R }.X
                R.X P.X) ≫
            { X := R.X, actLeft := μ, one_actLeft := ⋯, left_assoc := ⋯, actRight := μ, actRight_one := ⋯,
                  right_assoc := ⋯, middle_assoc := ⋯ : Bimod R R }.X ◁
              P.actLeft)))
      (coequalizer.desc P.actLeft ⋯ ▷ S.X ≫ P.actRight)
⊢ Eq (α :=
    tensorObj.{v₁, u₁} (𝒞 := inst)
        (TensorBimod.X
          { X := R.X, actLeft := μ, one_actLeft := ⋯, left_assoc := ⋯, actRight := μ, actRight_one := ⋯,
            right_assoc := ⋯, middle_assoc := ⋯ : Bimod R R }
          P)
        S.X ⟶
      P.X)
    (CategoryStruct.comp (Y :=
      TensorBimod.X
        { X := R.X, actLeft := μ, one_actLeft := ⋯, left_assoc := ⋯, actRight := μ, actRight_one := ⋯, right_assoc := ⋯,
          middle_assoc := ⋯ : Bimod R R }
        P)
      (CategoryStruct.comp (Y :=
        coequalizer (X :=
          tensorObj.{v₁, u₁} (𝒞 := inst) (tensorObj.{v₁, u₁} (𝒞 := inst) (tensorObj.{v₁, u₁} (𝒞 := inst) R.X R.X) P.X)
            S.X)
          (μ ▷ P.X ▷ S.X) ((Iso.hom (α_ R.X R.X P.X) ≫ R.X ◁ P.actLeft) ▷ S.X))
        (Iso.inv (PreservesCoequalizer.iso (tensorRight S.X) (μ ▷ P.X) (Iso.hom (α_ R.X R.X P.X) ≫ R.X ◁ P.actLeft)))
        (colimMap
          (parallelPairHom (μ ▷ P.X ▷ S.X) ((Iso.hom (α_ R.X R.X P.X) ≫ R.X ◁ P.actLeft) ▷ S.X) (μ ▷ P.X)
            (Iso.hom (α_ R.X R.X P.X) ≫ R.X ◁ P.actLeft)
            (Iso.hom (α_ (tensorObj.{v₁, u₁} (𝒞 := inst) R.X R.X) P.X S.X) ≫
              Iso.hom (α_ R.X R.X (tensorObj.{v₁, u₁} (𝒞 := inst) P.X S.X)) ≫
                R.X ◁ R.X ◁ P.actRight ≫ Iso.inv (α_ R.X R.X P.X))
            (Iso.hom (α_ R.X P.X S.X) ≫ R.X ◁ P.actRight) ⋯ ⋯)))
      (coequalizer.desc P.actLeft ⋯))
    (coequalizer.desc P.actLeft ⋯ ▷ S.X ≫ P.actRight)

Tactic:
refine (cancel_epi ((tensorRight _).map (coequalizer.π _ _))).1 ?_

Premises used: CategoryTheory.Functor.map, CategoryTheory.MonoidalCategory.tensorRight, Iff.mp, CategoryTheory.Limits.coequalizer.π, CategoryTheory.cancel_epi