l3lab/ntp-mathlib huggingface dataset:
/-- The composition of right adjoint mates is the adjoint mate of the composition. -/
@[reassoc]
theorem comp_rightAdjointMate {X Y Z : C} [HasRightDual X] [HasRightDual Y] [HasRightDual Z]
    {f : X ⟶ Y} {g : Y ⟶ Z} : (f ≫ g)ᘁ = gᘁ ≫ fᘁ := by
  rw [rightAdjointMate_comp]
  simp only [rightAdjointMate, comp_tensor_id, Iso.cancel_iso_inv_left, id_tensor_comp,
    Category.assoc]
  symm
  iterate 5
    trans
    rw [← Category.id_comp g, tensor_comp]
  rw [← Category.assoc]
  symm
  iterate 2
    trans
    rw [← Category.assoc]
  apply eq_whisker
  repeat'
    -- Porting note: why do we need to fill in the implicit `C` here, and below?
    rw [← @id_tensor_comp C]
  congr 1
  rw [← id_tensor_comp_tensor_id (λ_ (Xᘁ)).hom g, id_tensor_rightUnitor_inv, Category.assoc,
    Category.assoc, rightUnitor_inv_naturality_assoc, ← associator_naturality_assoc, tensor_id,
    tensor_id_comp_id_tensor_assoc, ← associator_naturality_assoc]
  slice_rhs 2 3 =>
    rw [← tensor_comp, tensor_id, Category.comp_id, ← Category.id_comp (η_ Y (Yᘁ)), tensor_comp]
  

Proof state:
case w.e_g
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
inst✝³ : MonoidalCategory C
X Y Z : C
inst✝² : HasRightDual X
inst✝¹ : HasRightDual Y
inst✝ : HasRightDual Z
f : X ⟶ Y
g : Y ⟶ Z
⊢ η_ X Xᘁ ≫ (f ⊗ 𝟙 Xᘁ) ≫ (g ⊗ 𝟙 Xᘁ) =
    (ρ_ (𝟙_ C)).inv ≫
      ((((((𝟙 (𝟙_ C) ⊗ η_ X Xᘁ) ≫ (η_ Y Yᘁ ⊗ f ⊗ 𝟙 Xᘁ)) ≫ (α_ Y Yᘁ (Y ⊗ Xᘁ)).hom) ≫ (𝟙 Y ⊗ (α_ Yᘁ Y Xᘁ).inv)) ≫
            (𝟙 Y ⊗ ε_ Y Yᘁ ⊗ 𝟙 Xᘁ)) ≫
          (𝟙 Y ⊗ (λ_ Xᘁ).hom)) ≫
        (g ⊗ 𝟙 Xᘁ)

Next tactic:
rw [← id_tensor_comp_tensor_id _ (η_ Y (Yᘁ)), ← tensor_id]
/-- The composition of right adjoint mates is the adjoint mate of the composition. -/
@[reassoc]
theorem comp_rightAdjointMate {X Y Z : C} [HasRightDual X] [HasRightDual Y] [HasRightDual Z]
    {f : X ⟶ Y} {g : Y ⟶ Z} : (f ≫ g)ᘁ = gᘁ ≫ fᘁ := by
  rw [rightAdjointMate_comp]
  simp only [rightAdjointMate, comp_tensor_id, Iso.cancel_iso_inv_left, id_tensor_comp,
    Category.assoc]
  symm
  iterate 5
    trans
    rw [← Category.id_comp g, tensor_comp]
  rw [← Category.assoc]
  symm
  iterate 2
    trans
    rw [← Category.assoc]
  apply eq_whisker
  repeat'
    -- Porting note: why do we need to fill in the implicit `C` here, and below?
    rw [← @id_tensor_comp C]
  congr 1
  rw [← id_tensor_comp_tensor_id (λ_ (Xᘁ)).hom g, id_tensor_rightUnitor_inv, Category.assoc,
    Category.assoc, rightUnitor_inv_naturality_assoc, ← associator_naturality_assoc, tensor_id,
    tensor_id_comp_id_tensor_assoc, ← associator_naturality_assoc]
  slice_rhs 2 3 =>
    rw [← tensor_comp, tensor_id, Category.comp_id, ← Category.id_comp (η_ Y (Yᘁ)), tensor_comp]
  rw [← id_tensor_comp_tensor_id _ (η_ Y (Yᘁ)), ← tensor_id]
  

Proof state:
case w.e_g
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
inst✝³ : MonoidalCategory C
X Y Z : C
inst✝² : HasRightDual X
inst✝¹ : HasRightDual Y
inst✝ : HasRightDual Z
f : X ⟶ Y
g : Y ⟶ Z
⊢ η_ X Xᘁ ≫ (f ⊗ 𝟙 Xᘁ) ≫ (g ⊗ 𝟙 Xᘁ) =
    (ρ_ (𝟙_ C)).inv ≫
      ((((((𝟙 (𝟙_ C) ⊗ η_ X Xᘁ) ≫ (𝟙 (𝟙_ C) ⊗ f ⊗ 𝟙 Xᘁ) ≫ (η_ Y Yᘁ ⊗ 𝟙 Y ⊗ 𝟙 Xᘁ)) ≫ (α_ Y Yᘁ (Y ⊗ Xᘁ)).hom) ≫
              (𝟙 Y ⊗ (α_ Yᘁ Y Xᘁ).inv)) ≫
            (𝟙 Y ⊗ ε_ Y Yᘁ ⊗ 𝟙 Xᘁ)) ≫
          (𝟙 Y ⊗ (λ_ Xᘁ).hom)) ≫
        (g ⊗ 𝟙 Xᘁ)

