l3lab/ntp-mathlib huggingface dataset:
theorem right_assoc' :
    (𝟙 _ ⊗ T.mul) ≫ actRight P Q =
      (α_ _ T.X T.X).inv ≫ (actRight P Q ⊗ 𝟙 T.X) ≫ actRight P Q := by
  refine' (cancel_epi ((tensorRight _).map (coequalizer.π _ _))).1 _
  dsimp [X]
  -- porting note: had to replace some `rw` by `erw`
  slice_lhs 1 2 => erw [tensor_id_comp_id_tensor, ← id_tensor_comp_tensor_id]
  slice_lhs 2 3 => rw [π_tensor_id_actRight]
  slice_lhs 1 2 => rw [← MonoidalCategory.tensor_id, associator_naturality]
  slice_lhs 2 3 => rw [← id_tensor_comp, right_assoc, id_tensor_comp, id_tensor_comp]
  slice_rhs 1 2 => erw [← MonoidalCategory.tensor_id, associator_inv_naturality]
  slice_rhs 2 3 => rw [← comp_tensor_id, π_tensor_id_actRight, comp_tensor_id, comp_tensor_id]
  

Proof state:
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
inst✝² : MonoidalCategory C
A B : Mon_ C
M : Bimod A B
inst✝¹ : HasCoequalizers C
R S T : Mon_ C
P : Bimod R S
Q : Bimod S T
inst✝ : (X : C) → PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorRight X)
⊢ (α_ P.X Q.X (T.X ⊗ T.X)).hom ≫
      ((𝟙 P.X ⊗ (α_ Q.X T.X T.X).inv) ≫ (𝟙 P.X ⊗ Q.actRight ⊗ 𝟙 T.X) ≫ (𝟙 P.X ⊗ Q.actRight)) ≫
        coequalizer.π (P.actRight ⊗ 𝟙 Q.X) ((α_ P.X S.X Q.X).hom ≫ (𝟙 P.X ⊗ Q.actLeft)) =
    (α_ (P.X ⊗ Q.X) T.X T.X).inv ≫
      (((α_ P.X Q.X T.X).hom ⊗ 𝟙 T.X) ≫
          ((𝟙 P.X ⊗ Q.actRight) ⊗ 𝟙 T.X) ≫
            (coequalizer.π (P.actRight ⊗ 𝟙 Q.X) ((α_ P.X S.X Q.X).hom ≫ (𝟙 P.X ⊗ Q.actLeft)) ⊗ 𝟙 T.X)) ≫
        actRight P Q

Next tactic:
slice_rhs 4 5 => rw [π_tensor_id_actRight]
theorem right_assoc' :
    (𝟙 _ ⊗ T.mul) ≫ actRight P Q =
      (α_ _ T.X T.X).inv ≫ (actRight P Q ⊗ 𝟙 T.X) ≫ actRight P Q := by
  refine' (cancel_epi ((tensorRight _).map (coequalizer.π _ _))).1 _
  dsimp [X]
  -- porting note: had to replace some `rw` by `erw`
  slice_lhs 1 2 => erw [tensor_id_comp_id_tensor, ← id_tensor_comp_tensor_id]
  slice_lhs 2 3 => rw [π_tensor_id_actRight]
  slice_lhs 1 2 => rw [← MonoidalCategory.tensor_id, associator_naturality]
  slice_lhs 2 3 => rw [← id_tensor_comp, right_assoc, id_tensor_comp, id_tensor_comp]
  slice_rhs 1 2 => erw [← MonoidalCategory.tensor_id, associator_inv_naturality]
  slice_rhs 2 3 => rw [← comp_tensor_id, π_tensor_id_actRight, comp_tensor_id, comp_tensor_id]
  slice_rhs 4 5 => 

