l3lab/ntp-mathlib huggingface dataset:
theorem prod.triangle [HasBinaryProducts C] (X Y : C) :
    (prod.associator X (⊤_ C) Y).hom ≫ prod.map (𝟙 X) (prod.leftUnitor Y).hom =
      prod.map (prod.rightUnitor X).hom (𝟙 Y) :=
  by 

Proof state:
C : Type u
inst✝² : Category.{v, u} C
X✝ Y✝ : C
inst✝¹ : HasTerminal C
inst✝ : HasBinaryProducts C
X Y : C
⊢ (associator X (⊤_ C) Y).hom ≫ map (𝟙 X) (leftUnitor Y).hom = map (rightUnitor X).hom (𝟙 Y)

Next tactic:
ext
theorem prod.triangle [HasBinaryProducts C] (X Y : C) :
    (prod.associator X (⊤_ C) Y).hom ≫ prod.map (𝟙 X) (prod.leftUnitor Y).hom =
      prod.map (prod.rightUnitor X).hom (𝟙 Y) :=
  by ext <;> 

Proof state:
case h₁
C : Type u
inst✝² : Category.{v, u} C
X✝ Y✝ : C
inst✝¹ : HasTerminal C
inst✝ : HasBinaryProducts C
X Y : C
⊢ ((associator X (⊤_ C) Y).hom ≫ map (𝟙 X) (leftUnitor Y).hom) ≫ fst = map (rightUnitor X).hom (𝟙 Y) ≫ fst

Next tactic:
simp
theorem prod.triangle [HasBinaryProducts C] (X Y : C) :
    (prod.associator X (⊤_ C) Y).hom ≫ prod.map (𝟙 X) (prod.leftUnitor Y).hom =
      prod.map (prod.rightUnitor X).hom (𝟙 Y) :=
  by ext <;> 

Proof state:
case h₂
C : Type u
inst✝² : Category.{v, u} C
X✝ Y✝ : C
inst✝¹ : HasTerminal C
inst✝ : HasBinaryProducts C
X Y : C
⊢ ((associator X (⊤_ C) Y).hom ≫ map (𝟙 X) (leftUnitor Y).hom) ≫ snd = map (rightUnitor X).hom (𝟙 Y) ≫ snd

Next tactic:
simp
theorem coprod.pentagon (W X Y Z : C) :
    coprod.map (coprod.associator W X Y).hom (𝟙 Z) ≫
        (coprod.associator W (X ⨿ Y) Z).hom ≫ coprod.map (𝟙 W) (coprod.associator X Y Z).hom =
      (coprod.associator (W ⨿ X) Y Z).hom ≫ (coprod.associator W X (Y ⨿ Z)).hom :=
  by 

Proof state:
C : Type u
inst✝² : Category.{v, u} C
X✝ Y✝ : C
inst✝¹ : Category.{v, u} C
inst✝ : HasBinaryCoproducts C
W X Y Z : C
⊢ map (associator W X Y).hom (𝟙 Z) ≫ (associator W (X ⨿ Y) Z).hom ≫ map (𝟙 W) (associator X Y Z).hom =
    (associator (W ⨿ X) Y Z).hom ≫ (associator W X (Y ⨿ Z)).hom

Next tactic:
simp
theorem coprod.associator_naturality {X₁ X₂ X₃ Y₁ Y₂ Y₃ : C} (f₁ : X₁ ⟶ Y₁) (f₂ : X₂ ⟶ Y₂)
    (f₃ : X₃ ⟶ Y₃) :
    coprod.map (coprod.map f₁ f₂) f₃ ≫ (coprod.associator Y₁ Y₂ Y₃).hom =
      (coprod.associator X₁ X₂ X₃).hom ≫ coprod.map f₁ (coprod.map f₂ f₃) :=
  by 

Proof state:
C : Type u
inst✝² : Category.{v, u} C
X Y : C
inst✝¹ : Category.{v, u} C
inst✝ : HasBinaryCoproducts C
X₁ X₂ X₃ Y₁ Y₂ Y₃ : C
f₁ : X₁ ⟶ Y₁
f₂ : X₂ ⟶ Y₂
f₃ : X₃ ⟶ Y₃
⊢ map (map f₁ f₂) f₃ ≫ (associator Y₁ Y₂ Y₃).hom = (associator X₁ X₂ X₃).hom ≫ map f₁ (map f₂ f₃)

Next tactic:
simp
/-- The left unitor isomorphism for binary coproducts with the initial object. -/
@[simps]
def coprod.leftUnitor (P : C) : (⊥_ C) ⨿ P ≅ P where
  hom := coprod.desc (initial.to P) (𝟙 _)
  inv := coprod.inr
  hom_inv_id := by 

