l3lab/ntp-mathlib huggingface dataset:
/-- The associator functor `(C ⊕ D) ⊕ E ⥤ C ⊕ (D ⊕ E)` for sums of categories.
-/
def associator : Sum (Sum C D) E ⥤ Sum C (Sum D E)
    where
  obj X :=
    match X with
    | inl (inl X) => inl X
    | inl (inr X) => inr (inl X)
    | inr X => inr (inr X)
  map {X Y} f :=
    match X, Y, f with
    | inl (inl _), inl (inl _), f => f
    | inl (inr _), inl (inr _), f => f
    | inr _, inr _, f => f
  map_id := by rintro ((_|_)|_) <;> rfl
  map_comp := by
    rintro ((_|_)|_) ((_|_)|_) ((_|_)|_) f g <;> 

Proof state:
case inl.inr.inl.inr.inl.inr
C : Type u
inst✝² : Category.{v, u} C
D : Type u
inst✝¹ : Category.{v, u} D
E : Type u
inst✝ : Category.{v, u} E
val✝² val✝¹ val✝ : D
f : inl (inr val✝²) ⟶ inl (inr val✝¹)
g : inl (inr val✝¹) ⟶ inl (inr val✝)
⊢ {
          obj := fun X =>
            match X with
            | inl (inl X) => inl X
            | inl (inr X) => inr (inl X)
            | inr X => inr (inr X),
          map := fun {X Y} f =>
            match X, Y, f with
            | inl (inl val), inl (inl val_1), f => f
            | inl (inr val), inl (inr val_1), f => f
            | inr val, inr val_1, f => f }.map
      (f ≫ g) =
    {
            obj := fun X =>
              match X with
              | inl (inl X) => inl X
              | inl (inr X) => inr (inl X)
              | inr X => inr (inr X),
            map := fun {X Y} f =>
              match X, Y, f with
              | inl (inl val), inl (inl val_1), f => f
              | inl (inr val), inl (inr val_1), f => f
              | inr val, inr val_1, f => f }.map
        f ≫
      {
            obj := fun X =>
              match X with
              | inl (inl X) => inl X
              | inl (inr X) => inr (inl X)
              | inr X => inr (inr X),
            map := fun {X Y} f =>
              match X, Y, f with
              | inl (inl val), inl (inl val_1), f => f
              | inl (inr val), inl (inr val_1), f => f
              | inr val, inr val_1, f => f }.map
        g

Next tactic:
first | cases f | cases g | aesop_cat
/-- The associator functor `(C ⊕ D) ⊕ E ⥤ C ⊕ (D ⊕ E)` for sums of categories.
-/
def associator : Sum (Sum C D) E ⥤ Sum C (Sum D E)
    where
  obj X :=
    match X with
    | inl (inl X) => inl X
    | inl (inr X) => inr (inl X)
    | inr X => inr (inr X)
  map {X Y} f :=
    match X, Y, f with
    | inl (inl _), inl (inl _), f => f
    | inl (inr _), inl (inr _), f => f
    | inr _, inr _, f => f
  map_id := by rintro ((_|_)|_) <;> rfl
  map_comp := by
    rintro ((_|_)|_) ((_|_)|_) ((_|_)|_) f g <;> first | 

Proof state:
case inl.inr.inl.inr.inl.inr
C : Type u
inst✝² : Category.{v, u} C
D : Type u
inst✝¹ : Category.{v, u} D
E : Type u
inst✝ : Category.{v, u} E
val✝² val✝¹ val✝ : D
f : inl (inr val✝²) ⟶ inl (inr val✝¹)
g : inl (inr val✝¹) ⟶ inl (inr val✝)
⊢ {
          obj := fun X =>
            match X with
            | inl (inl X) => inl X
            | inl (inr X) => inr (inl X)
            | inr X => inr (inr X),
          map := fun {X Y} f =>
            match X, Y, f with
            | inl (inl val), inl (inl val_1), f => f
            | inl (inr val), inl (inr val_1), f => f
            | inr val, inr val_1, f => f }.map
      (f ≫ g) =
    {
            obj := fun X =>
              match X with
              | inl (inl X) => inl X
              | inl (inr X) => inr (inl X)
              | inr X => inr (inr X),
            map := fun {X Y} f =>
              match X, Y, f with
              | inl (inl val), inl (inl val_1), f => f
              | inl (inr val), inl (inr val_1), f => f
              | inr val, inr val_1, f => f }.map
        f ≫
      {
            obj := fun X =>
              match X with
              | inl (inl X) => inl X
              | inl (inr X) => inr (inl X)
              | inr X => inr (inr X),
            map := fun {X Y} f =>
              match X, Y, f with
              | inl (inl val), inl (inl val_1), f => f
              | inl (inr val), inl (inr val_1), f => f
              | inr val, inr val_1, f => f }.map
        g

