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 <;> first | 

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:
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 inr.inl.inl.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✝² : E
val✝¹ val✝ : C
f : inr val✝² ⟶ inl (inl val✝¹)
g : inl (inl 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 inr.inl.inl.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✝² : E
val✝¹ val✝ : C
f : inr val✝² ⟶ inl (inl val✝¹)
g : inl (inl 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 inr.inl.inl.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✝² : E
val✝¹ : C
val✝ : D
f : inr val✝² ⟶ inl (inl val✝¹)
g : inl (inl 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 inr.inl.inl.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✝² : E
val✝¹ : C
val✝ : D
f : inr val✝² ⟶ inl (inl val✝¹)
g : inl (inl 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 inr.inl.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✝² : E
val✝¹ : C
val✝ : E
f : inr val✝² ⟶ inl (inl val✝¹)
g : inl (inl 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 inr.inl.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✝² : E
val✝¹ : C
val✝ : E
f : inr val✝² ⟶ inl (inl val✝¹)
g : inl (inl 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 <;> 

Proof state:
case inr.inl.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✝² : E
val✝¹ : D
val✝ : C
f : inr val✝² ⟶ inl (inr val✝¹)
g : inl (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 inr.inl.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✝² : E
val✝¹ : D
val✝ : C
f : inr val✝² ⟶ inl (inr val✝¹)
g : inl (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 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✝² : E
val✝¹ val✝ : D
f : 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 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✝² : E
val✝¹ val✝ : D
f : 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 <;> 

Proof state:
case 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✝² : E
val✝¹ : D
val✝ : E
f : 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