-- Mathlib/CategoryTheory/GradedObject/Monoidal.lean
@[reassoc]
lemma tensor_comp {X₁ X₂ X₃ Y₁ Y₂ Y₃ : GradedObject I C} (f₁ : X₁ ⟶ X₂) (f₂ : X₂ ⟶ X₃)
    (g₁ : Y₁ ⟶ Y₂) (g₂ : Y₂ ⟶ Y₃) [HasTensor X₁ Y₁] [HasTensor X₂ Y₂] [HasTensor X₃ Y₃] :
    tensorHom (f₁ ≫ f₂) (g₁ ≫ g₂) = tensorHom f₁ g₁ ≫ tensorHom f₂ g₂

Proof state:
I : Type u
inst✝⁵ : AddMonoid I
C : Type u_1
inst✝⁴ : Category.{u_2, u_1} C
inst✝³ : MonoidalCategory C
X₁ X₂ X₃ Y₁ Y₂ Y₃ : GradedObject I C
f₁ : X₁ ⟶ X₂
f₂ : X₂ ⟶ X₃
g₁ : Y₁ ⟶ Y₂
g₂ : Y₂ ⟶ Y₃
inst✝² : X₁.HasTensor Y₁
inst✝¹ : X₂.HasTensor Y₂
inst✝ : X₃.HasTensor Y₃
⊢ (mapMap
      (((mapBifunctor (curriedTensor C) I I).map (f₁ ≫ f₂)).app Y₁ ≫
        ((mapBifunctor (curriedTensor C) I I).obj X₃).map (g₁ ≫ g₂))
      fun x => x.1 + x.2) =
    mapMap
      ((((mapBifunctor (curriedTensor C) I I).map f₁).app Y₁ ≫ ((mapBifunctor (curriedTensor C) I I).obj X₂).map g₁) ≫
        ((mapBifunctor (curriedTensor C) I I).map f₂).app Y₂ ≫ ((mapBifunctor (curriedTensor C) I I).obj X₃).map g₂)
      fun x => x.1 + x.2

Tactic:
apply congr_mapMap

Result:
case h
I : Type u
inst✝⁵ : AddMonoid I
C : Type u_1
inst✝⁴ : Category.{u_2, u_1} C
inst✝³ : MonoidalCategory C
X₁ X₂ X₃ Y₁ Y₂ Y₃ : GradedObject I C
f₁ : X₁ ⟶ X₂
f₂ : X₂ ⟶ X₃
g₁ : Y₁ ⟶ Y₂
g₂ : Y₂ ⟶ Y₃
inst✝² : X₁.HasTensor Y₁
inst✝¹ : X₂.HasTensor Y₂
inst✝ : X₃.HasTensor Y₃
⊢ ((mapBifunctor (curriedTensor C) I I).map (f₁ ≫ f₂)).app Y₁ ≫
      ((mapBifunctor (curriedTensor C) I I).obj X₃).map (g₁ ≫ g₂) =
    (((mapBifunctor (curriedTensor C) I I).map f₁).app Y₁ ≫ ((mapBifunctor (curriedTensor C) I I).obj X₂).map g₁) ≫
      ((mapBifunctor (curriedTensor C) I I).map f₂).app Y₂ ≫ ((mapBifunctor (curriedTensor C) I I).obj X₃).map g₂

Proof state:
I : Type u
inst✝⁵ : AddMonoid I
C : Type u_1
inst✝⁴ : Category.{u_2, u_1} C
inst✝³ : MonoidalCategory C
X₁ X₂ X₃ Y₁ Y₂ Y₃ : GradedObject I C
f₁ : X₁ ⟶ X₂
f₂ : X₂ ⟶ X₃
g₁ : Y₁ ⟶ Y₂
g₂ : Y₂ ⟶ Y₃
inst✝² : X₁.HasTensor Y₁
inst✝¹ : X₂.HasTensor Y₂
inst✝ : X₃.HasTensor Y₃
⊢ tensorHom (f₁ ≫ f₂) (g₁ ≫ g₂) = tensorHom f₁ g₁ ≫ tensorHom f₂ g₂

Tactic:
dsimp only [tensorHom, mapBifunctorMapMap]