Proof state:
C : Type u
inst✝³ : Category.{v, u} C
X Y : C
inst✝² : Category.{v, u} C
inst✝¹ : HasBinaryCoproducts C
inst✝ : HasInitial C
P : C
⊢ desc (initial.to P) (𝟙 P) ≫ inr = 𝟙 ((⊥_ C) ⨿ P)

Next tactic:
apply coprod.hom_ext
/-- The left unitor isomorphism for binary coproducts with the initial object. -/
@[simps]
def coprod.leftUnitor (P : C) : (⊥_ C) ⨿ P ≅ P where
  hom := coprod.desc (initial.to P) (𝟙 _)
  inv := coprod.inr
  hom_inv_id := by apply coprod.hom_ext <;> 

Proof state:
case h₁
C : Type u
inst✝³ : Category.{v, u} C
X Y : C
inst✝² : Category.{v, u} C
inst✝¹ : HasBinaryCoproducts C
inst✝ : HasInitial C
P : C
⊢ inl ≫ desc (initial.to P) (𝟙 P) ≫ inr = inl ≫ 𝟙 ((⊥_ C) ⨿ P)

Next tactic:
simp [eq_iff_true_of_subsingleton]
/-- The left unitor isomorphism for binary coproducts with the initial object. -/
@[simps]
def coprod.leftUnitor (P : C) : (⊥_ C) ⨿ P ≅ P where
  hom := coprod.desc (initial.to P) (𝟙 _)
  inv := coprod.inr
  hom_inv_id := by apply coprod.hom_ext <;> 

Proof state:
case h₂
C : Type u
inst✝³ : Category.{v, u} C
X Y : C
inst✝² : Category.{v, u} C
inst✝¹ : HasBinaryCoproducts C
inst✝ : HasInitial C
P : C
⊢ inr ≫ desc (initial.to P) (𝟙 P) ≫ inr = inr ≫ 𝟙 ((⊥_ C) ⨿ P)

Next tactic:
simp [eq_iff_true_of_subsingleton]
/-- The left unitor isomorphism for binary coproducts with the initial object. -/
@[simps]
def coprod.leftUnitor (P : C) : (⊥_ C) ⨿ P ≅ P where
  hom := coprod.desc (initial.to P) (𝟙 _)
  inv := coprod.inr
  hom_inv_id := by apply coprod.hom_ext <;> simp [eq_iff_true_of_subsingleton]
  inv_hom_id := by 

Proof state:
C : Type u
inst✝³ : Category.{v, u} C
X Y : C
inst✝² : Category.{v, u} C
inst✝¹ : HasBinaryCoproducts C
inst✝ : HasInitial C
P : C
⊢ inr ≫ desc (initial.to P) (𝟙 P) = 𝟙 P

Next tactic:
simp
/-- The right unitor isomorphism for binary coproducts with the initial object. -/
@[simps]
def coprod.rightUnitor (P : C) : P ⨿ ⊥_ C ≅ P where
  hom := coprod.desc (𝟙 _) (initial.to P)
  inv := coprod.inl
  hom_inv_id := by 

Proof state:
C : Type u
inst✝³ : Category.{v, u} C
X Y : C
inst✝² : Category.{v, u} C
inst✝¹ : HasBinaryCoproducts C
inst✝ : HasInitial C
P : C
⊢ desc (𝟙 P) (initial.to P) ≫ inl = 𝟙 (P ⨿ ⊥_ C)

Next tactic:
apply coprod.hom_ext
/-- The right unitor isomorphism for binary coproducts with the initial object. -/
@[simps]
def coprod.rightUnitor (P : C) : P ⨿ ⊥_ C ≅ P where
  hom := coprod.desc (𝟙 _) (initial.to P)
  inv := coprod.inl
  hom_inv_id := by apply coprod.hom_ext <;> 

Proof state:
case h₁
C : Type u
inst✝³ : Category.{v, u} C
X Y : C
inst✝² : Category.{v, u} C
inst✝¹ : HasBinaryCoproducts C
inst✝ : HasInitial C
P : C
⊢ inl ≫ desc (𝟙 P) (initial.to P) ≫ inl = inl ≫ 𝟙 (P ⨿ ⊥_ C)

Next tactic:
simp [eq_iff_true_of_subsingleton]
/-- The right unitor isomorphism for binary coproducts with the initial object. -/
@[simps]
def coprod.rightUnitor (P : C) : P ⨿ ⊥_ C ≅ P where
  hom := coprod.desc (𝟙 _) (initial.to P)
  inv := coprod.inl
  hom_inv_id := by apply coprod.hom_ext <;> 

