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

Proof state:
case inr.inr.inr.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 (inr val✝²) ⟶ inr (inr val✝¹)
g : inr (inr 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:
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 inr.inr.inr.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 (inr val✝²) ⟶ inr (inr val✝¹)
g : inr (inr 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:
aesop_cat
/-- The equivalence of categories expressing associativity of sums of categories.
-/
def associativity : Sum (Sum C D) E ≌ Sum C (Sum D E) :=
  Equivalence.mk (associator C D E) (inverseAssociator C D E)
    (NatIso.ofComponents (fun X => eqToIso
      (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
⊢ (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X

Next tactic:
rcases X with ((_|_)|_)
/-- The equivalence of categories expressing associativity of sums of categories.
-/
def associativity : Sum (Sum C D) E ≌ Sum C (Sum D E) :=
  Equivalence.mk (associator C D E) (inverseAssociator C D E)
    (NatIso.ofComponents (fun X => eqToIso
      (by rcases X with ((_|_)|_) <;> 

Proof state:
case 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✝ : C
⊢ (𝟭 ((C ⊕ D) ⊕ E)).obj (inl (inl val✝)) = (associator C D E ⋙ inverseAssociator C D E).obj (inl (inl val✝))

Next tactic:
rfl
/-- The equivalence of categories expressing associativity of sums of categories.
-/
def associativity : Sum (Sum C D) E ≌ Sum C (Sum D E) :=
  Equivalence.mk (associator C D E) (inverseAssociator C D E)
    (NatIso.ofComponents (fun X => eqToIso
      (by rcases X with ((_|_)|_) <;> 

Proof state:
case 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
⊢ (𝟭 ((C ⊕ D) ⊕ E)).obj (inl (inr val✝)) = (associator C D E ⋙ inverseAssociator C D E).obj (inl (inr val✝))

Next tactic:
rfl
/-- The equivalence of categories expressing associativity of sums of categories.
-/
def associativity : Sum (Sum C D) E ≌ Sum C (Sum D E) :=
  Equivalence.mk (associator C D E) (inverseAssociator C D E)
    (NatIso.ofComponents (fun X => eqToIso
      (by rcases X with ((_|_)|_) <;> 

Proof state:
case 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
⊢ (𝟭 ((C ⊕ D) ⊕ E)).obj (inr val✝) = (associator C D E ⋙ inverseAssociator C D E).obj (inr val✝)

Next tactic:
rfl
/-- The equivalence of categories expressing associativity of sums of categories.
-/
def associativity : Sum (Sum C D) E ≌ Sum C (Sum D E) :=
  Equivalence.mk (associator C D E) (inverseAssociator C D E)
    (NatIso.ofComponents (fun X => eqToIso
      (by rcases X with ((_|_)|_) <;> rfl)) -- Porting notes: aesop_cat fails
      (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 : (C ⊕ D) ⊕ E} (f : X ⟶ Y),
    (𝟭 ((C ⊕ D) ⊕ E)).map f ≫
        ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X)) Y).hom =
      ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X)) X).hom ≫
        (associator C D E ⋙ inverseAssociator C D E).map f

Next tactic:
rintro ((_|_)|_) ((_|_)|_) f
/-- The equivalence of categories expressing associativity of sums of categories.
-/
def associativity : Sum (Sum C D) E ≌ Sum C (Sum D E) :=
  Equivalence.mk (associator C D E) (inverseAssociator C D E)
    (NatIso.ofComponents (fun X => eqToIso
      (by rcases X with ((_|_)|_) <;> rfl)) -- Porting notes: aesop_cat fails
      (by rintro ((_|_)|_) ((_|_)|_) f <;> 

Proof state:
case 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✝¹ val✝ : C
f : inl (inl val✝¹) ⟶ inl (inl val✝)
⊢ (𝟭 ((C ⊕ D) ⊕ E)).map f ≫
      ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))
          (inl (inl val✝))).hom =
    ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))
          (inl (inl val✝¹))).hom ≫
      (associator C D E ⋙ inverseAssociator C D E).map f

Next tactic:
first | cases f | aesop_cat
/-- The equivalence of categories expressing associativity of sums of categories.
-/
def associativity : Sum (Sum C D) E ≌ Sum C (Sum D E) :=
  Equivalence.mk (associator C D E) (inverseAssociator C D E)
    (NatIso.ofComponents (fun X => eqToIso
      (by rcases X with ((_|_)|_) <;> rfl)) -- Porting notes: aesop_cat fails
      (by rintro ((_|_)|_) ((_|_)|_) f <;> first | 

Proof state:
case 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✝¹ val✝ : C
f : inl (inl val✝¹) ⟶ inl (inl val✝)
⊢ (𝟭 ((C ⊕ D) ⊕ E)).map f ≫
      ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))
          (inl (inl val✝))).hom =
    ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))
          (inl (inl val✝¹))).hom ≫
      (associator C D E ⋙ inverseAssociator C D E).map f

Next tactic:
cases f
/-- The equivalence of categories expressing associativity of sums of categories.
-/
def associativity : Sum (Sum C D) E ≌ Sum C (Sum D E) :=
  Equivalence.mk (associator C D E) (inverseAssociator C D E)
    (NatIso.ofComponents (fun X => eqToIso
      (by rcases X with ((_|_)|_) <;> rfl)) -- Porting notes: aesop_cat fails
      (by rintro ((_|_)|_) ((_|_)|_) f <;> first | cases f | 

Proof state:
case 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✝¹ val✝ : C
f : inl (inl val✝¹) ⟶ inl (inl val✝)
⊢ (𝟭 ((C ⊕ D) ⊕ E)).map f ≫
      ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))
          (inl (inl val✝))).hom =
    ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))
          (inl (inl val✝¹))).hom ≫
      (associator C D E ⋙ inverseAssociator C D E).map f

