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

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

Proof state:
case 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✝² val✝¹ : E
val✝ : D
f : 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 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 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✝² val✝¹ val✝ : E
f : 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
/-- 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.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✝¹ val✝ : E
f : 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 <;> first | cases f | 

Proof state:
case 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✝² val✝¹ val✝ : E
f : 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 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 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✝² val✝¹ val✝ : E
f : 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:
aesop_cat
/-- The inverse associator functor `C ⊕ (D ⊕ E) ⥤ (C ⊕ D) ⊕ E` for sums of categories.
-/
def inverseAssociator : Sum C (Sum D E) ⥤ Sum (Sum C D) E
    where
  obj X :=
    match X with
    | inl X => inl (inl X)
    | inr (inl X) => inl (inr X)
    | inr (inr X) => inr X
  map {X Y} f :=
    match X, Y, f with
    | inl _, inl _, f => f
    | inr (inl _), inr (inl _), f => f
    | inr (inr _), inr (inr _), f => f
  map_id := by 

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

Next tactic:
rintro (_|(_|_))