Proof state:
case a.a.a
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
inst✝² : MonoidalCategory C
A B : Mon_ C
M : Bimod A B
inst✝¹ : HasCoequalizers C
R S T : Mon_ C
P : Bimod R S
Q : Bimod S T
inst✝ : (X : C) → PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorRight X)
| (coequalizer.π (P.actRight ⊗ 𝟙 Q.X) ((α_ P.X S.X Q.X).hom ≫ (𝟙 P.X ⊗ Q.actLeft)) ⊗ 𝟙 T.X) ≫ actRight P Q
case a
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
inst✝² : MonoidalCategory C
A B : Mon_ C
M : Bimod A B
inst✝¹ : HasCoequalizers C
R S T : Mon_ C
P : Bimod R S
Q : Bimod S T
inst✝ : (X : C) → PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorRight X)
| (α_ (P.X ⊗ Q.X) T.X T.X).inv
case a.a
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
inst✝² : MonoidalCategory C
A B : Mon_ C
M : Bimod A B
inst✝¹ : HasCoequalizers C
R S T : Mon_ C
P : Bimod R S
Q : Bimod S T
inst✝ : (X : C) → PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorRight X)
| (α_ P.X Q.X T.X).hom ⊗ 𝟙 T.X
case a.a.a
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
inst✝² : MonoidalCategory C
A B : Mon_ C
M : Bimod A B
inst✝¹ : HasCoequalizers C
R S T : Mon_ C
P : Bimod R S
Q : Bimod S T
inst✝ : (X : C) → PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorRight X)
| (𝟙 P.X ⊗ Q.actRight) ⊗ 𝟙 T.X

Next tactic:
rw [π_tensor_id_actRight]
theorem right_assoc' :
    (𝟙 _ ⊗ T.mul) ≫ actRight P Q =
      (α_ _ T.X T.X).inv ≫ (actRight P Q ⊗ 𝟙 T.X) ≫ actRight P Q := by
  refine' (cancel_epi ((tensorRight _).map (coequalizer.π _ _))).1 _
  dsimp [X]
  -- porting note: had to replace some `rw` by `erw`
  slice_lhs 1 2 => erw [tensor_id_comp_id_tensor, ← id_tensor_comp_tensor_id]
  slice_lhs 2 3 => rw [π_tensor_id_actRight]
  slice_lhs 1 2 => rw [← MonoidalCategory.tensor_id, associator_naturality]
  slice_lhs 2 3 => rw [← id_tensor_comp, right_assoc, id_tensor_comp, id_tensor_comp]
  slice_rhs 1 2 => erw [← MonoidalCategory.tensor_id, associator_inv_naturality]
  slice_rhs 2 3 => rw [← comp_tensor_id, π_tensor_id_actRight, comp_tensor_id, comp_tensor_id]
  slice_rhs 4 5 => rw [π_tensor_id_actRight]
  

Proof state:
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
inst✝² : MonoidalCategory C
A B : Mon_ C
M : Bimod A B
inst✝¹ : HasCoequalizers C
R S T : Mon_ C
P : Bimod R S
Q : Bimod S T
inst✝ : (X : C) → PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorRight X)
⊢ (α_ P.X Q.X (T.X ⊗ T.X)).hom ≫
      ((𝟙 P.X ⊗ (α_ Q.X T.X T.X).inv) ≫ (𝟙 P.X ⊗ Q.actRight ⊗ 𝟙 T.X) ≫ (𝟙 P.X ⊗ Q.actRight)) ≫
        coequalizer.π (P.actRight ⊗ 𝟙 Q.X) ((α_ P.X S.X Q.X).hom ≫ (𝟙 P.X ⊗ Q.actLeft)) =
    (α_ (P.X ⊗ Q.X) T.X T.X).inv ≫
      ((α_ P.X Q.X T.X).hom ⊗ 𝟙 T.X) ≫
        ((𝟙 P.X ⊗ Q.actRight) ⊗ 𝟙 T.X) ≫
          (α_ P.X Q.X T.X).hom ≫
            (𝟙 P.X ⊗ Q.actRight) ≫ coequalizer.π (P.actRight ⊗ 𝟙 Q.X) ((α_ P.X S.X Q.X).hom ≫ (𝟙 P.X ⊗ Q.actLeft))

Next tactic:
slice_rhs 3 4 => rw [associator_naturality]
theorem right_assoc' :
    (𝟙 _ ⊗ T.mul) ≫ actRight P Q =
      (α_ _ T.X T.X).inv ≫ (actRight P Q ⊗ 𝟙 T.X) ≫ actRight P Q := by
  refine' (cancel_epi ((tensorRight _).map (coequalizer.π _ _))).1 _
  dsimp [X]
  -- porting note: had to replace some `rw` by `erw`
  slice_lhs 1 2 => erw [tensor_id_comp_id_tensor, ← id_tensor_comp_tensor_id]
  slice_lhs 2 3 => rw [π_tensor_id_actRight]
  slice_lhs 1 2 => rw [← MonoidalCategory.tensor_id, associator_naturality]
  slice_lhs 2 3 => rw [← id_tensor_comp, right_assoc, id_tensor_comp, id_tensor_comp]
  slice_rhs 1 2 => erw [← MonoidalCategory.tensor_id, associator_inv_naturality]
  slice_rhs 2 3 => rw [← comp_tensor_id, π_tensor_id_actRight, comp_tensor_id, comp_tensor_id]
  slice_rhs 4 5 => rw [π_tensor_id_actRight]
  slice_rhs 3 4 => 

