l3lab/ntp-mathlib huggingface dataset:
theorem hom_inv_id : hom P Q L ≫ inv P Q L = 𝟙 _ := 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
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 S T U : Mon_ C
P : Bimod R S
Q : Bimod S T
L : Bimod T U
⊢ hom P Q L ≫ inv P Q L = 𝟙 (tensorBimod (tensorBimod P Q) L).X

Next tactic:
dsimp [hom, homAux, inv, invAux]
theorem hom_inv_id : hom P Q L ≫ inv P Q L = 𝟙 _ := by
  dsimp [hom, homAux, inv, invAux]
  apply coequalizer.hom_ext
  slice_lhs 1 2 => rw [coequalizer.π_desc]
  refine' (cancel_epi ((tensorRight _).map (coequalizer.π _ _))).1 _
  rw [tensorRight_map]
  slice_lhs 1 3 => rw [π_tensor_id_preserves_coequalizer_inv_desc]
  

Proof state:
case h
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
inst✝³ : MonoidalCategory C
A B : Mon_ C
M : Bimod A B
inst✝² : HasCoequalizers C
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 S T U : Mon_ C
P : Bimod R S
Q : Bimod S T
L : Bimod T U
⊢ ((α_ P.X Q.X L.X).hom ≫
        (𝟙 P.X ⊗ coequalizer.π (Q.actRight ⊗ 𝟙 L.X) ((α_ Q.X T.X L.X).hom ≫ (𝟙 Q.X ⊗ L.actLeft))) ≫
          coequalizer.π (P.actRight ⊗ 𝟙 (TensorBimod.X Q L))
            ((α_ P.X S.X (TensorBimod.X Q L)).hom ≫ (𝟙 P.X ⊗ TensorBimod.actLeft Q L))) ≫
      coequalizer.desc
        ((PreservesCoequalizer.iso (tensorLeft P.X) (Q.actRight ⊗ 𝟙 L.X)
              ((α_ Q.X T.X L.X).hom ≫ (𝟙 Q.X ⊗ L.actLeft))).inv ≫
          coequalizer.desc
            ((α_ P.X Q.X L.X).inv ≫
              (coequalizer.π (P.actRight ⊗ 𝟙 Q.X) ((α_ P.X S.X Q.X).hom ≫ (𝟙 P.X ⊗ Q.actLeft)) ⊗ 𝟙 L.X) ≫
                coequalizer.π (TensorBimod.actRight P Q ⊗ 𝟙 L.X)
                  ((α_ (TensorBimod.X P Q) T.X L.X).hom ≫ (𝟙 (TensorBimod.X P Q) ⊗ L.actLeft)))
            (_ :
              (tensorLeft P.X).map (Q.actRight ⊗ 𝟙 L.X) ≫
                  (α_ P.X Q.X L.X).inv ≫
                    (coequalizer.π (P.actRight ⊗ 𝟙 Q.X) ((α_ P.X S.X Q.X).hom ≫ (𝟙 P.X ⊗ Q.actLeft)) ⊗ 𝟙 L.X) ≫
                      coequalizer.π ((tensorBimod P Q).actRight ⊗ 𝟙 L.X)
                        ((α_ (tensorBimod P Q).X T.X L.X).hom ≫ (𝟙 (tensorBimod P Q).X ⊗ L.actLeft)) =
                (tensorLeft P.X).map ((α_ Q.X T.X L.X).hom ≫ (𝟙 Q.X ⊗ L.actLeft)) ≫
                  (α_ P.X Q.X L.X).inv ≫
                    (coequalizer.π (P.actRight ⊗ 𝟙 Q.X) ((α_ P.X S.X Q.X).hom ≫ (𝟙 P.X ⊗ Q.actLeft)) ⊗ 𝟙 L.X) ≫
                      coequalizer.π ((tensorBimod P Q).actRight ⊗ 𝟙 L.X)
                        ((α_ (tensorBimod P Q).X T.X L.X).hom ≫ (𝟙 (tensorBimod P Q).X ⊗ L.actLeft))))
        (_ :
          (P.actRight ⊗ 𝟙 (tensorBimod Q L).X) ≫ invAux P Q L =
            ((α_ P.X S.X (tensorBimod Q L).X).hom ≫ (𝟙 P.X ⊗ (tensorBimod Q L).actLeft)) ≫ invAux P Q L) =
    (coequalizer.π (P.actRight ⊗ 𝟙 Q.X) ((α_ P.X S.X Q.X).hom ≫ (𝟙 P.X ⊗ Q.actLeft)) ⊗ 𝟙 L.X) ≫
      coequalizer.π ((tensorBimod P Q).actRight ⊗ 𝟙 L.X)
          ((α_ (tensorBimod P Q).X T.X L.X).hom ≫ (𝟙 (tensorBimod P Q).X ⊗ L.actLeft)) ≫
        𝟙 (TensorBimod.X (tensorBimod P Q) L)