Next tactic:
repeat' rw [@Category.assoc C]
/-- The composition of right adjoint mates is the adjoint mate of the composition. -/
@[reassoc]
theorem comp_rightAdjointMate {X Y Z : C} [HasRightDual X] [HasRightDual Y] [HasRightDual Z]
    {f : X ⟶ Y} {g : Y ⟶ Z} : (f ≫ g)ᘁ = gᘁ ≫ fᘁ := by
  rw [rightAdjointMate_comp]
  simp only [rightAdjointMate, comp_tensor_id, Iso.cancel_iso_inv_left, id_tensor_comp,
    Category.assoc]
  symm
  iterate 5
    trans
    rw [← Category.id_comp g, tensor_comp]
  rw [← Category.assoc]
  symm
  iterate 2
    trans
    rw [← Category.assoc]
  apply eq_whisker
  repeat'
    -- Porting note: why do we need to fill in the implicit `C` here, and below?
    rw [← @id_tensor_comp C]
  congr 1
  rw [← id_tensor_comp_tensor_id (λ_ (Xᘁ)).hom g, id_tensor_rightUnitor_inv, Category.assoc,
    Category.assoc, rightUnitor_inv_naturality_assoc, ← associator_naturality_assoc, tensor_id,
    tensor_id_comp_id_tensor_assoc, ← associator_naturality_assoc]
  slice_rhs 2 3 =>
    rw [← tensor_comp, tensor_id, Category.comp_id, ← Category.id_comp (η_ Y (Yᘁ)), tensor_comp]
  rw [← id_tensor_comp_tensor_id _ (η_ Y (Yᘁ)), ← tensor_id]
  repeat' 

Proof state:
case w.e_g
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
inst✝³ : MonoidalCategory C
X Y Z : C
inst✝² : HasRightDual X
inst✝¹ : HasRightDual Y
inst✝ : HasRightDual Z
f : X ⟶ Y
g : Y ⟶ Z
⊢ η_ X Xᘁ ≫ (f ⊗ 𝟙 Xᘁ) ≫ (g ⊗ 𝟙 Xᘁ) =
    (ρ_ (𝟙_ C)).inv ≫
      ((((((𝟙 (𝟙_ C) ⊗ η_ X Xᘁ) ≫ (𝟙 (𝟙_ C) ⊗ f ⊗ 𝟙 Xᘁ) ≫ (η_ Y Yᘁ ⊗ 𝟙 Y ⊗ 𝟙 Xᘁ)) ≫ (α_ Y Yᘁ (Y ⊗ Xᘁ)).hom) ≫
              (𝟙 Y ⊗ (α_ Yᘁ Y Xᘁ).inv)) ≫
            (𝟙 Y ⊗ ε_ Y Yᘁ ⊗ 𝟙 Xᘁ)) ≫
          (𝟙 Y ⊗ (λ_ Xᘁ).hom)) ≫
        (g ⊗ 𝟙 Xᘁ)

Next tactic:
rw [@Category.assoc C]
/-- The composition of right adjoint mates is the adjoint mate of the composition. -/
@[reassoc]
theorem comp_rightAdjointMate {X Y Z : C} [HasRightDual X] [HasRightDual Y] [HasRightDual Z]
    {f : X ⟶ Y} {g : Y ⟶ Z} : (f ≫ g)ᘁ = gᘁ ≫ fᘁ := by
  rw [rightAdjointMate_comp]
  simp only [rightAdjointMate, comp_tensor_id, Iso.cancel_iso_inv_left, id_tensor_comp,
    Category.assoc]
  symm
  iterate 5
    trans
    rw [← Category.id_comp g, tensor_comp]
  rw [← Category.assoc]
  symm
  iterate 2
    trans
    rw [← Category.assoc]
  apply eq_whisker
  repeat'
    -- Porting note: why do we need to fill in the implicit `C` here, and below?
    rw [← @id_tensor_comp C]
  congr 1
  rw [← id_tensor_comp_tensor_id (λ_ (Xᘁ)).hom g, id_tensor_rightUnitor_inv, Category.assoc,
    Category.assoc, rightUnitor_inv_naturality_assoc, ← associator_naturality_assoc, tensor_id,
    tensor_id_comp_id_tensor_assoc, ← associator_naturality_assoc]
  slice_rhs 2 3 =>
    rw [← tensor_comp, tensor_id, Category.comp_id, ← Category.id_comp (η_ Y (Yᘁ)), tensor_comp]
  rw [← id_tensor_comp_tensor_id _ (η_ Y (Yᘁ)), ← tensor_id]
  repeat' 