Proof state:
case a.a.a.a
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
inst✝² : MonoidalCategory C
A B : Mon_ C
M : Bimod A B
inst✝¹ : HasCoequalizers C
R S T : Mon_ C
P : Bimod R S
Q : Bimod S T
inst✝ : (X : C) → PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorRight X)
| ((𝟙 P.X ⊗ Q.actRight) ⊗ 𝟙 T.X) ≫ (α_ P.X Q.X T.X).hom
case a.a.a.a
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
inst✝² : MonoidalCategory C
A B : Mon_ C
M : Bimod A B
inst✝¹ : HasCoequalizers C
R S T : Mon_ C
P : Bimod R S
Q : Bimod S T
inst✝ : (X : C) → PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorRight X)
| 𝟙 P.X ⊗ Q.actRight
case a.a.a
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
inst✝² : MonoidalCategory C
A B : Mon_ C
M : Bimod A B
inst✝¹ : HasCoequalizers C
R S T : Mon_ C
P : Bimod R S
Q : Bimod S T
inst✝ : (X : C) → PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorRight X)
| coequalizer.π (P.actRight ⊗ 𝟙 Q.X) ((α_ P.X S.X Q.X).hom ≫ (𝟙 P.X ⊗ Q.actLeft))
case a
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
inst✝² : MonoidalCategory C
A B : Mon_ C
M : Bimod A B
inst✝¹ : HasCoequalizers C
R S T : Mon_ C
P : Bimod R S
Q : Bimod S T
inst✝ : (X : C) → PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorRight X)
| (α_ (P.X ⊗ Q.X) T.X T.X).inv
case a.a
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
inst✝² : MonoidalCategory C
A B : Mon_ C
M : Bimod A B
inst✝¹ : HasCoequalizers C
R S T : Mon_ C
P : Bimod R S
Q : Bimod S T
inst✝ : (X : C) → PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorRight X)
| (α_ P.X Q.X T.X).hom ⊗ 𝟙 T.X

Next tactic:
rw [associator_naturality]
theorem right_assoc' :
    (𝟙 _ ⊗ T.mul) ≫ actRight P Q =
      (α_ _ T.X T.X).inv ≫ (actRight P Q ⊗ 𝟙 T.X) ≫ actRight P Q := by
  refine' (cancel_epi ((tensorRight _).map (coequalizer.π _ _))).1 _
  dsimp [X]
  -- porting note: had to replace some `rw` by `erw`
  slice_lhs 1 2 => erw [tensor_id_comp_id_tensor, ← id_tensor_comp_tensor_id]
  slice_lhs 2 3 => rw [π_tensor_id_actRight]
  slice_lhs 1 2 => rw [← MonoidalCategory.tensor_id, associator_naturality]
  slice_lhs 2 3 => rw [← id_tensor_comp, right_assoc, id_tensor_comp, id_tensor_comp]
  slice_rhs 1 2 => erw [← MonoidalCategory.tensor_id, associator_inv_naturality]
  slice_rhs 2 3 => rw [← comp_tensor_id, π_tensor_id_actRight, comp_tensor_id, comp_tensor_id]
  slice_rhs 4 5 => rw [π_tensor_id_actRight]
  slice_rhs 3 4 => rw [associator_naturality]
  

Proof state:
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
inst✝² : MonoidalCategory C
A B : Mon_ C
M : Bimod A B
inst✝¹ : HasCoequalizers C
R S T : Mon_ C
P : Bimod R S
Q : Bimod S T
inst✝ : (X : C) → PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorRight X)
⊢ (α_ P.X Q.X (T.X ⊗ T.X)).hom ≫
      ((𝟙 P.X ⊗ (α_ Q.X T.X T.X).inv) ≫ (𝟙 P.X ⊗ Q.actRight ⊗ 𝟙 T.X) ≫ (𝟙 P.X ⊗ Q.actRight)) ≫
        coequalizer.π (P.actRight ⊗ 𝟙 Q.X) ((α_ P.X S.X Q.X).hom ≫ (𝟙 P.X ⊗ Q.actLeft)) =
    (α_ (P.X ⊗ Q.X) T.X T.X).inv ≫
      ((α_ P.X Q.X T.X).hom ⊗ 𝟙 T.X) ≫
        (((α_ P.X (Q.X ⊗ T.X) T.X).hom ≫ (𝟙 P.X ⊗ Q.actRight ⊗ 𝟙 T.X)) ≫ (𝟙 P.X ⊗ Q.actRight)) ≫
          coequalizer.π (P.actRight ⊗ 𝟙 Q.X) ((α_ P.X S.X Q.X).hom ≫ (𝟙 P.X ⊗ Q.actLeft))