Proof state:
case h₂
C : Type u
inst✝³ : Category.{v, u} C
X Y : C
inst✝² : Category.{v, u} C
inst✝¹ : HasBinaryCoproducts C
inst✝ : HasInitial C
P : C
⊢ inr ≫ desc (𝟙 P) (initial.to P) ≫ inl = inr ≫ 𝟙 (P ⨿ ⊥_ C)

Next tactic:
simp [eq_iff_true_of_subsingleton]
/-- The right unitor isomorphism for binary coproducts with the initial object. -/
@[simps]
def coprod.rightUnitor (P : C) : P ⨿ ⊥_ C ≅ P where
  hom := coprod.desc (𝟙 _) (initial.to P)
  inv := coprod.inl
  hom_inv_id := by apply coprod.hom_ext <;> simp [eq_iff_true_of_subsingleton]
  inv_hom_id := by 

Proof state:
C : Type u
inst✝³ : Category.{v, u} C
X Y : C
inst✝² : Category.{v, u} C
inst✝¹ : HasBinaryCoproducts C
inst✝ : HasInitial C
P : C
⊢ inl ≫ desc (𝟙 P) (initial.to P) = 𝟙 P

Next tactic:
simp
theorem coprod.triangle (X Y : C) :
    (coprod.associator X (⊥_ C) Y).hom ≫ coprod.map (𝟙 X) (coprod.leftUnitor Y).hom =
      coprod.map (coprod.rightUnitor X).hom (𝟙 Y) :=
  by 

Proof state:
C : Type u
inst✝³ : Category.{v, u} C
X✝ Y✝ : C
inst✝² : Category.{v, u} C
inst✝¹ : HasBinaryCoproducts C
inst✝ : HasInitial C
X Y : C
⊢ (associator X (⊥_ C) Y).hom ≫ map (𝟙 X) (leftUnitor Y).hom = map (rightUnitor X).hom (𝟙 Y)

Next tactic:
ext
theorem coprod.triangle (X Y : C) :
    (coprod.associator X (⊥_ C) Y).hom ≫ coprod.map (𝟙 X) (coprod.leftUnitor Y).hom =
      coprod.map (coprod.rightUnitor X).hom (𝟙 Y) :=
  by ext <;> 

Proof state:
case h₁.h₁
C : Type u
inst✝³ : Category.{v, u} C
X✝ Y✝ : C
inst✝² : Category.{v, u} C
inst✝¹ : HasBinaryCoproducts C
inst✝ : HasInitial C
X Y : C
⊢ inl ≫ inl ≫ (associator X (⊥_ C) Y).hom ≫ map (𝟙 X) (leftUnitor Y).hom = inl ≫ inl ≫ map (rightUnitor X).hom (𝟙 Y)

Next tactic:
simp
theorem coprod.triangle (X Y : C) :
    (coprod.associator X (⊥_ C) Y).hom ≫ coprod.map (𝟙 X) (coprod.leftUnitor Y).hom =
      coprod.map (coprod.rightUnitor X).hom (𝟙 Y) :=
  by ext <;> 

Proof state:
case h₁.h₂.w
C : Type u
inst✝³ : Category.{v, u} C
X✝ Y✝ : C
inst✝² : Category.{v, u} C
inst✝¹ : HasBinaryCoproducts C
inst✝ : HasInitial C
X Y : C
j✝ : Discrete PEmpty.{1}
⊢ colimit.ι (Functor.empty C) j✝ ≫ inr ≫ inl ≫ (associator X (⊥_ C) Y).hom ≫ map (𝟙 X) (leftUnitor Y).hom =
    colimit.ι (Functor.empty C) j✝ ≫ inr ≫ inl ≫ map (rightUnitor X).hom (𝟙 Y)

Next tactic:
simp
theorem coprod.triangle (X Y : C) :
    (coprod.associator X (⊥_ C) Y).hom ≫ coprod.map (𝟙 X) (coprod.leftUnitor Y).hom =
      coprod.map (coprod.rightUnitor X).hom (𝟙 Y) :=
  by ext <;> 

Proof state:
case h₂
C : Type u
inst✝³ : Category.{v, u} C
X✝ Y✝ : C
inst✝² : Category.{v, u} C
inst✝¹ : HasBinaryCoproducts C
inst✝ : HasInitial C
X Y : C
⊢ inr ≫ (associator X (⊥_ C) Y).hom ≫ map (𝟙 X) (leftUnitor Y).hom = inr ≫ map (rightUnitor X).hom (𝟙 Y)