Next tactic:
aesop_cat
/-- The equivalence of categories expressing associativity of sums of categories.
-/
def associativity : Sum (Sum C D) E ≌ Sum C (Sum D E) :=
  Equivalence.mk (associator C D E) (inverseAssociator C D E)
    (NatIso.ofComponents (fun X => eqToIso
      (by rcases X with ((_|_)|_) <;> rfl)) -- Porting notes: aesop_cat fails
      (by rintro ((_|_)|_) ((_|_)|_) f <;> 

Proof state:
case 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✝¹ : C
val✝ : D
f : inl (inl val✝¹) ⟶ inl (inr val✝)
⊢ (𝟭 ((C ⊕ D) ⊕ E)).map f ≫
      ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))
          (inl (inr val✝))).hom =
    ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))
          (inl (inl val✝¹))).hom ≫
      (associator C D E ⋙ inverseAssociator C D E).map f

Next tactic:
first | cases f | aesop_cat
/-- The equivalence of categories expressing associativity of sums of categories.
-/
def associativity : Sum (Sum C D) E ≌ Sum C (Sum D E) :=
  Equivalence.mk (associator C D E) (inverseAssociator C D E)
    (NatIso.ofComponents (fun X => eqToIso
      (by rcases X with ((_|_)|_) <;> rfl)) -- Porting notes: aesop_cat fails
      (by rintro ((_|_)|_) ((_|_)|_) f <;> first | 

Proof state:
case 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✝¹ : C
val✝ : D
f : inl (inl val✝¹) ⟶ inl (inr val✝)
⊢ (𝟭 ((C ⊕ D) ⊕ E)).map f ≫
      ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))
          (inl (inr val✝))).hom =
    ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))
          (inl (inl val✝¹))).hom ≫
      (associator C D E ⋙ inverseAssociator C D E).map f

Next tactic:
cases f
/-- The equivalence of categories expressing associativity of sums of categories.
-/
def associativity : Sum (Sum C D) E ≌ Sum C (Sum D E) :=
  Equivalence.mk (associator C D E) (inverseAssociator C D E)
    (NatIso.ofComponents (fun X => eqToIso
      (by rcases X with ((_|_)|_) <;> rfl)) -- Porting notes: aesop_cat fails
      (by rintro ((_|_)|_) ((_|_)|_) f <;> 

Proof state:
case 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✝¹ : C
val✝ : E
f : inl (inl val✝¹) ⟶ inr val✝
⊢ (𝟭 ((C ⊕ D) ⊕ E)).map f ≫
      ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))
          (inr val✝)).hom =
    ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))
          (inl (inl val✝¹))).hom ≫
      (associator C D E ⋙ inverseAssociator C D E).map f

Next tactic:
first | cases f | aesop_cat
/-- The equivalence of categories expressing associativity of sums of categories.
-/
def associativity : Sum (Sum C D) E ≌ Sum C (Sum D E) :=
  Equivalence.mk (associator C D E) (inverseAssociator C D E)
    (NatIso.ofComponents (fun X => eqToIso
      (by rcases X with ((_|_)|_) <;> rfl)) -- Porting notes: aesop_cat fails
      (by rintro ((_|_)|_) ((_|_)|_) f <;> first | 

Proof state:
case 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✝¹ : C
val✝ : E
f : inl (inl val✝¹) ⟶ inr val✝
⊢ (𝟭 ((C ⊕ D) ⊕ E)).map f ≫
      ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))
          (inr val✝)).hom =
    ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))
          (inl (inl val✝¹))).hom ≫
      (associator C D E ⋙ inverseAssociator C D E).map f