Next tactic:
coherence
theorem middle_assoc' :
    (actLeft P Q ⊗ 𝟙 T.X) ≫ actRight P Q =
      (α_ R.X _ T.X).hom ≫ (𝟙 R.X ⊗ actRight P Q) ≫ actLeft P Q := by
  

Proof state:
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
inst✝³ : MonoidalCategory C
A B : Mon_ C
M : Bimod A B
inst✝² : HasCoequalizers C
R S T : Mon_ C
P : Bimod R S
Q : Bimod S T
inst✝¹ : (X : C) → PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorLeft X)
inst✝ : (X : C) → PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorRight X)
⊢ (actLeft P Q ⊗ 𝟙 T.X) ≫ actRight P Q = (α_ R.X (X P Q) T.X).hom ≫ (𝟙 R.X ⊗ actRight P Q) ≫ actLeft P Q

Next tactic:
refine' (cancel_epi ((tensorLeft _ ⋙ tensorRight _).map (coequalizer.π _ _))).1 _
theorem middle_assoc' :
    (actLeft P Q ⊗ 𝟙 T.X) ≫ actRight P Q =
      (α_ R.X _ T.X).hom ≫ (𝟙 R.X ⊗ actRight P Q) ≫ actLeft P Q := by
  refine' (cancel_epi ((tensorLeft _ ⋙ tensorRight _).map (coequalizer.π _ _))).1 _
  

Proof state:
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
inst✝³ : MonoidalCategory C
A B : Mon_ C
M : Bimod A B
inst✝² : HasCoequalizers C
R S T : Mon_ C
P : Bimod R S
Q : Bimod S T
inst✝¹ : (X : C) → PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorLeft X)
inst✝ : (X : C) → PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorRight X)
⊢ (tensorLeft R.X ⋙ tensorRight T.X).map
        (coequalizer.π (P.actRight ⊗ 𝟙 Q.X) ((α_ P.X S.X Q.X).hom ≫ (𝟙 P.X ⊗ Q.actLeft))) ≫
      (actLeft P Q ⊗ 𝟙 T.X) ≫ actRight P Q =
    (tensorLeft R.X ⋙ tensorRight T.X).map
        (coequalizer.π (P.actRight ⊗ 𝟙 Q.X) ((α_ P.X S.X Q.X).hom ≫ (𝟙 P.X ⊗ Q.actLeft))) ≫
      (α_ R.X (X P Q) T.X).hom ≫ (𝟙 R.X ⊗ actRight P Q) ≫ actLeft P Q

Next tactic:
dsimp [X]
theorem middle_assoc' :
    (actLeft P Q ⊗ 𝟙 T.X) ≫ actRight P Q =
      (α_ R.X _ T.X).hom ≫ (𝟙 R.X ⊗ actRight P Q) ≫ actLeft P Q := by
  refine' (cancel_epi ((tensorLeft _ ⋙ tensorRight _).map (coequalizer.π _ _))).1 _
  dsimp [X]
  

Proof state:
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
inst✝³ : MonoidalCategory C
A B : Mon_ C
M : Bimod A B
inst✝² : HasCoequalizers C
R S T : Mon_ C
P : Bimod R S
Q : Bimod S T
inst✝¹ : (X : C) → PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorLeft X)
inst✝ : (X : C) → PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorRight X)
⊢ ((𝟙 R.X ⊗ coequalizer.π (P.actRight ⊗ 𝟙 Q.X) ((α_ P.X S.X Q.X).hom ≫ (𝟙 P.X ⊗ Q.actLeft))) ⊗ 𝟙 T.X) ≫
      (actLeft P Q ⊗ 𝟙 T.X) ≫ actRight P Q =
    ((𝟙 R.X ⊗ coequalizer.π (P.actRight ⊗ 𝟙 Q.X) ((α_ P.X S.X Q.X).hom ≫ (𝟙 P.X ⊗ Q.actLeft))) ⊗ 𝟙 T.X) ≫
      (α_ R.X (coequalizer (P.actRight ⊗ 𝟙 Q.X) ((α_ P.X S.X Q.X).hom ≫ (𝟙 P.X ⊗ Q.actLeft))) T.X).hom ≫
        (𝟙 R.X ⊗ actRight P Q) ≫ actLeft P Q