Next tactic:
simp
/-- Naturality of the `prodComparison` morphism in both arguments. -/
@[reassoc]
theorem prodComparison_natural (f : A ⟶ A') (g : B ⟶ B') :
    F.map (prod.map f g) ≫ prodComparison F A' B' =
      prodComparison F A B ≫ prod.map (F.map f) (F.map g) := by
  

Proof state:
C : Type u
inst✝⁵ : Category.{v, u} C
X Y : C
D : Type u₂
inst✝⁴ : Category.{w, u₂} D
F : C ⥤ D
A A' B B' : C
inst✝³ : HasBinaryProduct A B
inst✝² : HasBinaryProduct A' B'
inst✝¹ : HasBinaryProduct (F.obj A) (F.obj B)
inst✝ : HasBinaryProduct (F.obj A') (F.obj B')
f : A ⟶ A'
g : B ⟶ B'
⊢ F.map (prod.map f g) ≫ prodComparison F A' B' = prodComparison F A B ≫ prod.map (F.map f) (F.map g)

Next tactic:
rw [prodComparison, prodComparison, prod.lift_map, ← F.map_comp, ← F.map_comp, prod.comp_lift, ←
    F.map_comp, prod.map_fst, ← F.map_comp, prod.map_snd]
/-- The product comparison morphism from `F(A ⨯ -)` to `FA ⨯ F-`, whose components are given by
`prodComparison`.
-/
@[simps]
def prodComparisonNatTrans [HasBinaryProducts C] [HasBinaryProducts D] (F : C ⥤ D) (A : C) :
    prod.functor.obj A ⋙ F ⟶ F ⋙ prod.functor.obj (F.obj A)
    where
  app B := prodComparison F A B
  naturality f := by 

Proof state:
C : Type u
inst✝⁷ : Category.{v, u} C
X Y : C
D : Type u₂
inst✝⁶ : Category.{w, u₂} D
F✝ : C ⥤ D
A✝ A' B B' : C
inst✝⁵ : HasBinaryProduct A✝ B
inst✝⁴ : HasBinaryProduct A' B'
inst✝³ : HasBinaryProduct (F✝.obj A✝) (F✝.obj B)
inst✝² : HasBinaryProduct (F✝.obj A') (F✝.obj B')
inst✝¹ : HasBinaryProducts C
inst✝ : HasBinaryProducts D
F : C ⥤ D
A f : C
⊢ ∀ ⦃Y : C⦄ (f_1 : f ⟶ Y),
    (prod.functor.obj A ⋙ F).map f_1 ≫ (fun B => prodComparison F A B) Y =
      (fun B => prodComparison F A B) f ≫ (F ⋙ prod.functor.obj (F.obj A)).map f_1

Next tactic:
simp [prodComparison_natural]
@[reassoc]
theorem inv_prodComparison_map_fst [IsIso (prodComparison F A B)] :
    inv (prodComparison F A B) ≫ F.map prod.fst = prod.fst := by 

Proof state:
C : Type u
inst✝⁶ : Category.{v, u} C
X Y : C
D : Type u₂
inst✝⁵ : Category.{w, u₂} D
F : C ⥤ D
A A' B B' : C
inst✝⁴ : HasBinaryProduct A B
inst✝³ : HasBinaryProduct A' B'
inst✝² : HasBinaryProduct (F.obj A) (F.obj B)
inst✝¹ : HasBinaryProduct (F.obj A') (F.obj B')
inst✝ : IsIso (prodComparison F A B)
⊢ inv (prodComparison F A B) ≫ F.map prod.fst = prod.fst

Next tactic:
simp [IsIso.inv_comp_eq]
@[reassoc]
theorem inv_prodComparison_map_snd [IsIso (prodComparison F A B)] :
    inv (prodComparison F A B) ≫ F.map prod.snd = prod.snd := by 

Proof state:
C : Type u
inst✝⁶ : Category.{v, u} C
X Y : C
D : Type u₂
inst✝⁵ : Category.{w, u₂} D
F : C ⥤ D
A A' B B' : C
inst✝⁴ : HasBinaryProduct A B
inst✝³ : HasBinaryProduct A' B'
inst✝² : HasBinaryProduct (F.obj A) (F.obj B)
inst✝¹ : HasBinaryProduct (F.obj A') (F.obj B')
inst✝ : IsIso (prodComparison F A B)
⊢ inv (prodComparison F A B) ≫ F.map prod.snd = prod.snd