Next tactic:
slice_lhs 3 4 => rw [coequalizer.π_desc]
theorem hom_inv_id : hom P Q L ≫ inv P Q L = 𝟙 _ := by
  dsimp [hom, homAux, inv, invAux]
  apply coequalizer.hom_ext
  slice_lhs 1 2 => rw [coequalizer.π_desc]
  refine' (cancel_epi ((tensorRight _).map (coequalizer.π _ _))).1 _
  rw [tensorRight_map]
  slice_lhs 1 3 => rw [π_tensor_id_preserves_coequalizer_inv_desc]
  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
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 S T U : Mon_ C
P : Bimod R S
Q : Bimod S T
L : Bimod T U
| coequalizer.π (P.actRight ⊗ 𝟙 (TensorBimod.X Q L))
      ((α_ P.X S.X (TensorBimod.X Q L)).hom ≫ (𝟙 P.X ⊗ TensorBimod.actLeft Q L)) ≫
    coequalizer.desc
      ((PreservesCoequalizer.iso (tensorLeft P.X) (Q.actRight ⊗ 𝟙 L.X)
            ((α_ Q.X T.X L.X).hom ≫ (𝟙 Q.X ⊗ L.actLeft))).inv ≫
        coequalizer.desc
          ((α_ P.X Q.X L.X).inv ≫
            (coequalizer.π (P.actRight ⊗ 𝟙 Q.X) ((α_ P.X S.X Q.X).hom ≫ (𝟙 P.X ⊗ Q.actLeft)) ⊗ 𝟙 L.X) ≫
              coequalizer.π (TensorBimod.actRight P Q ⊗ 𝟙 L.X)
                ((α_ (TensorBimod.X P Q) T.X L.X).hom ≫ (𝟙 (TensorBimod.X P Q) ⊗ L.actLeft)))
          (_ :
            (tensorLeft P.X).map (Q.actRight ⊗ 𝟙 L.X) ≫
                (α_ P.X Q.X L.X).inv ≫
                  (coequalizer.π (P.actRight ⊗ 𝟙 Q.X) ((α_ P.X S.X Q.X).hom ≫ (𝟙 P.X ⊗ Q.actLeft)) ⊗ 𝟙 L.X) ≫
                    coequalizer.π ((tensorBimod P Q).actRight ⊗ 𝟙 L.X)
                      ((α_ (tensorBimod P Q).X T.X L.X).hom ≫ (𝟙 (tensorBimod P Q).X ⊗ L.actLeft)) =
              (tensorLeft P.X).map ((α_ Q.X T.X L.X).hom ≫ (𝟙 Q.X ⊗ L.actLeft)) ≫
                (α_ P.X Q.X L.X).inv ≫
                  (coequalizer.π (P.actRight ⊗ 𝟙 Q.X) ((α_ P.X S.X Q.X).hom ≫ (𝟙 P.X ⊗ Q.actLeft)) ⊗ 𝟙 L.X) ≫
                    coequalizer.π ((tensorBimod P Q).actRight ⊗ 𝟙 L.X)
                      ((α_ (tensorBimod P Q).X T.X L.X).hom ≫ (𝟙 (tensorBimod P Q).X ⊗ L.actLeft))))
      (_ :
        (P.actRight ⊗ 𝟙 (tensorBimod Q L).X) ≫ invAux P Q L =
          ((α_ P.X S.X (tensorBimod Q L).X).hom ≫ (𝟙 P.X ⊗ (tensorBimod Q L).actLeft)) ≫ invAux P Q L)