Next tactic:
slice_lhs 1 2 => rw [← comp_tensor_id, id_tensor_π_actLeft, comp_tensor_id, comp_tensor_id]
theorem middle_assoc' :
    (actLeft P Q ⊗ 𝟙 T.X) ≫ actRight P Q =
      (α_ R.X _ T.X).hom ≫ (𝟙 R.X ⊗ actRight P Q) ≫ actLeft P Q := by
  refine' (cancel_epi ((tensorLeft _ ⋙ tensorRight _).map (coequalizer.π _ _))).1 _
  dsimp [X]
  slice_lhs 1 2 => 

Proof state:
case a
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
inst✝³ : MonoidalCategory C
A B : Mon_ C
M : Bimod A B
inst✝² : HasCoequalizers C
R S T : Mon_ C
P : Bimod R S
Q : Bimod S T
inst✝¹ : (X : C) → PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorLeft X)
inst✝ : (X : C) → PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorRight X)
| ((𝟙 R.X ⊗ coequalizer.π (P.actRight ⊗ 𝟙 Q.X) ((α_ P.X S.X Q.X).hom ≫ (𝟙 P.X ⊗ Q.actLeft))) ⊗ 𝟙 T.X) ≫
    (actLeft P Q ⊗ 𝟙 T.X)
case a
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
inst✝³ : MonoidalCategory C
A B : Mon_ C
M : Bimod A B
inst✝² : HasCoequalizers C
R S T : Mon_ C
P : Bimod R S
Q : Bimod S T
inst✝¹ : (X : C) → PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorLeft X)
inst✝ : (X : C) → PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorRight X)
| actRight P Q

Next tactic:
rw [← comp_tensor_id, id_tensor_π_actLeft, comp_tensor_id, comp_tensor_id]
theorem middle_assoc' :
    (actLeft P Q ⊗ 𝟙 T.X) ≫ actRight P Q =
      (α_ R.X _ T.X).hom ≫ (𝟙 R.X ⊗ actRight P Q) ≫ actLeft P Q := by
  refine' (cancel_epi ((tensorLeft _ ⋙ tensorRight _).map (coequalizer.π _ _))).1 _
  dsimp [X]
  slice_lhs 1 2 => rw [← comp_tensor_id, id_tensor_π_actLeft, comp_tensor_id, comp_tensor_id]
  

Proof state:
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
inst✝³ : MonoidalCategory C
A B : Mon_ C
M : Bimod A B
inst✝² : HasCoequalizers C
R S T : Mon_ C
P : Bimod R S
Q : Bimod S T
inst✝¹ : (X : C) → PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorLeft X)
inst✝ : (X : C) → PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorRight X)
⊢ (((α_ R.X P.X Q.X).inv ⊗ 𝟙 T.X) ≫
        ((P.actLeft ⊗ 𝟙 Q.X) ⊗ 𝟙 T.X) ≫
          (coequalizer.π (P.actRight ⊗ 𝟙 Q.X) ((α_ P.X S.X Q.X).hom ≫ (𝟙 P.X ⊗ Q.actLeft)) ⊗ 𝟙 T.X)) ≫
      actRight P Q =
    ((𝟙 R.X ⊗ coequalizer.π (P.actRight ⊗ 𝟙 Q.X) ((α_ P.X S.X Q.X).hom ≫ (𝟙 P.X ⊗ Q.actLeft))) ⊗ 𝟙 T.X) ≫
      (α_ R.X (coequalizer (P.actRight ⊗ 𝟙 Q.X) ((α_ P.X S.X Q.X).hom ≫ (𝟙 P.X ⊗ Q.actLeft))) T.X).hom ≫
        (𝟙 R.X ⊗ actRight P Q) ≫ actLeft P Q

Next tactic:
slice_lhs 3 4 => rw [π_tensor_id_actRight]
theorem middle_assoc' :
    (actLeft P Q ⊗ 𝟙 T.X) ≫ actRight P Q =
      (α_ R.X _ T.X).hom ≫ (𝟙 R.X ⊗ actRight P Q) ≫ actLeft P Q := by
  refine' (cancel_epi ((tensorLeft _ ⋙ tensorRight _).map (coequalizer.π _ _))).1 _
  dsimp [X]
  slice_lhs 1 2 => rw [← comp_tensor_id, id_tensor_π_actLeft, comp_tensor_id, comp_tensor_id]
  slice_lhs 3 4 => 