Next tactic:
simp [IsIso.inv_comp_eq]
/-- If the product comparison morphism is an iso, its inverse is natural. -/
@[reassoc]
theorem prodComparison_inv_natural (f : A ⟶ A') (g : B ⟶ B') [IsIso (prodComparison F A B)]
    [IsIso (prodComparison F A' B')] :
    inv (prodComparison F A B) ≫ F.map (prod.map f g) =
      prod.map (F.map f) (F.map g) ≫ inv (prodComparison F A' B') :=
  by 

Proof state:
C : Type u
inst✝⁷ : Category.{v, u} C
X Y : C
D : Type u₂
inst✝⁶ : Category.{w, u₂} D
F : C ⥤ D
A A' B B' : C
inst✝⁵ : HasBinaryProduct A B
inst✝⁴ : HasBinaryProduct A' B'
inst✝³ : HasBinaryProduct (F.obj A) (F.obj B)
inst✝² : HasBinaryProduct (F.obj A') (F.obj B')
f : A ⟶ A'
g : B ⟶ B'
inst✝¹ : IsIso (prodComparison F A B)
inst✝ : IsIso (prodComparison F A' B')
⊢ inv (prodComparison F A B) ≫ F.map (prod.map f g) = prod.map (F.map f) (F.map g) ≫ inv (prodComparison F A' B')

Next tactic:
rw [IsIso.eq_comp_inv, Category.assoc, IsIso.inv_comp_eq, prodComparison_natural]
/-- The natural isomorphism `F(A ⨯ -) ≅ FA ⨯ F-`, provided each `prodComparison F A B` is an
isomorphism (as `B` changes).
-/
-- @[simps (config := { rhsMd := semireducible })] -- Porting note: no config for semireducible
@[simps]
def prodComparisonNatIso [HasBinaryProducts C] [HasBinaryProducts D] (A : C)
    [∀ B, IsIso (prodComparison F A B)] :
    prod.functor.obj A ⋙ F ≅ F ⋙ prod.functor.obj (F.obj A) := by
  

Proof state:
C : Type u
inst✝⁸ : Category.{v, u} C
X Y : C
D : Type u₂
inst✝⁷ : Category.{w, u₂} D
F : C ⥤ D
A✝ A' B B' : C
inst✝⁶ : HasBinaryProduct A✝ B
inst✝⁵ : HasBinaryProduct A' B'
inst✝⁴ : HasBinaryProduct (F.obj A✝) (F.obj B)
inst✝³ : HasBinaryProduct (F.obj A') (F.obj B')
inst✝² : HasBinaryProducts C
inst✝¹ : HasBinaryProducts D
A : C
inst✝ : ∀ (B : C), IsIso (prodComparison F A B)
⊢ prod.functor.obj A ⋙ F ≅ F ⋙ prod.functor.obj (F.obj A)

Next tactic:
refine { @asIso _ _ _ _ _ (?_) with hom := prodComparisonNatTrans F A }
/-- The natural isomorphism `F(A ⨯ -) ≅ FA ⨯ F-`, provided each `prodComparison F A B` is an
isomorphism (as `B` changes).
-/
-- @[simps (config := { rhsMd := semireducible })] -- Porting note: no config for semireducible
@[simps]
def prodComparisonNatIso [HasBinaryProducts C] [HasBinaryProducts D] (A : C)
    [∀ B, IsIso (prodComparison F A B)] :
    prod.functor.obj A ⋙ F ≅ F ⋙ prod.functor.obj (F.obj A) := by
  refine { @asIso _ _ _ _ _ (?_) with hom := prodComparisonNatTrans F A }
  

Proof state:
C : Type u
inst✝⁸ : Category.{v, u} C
X Y : C
D : Type u₂
inst✝⁷ : Category.{w, u₂} D
F : C ⥤ D
A✝ A' B B' : C
inst✝⁶ : HasBinaryProduct A✝ B
inst✝⁵ : HasBinaryProduct A' B'
inst✝⁴ : HasBinaryProduct (F.obj A✝) (F.obj B)
inst✝³ : HasBinaryProduct (F.obj A') (F.obj B')
inst✝² : HasBinaryProducts C
inst✝¹ : HasBinaryProducts D
A : C
inst✝ : ∀ (B : C), IsIso (prodComparison F A B)
⊢ IsIso (NatTrans.mk fun B => prodComparison F A B)