Proof state:
case w.e_g
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
inst✝³ : MonoidalCategory C
X Y Z : C
inst✝² : HasRightDual X
inst✝¹ : HasRightDual Y
inst✝ : HasRightDual Z
f : X ⟶ Y
g : Y ⟶ Z
⊢ η_ X Xᘁ ≫ (f ⊗ 𝟙 Xᘁ) ≫ (g ⊗ 𝟙 Xᘁ) =
    (ρ_ (𝟙_ C)).inv ≫
      (((((𝟙 (𝟙_ C) ⊗ η_ X Xᘁ) ≫ (𝟙 (𝟙_ C) ⊗ f ⊗ 𝟙 Xᘁ) ≫ (η_ Y Yᘁ ⊗ 𝟙 Y ⊗ 𝟙 Xᘁ)) ≫ (α_ Y Yᘁ (Y ⊗ Xᘁ)).hom) ≫
            (𝟙 Y ⊗ (α_ Yᘁ Y Xᘁ).inv)) ≫
          (𝟙 Y ⊗ ε_ Y Yᘁ ⊗ 𝟙 Xᘁ)) ≫
        (𝟙 Y ⊗ (λ_ Xᘁ).hom) ≫ (g ⊗ 𝟙 Xᘁ)

Next tactic:
rw [@Category.assoc C]
/-- The composition of right adjoint mates is the adjoint mate of the composition. -/
@[reassoc]
theorem comp_rightAdjointMate {X Y Z : C} [HasRightDual X] [HasRightDual Y] [HasRightDual Z]
    {f : X ⟶ Y} {g : Y ⟶ Z} : (f ≫ g)ᘁ = gᘁ ≫ fᘁ := by
  rw [rightAdjointMate_comp]
  simp only [rightAdjointMate, comp_tensor_id, Iso.cancel_iso_inv_left, id_tensor_comp,
    Category.assoc]
  symm
  iterate 5
    trans
    rw [← Category.id_comp g, tensor_comp]
  rw [← Category.assoc]
  symm
  iterate 2
    trans
    rw [← Category.assoc]
  apply eq_whisker
  repeat'
    -- Porting note: why do we need to fill in the implicit `C` here, and below?
    rw [← @id_tensor_comp C]
  congr 1
  rw [← id_tensor_comp_tensor_id (λ_ (Xᘁ)).hom g, id_tensor_rightUnitor_inv, Category.assoc,
    Category.assoc, rightUnitor_inv_naturality_assoc, ← associator_naturality_assoc, tensor_id,
    tensor_id_comp_id_tensor_assoc, ← associator_naturality_assoc]
  slice_rhs 2 3 =>
    rw [← tensor_comp, tensor_id, Category.comp_id, ← Category.id_comp (η_ Y (Yᘁ)), tensor_comp]
  rw [← id_tensor_comp_tensor_id _ (η_ Y (Yᘁ)), ← tensor_id]
  repeat' 

Proof state:
case w.e_g
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
inst✝³ : MonoidalCategory C
X Y Z : C
inst✝² : HasRightDual X
inst✝¹ : HasRightDual Y
inst✝ : HasRightDual Z
f : X ⟶ Y
g : Y ⟶ Z
⊢ η_ X Xᘁ ≫ (f ⊗ 𝟙 Xᘁ) ≫ (g ⊗ 𝟙 Xᘁ) =
    (ρ_ (𝟙_ C)).inv ≫
      ((((𝟙 (𝟙_ C) ⊗ η_ X Xᘁ) ≫ (𝟙 (𝟙_ C) ⊗ f ⊗ 𝟙 Xᘁ) ≫ (η_ Y Yᘁ ⊗ 𝟙 Y ⊗ 𝟙 Xᘁ)) ≫ (α_ Y Yᘁ (Y ⊗ Xᘁ)).hom) ≫
          (𝟙 Y ⊗ (α_ Yᘁ Y Xᘁ).inv)) ≫
        (𝟙 Y ⊗ ε_ Y Yᘁ ⊗ 𝟙 Xᘁ) ≫ (𝟙 Y ⊗ (λ_ Xᘁ).hom) ≫ (g ⊗ 𝟙 Xᘁ)