Proof state:
case a.a
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
inst✝³ : MonoidalCategory C
A B : Mon_ C
M : Bimod A B
inst✝² : HasCoequalizers C
R S T : Mon_ C
P : Bimod R S
Q : Bimod S T
inst✝¹ : (X : C) → PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorLeft X)
inst✝ : (X : C) → PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorRight X)
| (coequalizer.π (P.actRight ⊗ 𝟙 Q.X) ((α_ P.X S.X Q.X).hom ≫ (𝟙 P.X ⊗ Q.actLeft)) ⊗ 𝟙 T.X) ≫ actRight P Q
case a
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
inst✝³ : MonoidalCategory C
A B : Mon_ C
M : Bimod A B
inst✝² : HasCoequalizers C
R S T : Mon_ C
P : Bimod R S
Q : Bimod S T
inst✝¹ : (X : C) → PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorLeft X)
inst✝ : (X : C) → PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorRight X)
| (α_ R.X P.X Q.X).inv ⊗ 𝟙 T.X
case a.a
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
inst✝³ : MonoidalCategory C
A B : Mon_ C
M : Bimod A B
inst✝² : HasCoequalizers C
R S T : Mon_ C
P : Bimod R S
Q : Bimod S T
inst✝¹ : (X : C) → PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorLeft X)
inst✝ : (X : C) → PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorRight X)
| (P.actLeft ⊗ 𝟙 Q.X) ⊗ 𝟙 T.X

Next tactic:
rw [π_tensor_id_actRight]
theorem middle_assoc' :
    (actLeft P Q ⊗ 𝟙 T.X) ≫ actRight P Q =
      (α_ R.X _ T.X).hom ≫ (𝟙 R.X ⊗ actRight P Q) ≫ actLeft P Q := by
  refine' (cancel_epi ((tensorLeft _ ⋙ tensorRight _).map (coequalizer.π _ _))).1 _
  dsimp [X]
  slice_lhs 1 2 => rw [← comp_tensor_id, id_tensor_π_actLeft, comp_tensor_id, comp_tensor_id]
  slice_lhs 3 4 => rw [π_tensor_id_actRight]
  

Proof state:
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
inst✝³ : MonoidalCategory C
A B : Mon_ C
M : Bimod A B
inst✝² : HasCoequalizers C
R S T : Mon_ C
P : Bimod R S
Q : Bimod S T
inst✝¹ : (X : C) → PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorLeft X)
inst✝ : (X : C) → PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorRight X)
⊢ ((α_ R.X P.X Q.X).inv ⊗ 𝟙 T.X) ≫
      ((P.actLeft ⊗ 𝟙 Q.X) ⊗ 𝟙 T.X) ≫
        (α_ P.X Q.X T.X).hom ≫
          (𝟙 P.X ⊗ Q.actRight) ≫ coequalizer.π (P.actRight ⊗ 𝟙 Q.X) ((α_ P.X S.X Q.X).hom ≫ (𝟙 P.X ⊗ Q.actLeft)) =
    ((𝟙 R.X ⊗ coequalizer.π (P.actRight ⊗ 𝟙 Q.X) ((α_ P.X S.X Q.X).hom ≫ (𝟙 P.X ⊗ Q.actLeft))) ⊗ 𝟙 T.X) ≫
      (α_ R.X (coequalizer (P.actRight ⊗ 𝟙 Q.X) ((α_ P.X S.X Q.X).hom ≫ (𝟙 P.X ⊗ Q.actLeft))) T.X).hom ≫
        (𝟙 R.X ⊗ actRight P Q) ≫ actLeft P Q

Next tactic:
slice_lhs 2 3 => rw [associator_naturality]
theorem middle_assoc' :
    (actLeft P Q ⊗ 𝟙 T.X) ≫ actRight P Q =
      (α_ R.X _ T.X).hom ≫ (𝟙 R.X ⊗ actRight P Q) ≫ actLeft P Q := by
  refine' (cancel_epi ((tensorLeft _ ⋙ tensorRight _).map (coequalizer.π _ _))).1 _
  dsimp [X]
  slice_lhs 1 2 => rw [← comp_tensor_id, id_tensor_π_actLeft, comp_tensor_id, comp_tensor_id]
  slice_lhs 3 4 => rw [π_tensor_id_actRight]
  slice_lhs 2 3 => 