Result:
I : Type u
inst✝⁵ : AddMonoid I
C : Type u_1
inst✝⁴ : Category.{u_2, u_1} C
inst✝³ : MonoidalCategory C
X₁ X₂ X₃ Y₁ Y₂ Y₃ : GradedObject I C
f₁ : X₁ ⟶ X₂
f₂ : X₂ ⟶ X₃
g₁ : Y₁ ⟶ Y₂
g₂ : Y₂ ⟶ Y₃
inst✝² : X₁.HasTensor Y₁
inst✝¹ : X₂.HasTensor Y₂
inst✝ : X₃.HasTensor Y₃
⊢ (mapMap
      (((mapBifunctor (curriedTensor C) I I).map (f₁ ≫ f₂)).app Y₁ ≫
        ((mapBifunctor (curriedTensor C) I I).obj X₃).map (g₁ ≫ g₂))
      fun x => x.1 + x.2) =
    (mapMap
        (((mapBifunctor (curriedTensor C) I I).map f₁).app Y₁ ≫ ((mapBifunctor (curriedTensor C) I I).obj X₂).map g₁)
        fun x => x.1 + x.2) ≫
      mapMap
        (((mapBifunctor (curriedTensor C) I I).map f₂).app Y₂ ≫ ((mapBifunctor (curriedTensor C) I I).obj X₃).map g₂)
        fun x => x.1 + x.2

Proof state:
I : Type u
inst✝⁵ : AddMonoid I
C : Type u_1
inst✝⁴ : Category.{u_2, u_1} C
inst✝³ : MonoidalCategory C
X₁ X₂ X₃ Y₁ Y₂ Y₃ : GradedObject I C
f₁ : X₁ ⟶ X₂
f₂ : X₂ ⟶ X₃
g₁ : Y₁ ⟶ Y₂
g₂ : Y₂ ⟶ Y₃
inst✝² : X₁.HasTensor Y₁
inst✝¹ : X₂.HasTensor Y₂
inst✝ : X₃.HasTensor Y₃
⊢ (mapMap
      (((mapBifunctor (curriedTensor C) I I).map (f₁ ≫ f₂)).app Y₁ ≫
        ((mapBifunctor (curriedTensor C) I I).obj X₃).map (g₁ ≫ g₂))
      fun x => x.1 + x.2) =
    (mapMap
        (((mapBifunctor (curriedTensor C) I I).map f₁).app Y₁ ≫ ((mapBifunctor (curriedTensor C) I I).obj X₂).map g₁)
        fun x => x.1 + x.2) ≫
      mapMap
        (((mapBifunctor (curriedTensor C) I I).map f₂).app Y₂ ≫ ((mapBifunctor (curriedTensor C) I I).obj X₃).map g₂)
        fun x => x.1 + x.2

Tactic:
rw [← mapMap_comp]

Result:
I : Type u
inst✝⁵ : AddMonoid I
C : Type u_1
inst✝⁴ : Category.{u_2, u_1} C
inst✝³ : MonoidalCategory C
X₁ X₂ X₃ Y₁ Y₂ Y₃ : GradedObject I C
f₁ : X₁ ⟶ X₂
f₂ : X₂ ⟶ X₃
g₁ : Y₁ ⟶ Y₂
g₂ : Y₂ ⟶ Y₃
inst✝² : X₁.HasTensor Y₁
inst✝¹ : X₂.HasTensor Y₂
inst✝ : X₃.HasTensor Y₃
⊢ (mapMap
      (((mapBifunctor (curriedTensor C) I I).map (f₁ ≫ f₂)).app Y₁ ≫
        ((mapBifunctor (curriedTensor C) I I).obj X₃).map (g₁ ≫ g₂))
      fun x => x.1 + x.2) =
    mapMap
      ((((mapBifunctor (curriedTensor C) I I).map f₁).app Y₁ ≫ ((mapBifunctor (curriedTensor C) I I).obj X₂).map g₁) ≫
        ((mapBifunctor (curriedTensor C) I I).map f₂).app Y₂ ≫ ((mapBifunctor (curriedTensor C) I I).obj X₃).map g₂)
      fun x => x.1 + x.2

Proof state:
case h
I : Type u
inst✝⁵ : AddMonoid I
C : Type u_1
inst✝⁴ : Category.{u_2, u_1} C
inst✝³ : MonoidalCategory C
X₁ X₂ X₃ Y₁ Y₂ Y₃ : GradedObject I C
f₁ : X₁ ⟶ X₂
f₂ : X₂ ⟶ X₃
g₁ : Y₁ ⟶ Y₂
g₂ : Y₂ ⟶ Y₃
inst✝² : X₁.HasTensor Y₁
inst✝¹ : X₂.HasTensor Y₂
inst✝ : X₃.HasTensor Y₃
⊢ ((mapBifunctor (curriedTensor C) I I).map (f₁ ≫ f₂)).app Y₁ ≫
      ((mapBifunctor (curriedTensor C) I I).obj X₃).map (g₁ ≫ g₂) =
    (((mapBifunctor (curriedTensor C) I I).map f₁).app Y₁ ≫ ((mapBifunctor (curriedTensor C) I I).obj X₂).map g₁) ≫
      ((mapBifunctor (curriedTensor C) I I).map f₂).app Y₂ ≫ ((mapBifunctor (curriedTensor C) I I).obj X₃).map g₂

Tactic:
simp

Result:
no goals