Next tactic:
cases f
/-- The equivalence of categories expressing associativity of sums of categories.
-/
def associativity : Sum (Sum C D) E ≌ Sum C (Sum D E) :=
  Equivalence.mk (associator C D E) (inverseAssociator C D E)
    (NatIso.ofComponents (fun X => eqToIso
      (by rcases X with ((_|_)|_) <;> rfl)) -- Porting notes: aesop_cat fails
      (by rintro ((_|_)|_) ((_|_)|_) f <;> 

Proof state:
case 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✝¹ : D
val✝ : C
f : inl (inr val✝¹) ⟶ inl (inl val✝)
⊢ (𝟭 ((C ⊕ D) ⊕ E)).map f ≫
      ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))
          (inl (inl val✝))).hom =
    ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))
          (inl (inr val✝¹))).hom ≫
      (associator C D E ⋙ inverseAssociator C D E).map f

Next tactic:
first | cases f | aesop_cat
/-- The equivalence of categories expressing associativity of sums of categories.
-/
def associativity : Sum (Sum C D) E ≌ Sum C (Sum D E) :=
  Equivalence.mk (associator C D E) (inverseAssociator C D E)
    (NatIso.ofComponents (fun X => eqToIso
      (by rcases X with ((_|_)|_) <;> rfl)) -- Porting notes: aesop_cat fails
      (by rintro ((_|_)|_) ((_|_)|_) f <;> first | 

Proof state:
case 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✝¹ : D
val✝ : C
f : inl (inr val✝¹) ⟶ inl (inl val✝)
⊢ (𝟭 ((C ⊕ D) ⊕ E)).map f ≫
      ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))
          (inl (inl val✝))).hom =
    ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))
          (inl (inr val✝¹))).hom ≫
      (associator C D E ⋙ inverseAssociator C D E).map f

Next tactic:
cases f
/-- The equivalence of categories expressing associativity of sums of categories.
-/
def associativity : Sum (Sum C D) E ≌ Sum C (Sum D E) :=
  Equivalence.mk (associator C D E) (inverseAssociator C D E)
    (NatIso.ofComponents (fun X => eqToIso
      (by rcases X with ((_|_)|_) <;> rfl)) -- Porting notes: aesop_cat fails
      (by rintro ((_|_)|_) ((_|_)|_) f <;> 

Proof state:
case inl.inr.inl.inr
C : Type u
inst✝² : Category.{v, u} C
D : Type u
inst✝¹ : Category.{v, u} D
E : Type u
inst✝ : Category.{v, u} E
val✝¹ val✝ : D
f : inl (inr val✝¹) ⟶ inl (inr val✝)
⊢ (𝟭 ((C ⊕ D) ⊕ E)).map f ≫
      ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))
          (inl (inr val✝))).hom =
    ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))
          (inl (inr val✝¹))).hom ≫
      (associator C D E ⋙ inverseAssociator C D E).map f

Next tactic:
first | cases f | aesop_cat
/-- The equivalence of categories expressing associativity of sums of categories.
-/
def associativity : Sum (Sum C D) E ≌ Sum C (Sum D E) :=
  Equivalence.mk (associator C D E) (inverseAssociator C D E)
    (NatIso.ofComponents (fun X => eqToIso
      (by rcases X with ((_|_)|_) <;> rfl)) -- Porting notes: aesop_cat fails
      (by rintro ((_|_)|_) ((_|_)|_) f <;> first | 

Proof state:
case inl.inr.inl.inr
C : Type u
inst✝² : Category.{v, u} C
D : Type u
inst✝¹ : Category.{v, u} D
E : Type u
inst✝ : Category.{v, u} E
val✝¹ val✝ : D
f : inl (inr val✝¹) ⟶ inl (inr val✝)
⊢ (𝟭 ((C ⊕ D) ⊕ E)).map f ≫
      ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))
          (inl (inr val✝))).hom =
    ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))
          (inl (inr val✝¹))).hom ≫
      (associator C D E ⋙ inverseAssociator C D E).map f

Next tactic:
cases f
/-- The equivalence of categories expressing associativity of sums of categories.
-/
def associativity : Sum (Sum C D) E ≌ Sum C (Sum D E) :=
  Equivalence.mk (associator C D E) (inverseAssociator C D E)
    (NatIso.ofComponents (fun X => eqToIso
      (by rcases X with ((_|_)|_) <;> rfl)) -- Porting notes: aesop_cat fails
      (by rintro ((_|_)|_) ((_|_)|_) f <;> first | cases f | 

Proof state:
case inl.inr.inl.inr
C : Type u
inst✝² : Category.{v, u} C
D : Type u
inst✝¹ : Category.{v, u} D
E : Type u
inst✝ : Category.{v, u} E
val✝¹ val✝ : D
f : inl (inr val✝¹) ⟶ inl (inr val✝)
⊢ (𝟭 ((C ⊕ D) ⊕ E)).map f ≫
      ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))
          (inl (inr val✝))).hom =
    ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))
          (inl (inr val✝¹))).hom ≫
      (associator C D E ⋙ inverseAssociator C D E).map f