Next tactic:
apply NatIso.isIso_of_isIso_app
/-- Naturality of the coprod_comparison morphism in both arguments. -/
@[reassoc]
theorem coprodComparison_natural (f : A ⟶ A') (g : B ⟶ B') :
    coprodComparison F A B ≫ F.map (coprod.map f g) =
      coprod.map (F.map f) (F.map g) ≫ coprodComparison F A' B' := by
  

Proof state:
C : Type u
inst✝⁵ : Category.{v, u} C
X Y : C
D : Type u₂
inst✝⁴ : Category.{w, u₂} D
F : C ⥤ D
A A' B B' : C
inst✝³ : HasBinaryCoproduct A B
inst✝² : HasBinaryCoproduct A' B'
inst✝¹ : HasBinaryCoproduct (F.obj A) (F.obj B)
inst✝ : HasBinaryCoproduct (F.obj A') (F.obj B')
f : A ⟶ A'
g : B ⟶ B'
⊢ coprodComparison F A B ≫ F.map (coprod.map f g) = coprod.map (F.map f) (F.map g) ≫ coprodComparison F A' B'

Next tactic:
rw [coprodComparison, coprodComparison, coprod.map_desc, ← F.map_comp, ← F.map_comp,
    coprod.desc_comp, ← F.map_comp, coprod.inl_map, ← F.map_comp, coprod.inr_map]
/-- The coproduct comparison morphism from `FA ⨿ F-` to `F(A ⨿ -)`, whose components are given by
`coprodComparison`.
-/
@[simps]
def coprodComparisonNatTrans [HasBinaryCoproducts C] [HasBinaryCoproducts D] (F : C ⥤ D) (A : C) :
    F ⋙ coprod.functor.obj (F.obj A) ⟶ coprod.functor.obj A ⋙ F where
  app B := coprodComparison F A B
  naturality f := by 

Proof state:
C : Type u
inst✝⁷ : Category.{v, u} C
X Y : C
D : Type u₂
inst✝⁶ : Category.{w, u₂} D
F✝ : C ⥤ D
A✝ A' B B' : C
inst✝⁵ : HasBinaryCoproduct A✝ B
inst✝⁴ : HasBinaryCoproduct A' B'
inst✝³ : HasBinaryCoproduct (F✝.obj A✝) (F✝.obj B)
inst✝² : HasBinaryCoproduct (F✝.obj A') (F✝.obj B')
inst✝¹ : HasBinaryCoproducts C
inst✝ : HasBinaryCoproducts D
F : C ⥤ D
A f : C
⊢ ∀ ⦃Y : C⦄ (f_1 : f ⟶ Y),
    (F ⋙ coprod.functor.obj (F.obj A)).map f_1 ≫ (fun B => coprodComparison F A B) Y =
      (fun B => coprodComparison F A B) f ≫ (coprod.functor.obj A ⋙ F).map f_1

Next tactic:
simp [coprodComparison_natural]
@[reassoc]
theorem map_inl_inv_coprodComparison [IsIso (coprodComparison F A B)] :
    F.map coprod.inl ≫ inv (coprodComparison F A B) = coprod.inl := by 

Proof state:
C : Type u
inst✝⁶ : Category.{v, u} C
X Y : C
D : Type u₂
inst✝⁵ : Category.{w, u₂} D
F : C ⥤ D
A A' B B' : C
inst✝⁴ : HasBinaryCoproduct A B
inst✝³ : HasBinaryCoproduct A' B'
inst✝² : HasBinaryCoproduct (F.obj A) (F.obj B)
inst✝¹ : HasBinaryCoproduct (F.obj A') (F.obj B')
inst✝ : IsIso (coprodComparison F A B)
⊢ F.map coprod.inl ≫ inv (coprodComparison F A B) = coprod.inl

Next tactic:
simp [IsIso.inv_comp_eq]
@[reassoc]
theorem map_inr_inv_coprodComparison [IsIso (coprodComparison F A B)] :
    F.map coprod.inr ≫ inv (coprodComparison F A B) = coprod.inr := by 

Proof state:
C : Type u
inst✝⁶ : Category.{v, u} C
X Y : C
D : Type u₂
inst✝⁵ : Category.{w, u₂} D
F : C ⥤ D
A A' B B' : C
inst✝⁴ : HasBinaryCoproduct A B
inst✝³ : HasBinaryCoproduct A' B'
inst✝² : HasBinaryCoproduct (F.obj A) (F.obj B)
inst✝¹ : HasBinaryCoproduct (F.obj A') (F.obj B')
inst✝ : IsIso (coprodComparison F A B)
⊢ F.map coprod.inr ≫ inv (coprodComparison F A B) = coprod.inr