Next tactic:
rw [@Category.assoc C]
/-- The composition of right adjoint mates is the adjoint mate of the composition. -/
@[reassoc]
theorem comp_rightAdjointMate {X Y Z : C} [HasRightDual X] [HasRightDual Y] [HasRightDual Z]
    {f : X ⟶ Y} {g : Y ⟶ Z} : (f ≫ g)ᘁ = gᘁ ≫ fᘁ := by
  rw [rightAdjointMate_comp]
  simp only [rightAdjointMate, comp_tensor_id, Iso.cancel_iso_inv_left, id_tensor_comp,
    Category.assoc]
  symm
  iterate 5
    trans
    rw [← Category.id_comp g, tensor_comp]
  rw [← Category.assoc]
  symm
  iterate 2
    trans
    rw [← Category.assoc]
  apply eq_whisker
  repeat'
    -- Porting note: why do we need to fill in the implicit `C` here, and below?
    rw [← @id_tensor_comp C]
  congr 1
  rw [← id_tensor_comp_tensor_id (λ_ (Xᘁ)).hom g, id_tensor_rightUnitor_inv, Category.assoc,
    Category.assoc, rightUnitor_inv_naturality_assoc, ← associator_naturality_assoc, tensor_id,
    tensor_id_comp_id_tensor_assoc, ← associator_naturality_assoc]
  slice_rhs 2 3 =>
    rw [← tensor_comp, tensor_id, Category.comp_id, ← Category.id_comp (η_ Y (Yᘁ)), tensor_comp]
  rw [← id_tensor_comp_tensor_id _ (η_ Y (Yᘁ)), ← tensor_id]
  repeat' 

Proof state:
case w.e_g
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
inst✝³ : MonoidalCategory C
X Y Z : C
inst✝² : HasRightDual X
inst✝¹ : HasRightDual Y
inst✝ : HasRightDual Z
f : X ⟶ Y
g : Y ⟶ Z
⊢ η_ X Xᘁ ≫ (f ⊗ 𝟙 Xᘁ) ≫ (g ⊗ 𝟙 Xᘁ) =
    (ρ_ (𝟙_ C)).inv ≫
      (((𝟙 (𝟙_ C) ⊗ η_ X Xᘁ) ≫ (𝟙 (𝟙_ C) ⊗ f ⊗ 𝟙 Xᘁ) ≫ (η_ Y Yᘁ ⊗ 𝟙 Y ⊗ 𝟙 Xᘁ)) ≫ (α_ Y Yᘁ (Y ⊗ Xᘁ)).hom) ≫
        (𝟙 Y ⊗ (α_ Yᘁ Y Xᘁ).inv) ≫ (𝟙 Y ⊗ ε_ Y Yᘁ ⊗ 𝟙 Xᘁ) ≫ (𝟙 Y ⊗ (λ_ Xᘁ).hom) ≫ (g ⊗ 𝟙 Xᘁ)

Next tactic:
rw [@Category.assoc C]
/-- The composition of right adjoint mates is the adjoint mate of the composition. -/
@[reassoc]
theorem comp_rightAdjointMate {X Y Z : C} [HasRightDual X] [HasRightDual Y] [HasRightDual Z]
    {f : X ⟶ Y} {g : Y ⟶ Z} : (f ≫ g)ᘁ = gᘁ ≫ fᘁ := by
  rw [rightAdjointMate_comp]
  simp only [rightAdjointMate, comp_tensor_id, Iso.cancel_iso_inv_left, id_tensor_comp,
    Category.assoc]
  symm
  iterate 5
    trans
    rw [← Category.id_comp g, tensor_comp]
  rw [← Category.assoc]
  symm
  iterate 2
    trans
    rw [← Category.assoc]
  apply eq_whisker
  repeat'
    -- Porting note: why do we need to fill in the implicit `C` here, and below?
    rw [← @id_tensor_comp C]
  congr 1
  rw [← id_tensor_comp_tensor_id (λ_ (Xᘁ)).hom g, id_tensor_rightUnitor_inv, Category.assoc,
    Category.assoc, rightUnitor_inv_naturality_assoc, ← associator_naturality_assoc, tensor_id,
    tensor_id_comp_id_tensor_assoc, ← associator_naturality_assoc]
  slice_rhs 2 3 =>
    rw [← tensor_comp, tensor_id, Category.comp_id, ← Category.id_comp (η_ Y (Yᘁ)), tensor_comp]
  rw [← id_tensor_comp_tensor_id _ (η_ Y (Yᘁ)), ← tensor_id]
  repeat' 

Proof state:
case w.e_g
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
inst✝³ : MonoidalCategory C
X Y Z : C
inst✝² : HasRightDual X
inst✝¹ : HasRightDual Y
inst✝ : HasRightDual Z
f : X ⟶ Y
g : Y ⟶ Z
⊢ η_ X Xᘁ ≫ (f ⊗ 𝟙 Xᘁ) ≫ (g ⊗ 𝟙 Xᘁ) =
    (ρ_ (𝟙_ C)).inv ≫
      ((𝟙 (𝟙_ C) ⊗ η_ X Xᘁ) ≫ (𝟙 (𝟙_ C) ⊗ f ⊗ 𝟙 Xᘁ) ≫ (η_ Y Yᘁ ⊗ 𝟙 Y ⊗ 𝟙 Xᘁ)) ≫
        (α_ Y Yᘁ (Y ⊗ Xᘁ)).hom ≫ (𝟙 Y ⊗ (α_ Yᘁ Y Xᘁ).inv) ≫ (𝟙 Y ⊗ ε_ Y Yᘁ ⊗ 𝟙 Xᘁ) ≫ (𝟙 Y ⊗ (λ_ Xᘁ).hom) ≫ (g ⊗ 𝟙 Xᘁ)

