l3lab/ntp-mathlib huggingface dataset:
/-- 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 rintro (_|(_|_)) <;> 

Proof state:
case 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✝ : C
⊢ {
          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
      (𝟙 (inl val✝)) =
    𝟙
      ({
            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
        (inl val✝))

Next tactic:
rfl
/-- 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 rintro (_|(_|_)) <;> 

Proof state:
case inr.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
⊢ {
          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
      (𝟙 (inr (inl val✝))) =
    𝟙
      ({
            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
        (inr (inl val✝)))

Next tactic:
rfl
/-- 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 rintro (_|(_|_)) <;> 

Proof state:
case 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
⊢ {
          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
      (𝟙 (inr (inr val✝))) =
    𝟙
      ({
            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
        (inr (inr val✝)))

Next tactic:
rfl
/-- 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 rintro (_|(_|_)) <;> rfl
  map_comp := 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 Y Z : C ⊕ D ⊕ E} (f : X ⟶ Y) (g : Y ⟶ Z),
    {
            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
        (f ≫ g) =
      {
              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
          f ≫
        {
              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
          g

Next tactic:
rintro (_|(_|_)) (_|(_|_)) (_|(_|_)) f g
/-- 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 rintro (_|(_|_)) <;> rfl
  map_comp := by
    rintro (_|(_|_)) (_|(_|_)) (_|(_|_)) f g <;> 

Proof state:
case 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✝² val✝¹ val✝ : C
f : inl val✝² ⟶ inl val✝¹
g : inl val✝¹ ⟶ inl val✝
⊢ {
          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
      (f ≫ g) =
    {
            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
        f ≫
      {
            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
        g

Next tactic:
first | cases f | cases g | 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 rintro (_|(_|_)) <;> rfl
  map_comp := by
    rintro (_|(_|_)) (_|(_|_)) (_|(_|_)) f g <;> first | 

Proof state:
case 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✝² val✝¹ val✝ : C
f : inl val✝² ⟶ inl val✝¹
g : inl val✝¹ ⟶ inl val✝
⊢ {
          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
      (f ≫ g) =
    {
            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
        f ≫
      {
            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
        g

Next tactic:
cases f
/-- 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 rintro (_|(_|_)) <;> rfl
  map_comp := by
    rintro (_|(_|_)) (_|(_|_)) (_|(_|_)) f g <;> first | cases f | 

Proof state:
case 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✝² val✝¹ val✝ : C
f : inl val✝² ⟶ inl val✝¹
g : inl val✝¹ ⟶ inl val✝
⊢ {
          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
      (f ≫ g) =
    {
            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
        f ≫
      {
            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
        g

Next tactic:
cases g
/-- 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 rintro (_|(_|_)) <;> rfl
  map_comp := by
    rintro (_|(_|_)) (_|(_|_)) (_|(_|_)) f g <;> first | cases f | cases g | 

Proof state:
case 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✝² val✝¹ val✝ : C
f : inl val✝² ⟶ inl val✝¹
g : inl val✝¹ ⟶ inl val✝
⊢ {
          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
      (f ≫ g) =
    {
            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
        f ≫
      {
            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
        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 rintro (_|(_|_)) <;> rfl
  map_comp := by
    rintro (_|(_|_)) (_|(_|_)) (_|(_|_)) f g <;> 

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

Next tactic:
first | cases f | cases g | 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 rintro (_|(_|_)) <;> rfl
  map_comp := by
    rintro (_|(_|_)) (_|(_|_)) (_|(_|_)) f g <;> first | 

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

Next tactic:
cases f
/-- 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 rintro (_|(_|_)) <;> rfl
  map_comp := by
    rintro (_|(_|_)) (_|(_|_)) (_|(_|_)) f g <;> first | cases f | 

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

Next tactic:
cases g
/-- 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 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✝² val✝¹ : C
val✝ : E
f : inl val✝² ⟶ inl val✝¹
g : inl val✝¹ ⟶ inr (inr val✝)
⊢ {
          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
      (f ≫ g) =
    {
            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
        f ≫
      {
            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
        g

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