Proof state:
case a.a.a
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
inst✝³ : MonoidalCategory C
A B : Mon_ C
M : Bimod A B
inst✝² : HasCoequalizers C
R S T : Mon_ C
P : Bimod R S
Q : Bimod S T
inst✝¹ : (X : C) → PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorLeft X)
inst✝ : (X : C) → PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorRight X)
| ((P.actLeft ⊗ 𝟙 Q.X) ⊗ 𝟙 T.X) ≫ (α_ P.X Q.X T.X).hom
case a.a.a
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
inst✝³ : MonoidalCategory C
A B : Mon_ C
M : Bimod A B
inst✝² : HasCoequalizers C
R S T : Mon_ C
P : Bimod R S
Q : Bimod S T
inst✝¹ : (X : C) → PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorLeft X)
inst✝ : (X : C) → PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorRight X)
| 𝟙 P.X ⊗ Q.actRight
case a.a
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
inst✝³ : MonoidalCategory C
A B : Mon_ C
M : Bimod A B
inst✝² : HasCoequalizers C
R S T : Mon_ C
P : Bimod R S
Q : Bimod S T
inst✝¹ : (X : C) → PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorLeft X)
inst✝ : (X : C) → PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorRight X)
| coequalizer.π (P.actRight ⊗ 𝟙 Q.X) ((α_ P.X S.X Q.X).hom ≫ (𝟙 P.X ⊗ Q.actLeft))
case a
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
inst✝³ : MonoidalCategory C
A B : Mon_ C
M : Bimod A B
inst✝² : HasCoequalizers C
R S T : Mon_ C
P : Bimod R S
Q : Bimod S T
inst✝¹ : (X : C) → PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorLeft X)
inst✝ : (X : C) → PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorRight X)
| (α_ R.X P.X Q.X).inv ⊗ 𝟙 T.X

Next tactic:
rw [associator_naturality]
theorem middle_assoc' :
    (actLeft P Q ⊗ 𝟙 T.X) ≫ actRight P Q =
      (α_ R.X _ T.X).hom ≫ (𝟙 R.X ⊗ actRight P Q) ≫ actLeft P Q := by
  refine' (cancel_epi ((tensorLeft _ ⋙ tensorRight _).map (coequalizer.π _ _))).1 _
  dsimp [X]
  slice_lhs 1 2 => rw [← comp_tensor_id, id_tensor_π_actLeft, comp_tensor_id, comp_tensor_id]
  slice_lhs 3 4 => rw [π_tensor_id_actRight]
  slice_lhs 2 3 => rw [associator_naturality]
  

Proof state:
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
inst✝³ : MonoidalCategory C
A B : Mon_ C
M : Bimod A B
inst✝² : HasCoequalizers C
R S T : Mon_ C
P : Bimod R S
Q : Bimod S T
inst✝¹ : (X : C) → PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorLeft X)
inst✝ : (X : C) → PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorRight X)
⊢ ((α_ R.X P.X Q.X).inv ⊗ 𝟙 T.X) ≫
      (((α_ (R.X ⊗ P.X) Q.X T.X).hom ≫ (P.actLeft ⊗ 𝟙 Q.X ⊗ 𝟙 T.X)) ≫ (𝟙 P.X ⊗ Q.actRight)) ≫
        coequalizer.π (P.actRight ⊗ 𝟙 Q.X) ((α_ P.X S.X Q.X).hom ≫ (𝟙 P.X ⊗ Q.actLeft)) =
    ((𝟙 R.X ⊗ coequalizer.π (P.actRight ⊗ 𝟙 Q.X) ((α_ P.X S.X Q.X).hom ≫ (𝟙 P.X ⊗ Q.actLeft))) ⊗ 𝟙 T.X) ≫
      (α_ R.X (coequalizer (P.actRight ⊗ 𝟙 Q.X) ((α_ P.X S.X Q.X).hom ≫ (𝟙 P.X ⊗ Q.actLeft))) T.X).hom ≫
        (𝟙 R.X ⊗ actRight P Q) ≫ actLeft P Q

Next tactic:
slice_lhs 3 4 => rw [MonoidalCategory.tensor_id, tensor_id_comp_id_tensor]
theorem middle_assoc' :
    (actLeft P Q ⊗ 𝟙 T.X) ≫ actRight P Q =
      (α_ R.X _ T.X).hom ≫ (𝟙 R.X ⊗ actRight P Q) ≫ actLeft P Q := by
  refine' (cancel_epi ((tensorLeft _ ⋙ tensorRight _).map (coequalizer.π _ _))).1 _
  dsimp [X]
  slice_lhs 1 2 => rw [← comp_tensor_id, id_tensor_π_actLeft, comp_tensor_id, comp_tensor_id]
  slice_lhs 3 4 => rw [π_tensor_id_actRight]
  slice_lhs 2 3 => rw [associator_naturality]
  slice_lhs 3 4 => 