Next tactic:
rw [@Category.assoc C]
/-- The composition of right adjoint mates is the adjoint mate of the composition. -/
@[reassoc]
theorem comp_rightAdjointMate {X Y Z : C} [HasRightDual X] [HasRightDual Y] [HasRightDual Z]
    {f : X ⟶ Y} {g : Y ⟶ Z} : (f ≫ g)ᘁ = gᘁ ≫ fᘁ := by
  rw [rightAdjointMate_comp]
  simp only [rightAdjointMate, comp_tensor_id, Iso.cancel_iso_inv_left, id_tensor_comp,
    Category.assoc]
  symm
  iterate 5
    trans
    rw [← Category.id_comp g, tensor_comp]
  rw [← Category.assoc]
  symm
  iterate 2
    trans
    rw [← Category.assoc]
  apply eq_whisker
  repeat'
    -- Porting note: why do we need to fill in the implicit `C` here, and below?
    rw [← @id_tensor_comp C]
  congr 1
  rw [← id_tensor_comp_tensor_id (λ_ (Xᘁ)).hom g, id_tensor_rightUnitor_inv, Category.assoc,
    Category.assoc, rightUnitor_inv_naturality_assoc, ← associator_naturality_assoc, tensor_id,
    tensor_id_comp_id_tensor_assoc, ← associator_naturality_assoc]
  slice_rhs 2 3 =>
    rw [← tensor_comp, tensor_id, Category.comp_id, ← Category.id_comp (η_ Y (Yᘁ)), tensor_comp]
  rw [← id_tensor_comp_tensor_id _ (η_ Y (Yᘁ)), ← tensor_id]
  repeat' 

Proof state:
case w.e_g
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
inst✝³ : MonoidalCategory C
X Y Z : C
inst✝² : HasRightDual X
inst✝¹ : HasRightDual Y
inst✝ : HasRightDual Z
f : X ⟶ Y
g : Y ⟶ Z
⊢ η_ X Xᘁ ≫ (f ⊗ 𝟙 Xᘁ) ≫ (g ⊗ 𝟙 Xᘁ) =
    (ρ_ (𝟙_ C)).inv ≫
      (𝟙 (𝟙_ C) ⊗ η_ X Xᘁ) ≫
        ((𝟙 (𝟙_ C) ⊗ f ⊗ 𝟙 Xᘁ) ≫ (η_ Y Yᘁ ⊗ 𝟙 Y ⊗ 𝟙 Xᘁ)) ≫
          (α_ Y Yᘁ (Y ⊗ Xᘁ)).hom ≫ (𝟙 Y ⊗ (α_ Yᘁ Y Xᘁ).inv) ≫ (𝟙 Y ⊗ ε_ Y Yᘁ ⊗ 𝟙 Xᘁ) ≫ (𝟙 Y ⊗ (λ_ Xᘁ).hom) ≫ (g ⊗ 𝟙 Xᘁ)

Next tactic:
rw [@Category.assoc C]
/-- The composition of right adjoint mates is the adjoint mate of the composition. -/
@[reassoc]
theorem comp_rightAdjointMate {X Y Z : C} [HasRightDual X] [HasRightDual Y] [HasRightDual Z]
    {f : X ⟶ Y} {g : Y ⟶ Z} : (f ≫ g)ᘁ = gᘁ ≫ fᘁ := by
  rw [rightAdjointMate_comp]
  simp only [rightAdjointMate, comp_tensor_id, Iso.cancel_iso_inv_left, id_tensor_comp,
    Category.assoc]
  symm
  iterate 5
    trans
    rw [← Category.id_comp g, tensor_comp]
  rw [← Category.assoc]
  symm
  iterate 2
    trans
    rw [← Category.assoc]
  apply eq_whisker
  repeat'
    -- Porting note: why do we need to fill in the implicit `C` here, and below?
    rw [← @id_tensor_comp C]
  congr 1
  rw [← id_tensor_comp_tensor_id (λ_ (Xᘁ)).hom g, id_tensor_rightUnitor_inv, Category.assoc,
    Category.assoc, rightUnitor_inv_naturality_assoc, ← associator_naturality_assoc, tensor_id,
    tensor_id_comp_id_tensor_assoc, ← associator_naturality_assoc]
  slice_rhs 2 3 =>
    rw [← tensor_comp, tensor_id, Category.comp_id, ← Category.id_comp (η_ Y (Yᘁ)), tensor_comp]
  rw [← id_tensor_comp_tensor_id _ (η_ Y (Yᘁ)), ← tensor_id]
  repeat' 

