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.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✝² : C
val✝¹ : E
val✝ : D
f : inl (inl 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.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✝² : C
val✝¹ val✝ : E
f : inl (inl 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
/-- 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.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✝² : C
val✝¹ val✝ : E
f : inl (inl 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 inl.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✝² : D
val✝¹ val✝ : C
f : inl (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 inl.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✝² : D
val✝¹ val✝ : C
f : inl (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 inl.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✝² : D
val✝¹ : C
val✝ : D
f : inl (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 inl.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✝² : D
val✝¹ : C
val✝ : D
f : inl (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 inl.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✝² : D
val✝¹ : C
val✝ : E
f : inl (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 inl.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✝² : D
val✝¹ : C
val✝ : E
f : inl (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 inl.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✝² val✝¹ : D
val✝ : C
f : inl (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 inl.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✝² val✝¹ : D
val✝ : C
f : inl (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 <;> first | cases f | 

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