Next tactic:
cases f
/-- The associator functor `(C ⊕ D) ⊕ E ⥤ C ⊕ (D ⊕ E)` for sums of categories.
-/
def associator : Sum (Sum C D) E ⥤ Sum C (Sum D E)
    where
  obj X :=
    match X with
    | inl (inl X) => inl X
    | inl (inr X) => inr (inl X)
    | inr X => inr (inr X)
  map {X Y} f :=
    match X, Y, f with
    | inl (inl _), inl (inl _), f => f
    | inl (inr _), inl (inr _), f => f
    | inr _, inr _, f => f
  map_id := by rintro ((_|_)|_) <;> rfl
  map_comp := by
    rintro ((_|_)|_) ((_|_)|_) ((_|_)|_) f g <;> first | cases f | 

Proof state:
case inl.inr.inl.inr.inl.inr
C : Type u
inst✝² : Category.{v, u} C
D : Type u
inst✝¹ : Category.{v, u} D
E : Type u
inst✝ : Category.{v, u} E
val✝² val✝¹ val✝ : D
f : inl (inr val✝²) ⟶ inl (inr val✝¹)
g : inl (inr val✝¹) ⟶ inl (inr val✝)
⊢ {
          obj := fun X =>
            match X with
            | inl (inl X) => inl X
            | inl (inr X) => inr (inl X)
            | inr X => inr (inr X),
          map := fun {X Y} f =>
            match X, Y, f with
            | inl (inl val), inl (inl val_1), f => f
            | inl (inr val), inl (inr val_1), f => f
            | inr val, inr val_1, f => f }.map
      (f ≫ g) =
    {
            obj := fun X =>
              match X with
              | inl (inl X) => inl X
              | inl (inr X) => inr (inl X)
              | inr X => inr (inr X),
            map := fun {X Y} f =>
              match X, Y, f with
              | inl (inl val), inl (inl val_1), f => f
              | inl (inr val), inl (inr val_1), f => f
              | inr val, inr val_1, f => f }.map
        f ≫
      {
            obj := fun X =>
              match X with
              | inl (inl X) => inl X
              | inl (inr X) => inr (inl X)
              | inr X => inr (inr X),
            map := fun {X Y} f =>
              match X, Y, f with
              | inl (inl val), inl (inl val_1), f => f
              | inl (inr val), inl (inr val_1), f => f
              | inr val, inr val_1, f => f }.map
        g

Next tactic:
cases g
/-- The associator functor `(C ⊕ D) ⊕ E ⥤ C ⊕ (D ⊕ E)` for sums of categories.
-/
def associator : Sum (Sum C D) E ⥤ Sum C (Sum D E)
    where
  obj X :=
    match X with
    | inl (inl X) => inl X
    | inl (inr X) => inr (inl X)
    | inr X => inr (inr X)
  map {X Y} f :=
    match X, Y, f with
    | inl (inl _), inl (inl _), f => f
    | inl (inr _), inl (inr _), f => f
    | inr _, inr _, f => f
  map_id := by rintro ((_|_)|_) <;> rfl
  map_comp := by
    rintro ((_|_)|_) ((_|_)|_) ((_|_)|_) f g <;> first | cases f | cases g | 