Next tactic:
aesop_cat
/-- The equivalence of categories expressing associativity of sums of categories.
-/
def associativity : Sum (Sum C D) E ≌ Sum C (Sum D E) :=
  Equivalence.mk (associator C D E) (inverseAssociator C D E)
    (NatIso.ofComponents (fun X => eqToIso
      (by rcases X with ((_|_)|_) <;> rfl)) -- Porting notes: aesop_cat fails
      (by rintro ((_|_)|_) ((_|_)|_) f <;> 

Proof state:
case 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✝¹ : D
val✝ : E
f : inl (inr val✝¹) ⟶ inr val✝
⊢ (𝟭 ((C ⊕ D) ⊕ E)).map f ≫
      ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))
          (inr val✝)).hom =
    ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))
          (inl (inr val✝¹))).hom ≫
      (associator C D E ⋙ inverseAssociator C D E).map f

Next tactic:
first | cases f | aesop_cat
/-- The equivalence of categories expressing associativity of sums of categories.
-/
def associativity : Sum (Sum C D) E ≌ Sum C (Sum D E) :=
  Equivalence.mk (associator C D E) (inverseAssociator C D E)
    (NatIso.ofComponents (fun X => eqToIso
      (by rcases X with ((_|_)|_) <;> rfl)) -- Porting notes: aesop_cat fails
      (by rintro ((_|_)|_) ((_|_)|_) f <;> first | 

Proof state:
case 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✝¹ : D
val✝ : E
f : inl (inr val✝¹) ⟶ inr val✝
⊢ (𝟭 ((C ⊕ D) ⊕ E)).map f ≫
      ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))
          (inr val✝)).hom =
    ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))
          (inl (inr val✝¹))).hom ≫
      (associator C D E ⋙ inverseAssociator C D E).map f

Next tactic:
cases f
/-- The equivalence of categories expressing associativity of sums of categories.
-/
def associativity : Sum (Sum C D) E ≌ Sum C (Sum D E) :=
  Equivalence.mk (associator C D E) (inverseAssociator C D E)
    (NatIso.ofComponents (fun X => eqToIso
      (by rcases X with ((_|_)|_) <;> rfl)) -- Porting notes: aesop_cat fails
      (by rintro ((_|_)|_) ((_|_)|_) f <;> 

Proof state:
case 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✝ : C
f : inr val✝¹ ⟶ inl (inl val✝)
⊢ (𝟭 ((C ⊕ D) ⊕ E)).map f ≫
      ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))
          (inl (inl val✝))).hom =
    ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))
          (inr val✝¹)).hom ≫
      (associator C D E ⋙ inverseAssociator C D E).map f

Next tactic:
first | cases f | aesop_cat
/-- The equivalence of categories expressing associativity of sums of categories.
-/
def associativity : Sum (Sum C D) E ≌ Sum C (Sum D E) :=
  Equivalence.mk (associator C D E) (inverseAssociator C D E)
    (NatIso.ofComponents (fun X => eqToIso
      (by rcases X with ((_|_)|_) <;> rfl)) -- Porting notes: aesop_cat fails
      (by rintro ((_|_)|_) ((_|_)|_) f <;> first | 

Proof state:
case 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✝ : C
f : inr val✝¹ ⟶ inl (inl val✝)
⊢ (𝟭 ((C ⊕ D) ⊕ E)).map f ≫
      ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))
          (inl (inl val✝))).hom =
    ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))
          (inr val✝¹)).hom ≫
      (associator C D E ⋙ inverseAssociator C D E).map f

Next tactic:
cases f
/-- The equivalence of categories expressing associativity of sums of categories.
-/
def associativity : Sum (Sum C D) E ≌ Sum C (Sum D E) :=
  Equivalence.mk (associator C D E) (inverseAssociator C D E)
    (NatIso.ofComponents (fun X => eqToIso
      (by rcases X with ((_|_)|_) <;> rfl)) -- Porting notes: aesop_cat fails
      (by rintro ((_|_)|_) ((_|_)|_) f <;> 

Proof state:
case 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✝ : D
f : inr val✝¹ ⟶ inl (inr val✝)
⊢ (𝟭 ((C ⊕ D) ⊕ E)).map f ≫
      ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))
          (inl (inr val✝))).hom =
    ((fun X => eqToIso (_ : (𝟭 ((C ⊕ D) ⊕ E)).obj X = (associator C D E ⋙ inverseAssociator C D E).obj X))
          (inr val✝¹)).hom ≫
      (associator C D E ⋙ inverseAssociator C D E).map f

Next tactic:
first | cases f | aesop_cat