Proof state:
case a.a.a
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
inst✝³ : MonoidalCategory C
A B : Mon_ C
M : Bimod A B
inst✝² : HasCoequalizers C
R S T : Mon_ C
P : Bimod R S
Q : Bimod S T
inst✝¹ : (X : C) → PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorLeft X)
inst✝ : (X : C) → PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorRight X)
| (P.actLeft ⊗ 𝟙 Q.X ⊗ 𝟙 T.X) ≫ (𝟙 P.X ⊗ Q.actRight)
case a.a.a
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
inst✝³ : MonoidalCategory C
A B : Mon_ C
M : Bimod A B
inst✝² : HasCoequalizers C
R S T : Mon_ C
P : Bimod R S
Q : Bimod S T
inst✝¹ : (X : C) → PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorLeft X)
inst✝ : (X : C) → PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorRight X)
| coequalizer.π (P.actRight ⊗ 𝟙 Q.X) ((α_ P.X S.X Q.X).hom ≫ (𝟙 P.X ⊗ Q.actLeft))
case a
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
inst✝³ : MonoidalCategory C
A B : Mon_ C
M : Bimod A B
inst✝² : HasCoequalizers C
R S T : Mon_ C
P : Bimod R S
Q : Bimod S T
inst✝¹ : (X : C) → PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorLeft X)
inst✝ : (X : C) → PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorRight X)
| (α_ R.X P.X Q.X).inv ⊗ 𝟙 T.X
case a.a
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
inst✝³ : MonoidalCategory C
A B : Mon_ C
M : Bimod A B
inst✝² : HasCoequalizers C
R S T : Mon_ C
P : Bimod R S
Q : Bimod S T
inst✝¹ : (X : C) → PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorLeft X)
inst✝ : (X : C) → PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorRight X)
| (α_ (R.X ⊗ P.X) Q.X T.X).hom

Next tactic:
rw [MonoidalCategory.tensor_id, tensor_id_comp_id_tensor]
theorem middle_assoc' :
    (actLeft P Q ⊗ 𝟙 T.X) ≫ actRight P Q =
      (α_ R.X _ T.X).hom ≫ (𝟙 R.X ⊗ actRight P Q) ≫ actLeft P Q := by
  refine' (cancel_epi ((tensorLeft _ ⋙ tensorRight _).map (coequalizer.π _ _))).1 _
  dsimp [X]
  slice_lhs 1 2 => rw [← comp_tensor_id, id_tensor_π_actLeft, comp_tensor_id, comp_tensor_id]
  slice_lhs 3 4 => rw [π_tensor_id_actRight]
  slice_lhs 2 3 => rw [associator_naturality]
  slice_lhs 3 4 => rw [MonoidalCategory.tensor_id, tensor_id_comp_id_tensor]
  -- porting note: had to replace `rw` by `erw`
  

Proof state:
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
inst✝³ : MonoidalCategory C
A B : Mon_ C
M : Bimod A B
inst✝² : HasCoequalizers C
R S T : Mon_ C
P : Bimod R S
Q : Bimod S T
inst✝¹ : (X : C) → PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorLeft X)
inst✝ : (X : C) → PreservesColimitsOfSize.{0, 0, v₁, v₁, u₁, u₁} (tensorRight X)
⊢ ((α_ R.X P.X Q.X).inv ⊗ 𝟙 T.X) ≫
      (α_ (R.X ⊗ P.X) Q.X T.X).hom ≫
        (P.actLeft ⊗ Q.actRight) ≫ coequalizer.π (P.actRight ⊗ 𝟙 Q.X) ((α_ P.X S.X Q.X).hom ≫ (𝟙 P.X ⊗ Q.actLeft)) =
    ((𝟙 R.X ⊗ coequalizer.π (P.actRight ⊗ 𝟙 Q.X) ((α_ P.X S.X Q.X).hom ≫ (𝟙 P.X ⊗ Q.actLeft))) ⊗ 𝟙 T.X) ≫
      (α_ R.X (coequalizer (P.actRight ⊗ 𝟙 Q.X) ((α_ P.X S.X Q.X).hom ≫ (𝟙 P.X ⊗ Q.actLeft))) T.X).hom ≫
        (𝟙 R.X ⊗ actRight P Q) ≫ actLeft P Q

Next tactic:
slice_rhs 1 2 => erw [associator_naturality]