Proof state:
case inl.inr.inl.inr.inl.inr
C : Type u
inst✝² : Category.{v, u} C
D : Type u
inst✝¹ : Category.{v, u} D
E : Type u
inst✝ : Category.{v, u} E
val✝² val✝¹ val✝ : D
f : inl (inr val✝²) ⟶ inl (inr val✝¹)
g : inl (inr val✝¹) ⟶ inl (inr val✝)
⊢ {
          obj := fun X =>
            match X with
            | inl (inl X) => inl X
            | inl (inr X) => inr (inl X)
            | inr X => inr (inr X),
          map := fun {X Y} f =>
            match X, Y, f with
            | inl (inl val), inl (inl val_1), f => f
            | inl (inr val), inl (inr val_1), f => f
            | inr val, inr val_1, f => f }.map
      (f ≫ g) =
    {
            obj := fun X =>
              match X with
              | inl (inl X) => inl X
              | inl (inr X) => inr (inl X)
              | inr X => inr (inr X),
            map := fun {X Y} f =>
              match X, Y, f with
              | inl (inl val), inl (inl val_1), f => f
              | inl (inr val), inl (inr val_1), f => f
              | inr val, inr val_1, f => f }.map
        f ≫
      {
            obj := fun X =>
              match X with
              | inl (inl X) => inl X
              | inl (inr X) => inr (inl X)
              | inr X => inr (inr X),
            map := fun {X Y} f =>
              match X, Y, f with
              | inl (inl val), inl (inl val_1), f => f
              | inl (inr val), inl (inr val_1), f => f
              | inr val, inr val_1, f => f }.map
        g

Next tactic:
aesop_cat
/-- The associator functor `(C ⊕ D) ⊕ E ⥤ C ⊕ (D ⊕ E)` for sums of categories.
-/
def associator : Sum (Sum C D) E ⥤ Sum C (Sum D E)
    where
  obj X :=
    match X with
    | inl (inl X) => inl X
    | inl (inr X) => inr (inl X)
    | inr X => inr (inr X)
  map {X Y} f :=
    match X, Y, f with
    | inl (inl _), inl (inl _), f => f
    | inl (inr _), inl (inr _), f => f
    | inr _, inr _, f => f
  map_id := by rintro ((_|_)|_) <;> rfl
  map_comp := by
    rintro ((_|_)|_) ((_|_)|_) ((_|_)|_) f g <;> 

Proof state:
case inl.inr.inl.inr.inr
C : Type u
inst✝² : Category.{v, u} C
D : Type u
inst✝¹ : Category.{v, u} D
E : Type u
inst✝ : Category.{v, u} E
val✝² val✝¹ : D
val✝ : E
f : inl (inr val✝²) ⟶ inl (inr val✝¹)
g : inl (inr val✝¹) ⟶ inr val✝
⊢ {
          obj := fun X =>
            match X with
            | inl (inl X) => inl X
            | inl (inr X) => inr (inl X)
            | inr X => inr (inr X),
          map := fun {X Y} f =>
            match X, Y, f with
            | inl (inl val), inl (inl val_1), f => f
            | inl (inr val), inl (inr val_1), f => f
            | inr val, inr val_1, f => f }.map
      (f ≫ g) =
    {
            obj := fun X =>
              match X with
              | inl (inl X) => inl X
              | inl (inr X) => inr (inl X)
              | inr X => inr (inr X),
            map := fun {X Y} f =>
              match X, Y, f with
              | inl (inl val), inl (inl val_1), f => f
              | inl (inr val), inl (inr val_1), f => f
              | inr val, inr val_1, f => f }.map
        f ≫
      {
            obj := fun X =>
              match X with
              | inl (inl X) => inl X
              | inl (inr X) => inr (inl X)
              | inr X => inr (inr X),
            map := fun {X Y} f =>
              match X, Y, f with
              | inl (inl val), inl (inl val_1), f => f
              | inl (inr val), inl (inr val_1), f => f
              | inr val, inr val_1, f => f }.map
        g