Proof state:
case w.e_g
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
inst✝³ : MonoidalCategory C
X Y Z : C
inst✝² : HasRightDual X
inst✝¹ : HasRightDual Y
inst✝ : HasRightDual Z
f : X ⟶ Y
g : Y ⟶ Z
⊢ η_ X Xᘁ ≫ (f ⊗ 𝟙 Xᘁ) ≫ (g ⊗ 𝟙 Xᘁ) =
    (ρ_ (𝟙_ C)).inv ≫
      (𝟙 (𝟙_ C) ⊗ η_ X Xᘁ) ≫
        (𝟙 (𝟙_ C) ⊗ f ⊗ 𝟙 Xᘁ) ≫
          (η_ Y Yᘁ ⊗ 𝟙 Y ⊗ 𝟙 Xᘁ) ≫
            (α_ Y Yᘁ (Y ⊗ Xᘁ)).hom ≫
              (𝟙 Y ⊗ (α_ Yᘁ Y Xᘁ).inv) ≫ (𝟙 Y ⊗ ε_ Y Yᘁ ⊗ 𝟙 Xᘁ) ≫ (𝟙 Y ⊗ (λ_ Xᘁ).hom) ≫ (g ⊗ 𝟙 Xᘁ)

Next tactic:
rw [@Category.assoc C]
/-- The composition of right adjoint mates is the adjoint mate of the composition. -/
@[reassoc]
theorem comp_rightAdjointMate {X Y Z : C} [HasRightDual X] [HasRightDual Y] [HasRightDual Z]
    {f : X ⟶ Y} {g : Y ⟶ Z} : (f ≫ g)ᘁ = gᘁ ≫ fᘁ := by
  rw [rightAdjointMate_comp]
  simp only [rightAdjointMate, comp_tensor_id, Iso.cancel_iso_inv_left, id_tensor_comp,
    Category.assoc]
  symm
  iterate 5
    trans
    rw [← Category.id_comp g, tensor_comp]
  rw [← Category.assoc]
  symm
  iterate 2
    trans
    rw [← Category.assoc]
  apply eq_whisker
  repeat'
    -- Porting note: why do we need to fill in the implicit `C` here, and below?
    rw [← @id_tensor_comp C]
  congr 1
  rw [← id_tensor_comp_tensor_id (λ_ (Xᘁ)).hom g, id_tensor_rightUnitor_inv, Category.assoc,
    Category.assoc, rightUnitor_inv_naturality_assoc, ← associator_naturality_assoc, tensor_id,
    tensor_id_comp_id_tensor_assoc, ← associator_naturality_assoc]
  slice_rhs 2 3 =>
    rw [← tensor_comp, tensor_id, Category.comp_id, ← Category.id_comp (η_ Y (Yᘁ)), tensor_comp]
  rw [← id_tensor_comp_tensor_id _ (η_ Y (Yᘁ)), ← tensor_id]
  repeat' rw [@Category.assoc C]
  

Proof state:
case w.e_g
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
inst✝³ : MonoidalCategory C
X Y Z : C
inst✝² : HasRightDual X
inst✝¹ : HasRightDual Y
inst✝ : HasRightDual Z
f : X ⟶ Y
g : Y ⟶ Z
⊢ η_ X Xᘁ ≫ (f ⊗ 𝟙 Xᘁ) ≫ (g ⊗ 𝟙 Xᘁ) =
    (ρ_ (𝟙_ C)).inv ≫
      (𝟙 (𝟙_ C) ⊗ η_ X Xᘁ) ≫
        (𝟙 (𝟙_ C) ⊗ f ⊗ 𝟙 Xᘁ) ≫
          (η_ Y Yᘁ ⊗ 𝟙 Y ⊗ 𝟙 Xᘁ) ≫
            (α_ Y Yᘁ (Y ⊗ Xᘁ)).hom ≫
              (𝟙 Y ⊗ (α_ Yᘁ Y Xᘁ).inv) ≫ (𝟙 Y ⊗ ε_ Y Yᘁ ⊗ 𝟙 Xᘁ) ≫ (𝟙 Y ⊗ (λ_ Xᘁ).hom) ≫ (g ⊗ 𝟙 Xᘁ)

Next tactic:
rw [pentagon_hom_inv_assoc, ← associator_naturality_assoc, associator_inv_naturality_assoc]
/-- The composition of right adjoint mates is the adjoint mate of the composition. -/
@[reassoc]
theorem comp_rightAdjointMate {X Y Z : C} [HasRightDual X] [HasRightDual Y] [HasRightDual Z]
    {f : X ⟶ Y} {g : Y ⟶ Z} : (f ≫ g)ᘁ = gᘁ ≫ fᘁ := by
  rw [rightAdjointMate_comp]
  simp only [rightAdjointMate, comp_tensor_id, Iso.cancel_iso_inv_left, id_tensor_comp,
    Category.assoc]
  symm
  iterate 5
    trans
    rw [← Category.id_comp g, tensor_comp]
  rw [← Category.assoc]
  symm
  iterate 2
    trans
    rw [← Category.assoc]
  apply eq_whisker
  repeat'
    -- Porting note: why do we need to fill in the implicit `C` here, and below?
    rw [← @id_tensor_comp C]
  congr 1
  rw [← id_tensor_comp_tensor_id (λ_ (Xᘁ)).hom g, id_tensor_rightUnitor_inv, Category.assoc,
    Category.assoc, rightUnitor_inv_naturality_assoc, ← associator_naturality_assoc, tensor_id,
    tensor_id_comp_id_tensor_assoc, ← associator_naturality_assoc]
  slice_rhs 2 3 =>
    rw [← tensor_comp, tensor_id, Category.comp_id, ← Category.id_comp (η_ Y (Yᘁ)), tensor_comp]
  rw [← id_tensor_comp_tensor_id _ (η_ Y (Yᘁ)), ← tensor_id]
  repeat' rw [@Category.assoc C]
  rw [pentagon_hom_inv_assoc, ← associator_naturality_assoc, associator_inv_naturality_assoc]
  