case a
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
inst✝³ : MonoidalCategory C
A B : Mon_ C
M : Bimod A B
inst✝² : HasCoequalizers C
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 S T U : Mon_ C
P : Bimod R S
Q : Bimod S T
L : Bimod T U
| (α_ P.X Q.X L.X).hom
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
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 S T U : Mon_ C
P : Bimod R S
Q : Bimod S T
L : Bimod T U
| 𝟙 P.X ⊗ coequalizer.π (Q.actRight ⊗ 𝟙 L.X) ((α_ Q.X T.X L.X).hom ≫ (𝟙 Q.X ⊗ L.actLeft))

Next tactic:
rw [coequalizer.π_desc]
theorem hom_inv_id : hom P Q L ≫ inv P Q L = 𝟙 _ := by
  dsimp [hom, homAux, inv, invAux]
  apply coequalizer.hom_ext
  slice_lhs 1 2 => rw [coequalizer.π_desc]
  refine' (cancel_epi ((tensorRight _).map (coequalizer.π _ _))).1 _
  rw [tensorRight_map]
  slice_lhs 1 3 => rw [π_tensor_id_preserves_coequalizer_inv_desc]
  slice_lhs 3 4 => rw [coequalizer.π_desc]
  

Proof state:
case h
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
inst✝³ : MonoidalCategory C
A B : Mon_ C
M : Bimod A B
inst✝² : HasCoequalizers C
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 S T U : Mon_ C
P : Bimod R S
Q : Bimod S T
L : Bimod T U
⊢ (α_ P.X Q.X L.X).hom ≫
      (𝟙 P.X ⊗ coequalizer.π (Q.actRight ⊗ 𝟙 L.X) ((α_ Q.X T.X L.X).hom ≫ (𝟙 Q.X ⊗ L.actLeft))) ≫
        (PreservesCoequalizer.iso (tensorLeft P.X) (Q.actRight ⊗ 𝟙 L.X)
              ((α_ Q.X T.X L.X).hom ≫ (𝟙 Q.X ⊗ L.actLeft))).inv ≫
          coequalizer.desc
            ((α_ P.X Q.X L.X).inv ≫
              (coequalizer.π (P.actRight ⊗ 𝟙 Q.X) ((α_ P.X S.X Q.X).hom ≫ (𝟙 P.X ⊗ Q.actLeft)) ⊗ 𝟙 L.X) ≫
                coequalizer.π (TensorBimod.actRight P Q ⊗ 𝟙 L.X)
                  ((α_ (TensorBimod.X P Q) T.X L.X).hom ≫ (𝟙 (TensorBimod.X P Q) ⊗ L.actLeft)))
            (_ :
              (tensorLeft P.X).map (Q.actRight ⊗ 𝟙 L.X) ≫
                  (α_ P.X Q.X L.X).inv ≫
                    (coequalizer.π (P.actRight ⊗ 𝟙 Q.X) ((α_ P.X S.X Q.X).hom ≫ (𝟙 P.X ⊗ Q.actLeft)) ⊗ 𝟙 L.X) ≫
                      coequalizer.π ((tensorBimod P Q).actRight ⊗ 𝟙 L.X)
                        ((α_ (tensorBimod P Q).X T.X L.X).hom ≫ (𝟙 (tensorBimod P Q).X ⊗ L.actLeft)) =
                (tensorLeft P.X).map ((α_ Q.X T.X L.X).hom ≫ (𝟙 Q.X ⊗ L.actLeft)) ≫
                  (α_ P.X Q.X L.X).inv ≫
                    (coequalizer.π (P.actRight ⊗ 𝟙 Q.X) ((α_ P.X S.X Q.X).hom ≫ (𝟙 P.X ⊗ Q.actLeft)) ⊗ 𝟙 L.X) ≫
                      coequalizer.π ((tensorBimod P Q).actRight ⊗ 𝟙 L.X)
                        ((α_ (tensorBimod P Q).X T.X L.X).hom ≫ (𝟙 (tensorBimod P Q).X ⊗ L.actLeft))) =
    (coequalizer.π (P.actRight ⊗ 𝟙 Q.X) ((α_ P.X S.X Q.X).hom ≫ (𝟙 P.X ⊗ Q.actLeft)) ⊗ 𝟙 L.X) ≫
      coequalizer.π ((tensorBimod P Q).actRight ⊗ 𝟙 L.X)
          ((α_ (tensorBimod P Q).X T.X L.X).hom ≫ (𝟙 (tensorBimod P Q).X ⊗ L.actLeft)) ≫
        𝟙 (TensorBimod.X (tensorBimod P Q) L)