Next tactic:
first | cases f | cases g | aesop_cat
/-- The associator functor `(C ⊕ D) ⊕ E ⥤ C ⊕ (D ⊕ E)` for sums of categories.
-/
def associator : Sum (Sum C D) E ⥤ Sum C (Sum D E)
    where
  obj X :=
    match X with
    | inl (inl X) => inl X
    | inl (inr X) => inr (inl X)
    | inr X => inr (inr X)
  map {X Y} f :=
    match X, Y, f with
    | inl (inl _), inl (inl _), f => f
    | inl (inr _), inl (inr _), f => f
    | inr _, inr _, f => f
  map_id := by rintro ((_|_)|_) <;> rfl
  map_comp := by
    rintro ((_|_)|_) ((_|_)|_) ((_|_)|_) f g <;> first | 

Proof state:
case inl.inr.inl.inr.inr
C : Type u
inst✝² : Category.{v, u} C
D : Type u
inst✝¹ : Category.{v, u} D
E : Type u
inst✝ : Category.{v, u} E
val✝² val✝¹ : D
val✝ : E
f : inl (inr val✝²) ⟶ inl (inr val✝¹)
g : inl (inr val✝¹) ⟶ inr val✝
⊢ {
          obj := fun X =>
            match X with
            | inl (inl X) => inl X
            | inl (inr X) => inr (inl X)
            | inr X => inr (inr X),
          map := fun {X Y} f =>
            match X, Y, f with
            | inl (inl val), inl (inl val_1), f => f
            | inl (inr val), inl (inr val_1), f => f
            | inr val, inr val_1, f => f }.map
      (f ≫ g) =
    {
            obj := fun X =>
              match X with
              | inl (inl X) => inl X
              | inl (inr X) => inr (inl X)
              | inr X => inr (inr X),
            map := fun {X Y} f =>
              match X, Y, f with
              | inl (inl val), inl (inl val_1), f => f
              | inl (inr val), inl (inr val_1), f => f
              | inr val, inr val_1, f => f }.map
        f ≫
      {
            obj := fun X =>
              match X with
              | inl (inl X) => inl X
              | inl (inr X) => inr (inl X)
              | inr X => inr (inr X),
            map := fun {X Y} f =>
              match X, Y, f with
              | inl (inl val), inl (inl val_1), f => f
              | inl (inr val), inl (inr val_1), f => f
              | inr val, inr val_1, f => f }.map
        g

Next tactic:
cases f
/-- The associator functor `(C ⊕ D) ⊕ E ⥤ C ⊕ (D ⊕ E)` for sums of categories.
-/
def associator : Sum (Sum C D) E ⥤ Sum C (Sum D E)
    where
  obj X :=
    match X with
    | inl (inl X) => inl X
    | inl (inr X) => inr (inl X)
    | inr X => inr (inr X)
  map {X Y} f :=
    match X, Y, f with
    | inl (inl _), inl (inl _), f => f
    | inl (inr _), inl (inr _), f => f
    | inr _, inr _, f => f
  map_id := by rintro ((_|_)|_) <;> rfl
  map_comp := by
    rintro ((_|_)|_) ((_|_)|_) ((_|_)|_) f g <;> first | cases f | 

Proof state:
case inl.inr.inl.inr.inr
C : Type u
inst✝² : Category.{v, u} C
D : Type u
inst✝¹ : Category.{v, u} D
E : Type u
inst✝ : Category.{v, u} E
val✝² val✝¹ : D
val✝ : E
f : inl (inr val✝²) ⟶ inl (inr val✝¹)
g : inl (inr val✝¹) ⟶ inr val✝
⊢ {
          obj := fun X =>
            match X with
            | inl (inl X) => inl X
            | inl (inr X) => inr (inl X)
            | inr X => inr (inr X),
          map := fun {X Y} f =>
            match X, Y, f with
            | inl (inl val), inl (inl val_1), f => f
            | inl (inr val), inl (inr val_1), f => f
            | inr val, inr val_1, f => f }.map
      (f ≫ g) =
    {
            obj := fun X =>
              match X with
              | inl (inl X) => inl X
              | inl (inr X) => inr (inl X)
              | inr X => inr (inr X),
            map := fun {X Y} f =>
              match X, Y, f with
              | inl (inl val), inl (inl val_1), f => f
              | inl (inr val), inl (inr val_1), f => f
              | inr val, inr val_1, f => f }.map
        f ≫
      {
            obj := fun X =>
              match X with
              | inl (inl X) => inl X
              | inl (inr X) => inr (inl X)
              | inr X => inr (inr X),
            map := fun {X Y} f =>
              match X, Y, f with
              | inl (inl val), inl (inl val_1), f => f
              | inl (inr val), inl (inr val_1), f => f
              | inr val, inr val_1, f => f }.map
        g

