-- Lean 4 proof step from Mathlib.CategoryTheory.Monoidal.Bimod (goal)
Goal:
C : Type u₁
inst : Category.{v₁, u₁} C
inst_1 : MonoidalCategory.{v₁, u₁} C
inst_2 : HasCoequalizers.{v₁, u₁} C
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)
V W X Y Z : Mon.{v₁, u₁} C
M : Bimod V W
N : Bimod W X
P : Bimod X Y
Q : Bimod Y Z
| (CategoryStruct.comp (Y :=
      tensorObj.{v₁, u₁} (𝒞 := inst)
        (coequalizer (TensorBimod.actRight M N ▷ P.X)
          (Iso.hom (α_ (TensorBimod.X M N) X.X P.X) ≫ TensorBimod.X M N ◁ P.actLeft))
        Q.X)
      (coequalizer.π (TensorBimod.actRight M N ▷ P.X)
          (Iso.hom (α_ (TensorBimod.X M N) X.X P.X) ≫ TensorBimod.X M N ◁ P.actLeft) ▷
        Q.X)
      (CategoryStruct.comp (Y :=
        coequalizer (X :=
          tensorObj.{v₁, u₁} (𝒞 := inst)
            (tensorObj.{v₁, u₁} (𝒞 := inst) (tensorObj.{v₁, u₁} (𝒞 := inst) (TensorBimod.X M N) X.X) P.X) Q.X)
          (TensorBimod.actRight M N ▷ P.X ▷ Q.X)
          ((Iso.hom (α_ (TensorBimod.X M N) X.X P.X) ≫ TensorBimod.X M N ◁ P.actLeft) ▷ Q.X))
        (Iso.inv
          (PreservesCoequalizer.iso (tensorRight Q.X) (TensorBimod.actRight M N ▷ P.X)
            (Iso.hom (α_ (TensorBimod.X M N) X.X P.X) ≫ TensorBimod.X M N ◁ P.actLeft)))
        (coequalizer.desc
          (Iso.hom (α_ (TensorBimod.X M N) P.X Q.X) ≫
            CategoryStruct.comp (Y :=
              tensorObj.{v₁, u₁} (𝒞 := inst) (TensorBimod.X M N)
                (coequalizer (P.actRight ▷ Q.X) (Iso.hom (α_ P.X Y.X Q.X) ≫ P.X ◁ Q.actLeft)))
              (TensorBimod.X M N ◁ coequalizer.π (P.actRight ▷ Q.X) (Iso.hom (α_ P.X Y.X Q.X) ≫ P.X ◁ Q.actLeft) :
                tensorObj.{v₁, u₁} (𝒞 := inst) (TensorBimod.X M N) (tensorObj.{v₁, u₁} (𝒞 := inst) P.X Q.X) ⟶
                  tensorObj.{v₁, u₁} (𝒞 := inst) (TensorBimod.X M N)
                    (coequalizer (P.actRight ▷ Q.X) (Iso.hom (α_ P.X Y.X Q.X) ≫ P.X ◁ Q.actLeft)))
              (coequalizer.π (TensorBimod.actRight M N ▷ TensorBimod.X P Q)
                  (Iso.hom (α_ (TensorBimod.X M N) X.X (TensorBimod.X P Q)) ≫
                    TensorBimod.X M N ◁ TensorBimod.actLeft P Q) :
                tensorObj.{v₁, u₁} (𝒞 := inst) (TensorBimod.X M N)
                    (coequalizer (P.actRight ▷ Q.X) (Iso.hom (α_ P.X Y.X Q.X) ≫ P.X ◁ Q.actLeft)) ⟶
                  coequalizer (X :=
                    tensorObj.{v₁, u₁} (𝒞 := inst) (tensorObj.{v₁, u₁} (𝒞 := inst) (TensorBimod.X M N) X.X)
                      (TensorBimod.X P Q))
                    (TensorBimod.actRight M N ▷ TensorBimod.X P Q)
                    (Iso.hom (α_ (TensorBimod.X M N) X.X (TensorBimod.X P Q)) ≫
                      TensorBimod.X M N ◁ TensorBimod.actLeft P Q)))
          ⋯)) :
    tensorObj.{v₁, u₁} (𝒞 := inst) (tensorObj.{v₁, u₁} (𝒞 := inst) (TensorBimod.X M N) P.X) Q.X ⟶
      TensorBimod.X (M.tensorBimod N) (P.tensorBimod Q))
have a : (Iso.hom (α_ (TensorBimod.X M N) P.X Q.X) ≫
    CategoryStruct.comp (Y :=
      tensorObj.{v₁, u₁} (𝒞 := inst) (TensorBimod.X M N)
        (coequalizer (P.actRight ▷ Q.X) (Iso.hom (α_ P.X Y.X Q.X) ≫ P.X ◁ Q.actLeft)))
      (TensorBimod.X M N ◁ coequalizer.π (P.actRight ▷ Q.X) (Iso.hom (α_ P.X Y.X Q.X) ≫ P.X ◁ Q.actLeft) :
        tensorObj.{v₁, u₁} (𝒞 := inst) (TensorBimod.X M N) (tensorObj.{v₁, u₁} (𝒞 := inst) P.X Q.X) ⟶
          tensorObj.{v₁, u₁} (𝒞 := inst) (TensorBimod.X M N)
            (coequalizer (P.actRight ▷ Q.X) (Iso.hom (α_ P.X Y.X Q.X) ≫ P.X ◁ Q.actLeft)))
      (coequalizer.π (TensorBimod.actRight M N ▷ TensorBimod.X P Q)
          (Iso.hom (α_ (TensorBimod.X M N) X.X (TensorBimod.X P Q)) ≫ TensorBimod.X M N ◁ TensorBimod.actLeft P Q) :
        tensorObj.{v₁, u₁} (𝒞 := inst) (TensorBimod.X M N)
            (coequalizer (P.actRight ▷ Q.X) (Iso.hom (α_ P.X Y.X Q.X) ≫ P.X ◁ Q.actLeft)) ⟶
          coequalizer (X :=
            tensorObj.{v₁, u₁} (𝒞 := inst) (tensorObj.{v₁, u₁} (𝒞 := inst) (TensorBimod.X M N) X.X) (TensorBimod.X P Q))
            (TensorBimod.actRight M N ▷ TensorBimod.X P Q)
            (Iso.hom (α_ (TensorBimod.X M N) X.X (TensorBimod.X P Q)) ≫ TensorBimod.X M N ◁ TensorBimod.actLeft P Q)) :
  tensorObj.{v₁, u₁} (𝒞 := inst) (tensorObj.{v₁, u₁} (𝒞 := inst) (TensorBimod.X M N) P.X) Q.X ⟶
    TensorBimod.X (M.tensorBimod N) (P.tensorBimod Q))
Tactic: rw [π_tensor_id_preserves_coequalizer_inv_desc]