Proof state:
case w.e_g
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
inst✝³ : MonoidalCategory C
X Y Z : C
inst✝² : HasRightDual X
inst✝¹ : HasRightDual Y
inst✝ : HasRightDual Z
f : X ⟶ Y
g : Y ⟶ Z
⊢ η_ X Xᘁ ≫ (f ⊗ 𝟙 Xᘁ) ≫ (g ⊗ 𝟙 Xᘁ) =
    (ρ_ (𝟙_ C)).inv ≫
      (𝟙 (𝟙_ C) ⊗ η_ X Xᘁ) ≫
        (𝟙 (𝟙_ C) ⊗ f ⊗ 𝟙 Xᘁ) ≫
          (α_ (𝟙_ C) Y Xᘁ).inv ≫
            ((η_ Y Yᘁ ⊗ 𝟙 Y) ⊗ 𝟙 Xᘁ) ≫
              ((α_ Y Yᘁ Y).hom ⊗ 𝟙 Xᘁ) ≫
                ((𝟙 Y ⊗ ε_ Y Yᘁ) ⊗ 𝟙 Xᘁ) ≫ (α_ Y (𝟙_ C) Xᘁ).hom ≫ (𝟙 Y ⊗ (λ_ Xᘁ).hom) ≫ (g ⊗ 𝟙 Xᘁ)

Next tactic:
slice_rhs 5 7 => rw [← comp_tensor_id, ← comp_tensor_id, evaluation_coevaluation, comp_tensor_id]
/-- The composition of right adjoint mates is the adjoint mate of the composition. -/
@[reassoc]
theorem comp_rightAdjointMate {X Y Z : C} [HasRightDual X] [HasRightDual Y] [HasRightDual Z]
    {f : X ⟶ Y} {g : Y ⟶ Z} : (f ≫ g)ᘁ = gᘁ ≫ fᘁ := by
  rw [rightAdjointMate_comp]
  simp only [rightAdjointMate, comp_tensor_id, Iso.cancel_iso_inv_left, id_tensor_comp,
    Category.assoc]
  symm
  iterate 5
    trans
    rw [← Category.id_comp g, tensor_comp]
  rw [← Category.assoc]
  symm
  iterate 2
    trans
    rw [← Category.assoc]
  apply eq_whisker
  repeat'
    -- Porting note: why do we need to fill in the implicit `C` here, and below?
    rw [← @id_tensor_comp C]
  congr 1
  rw [← id_tensor_comp_tensor_id (λ_ (Xᘁ)).hom g, id_tensor_rightUnitor_inv, Category.assoc,
    Category.assoc, rightUnitor_inv_naturality_assoc, ← associator_naturality_assoc, tensor_id,
    tensor_id_comp_id_tensor_assoc, ← associator_naturality_assoc]
  slice_rhs 2 3 =>
    rw [← tensor_comp, tensor_id, Category.comp_id, ← Category.id_comp (η_ Y (Yᘁ)), tensor_comp]
  rw [← id_tensor_comp_tensor_id _ (η_ Y (Yᘁ)), ← tensor_id]
  repeat' rw [@Category.assoc C]
  rw [pentagon_hom_inv_assoc, ← associator_naturality_assoc, associator_inv_naturality_assoc]
  slice_rhs 5 7 => 