Next tactic:
cases g
/-- The associator functor `(C ⊕ D) ⊕ E ⥤ C ⊕ (D ⊕ E)` for sums of categories.
-/
def associator : Sum (Sum C D) E ⥤ Sum C (Sum D E)
    where
  obj X :=
    match X with
    | inl (inl X) => inl X
    | inl (inr X) => inr (inl X)
    | inr X => inr (inr X)
  map {X Y} f :=
    match X, Y, f with
    | inl (inl _), inl (inl _), f => f
    | inl (inr _), inl (inr _), f => f
    | inr _, inr _, f => f
  map_id := by rintro ((_|_)|_) <;> rfl
  map_comp := by
    rintro ((_|_)|_) ((_|_)|_) ((_|_)|_) f g <;> 

Proof state:
case inl.inr.inr.inl.inl
C : Type u
inst✝² : Category.{v, u} C
D : Type u
inst✝¹ : Category.{v, u} D
E : Type u
inst✝ : Category.{v, u} E
val✝² : D
val✝¹ : E
val✝ : C
f : inl (inr val✝²) ⟶ inr val✝¹
g : inr val✝¹ ⟶ inl (inl val✝)
⊢ {
          obj := fun X =>
            match X with
            | inl (inl X) => inl X
            | inl (inr X) => inr (inl X)
            | inr X => inr (inr X),
          map := fun {X Y} f =>
            match X, Y, f with
            | inl (inl val), inl (inl val_1), f => f
            | inl (inr val), inl (inr val_1), f => f
            | inr val, inr val_1, f => f }.map
      (f ≫ g) =
    {
            obj := fun X =>
              match X with
              | inl (inl X) => inl X
              | inl (inr X) => inr (inl X)
              | inr X => inr (inr X),
            map := fun {X Y} f =>
              match X, Y, f with
              | inl (inl val), inl (inl val_1), f => f
              | inl (inr val), inl (inr val_1), f => f
              | inr val, inr val_1, f => f }.map
        f ≫
      {
            obj := fun X =>
              match X with
              | inl (inl X) => inl X
              | inl (inr X) => inr (inl X)
              | inr X => inr (inr X),
            map := fun {X Y} f =>
              match X, Y, f with
              | inl (inl val), inl (inl val_1), f => f
              | inl (inr val), inl (inr val_1), f => f
              | inr val, inr val_1, f => f }.map
        g

Next tactic:
first | cases f | cases g | aesop_cat
/-- The associator functor `(C ⊕ D) ⊕ E ⥤ C ⊕ (D ⊕ E)` for sums of categories.
-/
def associator : Sum (Sum C D) E ⥤ Sum C (Sum D E)
    where
  obj X :=
    match X with
    | inl (inl X) => inl X
    | inl (inr X) => inr (inl X)
    | inr X => inr (inr X)
  map {X Y} f :=
    match X, Y, f with
    | inl (inl _), inl (inl _), f => f
    | inl (inr _), inl (inr _), f => f
    | inr _, inr _, f => f
  map_id := by rintro ((_|_)|_) <;> rfl
  map_comp := by
    rintro ((_|_)|_) ((_|_)|_) ((_|_)|_) f g <;> first | 

