-- Module: Mathlib.CategoryTheory.Join.Basic
Goal:
C : Type u₁
inst : Category.{v₁, u₁} C
D : Type u₂
inst_1 : Category.{v₂, u₂} D
a : C
a_1 : D
f : Hom.{v₁, v₂, u₁, u₂} (Join.left a) (right a_1)
a_2 : D
g : Hom.{v₁, v₂, u₁, u₂} (C := C) (right a_1) (right a_2)
a_3 : C
h : Hom.{v₁, v₂, u₁, u₂} (right a_2) (Join.left a_3)
left :
  Eq (α := ULift.{v₂, v₁} (a ⟶ a_3))
    (match (motive :=
        (x x_1 x_2 : Join.{v₁, v₂, u₁, u₂} C D) →
          (match (motive := Join.{v₁, v₂, u₁, u₂} C D → Join.{v₁, v₂, u₁, u₂} C D → Type (max v₁ v₂)) x, x_1 with
            | Join.left x, Join.left y => ULift.{v₂, v₁} (x ⟶ y)
            | right x, right y => ULift.{v₁, v₂} (x ⟶ y)
            | Join.left a, right a_4 => PUnit.{max (v₁ + 1) (v₂ + 1)}
            | right a, Join.left a_4 => PEmpty.{max (v₁ + 1) (v₂ + 1)}) →
            (match (motive := Join.{v₁, v₂, u₁, u₂} C D → Join.{v₁, v₂, u₁, u₂} C D → Type (max v₁ v₂)) x_1, x_2 with
              | Join.left x, Join.left y => ULift.{v₂, v₁} (x ⟶ y)
              | right x, right y => ULift.{v₁, v₂} (x ⟶ y)
              | Join.left a, right a_4 => PUnit.{max (v₁ + 1) (v₂ + 1)}
              | right a, Join.left a_4 => PEmpty.{max (v₁ + 1) (v₂ + 1)}) →
              match (motive := Join.{v₁, v₂, u₁, u₂} C D → Join.{v₁, v₂, u₁, u₂} C D → Type (max v₁ v₂)) x, x_2 with
              | Join.left x, Join.left y => ULift.{v₂, v₁} (x ⟶ y)
              | right x, right y => ULift.{v₁, v₂} (x ⟶ y)
              | Join.left a, right a_4 => PUnit.{max (v₁ + 1) (v₂ + 1)}
              | right a, Join.left a_4 => PEmpty.{max (v₁ + 1) (v₂ + 1)})
        Join.left a, right a_2, Join.left a_3, PUnit.unit, h with
      | Join.left _x, Join.left _y, Join.left _z, f, g => { down := f.down ≫ g.down }
      | Join.left _x, Join.left _y, right _z, x, x_1 => PUnit.unit
      | Join.left _x, right _y, right _z, x, x_1 => PUnit.unit
      | right _x, right _y, right _z, f, g => { down := f.down ≫ g.down } :
      match (motive := Join.{v₁, v₂, u₁, u₂} C D → Join.{v₁, v₂, u₁, u₂} C D → Type (max v₁ v₂)) Join.left a,
        Join.left a_3 with
      | Join.left x, Join.left y => ULift.{v₂, v₁} (x ⟶ y)
      | right x, right y => ULift.{v₁, v₂} (x ⟶ y)
      | Join.left a, right a_4 => PUnit.{max (v₁ + 1) (v₂ + 1)}
      | right a, Join.left a_4 => PEmpty.{max (v₁ + 1) (v₂ + 1)})
    (match (motive :=
        (x x_1 x_2 : Join.{v₁, v₂, u₁, u₂} C D) →
          (match (motive := Join.{v₁, v₂, u₁, u₂} C D → Join.{v₁, v₂, u₁, u₂} C D → Type (max v₁ v₂)) x, x_1 with
            | Join.left x, Join.left y => ULift.{v₂, v₁} (x ⟶ y)
            | right x, right y => ULift.{v₁, v₂} (x ⟶ y)
            | Join.left a, right a_4 => PUnit.{max (v₁ + 1) (v₂ + 1)}
            | right a, Join.left a_4 => PEmpty.{max (v₁ + 1) (v₂ + 1)}) →
            (match (motive := Join.{v₁, v₂, u₁, u₂} C D → Join.{v₁, v₂, u₁, u₂} C D → Type (max v₁ v₂)) x_1, x_2 with
              | Join.left x, Join.left y => ULift.{v₂, v₁} (x ⟶ y)
              | right x, right y => ULift.{v₁, v₂} (x ⟶ y)
              | Join.left a, right a_4 => PUnit.{max (v₁ + 1) (v₂ + 1)}
              | right a, Join.left a_4 => PEmpty.{max (v₁ + 1) (v₂ + 1)}) →
              match (motive := Join.{v₁, v₂, u₁, u₂} C D → Join.{v₁, v₂, u₁, u₂} C D → Type (max v₁ v₂)) x, x_2 with
              | Join.left x, Join.left y => ULift.{v₂, v₁} (x ⟶ y)
              | right x, right y => ULift.{v₁, v₂} (x ⟶ y)
              | Join.left a, right a_4 => PUnit.{max (v₁ + 1) (v₂ + 1)}
              | right a, Join.left a_4 => PEmpty.{max (v₁ + 1) (v₂ + 1)})
        Join.left a, right a_1, Join.left a_3, f,
        match (motive :=
          (x x_1 x_2 : Join.{v₁, v₂, u₁, u₂} C D) →
            (match (motive := Join.{v₁, v₂, u₁, u₂} C D → Join.{v₁, v₂, u₁, u₂} C D → Type (max v₁ v₂)) x, x_1 with
              | Join.left x, Join.left y => ULift.{v₂, v₁} (x ⟶ y)
              | right x, right y => ULift.{v₁, v₂} (x ⟶ y)
              | Join.left a, right a_4 => PUnit.{max (v₁ + 1) (v₂ + 1)}
              | right a, Join.left a_4 => PEmpty.{max (v₁ + 1) (v₂ + 1)}) →
              (match (motive := Join.{v₁, v₂, u₁, u₂} C D → Join.{v₁, v₂, u₁, u₂} C D → Type (max v₁ v₂)) x_1, x_2 with
                | Join.left x, Join.left y => ULift.{v₂, v₁} (x ⟶ y)
                | right x, right y => ULift.{v₁, v₂} (x ⟶ y)
                | Join.left a, right a_4 => PUnit.{max (v₁ + 1) (v₂ + 1)}
                | right a, Join.left a_4 => PEmpty.{max (v₁ + 1) (v₂ + 1)}) →
                match (motive := Join.{v₁, v₂, u₁, u₂} C D → Join.{v₁, v₂, u₁, u₂} C D → Type (max v₁ v₂)) x, x_2 with
                | Join.left x, Join.left y => ULift.{v₂, v₁} (x ⟶ y)
                | right x, right y => ULift.{v₁, v₂} (x ⟶ y)
                | Join.left a, right a_4 => PUnit.{max (v₁ + 1) (v₂ + 1)}
                | right a, Join.left a_4 => PEmpty.{max (v₁ + 1) (v₂ + 1)})
          right a_1, right a_2, Join.left a_3, g, h with
        | Join.left _x, Join.left _y, Join.left _z, f, g => { down := f.down ≫ g.down }
        | Join.left _x, Join.left _y, right _z, x, x_1 => PUnit.unit
        | Join.left _x, right _y, right _z, x, x_1 => PUnit.unit
        | right _x, right _y, right _z, f, g => { down := f.down ≫ g.down } with
      | Join.left _x, Join.left _y, Join.left _z, f, g => { down := f.down ≫ g.down }
      | Join.left _x, Join.left _y, right _z, x, x_1 => PUnit.unit
      | Join.left _x, right _y, right _z, x, x_1 => PUnit.unit
      | right _x, right _y, right _z, f, g => { down := f.down ≫ g.down } :
      match (motive := Join.{v₁, v₂, u₁, u₂} C D → Join.{v₁, v₂, u₁, u₂} C D → Type (max v₁ v₂)) Join.left a,
        Join.left a_3 with
      | Join.left x, Join.left y => ULift.{v₂, v₁} (x ⟶ y)
      | right x, right y => ULift.{v₁, v₂} (x ⟶ y)
      | Join.left a, right a_4 => PUnit.{max (v₁ + 1) (v₂ + 1)}
      | right a, Join.left a_4 => PEmpty.{max (v₁ + 1) (v₂ + 1)})
⊢ comp (comp f g) h = comp f (comp g h)

Tactic:
simp only [Hom, comp, Category.assoc]

Premises used: CategoryTheory.Category.assoc, CategoryTheory.Join.comp, CategoryTheory.Join.Hom