Next tactic:
simp [IsIso.inv_comp_eq]
/-- If the coproduct comparison morphism is an iso, its inverse is natural. -/
@[reassoc]
theorem coprodComparison_inv_natural (f : A ⟶ A') (g : B ⟶ B') [IsIso (coprodComparison F A B)]
    [IsIso (coprodComparison F A' B')] :
    inv (coprodComparison F A B) ≫ coprod.map (F.map f) (F.map g) =
      F.map (coprod.map f g) ≫ inv (coprodComparison F A' B') :=
  by 

Proof state:
C : Type u
inst✝⁷ : Category.{v, u} C
X Y : C
D : Type u₂
inst✝⁶ : Category.{w, u₂} D
F : C ⥤ D
A A' B B' : C
inst✝⁵ : HasBinaryCoproduct A B
inst✝⁴ : HasBinaryCoproduct A' B'
inst✝³ : HasBinaryCoproduct (F.obj A) (F.obj B)
inst✝² : HasBinaryCoproduct (F.obj A') (F.obj B')
f : A ⟶ A'
g : B ⟶ B'
inst✝¹ : IsIso (coprodComparison F A B)
inst✝ : IsIso (coprodComparison F A' B')
⊢ inv (coprodComparison F A B) ≫ coprod.map (F.map f) (F.map g) =
    F.map (coprod.map f g) ≫ inv (coprodComparison F A' B')

Next tactic:
rw [IsIso.eq_comp_inv, Category.assoc, IsIso.inv_comp_eq, coprodComparison_natural]
/-- The natural isomorphism `FA ⨿ F- ≅ F(A ⨿ -)`, provided each `coprodComparison F A B` is an
isomorphism (as `B` changes).
-/
-- @[simps (config := { rhsMd := semireducible })] -- Porting note: no config for semireducible
@[simps]
def coprodComparisonNatIso [HasBinaryCoproducts C] [HasBinaryCoproducts D] (A : C)
    [∀ B, IsIso (coprodComparison F A B)] :
    F ⋙ coprod.functor.obj (F.obj A) ≅ coprod.functor.obj A ⋙ F := by
  

Proof state:
C : Type u
inst✝⁸ : Category.{v, u} C
X Y : C
D : Type u₂
inst✝⁷ : Category.{w, u₂} D
F : C ⥤ D
A✝ A' B B' : C
inst✝⁶ : HasBinaryCoproduct A✝ B
inst✝⁵ : HasBinaryCoproduct A' B'
inst✝⁴ : HasBinaryCoproduct (F.obj A✝) (F.obj B)
inst✝³ : HasBinaryCoproduct (F.obj A') (F.obj B')
inst✝² : HasBinaryCoproducts C
inst✝¹ : HasBinaryCoproducts D
A : C
inst✝ : ∀ (B : C), IsIso (coprodComparison F A B)
⊢ F ⋙ coprod.functor.obj (F.obj A) ≅ coprod.functor.obj A ⋙ F

Next tactic:
refine { @asIso _ _ _ _ _ (?_) with hom := coprodComparisonNatTrans F A }
/-- The natural isomorphism `FA ⨿ F- ≅ F(A ⨿ -)`, provided each `coprodComparison F A B` is an
isomorphism (as `B` changes).
-/
-- @[simps (config := { rhsMd := semireducible })] -- Porting note: no config for semireducible
@[simps]
def coprodComparisonNatIso [HasBinaryCoproducts C] [HasBinaryCoproducts D] (A : C)
    [∀ B, IsIso (coprodComparison F A B)] :
    F ⋙ coprod.functor.obj (F.obj A) ≅ coprod.functor.obj A ⋙ F := by
  refine { @asIso _ _ _ _ _ (?_) with hom := coprodComparisonNatTrans F A }
  

Proof state:
C : Type u
inst✝⁸ : Category.{v, u} C
X Y : C
D : Type u₂
inst✝⁷ : Category.{w, u₂} D
F : C ⥤ D
A✝ A' B B' : C
inst✝⁶ : HasBinaryCoproduct A✝ B
inst✝⁵ : HasBinaryCoproduct A' B'
inst✝⁴ : HasBinaryCoproduct (F.obj A✝) (F.obj B)
inst✝³ : HasBinaryCoproduct (F.obj A') (F.obj B')
inst✝² : HasBinaryCoproducts C
inst✝¹ : HasBinaryCoproducts D
A : C
inst✝ : ∀ (B : C), IsIso (coprodComparison F A B)
⊢ IsIso (NatTrans.mk fun B => coprodComparison F A B)