Proof state:
case inl.inr.inr.inl.inl
C : Type u
inst✝² : Category.{v, u} C
D : Type u
inst✝¹ : Category.{v, u} D
E : Type u
inst✝ : Category.{v, u} E
val✝² : D
val✝¹ : E
val✝ : C
f : inl (inr val✝²) ⟶ inr val✝¹
g : inr val✝¹ ⟶ inl (inl val✝)
⊢ {
          obj := fun X =>
            match X with
            | inl (inl X) => inl X
            | inl (inr X) => inr (inl X)
            | inr X => inr (inr X),
          map := fun {X Y} f =>
            match X, Y, f with
            | inl (inl val), inl (inl val_1), f => f
            | inl (inr val), inl (inr val_1), f => f
            | inr val, inr val_1, f => f }.map
      (f ≫ g) =
    {
            obj := fun X =>
              match X with
              | inl (inl X) => inl X
              | inl (inr X) => inr (inl X)
              | inr X => inr (inr X),
            map := fun {X Y} f =>
              match X, Y, f with
              | inl (inl val), inl (inl val_1), f => f
              | inl (inr val), inl (inr val_1), f => f
              | inr val, inr val_1, f => f }.map
        f ≫
      {
            obj := fun X =>
              match X with
              | inl (inl X) => inl X
              | inl (inr X) => inr (inl X)
              | inr X => inr (inr X),
            map := fun {X Y} f =>
              match X, Y, f with
              | inl (inl val), inl (inl val_1), f => f
              | inl (inr val), inl (inr val_1), f => f
              | inr val, inr val_1, f => f }.map
        g

Next tactic:
cases f
/-- The associator functor `(C ⊕ D) ⊕ E ⥤ C ⊕ (D ⊕ E)` for sums of categories.
-/
def associator : Sum (Sum C D) E ⥤ Sum C (Sum D E)
    where
  obj X :=
    match X with
    | inl (inl X) => inl X
    | inl (inr X) => inr (inl X)
    | inr X => inr (inr X)
  map {X Y} f :=
    match X, Y, f with
    | inl (inl _), inl (inl _), f => f
    | inl (inr _), inl (inr _), f => f
    | inr _, inr _, f => f
  map_id := by rintro ((_|_)|_) <;> rfl
  map_comp := by
    rintro ((_|_)|_) ((_|_)|_) ((_|_)|_) f g <;> 

Proof state:
case inl.inr.inr.inl.inr
C : Type u
inst✝² : Category.{v, u} C
D : Type u
inst✝¹ : Category.{v, u} D
E : Type u
inst✝ : Category.{v, u} E
val✝² : D
val✝¹ : E
val✝ : D
f : inl (inr val✝²) ⟶ inr val✝¹
g : inr val✝¹ ⟶ inl (inr val✝)
⊢ {
          obj := fun X =>
            match X with
            | inl (inl X) => inl X
            | inl (inr X) => inr (inl X)
            | inr X => inr (inr X),
          map := fun {X Y} f =>
            match X, Y, f with
            | inl (inl val), inl (inl val_1), f => f
            | inl (inr val), inl (inr val_1), f => f
            | inr val, inr val_1, f => f }.map
      (f ≫ g) =
    {
            obj := fun X =>
              match X with
              | inl (inl X) => inl X
              | inl (inr X) => inr (inl X)
              | inr X => inr (inr X),
            map := fun {X Y} f =>
              match X, Y, f with
              | inl (inl val), inl (inl val_1), f => f
              | inl (inr val), inl (inr val_1), f => f
              | inr val, inr val_1, f => f }.map
        f ≫
      {
            obj := fun X =>
              match X with
              | inl (inl X) => inl X
              | inl (inr X) => inr (inl X)
              | inr X => inr (inr X),
            map := fun {X Y} f =>
              match X, Y, f with
              | inl (inl val), inl (inl val_1), f => f
              | inl (inr val), inl (inr val_1), f => f
              | inr val, inr val_1, f => f }.map
        g

Next tactic:
first | cases f | cases g | aesop_cat
/-- The associator functor `(C ⊕ D) ⊕ E ⥤ C ⊕ (D ⊕ E)` for sums of categories.
-/
def associator : Sum (Sum C D) E ⥤ Sum C (Sum D E)
    where
  obj X :=
    match X with
    | inl (inl X) => inl X
    | inl (inr X) => inr (inl X)
    | inr X => inr (inr X)
  map {X Y} f :=
    match X, Y, f with
    | inl (inl _), inl (inl _), f => f
    | inl (inr _), inl (inr _), f => f
    | inr _, inr _, f => f
  map_id := by rintro ((_|_)|_) <;> rfl
  map_comp := by
    rintro ((_|_)|_) ((_|_)|_) ((_|_)|_) f g <;> first | 