Proof state:
case a.a.a.a.a.a.a
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
inst✝³ : MonoidalCategory C
X Y Z : C
inst✝² : HasRightDual X
inst✝¹ : HasRightDual Y
inst✝ : HasRightDual Z
f : X ⟶ Y
g : Y ⟶ Z
| ((η_ Y Yᘁ ⊗ 𝟙 Y) ⊗ 𝟙 Xᘁ) ≫ ((α_ Y Yᘁ Y).hom ⊗ 𝟙 Xᘁ) ≫ ((𝟙 Y ⊗ ε_ Y Yᘁ) ⊗ 𝟙 Xᘁ)
case a.a.a.a.a.a.a
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
inst✝³ : MonoidalCategory C
X Y Z : C
inst✝² : HasRightDual X
inst✝¹ : HasRightDual Y
inst✝ : HasRightDual Z
f : X ⟶ Y
g : Y ⟶ Z
| (α_ Y (𝟙_ C) Xᘁ).hom
case a.a.a.a.a.a
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
inst✝³ : MonoidalCategory C
X Y Z : C
inst✝² : HasRightDual X
inst✝¹ : HasRightDual Y
inst✝ : HasRightDual Z
f : X ⟶ Y
g : Y ⟶ Z
| 𝟙 Y ⊗ (λ_ Xᘁ).hom
case a.a.a.a.a
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
inst✝³ : MonoidalCategory C
X Y Z : C
inst✝² : HasRightDual X
inst✝¹ : HasRightDual Y
inst✝ : HasRightDual Z
f : X ⟶ Y
g : Y ⟶ Z
| g ⊗ 𝟙 Xᘁ
case a
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
inst✝³ : MonoidalCategory C
X Y Z : C
inst✝² : HasRightDual X
inst✝¹ : HasRightDual Y
inst✝ : HasRightDual Z
f : X ⟶ Y
g : Y ⟶ Z
| (ρ_ (𝟙_ C)).inv
case a.a
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
inst✝³ : MonoidalCategory C
X Y Z : C
inst✝² : HasRightDual X
inst✝¹ : HasRightDual Y
inst✝ : HasRightDual Z
f : X ⟶ Y
g : Y ⟶ Z
| 𝟙 (𝟙_ C) ⊗ η_ X Xᘁ
case a.a.a
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
inst✝³ : MonoidalCategory C
X Y Z : C
inst✝² : HasRightDual X
inst✝¹ : HasRightDual Y
inst✝ : HasRightDual Z
f : X ⟶ Y
g : Y ⟶ Z
| 𝟙 (𝟙_ C) ⊗ f ⊗ 𝟙 Xᘁ
case a.a.a.a
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
inst✝³ : MonoidalCategory C
X Y Z : C
inst✝² : HasRightDual X
inst✝¹ : HasRightDual Y
inst✝ : HasRightDual Z
f : X ⟶ Y
g : Y ⟶ Z
| (α_ (𝟙_ C) Y Xᘁ).inv

Next tactic:
rw [← comp_tensor_id, ← comp_tensor_id, evaluation_coevaluation, comp_tensor_id]
/-- The composition of right adjoint mates is the adjoint mate of the composition. -/
@[reassoc]
theorem comp_rightAdjointMate {X Y Z : C} [HasRightDual X] [HasRightDual Y] [HasRightDual Z]
    {f : X ⟶ Y} {g : Y ⟶ Z} : (f ≫ g)ᘁ = gᘁ ≫ fᘁ := by
  rw [rightAdjointMate_comp]
  simp only [rightAdjointMate, comp_tensor_id, Iso.cancel_iso_inv_left, id_tensor_comp,
    Category.assoc]
  symm
  iterate 5
    trans
    rw [← Category.id_comp g, tensor_comp]
  rw [← Category.assoc]
  symm
  iterate 2
    trans
    rw [← Category.assoc]
  apply eq_whisker
  repeat'
    -- Porting note: why do we need to fill in the implicit `C` here, and below?
    rw [← @id_tensor_comp C]
  congr 1
  rw [← id_tensor_comp_tensor_id (λ_ (Xᘁ)).hom g, id_tensor_rightUnitor_inv, Category.assoc,
    Category.assoc, rightUnitor_inv_naturality_assoc, ← associator_naturality_assoc, tensor_id,
    tensor_id_comp_id_tensor_assoc, ← associator_naturality_assoc]
  slice_rhs 2 3 =>
    rw [← tensor_comp, tensor_id, Category.comp_id, ← Category.id_comp (η_ Y (Yᘁ)), tensor_comp]
  rw [← id_tensor_comp_tensor_id _ (η_ Y (Yᘁ)), ← tensor_id]
  repeat' rw [@Category.assoc C]
  rw [pentagon_hom_inv_assoc, ← associator_naturality_assoc, associator_inv_naturality_assoc]
  slice_rhs 5 7 => rw [← comp_tensor_id, ← comp_tensor_id, evaluation_coevaluation, comp_tensor_id]
  

Proof state:
case w.e_g
C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
inst✝³ : MonoidalCategory C
X Y Z : C
inst✝² : HasRightDual X
inst✝¹ : HasRightDual Y
inst✝ : HasRightDual Z
f : X ⟶ Y
g : Y ⟶ Z
⊢ η_ X Xᘁ ≫ (f ⊗ 𝟙 Xᘁ) ≫ (g ⊗ 𝟙 Xᘁ) =
    (ρ_ (𝟙_ C)).inv ≫
      (𝟙 (𝟙_ C) ⊗ η_ X Xᘁ) ≫
        (𝟙 (𝟙_ C) ⊗ f ⊗ 𝟙 Xᘁ) ≫
          (α_ (𝟙_ C) Y Xᘁ).inv ≫
            (((((λ_ Y).hom ⊗ 𝟙 Xᘁ) ≫ ((ρ_ Y).inv ⊗ 𝟙 Xᘁ)) ≫ (α_ Y (𝟙_ C) Xᘁ).hom) ≫ (𝟙 Y ⊗ (λ_ Xᘁ).hom)) ≫ (g ⊗ 𝟙 Xᘁ)

Next tactic:
rw [associator_inv_naturality_assoc]