-- Lean 4 proof step from Mathlib.CategoryTheory.GradedObject.Monoidal (goal)
Goal:
I : Type u
inst : AddMonoid I
C : Type u_1
inst_1 : Category.{v_1, u_1} C
inst_2 : MonoidalCategory.{v_1, u_1} C
X₁ X₂ X₃ X₄ : GradedObject I C
inst_3 : HasTensor.{u, v_1, u_1} X₁ X₂
inst_4 : HasTensor.{u, v_1, u_1} X₂ X₃
inst_5 : HasTensor.{u, v_1, u_1} X₃ X₄
inst_6 : HasTensor.{u, v_1, u_1} (tensorObj.{u, v_1, u_1} X₁ X₂) X₃
inst_7 : HasTensor.{u, v_1, u_1} X₁ (tensorObj.{u, v_1, u_1} X₂ X₃)
inst_8 : HasTensor.{u, v_1, u_1} (tensorObj.{u, v_1, u_1} X₂ X₃) X₄
inst_9 : HasTensor.{u, v_1, u_1} X₂ (tensorObj.{u, v_1, u_1} X₃ X₄)
inst_10 : HasTensor.{u, v_1, u_1} (tensorObj.{u, v_1, u_1} (tensorObj.{u, v_1, u_1} X₁ X₂) X₃) X₄
inst_11 : HasTensor.{u, v_1, u_1} (tensorObj.{u, v_1, u_1} X₁ (tensorObj.{u, v_1, u_1} X₂ X₃)) X₄
inst_12 : HasTensor.{u, v_1, u_1} X₁ (tensorObj.{u, v_1, u_1} (tensorObj.{u, v_1, u_1} X₂ X₃) X₄)
inst_13 : HasTensor.{u, v_1, u_1} X₁ (tensorObj.{u, v_1, u_1} X₂ (tensorObj.{u, v_1, u_1} X₃ X₄))
inst_14 : HasTensor.{u, v_1, u_1} (tensorObj.{u, v_1, u_1} X₁ X₂) (tensorObj.{u, v_1, u_1} X₃ X₄)
inst_15 : HasGoodTensor₁₂Tensor.{u, v_1, u_1} X₁ X₂ X₃
inst_16 : HasGoodTensorTensor₂₃.{u, v_1, u_1} X₁ X₂ X₃
inst_17 : HasGoodTensor₁₂Tensor.{u, v_1, u_1} X₁ (tensorObj.{u, v_1, u_1} X₂ X₃) X₄
inst_18 : HasGoodTensorTensor₂₃.{u, v_1, u_1} X₁ (tensorObj.{u, v_1, u_1} X₂ X₃) X₄
inst_19 : HasGoodTensor₁₂Tensor.{u, v_1, u_1} X₂ X₃ X₄
inst_20 : HasGoodTensorTensor₂₃.{u, v_1, u_1} X₂ X₃ X₄
inst_21 : HasGoodTensor₁₂Tensor.{u, v_1, u_1} (tensorObj.{u, v_1, u_1} X₁ X₂) X₃ X₄
inst_22 : HasGoodTensorTensor₂₃.{u, v_1, u_1} (tensorObj.{u, v_1, u_1} X₁ X₂) X₃ X₄
inst_23 : HasGoodTensor₁₂Tensor.{u, v_1, u_1} X₁ X₂ (tensorObj.{u, v_1, u_1} X₃ X₄)
inst_24 : HasGoodTensorTensor₂₃.{u, v_1, u_1} X₁ X₂ (tensorObj.{u, v_1, u_1} X₃ X₄)
inst_25 : HasTensor₄ObjExt.{u, v_1, u_1} X₁ X₂ X₃ X₄
⊢ Eq (α :=
    tensorObj.{u, v_1, u_1} (tensorObj.{u, v_1, u_1} (tensorObj.{u, v_1, u_1} X₁ X₂) X₃) X₄ ⟶
      tensorObj.{u, v_1, u_1} X₁ (tensorObj.{u, v_1, u_1} X₂ (tensorObj.{u, v_1, u_1} X₃ X₄)))
    (CategoryStruct.comp (Y := tensorObj.{u, v_1, u_1} (tensorObj.{u, v_1, u_1} X₁ (tensorObj.{u, v_1, u_1} X₂ X₃)) X₄)
      (tensorHom (Iso.hom (associator X₁ X₂ X₃)) (𝟙 X₄))
      (CategoryStruct.comp (Y :=
        tensorObj.{u, v_1, u_1} X₁ (tensorObj.{u, v_1, u_1} (tensorObj.{u, v_1, u_1} X₂ X₃) X₄))
        (Iso.hom (associator X₁ (tensorObj.{u, v_1, u_1} X₂ X₃) X₄))
        (tensorHom (𝟙 X₁) (Iso.hom (associator X₂ X₃ X₄)))))
    (CategoryStruct.comp (Y := tensorObj.{u, v_1, u_1} (tensorObj.{u, v_1, u_1} X₁ X₂) (tensorObj.{u, v_1, u_1} X₃ X₄))
      (Iso.hom (associator (tensorObj.{u, v_1, u_1} X₁ X₂) X₃ X₄))
      (Iso.hom (associator X₁ X₂ (tensorObj.{u, v_1, u_1} X₃ X₄))))
have rw : CategoryStruct.comp (Y := tensorObj.{u, v_1, u_1} X₁ (tensorObj.{u, v_1, u_1} (tensorObj.{u, v_1, u_1} X₂ X₃) X₄))
    (tensorHom (𝟙 X₁) (Iso.inv (associator X₂ X₃ X₄)))
    (CategoryStruct.comp (Y := tensorObj.{u, v_1, u_1} (tensorObj.{u, v_1, u_1} X₁ (tensorObj.{u, v_1, u_1} X₂ X₃)) X₄)
      (Iso.inv (associator X₁ (tensorObj.{u, v_1, u_1} X₂ X₃) X₄))
      (CategoryStruct.comp (Y :=
        tensorObj.{u, v_1, u_1} (tensorObj.{u, v_1, u_1} (tensorObj.{u, v_1, u_1} X₁ X₂) X₃) X₄)
        (tensorHom (Iso.inv (associator X₁ X₂ X₃)) (𝟙 X₄))
        (CategoryStruct.comp (Y :=
          tensorObj.{u, v_1, u_1} (tensorObj.{u, v_1, u_1} X₁ (tensorObj.{u, v_1, u_1} X₂ X₃)) X₄)
          (tensorHom (Iso.hom (associator X₁ X₂ X₃)) (𝟙 X₄))
          (CategoryStruct.comp (Y :=
            tensorObj.{u, v_1, u_1} X₁ (tensorObj.{u, v_1, u_1} (tensorObj.{u, v_1, u_1} X₂ X₃) X₄))
            (Iso.hom (associator X₁ (tensorObj.{u, v_1, u_1} X₂ X₃) X₄))
            (tensorHom (𝟙 X₁) (Iso.hom (associator X₂ X₃ X₄))))))) =
  𝟙 (tensorObj.{u, v_1, u_1} X₁ (tensorObj.{u, v_1, u_1} X₂ (tensorObj.{u, v_1, u_1} X₃ X₄)))
Tactic: rw [← cancel_epi (associator (tensorObj X₁ X₂) X₃ X₄).inv,
    ← cancel_epi (associator X₁ X₂ (tensorObj X₃ X₄)).inv, Iso.inv_hom_id_assoc,
    Iso.inv_hom_id, ← pentagon_inv_assoc]