Proof state:
case inl.inr.inr.inl.inr
C : Type u
inst✝² : Category.{v, u} C
D : Type u
inst✝¹ : Category.{v, u} D
E : Type u
inst✝ : Category.{v, u} E
val✝² : D
val✝¹ : E
val✝ : D
f : inl (inr val✝²) ⟶ inr val✝¹
g : inr val✝¹ ⟶ inl (inr val✝)
⊢ {
          obj := fun X =>
            match X with
            | inl (inl X) => inl X
            | inl (inr X) => inr (inl X)
            | inr X => inr (inr X),
          map := fun {X Y} f =>
            match X, Y, f with
            | inl (inl val), inl (inl val_1), f => f
            | inl (inr val), inl (inr val_1), f => f
            | inr val, inr val_1, f => f }.map
      (f ≫ g) =
    {
            obj := fun X =>
              match X with
              | inl (inl X) => inl X
              | inl (inr X) => inr (inl X)
              | inr X => inr (inr X),
            map := fun {X Y} f =>
              match X, Y, f with
              | inl (inl val), inl (inl val_1), f => f
              | inl (inr val), inl (inr val_1), f => f
              | inr val, inr val_1, f => f }.map
        f ≫
      {
            obj := fun X =>
              match X with
              | inl (inl X) => inl X
              | inl (inr X) => inr (inl X)
              | inr X => inr (inr X),
            map := fun {X Y} f =>
              match X, Y, f with
              | inl (inl val), inl (inl val_1), f => f
              | inl (inr val), inl (inr val_1), f => f
              | inr val, inr val_1, f => f }.map
        g

Next tactic:
cases f
/-- The associator functor `(C ⊕ D) ⊕ E ⥤ C ⊕ (D ⊕ E)` for sums of categories.
-/
def associator : Sum (Sum C D) E ⥤ Sum C (Sum D E)
    where
  obj X :=
    match X with
    | inl (inl X) => inl X
    | inl (inr X) => inr (inl X)
    | inr X => inr (inr X)
  map {X Y} f :=
    match X, Y, f with
    | inl (inl _), inl (inl _), f => f
    | inl (inr _), inl (inr _), f => f
    | inr _, inr _, f => f
  map_id := by rintro ((_|_)|_) <;> rfl
  map_comp := by
    rintro ((_|_)|_) ((_|_)|_) ((_|_)|_) f g <;> 

Proof state:
case inl.inr.inr.inr
C : Type u
inst✝² : Category.{v, u} C
D : Type u
inst✝¹ : Category.{v, u} D
E : Type u
inst✝ : Category.{v, u} E
val✝² : D
val✝¹ val✝ : E
f : inl (inr val✝²) ⟶ inr val✝¹
g : inr val✝¹ ⟶ inr val✝
⊢ {
          obj := fun X =>
            match X with
            | inl (inl X) => inl X
            | inl (inr X) => inr (inl X)
            | inr X => inr (inr X),
          map := fun {X Y} f =>
            match X, Y, f with
            | inl (inl val), inl (inl val_1), f => f
            | inl (inr val), inl (inr val_1), f => f
            | inr val, inr val_1, f => f }.map
      (f ≫ g) =
    {
            obj := fun X =>
              match X with
              | inl (inl X) => inl X
              | inl (inr X) => inr (inl X)
              | inr X => inr (inr X),
            map := fun {X Y} f =>
              match X, Y, f with
              | inl (inl val), inl (inl val_1), f => f
              | inl (inr val), inl (inr val_1), f => f
              | inr val, inr val_1, f => f }.map
        f ≫
      {
            obj := fun X =>
              match X with
              | inl (inl X) => inl X
              | inl (inr X) => inr (inl X)
              | inr X => inr (inr X),
            map := fun {X Y} f =>
              match X, Y, f with
              | inl (inl val), inl (inl val_1), f => f
              | inl (inr val), inl (inr val_1), f => f
              | inr val, inr val_1, f => f }.map
        g

Next tactic:
first | cases f | cases g | aesop_cat