Next tactic:
slice_lhs 2 4 => rw [id_tensor_π_preserves_coequalizer_inv_desc]
theorem hom_inv_id : hom P Q L ≫ inv P Q L = 𝟙 _ := by
  dsimp [hom, homAux, inv, invAux]
  apply coequalizer.hom_ext
  slice_lhs 1 2 => rw [coequalizer.π_desc]
  refine' (cancel_epi ((tensorRight _).map (coequalizer.π _ _))).1 _
  rw [tensorRight_map]
  slice_lhs 1 3 => rw [π_tensor_id_preserves_coequalizer_inv_desc]
  slice_lhs 3 4 => rw [coequalizer.π_desc]
  slice_lhs 2 4 => 

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
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 S T U : Mon_ C
P : Bimod R S
Q : Bimod S T
L : Bimod T U
| (𝟙 P.X ⊗ coequalizer.π (Q.actRight ⊗ 𝟙 L.X) ((α_ Q.X T.X L.X).hom ≫ (𝟙 Q.X ⊗ L.actLeft))) ≫
    (PreservesCoequalizer.iso (tensorLeft P.X) (Q.actRight ⊗ 𝟙 L.X) ((α_ Q.X T.X L.X).hom ≫ (𝟙 Q.X ⊗ L.actLeft))).inv ≫
      coequalizer.desc
        ((α_ P.X Q.X L.X).inv ≫
          (coequalizer.π (P.actRight ⊗ 𝟙 Q.X) ((α_ P.X S.X Q.X).hom ≫ (𝟙 P.X ⊗ Q.actLeft)) ⊗ 𝟙 L.X) ≫
            coequalizer.π (TensorBimod.actRight P Q ⊗ 𝟙 L.X)
              ((α_ (TensorBimod.X P Q) T.X L.X).hom ≫ (𝟙 (TensorBimod.X P Q) ⊗ L.actLeft)))
        (_ :
          (tensorLeft P.X).map (Q.actRight ⊗ 𝟙 L.X) ≫
              (α_ P.X Q.X L.X).inv ≫
                (coequalizer.π (P.actRight ⊗ 𝟙 Q.X) ((α_ P.X S.X Q.X).hom ≫ (𝟙 P.X ⊗ Q.actLeft)) ⊗ 𝟙 L.X) ≫
                  coequalizer.π ((tensorBimod P Q).actRight ⊗ 𝟙 L.X)
                    ((α_ (tensorBimod P Q).X T.X L.X).hom ≫ (𝟙 (tensorBimod P Q).X ⊗ L.actLeft)) =
            (tensorLeft P.X).map ((α_ Q.X T.X L.X).hom ≫ (𝟙 Q.X ⊗ L.actLeft)) ≫
              (α_ P.X Q.X L.X).inv ≫
                (coequalizer.π (P.actRight ⊗ 𝟙 Q.X) ((α_ P.X S.X Q.X).hom ≫ (𝟙 P.X ⊗ Q.actLeft)) ⊗ 𝟙 L.X) ≫
                  coequalizer.π ((tensorBimod P Q).actRight ⊗ 𝟙 L.X)
                    ((α_ (tensorBimod P Q).X T.X L.X).hom ≫ (𝟙 (tensorBimod P Q).X ⊗ L.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
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 S T U : Mon_ C
P : Bimod R S
Q : Bimod S T
L : Bimod T U
| (α_ P.X Q.X L.X).hom

Next tactic:
rw [id_tensor_π_preserves_coequalizer_inv_desc]
theorem hom_inv_id : hom P Q L ≫ inv P Q L = 𝟙 _ := by
  dsimp [hom, homAux, inv, invAux]
  apply coequalizer.hom_ext
  slice_lhs 1 2 => rw [coequalizer.π_desc]
  refine' (cancel_epi ((tensorRight _).map (coequalizer.π _ _))).1 _
  rw [tensorRight_map]
  slice_lhs 1 3 => rw [π_tensor_id_preserves_coequalizer_inv_desc]
  slice_lhs 3 4 => rw [coequalizer.π_desc]
  slice_lhs 2 4 => rw [id_tensor_π_preserves_coequalizer_inv_desc]
  

Proof state:
case h
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
inst✝³ : MonoidalCategory C
A B : Mon_ C
M : Bimod A B
inst✝² : HasCoequalizers C
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 S T U : Mon_ C
P : Bimod R S
Q : Bimod S T
L : Bimod T U
⊢ (α_ P.X Q.X L.X).hom ≫
      (α_ P.X Q.X L.X).inv ≫
        (coequalizer.π (P.actRight ⊗ 𝟙 Q.X) ((α_ P.X S.X Q.X).hom ≫ (𝟙 P.X ⊗ Q.actLeft)) ⊗ 𝟙 L.X) ≫
          coequalizer.π (TensorBimod.actRight P Q ⊗ 𝟙 L.X)
            ((α_ (TensorBimod.X P Q) T.X L.X).hom ≫ (𝟙 (TensorBimod.X P Q) ⊗ L.actLeft)) =
    (coequalizer.π (P.actRight ⊗ 𝟙 Q.X) ((α_ P.X S.X Q.X).hom ≫ (𝟙 P.X ⊗ Q.actLeft)) ⊗ 𝟙 L.X) ≫
      coequalizer.π ((tensorBimod P Q).actRight ⊗ 𝟙 L.X)
          ((α_ (tensorBimod P Q).X T.X L.X).hom ≫ (𝟙 (tensorBimod P Q).X ⊗ L.actLeft)) ≫
        𝟙 (TensorBimod.X (tensorBimod P Q) L)

Next tactic:
slice_lhs 1 3 => rw [Iso.hom_inv_id_assoc]
theorem hom_inv_id : hom P Q L ≫ inv P Q L = 𝟙 _ := by
  dsimp [hom, homAux, inv, invAux]
  apply coequalizer.hom_ext
  slice_lhs 1 2 => rw [coequalizer.π_desc]
  refine' (cancel_epi ((tensorRight _).map (coequalizer.π _ _))).1 _
  rw [tensorRight_map]
  slice_lhs 1 3 => rw [π_tensor_id_preserves_coequalizer_inv_desc]
  slice_lhs 3 4 => rw [coequalizer.π_desc]
  slice_lhs 2 4 => rw [id_tensor_π_preserves_coequalizer_inv_desc]
  slice_lhs 1 3 => 

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
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 S T U : Mon_ C
P : Bimod R S
Q : Bimod S T
L : Bimod T U
| (α_ P.X Q.X L.X).hom ≫
    (α_ P.X Q.X L.X).inv ≫ (coequalizer.π (P.actRight ⊗ 𝟙 Q.X) ((α_ P.X S.X Q.X).hom ≫ (𝟙 P.X ⊗ Q.actLeft)) ⊗ 𝟙 L.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
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 S T U : Mon_ C
P : Bimod R S
Q : Bimod S T
L : Bimod T U
| coequalizer.π (TensorBimod.actRight P Q ⊗ 𝟙 L.X)
    ((α_ (TensorBimod.X P Q) T.X L.X).hom ≫ (𝟙 (TensorBimod.X P Q) ⊗ L.actLeft))

Next tactic:
rw [Iso.hom_inv_id_assoc]
theorem hom_inv_id : hom P Q L ≫ inv P Q L = 𝟙 _ := by
  dsimp [hom, homAux, inv, invAux]
  apply coequalizer.hom_ext
  slice_lhs 1 2 => rw [coequalizer.π_desc]
  refine' (cancel_epi ((tensorRight _).map (coequalizer.π _ _))).1 _
  rw [tensorRight_map]
  slice_lhs 1 3 => rw [π_tensor_id_preserves_coequalizer_inv_desc]
  slice_lhs 3 4 => rw [coequalizer.π_desc]
  slice_lhs 2 4 => rw [id_tensor_π_preserves_coequalizer_inv_desc]
  slice_lhs 1 3 => rw [Iso.hom_inv_id_assoc]
  

Proof state:
case h
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
inst✝³ : MonoidalCategory C
A B : Mon_ C
M : Bimod A B
inst✝² : HasCoequalizers C
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 S T U : Mon_ C
P : Bimod R S
Q : Bimod S T
L : Bimod T U
⊢ (coequalizer.π (P.actRight ⊗ 𝟙 Q.X) ((α_ P.X S.X Q.X).hom ≫ (𝟙 P.X ⊗ Q.actLeft)) ⊗ 𝟙 L.X) ≫
      coequalizer.π (TensorBimod.actRight P Q ⊗ 𝟙 L.X)
        ((α_ (TensorBimod.X P Q) T.X L.X).hom ≫ (𝟙 (TensorBimod.X P Q) ⊗ L.actLeft)) =
    (coequalizer.π (P.actRight ⊗ 𝟙 Q.X) ((α_ P.X S.X Q.X).hom ≫ (𝟙 P.X ⊗ Q.actLeft)) ⊗ 𝟙 L.X) ≫
      coequalizer.π ((tensorBimod P Q).actRight ⊗ 𝟙 L.X)
          ((α_ (tensorBimod P Q).X T.X L.X).hom ≫ (𝟙 (tensorBimod P Q).X ⊗ L.actLeft)) ≫
        𝟙 (TensorBimod.X (tensorBimod P Q) L)

Next tactic:
dsimp only [TensorBimod.X]
theorem hom_inv_id : hom P Q L ≫ inv P Q L = 𝟙 _ := by
  dsimp [hom, homAux, inv, invAux]
  apply coequalizer.hom_ext
  slice_lhs 1 2 => rw [coequalizer.π_desc]
  refine' (cancel_epi ((tensorRight _).map (coequalizer.π _ _))).1 _
  rw [tensorRight_map]
  slice_lhs 1 3 => rw [π_tensor_id_preserves_coequalizer_inv_desc]
  slice_lhs 3 4 => rw [coequalizer.π_desc]
  slice_lhs 2 4 => rw [id_tensor_π_preserves_coequalizer_inv_desc]
  slice_lhs 1 3 => rw [Iso.hom_inv_id_assoc]
  dsimp only [TensorBimod.X]
  

Proof state:
case h
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
inst✝³ : MonoidalCategory C
A B : Mon_ C
M : Bimod A B
inst✝² : HasCoequalizers C
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 S T U : Mon_ C
P : Bimod R S
Q : Bimod S T
L : Bimod T U
⊢ (coequalizer.π (P.actRight ⊗ 𝟙 Q.X) ((α_ P.X S.X Q.X).hom ≫ (𝟙 P.X ⊗ Q.actLeft)) ⊗ 𝟙 L.X) ≫
      coequalizer.π (TensorBimod.actRight P Q ⊗ 𝟙 L.X)
        ((α_ (coequalizer (P.actRight ⊗ 𝟙 Q.X) ((α_ P.X S.X Q.X).hom ≫ (𝟙 P.X ⊗ Q.actLeft))) T.X L.X).hom ≫
          (𝟙 (coequalizer (P.actRight ⊗ 𝟙 Q.X) ((α_ P.X S.X Q.X).hom ≫ (𝟙 P.X ⊗ Q.actLeft))) ⊗ L.actLeft)) =
    (coequalizer.π (P.actRight ⊗ 𝟙 Q.X) ((α_ P.X S.X Q.X).hom ≫ (𝟙 P.X ⊗ Q.actLeft)) ⊗ 𝟙 L.X) ≫
      coequalizer.π ((tensorBimod P Q).actRight ⊗ 𝟙 L.X)
          ((α_ (tensorBimod P Q).X T.X L.X).hom ≫ (𝟙 (tensorBimod P Q).X ⊗ L.actLeft)) ≫
        𝟙
          (coequalizer ((tensorBimod P Q).actRight ⊗ 𝟙 L.X)
            ((α_ (tensorBimod P Q).X T.X L.X).hom ≫ (𝟙 (tensorBimod P Q).X ⊗ L.actLeft)))

Next tactic:
slice_rhs 2 3 => rw [Category.comp_id]
theorem hom_inv_id : hom P Q L ≫ inv P Q L = 𝟙 _ := by
  dsimp [hom, homAux, inv, invAux]
  apply coequalizer.hom_ext
  slice_lhs 1 2 => rw [coequalizer.π_desc]
  refine' (cancel_epi ((tensorRight _).map (coequalizer.π _ _))).1 _
  rw [tensorRight_map]
  slice_lhs 1 3 => rw [π_tensor_id_preserves_coequalizer_inv_desc]
  slice_lhs 3 4 => rw [coequalizer.π_desc]
  slice_lhs 2 4 => rw [id_tensor_π_preserves_coequalizer_inv_desc]
  slice_lhs 1 3 => rw [Iso.hom_inv_id_assoc]
  dsimp only [TensorBimod.X]
  slice_rhs 2 3 => 

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
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 S T U : Mon_ C
P : Bimod R S
Q : Bimod S T
L : Bimod T U
| coequalizer.π ((tensorBimod P Q).actRight ⊗ 𝟙 L.X)
      ((α_ (tensorBimod P Q).X T.X L.X).hom ≫ (𝟙 (tensorBimod P Q).X ⊗ L.actLeft)) ≫
    𝟙
      (coequalizer ((tensorBimod P Q).actRight ⊗ 𝟙 L.X)
        ((α_ (tensorBimod P Q).X T.X L.X).hom ≫ (𝟙 (tensorBimod P Q).X ⊗ L.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
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 S T U : Mon_ C
P : Bimod R S
Q : Bimod S T
L : Bimod T U
| coequalizer.π (P.actRight ⊗ 𝟙 Q.X) ((α_ P.X S.X Q.X).hom ≫ (𝟙 P.X ⊗ Q.actLeft)) ⊗ 𝟙 L.X

Next tactic:
rw [Category.comp_id]
theorem inv_hom_id : inv P Q L ≫ hom P Q L = 𝟙 _ := 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
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 S T U : Mon_ C
P : Bimod R S
Q : Bimod S T
L : Bimod T U
⊢ inv P Q L ≫ hom P Q L = 𝟙 (tensorBimod P (tensorBimod Q L)).X

Next tactic:
dsimp [hom, homAux, inv, invAux]
theorem inv_hom_id : inv P Q L ≫ hom P Q L = 𝟙 _ := by
  dsimp [hom, homAux, inv, invAux]
  apply coequalizer.hom_ext
  slice_lhs 1 2 => rw [coequalizer.π_desc]
  refine' (cancel_epi ((tensorLeft _).map (coequalizer.π _ _))).1 _
  rw [tensorLeft_map]
  slice_lhs 1 3 => rw [id_tensor_π_preserves_coequalizer_inv_desc]
  

Proof state:
case h
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
inst✝³ : MonoidalCategory C
A B : Mon_ C
M : Bimod A B
inst✝² : HasCoequalizers C
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 S T U : Mon_ C
P : Bimod R S
Q : Bimod S T
L : Bimod T U
⊢ ((α_ P.X Q.X L.X).inv ≫
        (coequalizer.π (P.actRight ⊗ 𝟙 Q.X) ((α_ P.X S.X Q.X).hom ≫ (𝟙 P.X ⊗ Q.actLeft)) ⊗ 𝟙 L.X) ≫
          coequalizer.π (TensorBimod.actRight P Q ⊗ 𝟙 L.X)
            ((α_ (TensorBimod.X P Q) T.X L.X).hom ≫ (𝟙 (TensorBimod.X P Q) ⊗ L.actLeft))) ≫
      coequalizer.desc
        ((PreservesCoequalizer.iso (tensorRight L.X) (P.actRight ⊗ 𝟙 Q.X)
              ((α_ P.X S.X Q.X).hom ≫ (𝟙 P.X ⊗ Q.actLeft))).inv ≫
          coequalizer.desc
            ((α_ P.X Q.X L.X).hom ≫
              (𝟙 P.X ⊗ coequalizer.π (Q.actRight ⊗ 𝟙 L.X) ((α_ Q.X T.X L.X).hom ≫ (𝟙 Q.X ⊗ L.actLeft))) ≫
                coequalizer.π (P.actRight ⊗ 𝟙 (TensorBimod.X Q L))
                  ((α_ P.X S.X (TensorBimod.X Q L)).hom ≫ (𝟙 P.X ⊗ TensorBimod.actLeft Q L)))
            (_ :
              (tensorRight L.X).map (P.actRight ⊗ 𝟙 Q.X) ≫
                  (α_ P.X Q.X L.X).hom ≫
                    (𝟙 P.X ⊗ coequalizer.π (Q.actRight ⊗ 𝟙 L.X) ((α_ Q.X T.X L.X).hom ≫ (𝟙 Q.X ⊗ L.actLeft))) ≫
                      coequalizer.π (P.actRight ⊗ 𝟙 (tensorBimod Q L).X)
                        ((α_ P.X S.X (tensorBimod Q L).X).hom ≫ (𝟙 P.X ⊗ (tensorBimod Q L).actLeft)) =
                (tensorRight L.X).map ((α_ P.X S.X Q.X).hom ≫ (𝟙 P.X ⊗ Q.actLeft)) ≫
                  (α_ P.X Q.X L.X).hom ≫
                    (𝟙 P.X ⊗ coequalizer.π (Q.actRight ⊗ 𝟙 L.X) ((α_ Q.X T.X L.X).hom ≫ (𝟙 Q.X ⊗ L.actLeft))) ≫
                      coequalizer.π (P.actRight ⊗ 𝟙 (tensorBimod Q L).X)
                        ((α_ P.X S.X (tensorBimod Q L).X).hom ≫ (𝟙 P.X ⊗ (tensorBimod Q L).actLeft))))
        (_ :
          ((tensorBimod P Q).actRight ⊗ 𝟙 L.X) ≫ homAux P Q L =
            ((α_ (tensorBimod P Q).X T.X L.X).hom ≫ (𝟙 (tensorBimod P Q).X ⊗ L.actLeft)) ≫ homAux P Q L) =
    (𝟙 P.X ⊗ coequalizer.π (Q.actRight ⊗ 𝟙 L.X) ((α_ Q.X T.X L.X).hom ≫ (𝟙 Q.X ⊗ L.actLeft))) ≫
      coequalizer.π (P.actRight ⊗ 𝟙 (tensorBimod Q L).X)
          ((α_ P.X S.X (tensorBimod Q L).X).hom ≫ (𝟙 P.X ⊗ (tensorBimod Q L).actLeft)) ≫
        𝟙 (TensorBimod.X P (tensorBimod Q L))

Next tactic:
slice_lhs 3 4 => rw [coequalizer.π_desc]