Next tactic:
apply NatIso.isIso_of_isIso_app
/-- A category with binary coproducts has a functorial `sup` operation on over categories. -/
@[simps]
def Over.coprod [HasBinaryCoproducts C] {A : C} : Over A ⥤ Over A ⥤ Over A where
  obj f := Over.coprodObj f
  map k :=
    { app := fun g => Over.homMk (coprod.map k.left (𝟙 _)) (by
        

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasBinaryCoproducts C
A : C
X✝ Y✝ : Over A
k : X✝ ⟶ Y✝
g : Over A
⊢ coprod.map k.left (𝟙 ((𝟭 C).obj g.left)) ≫ (((fun f => coprodObj f) Y✝).obj g).hom =
    (((fun f => coprodObj f) X✝).obj g).hom

Next tactic:
dsimp
/-- A category with binary coproducts has a functorial `sup` operation on over categories. -/
@[simps]
def Over.coprod [HasBinaryCoproducts C] {A : C} : Over A ⥤ Over A ⥤ Over A where
  obj f := Over.coprodObj f
  map k :=
    { app := fun g => Over.homMk (coprod.map k.left (𝟙 _)) (by
        dsimp; 

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasBinaryCoproducts C
A : C
X✝ Y✝ : Over A
k : X✝ ⟶ Y✝
g : Over A
⊢ coprod.map k.left (𝟙 g.left) ≫ coprod.desc Y✝.hom g.hom = coprod.desc X✝.hom g.hom

Next tactic:
rw [coprod.map_desc, Category.id_comp, Over.w k]
/-- A category with binary coproducts has a functorial `sup` operation on over categories. -/
@[simps]
def Over.coprod [HasBinaryCoproducts C] {A : C} : Over A ⥤ Over A ⥤ Over A where
  obj f := Over.coprodObj f
  map k :=
    { app := fun g => Over.homMk (coprod.map k.left (𝟙 _)) (by
        dsimp; rw [coprod.map_desc, Category.id_comp, Over.w k])
      naturality := fun f g k => by
        

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasBinaryCoproducts C
A : C
X✝ Y✝ : Over A
k✝ : X✝ ⟶ Y✝
f g : Over A
k : f ⟶ g
⊢ ((fun f => coprodObj f) X✝).map k ≫ (fun g => homMk (coprod.map k✝.left (𝟙 ((𝟭 C).obj g.left)))) g =
    (fun g => homMk (coprod.map k✝.left (𝟙 ((𝟭 C).obj g.left)))) f ≫ ((fun f => coprodObj f) Y✝).map k

Next tactic:
ext
/-- A category with binary coproducts has a functorial `sup` operation on over categories. -/
@[simps]
def Over.coprod [HasBinaryCoproducts C] {A : C} : Over A ⥤ Over A ⥤ Over A where
  obj f := Over.coprodObj f
  map k :=
    { app := fun g => Over.homMk (coprod.map k.left (𝟙 _)) (by
        dsimp; rw [coprod.map_desc, Category.id_comp, Over.w k])
      naturality := fun f g k => by
        ext;
          · 

Proof state:
case h
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasBinaryCoproducts C
A : C
X✝ Y✝ : Over A
k✝ : X✝ ⟶ Y✝
f g : Over A
k : f ⟶ g
⊢ (((fun f => coprodObj f) X✝).map k ≫ (fun g => homMk (coprod.map k✝.left (𝟙 ((𝟭 C).obj g.left)))) g).left =
    ((fun g => homMk (coprod.map k✝.left (𝟙 ((𝟭 C).obj g.left)))) f ≫ ((fun f => coprodObj f) Y✝).map k).left

Next tactic:
dsimp
/-- A category with binary coproducts has a functorial `sup` operation on over categories. -/
@[simps]
def Over.coprod [HasBinaryCoproducts C] {A : C} : Over A ⥤ Over A ⥤ Over A where
  obj f := Over.coprodObj f
  map k :=
    { app := fun g => Over.homMk (coprod.map k.left (𝟙 _)) (by
        dsimp; rw [coprod.map_desc, Category.id_comp, Over.w k])
      naturality := fun f g k => by
        ext;
          · dsimp; 

Proof state:
case h
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasBinaryCoproducts C
A : C
X✝ Y✝ : Over A
k✝ : X✝ ⟶ Y✝
f g : Over A
k : f ⟶ g
⊢ coprod.map (𝟙 X✝.left) k.left ≫ coprod.map k✝.left (𝟙 g.left) =
    coprod.map k✝.left (𝟙 f.left) ≫ coprod.map (𝟙 Y✝.left) k.left

Next tactic:
simp