l3lab/ntp-mathlib huggingface dataset:
theorem is_coprod_iff_isPushout {X E Y YE : C} (c : BinaryCofan X E) (hc : IsColimit c) {f : X ⟶ Y}
    {iY : Y ⟶ YE} {fE : c.pt ⟶ YE} (H : CommSq f c.inl iY fE) :
    Nonempty (IsColimit (BinaryCofan.mk (c.inr ≫ fE) iY)) ↔ IsPushout f c.inl iY fE := by
  constructor
  · rintro ⟨h⟩
    refine' ⟨H, ⟨Limits.PushoutCocone.isColimitAux' _ _⟩⟩
    intro s
    dsimp only [PushoutCocone.inr, PushoutCocone.mk] -- Porting note: Originally `dsimp`
    refine' ⟨h.desc (BinaryCofan.mk (c.inr ≫ s.inr) s.inl), h.fac _ ⟨WalkingPair.right⟩, _, _⟩
    · apply BinaryCofan.IsColimit.hom_ext hc
      · rw [← H.w_assoc]; erw [h.fac _ ⟨WalkingPair.right⟩]; exact s.condition
      · rw [← Category.assoc]; exact h.fac _ ⟨WalkingPair.left⟩
    · intro m e₁ e₂
      apply BinaryCofan.IsColimit.hom_ext h
      · dsimp only [BinaryCofan.mk, id] -- Porting note: Originally `dsimp`
        rw [Category.assoc, e₂, eq_comm]; exact h.fac _ ⟨WalkingPair.left⟩
      · refine' e₁.trans (Eq.symm _); exact h.fac _ _
  · refine' fun H => ⟨_⟩
    fapply Limits.BinaryCofan.isColimitMk
    · exact fun s => H.isColimit.desc (PushoutCocone.mk s.inr _ <|
        (hc.fac (BinaryCofan.mk (f ≫ s.inr) s.inl) ⟨WalkingPair.left⟩).symm)
    · intro s
      

Proof state:
case mpr.fac_left
J : Type v'
inst✝¹ : Category.{u', v'} J
C : Type u
inst✝ : Category.{v, u} C
W X✝ Y✝ Z : C
f✝ : W ⟶ X✝
g : W ⟶ Y✝
h : X✝ ⟶ Z
i : Y✝ ⟶ Z
X E Y YE : C
c : BinaryCofan X E
hc : IsColimit c
f : X ⟶ Y
iY : Y ⟶ YE
fE : c.pt ⟶ YE
H✝ : CommSq f (BinaryCofan.inl c) iY fE
H : IsPushout f (BinaryCofan.inl c) iY fE
s : BinaryCofan ((pair X E).obj { as := WalkingPair.right }) Y
⊢ (BinaryCofan.inr c ≫ fE) ≫
      IsColimit.desc (IsPushout.isColimit H)
        (PushoutCocone.mk (BinaryCofan.inr s)
          (IsColimit.desc hc (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)))
          (_ :
            (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)).ι.app { as := WalkingPair.left } =
              c.ι.app { as := WalkingPair.left } ≫
                IsColimit.desc hc (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)))) =
    BinaryCofan.inl s

Next tactic:
erw [Category.assoc, H.isColimit.fac _ WalkingSpan.right, hc.fac]
theorem is_coprod_iff_isPushout {X E Y YE : C} (c : BinaryCofan X E) (hc : IsColimit c) {f : X ⟶ Y}
    {iY : Y ⟶ YE} {fE : c.pt ⟶ YE} (H : CommSq f c.inl iY fE) :
    Nonempty (IsColimit (BinaryCofan.mk (c.inr ≫ fE) iY)) ↔ IsPushout f c.inl iY fE := by
  constructor
  · rintro ⟨h⟩
    refine' ⟨H, ⟨Limits.PushoutCocone.isColimitAux' _ _⟩⟩
    intro s
    dsimp only [PushoutCocone.inr, PushoutCocone.mk] -- Porting note: Originally `dsimp`
    refine' ⟨h.desc (BinaryCofan.mk (c.inr ≫ s.inr) s.inl), h.fac _ ⟨WalkingPair.right⟩, _, _⟩
    · apply BinaryCofan.IsColimit.hom_ext hc
      · rw [← H.w_assoc]; erw [h.fac _ ⟨WalkingPair.right⟩]; exact s.condition
      · rw [← Category.assoc]; exact h.fac _ ⟨WalkingPair.left⟩
    · intro m e₁ e₂
      apply BinaryCofan.IsColimit.hom_ext h
      · dsimp only [BinaryCofan.mk, id] -- Porting note: Originally `dsimp`
        rw [Category.assoc, e₂, eq_comm]; exact h.fac _ ⟨WalkingPair.left⟩
      · refine' e₁.trans (Eq.symm _); exact h.fac _ _
  · refine' fun H => ⟨_⟩
    fapply Limits.BinaryCofan.isColimitMk
    · exact fun s => H.isColimit.desc (PushoutCocone.mk s.inr _ <|
        (hc.fac (BinaryCofan.mk (f ≫ s.inr) s.inl) ⟨WalkingPair.left⟩).symm)
    · intro s
      erw [Category.assoc, H.isColimit.fac _ WalkingSpan.right, hc.fac]; 

Proof state:
case mpr.fac_left
J : Type v'
inst✝¹ : Category.{u', v'} J
C : Type u
inst✝ : Category.{v, u} C
W X✝ Y✝ Z : C
f✝ : W ⟶ X✝
g : W ⟶ Y✝
h : X✝ ⟶ Z
i : Y✝ ⟶ Z
X E Y YE : C
c : BinaryCofan X E
hc : IsColimit c
f : X ⟶ Y
iY : Y ⟶ YE
fE : c.pt ⟶ YE
H✝ : CommSq f (BinaryCofan.inl c) iY fE
H : IsPushout f (BinaryCofan.inl c) iY fE
s : BinaryCofan ((pair X E).obj { as := WalkingPair.right }) Y
⊢ (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)).ι.app { as := WalkingPair.right } = BinaryCofan.inl s

Next tactic:
rfl
theorem is_coprod_iff_isPushout {X E Y YE : C} (c : BinaryCofan X E) (hc : IsColimit c) {f : X ⟶ Y}
    {iY : Y ⟶ YE} {fE : c.pt ⟶ YE} (H : CommSq f c.inl iY fE) :
    Nonempty (IsColimit (BinaryCofan.mk (c.inr ≫ fE) iY)) ↔ IsPushout f c.inl iY fE := by
  constructor
  · rintro ⟨h⟩
    refine' ⟨H, ⟨Limits.PushoutCocone.isColimitAux' _ _⟩⟩
    intro s
    dsimp only [PushoutCocone.inr, PushoutCocone.mk] -- Porting note: Originally `dsimp`
    refine' ⟨h.desc (BinaryCofan.mk (c.inr ≫ s.inr) s.inl), h.fac _ ⟨WalkingPair.right⟩, _, _⟩
    · apply BinaryCofan.IsColimit.hom_ext hc
      · rw [← H.w_assoc]; erw [h.fac _ ⟨WalkingPair.right⟩]; exact s.condition
      · rw [← Category.assoc]; exact h.fac _ ⟨WalkingPair.left⟩
    · intro m e₁ e₂
      apply BinaryCofan.IsColimit.hom_ext h
      · dsimp only [BinaryCofan.mk, id] -- Porting note: Originally `dsimp`
        rw [Category.assoc, e₂, eq_comm]; exact h.fac _ ⟨WalkingPair.left⟩
      · refine' e₁.trans (Eq.symm _); exact h.fac _ _
  · refine' fun H => ⟨_⟩
    fapply Limits.BinaryCofan.isColimitMk
    · exact fun s => H.isColimit.desc (PushoutCocone.mk s.inr _ <|
        (hc.fac (BinaryCofan.mk (f ≫ s.inr) s.inl) ⟨WalkingPair.left⟩).symm)
    · intro s
      erw [Category.assoc, H.isColimit.fac _ WalkingSpan.right, hc.fac]; rfl
    · 

Proof state:
case mpr.fac_right
J : Type v'
inst✝¹ : Category.{u', v'} J
C : Type u
inst✝ : Category.{v, u} C
W X✝ Y✝ Z : C
f✝ : W ⟶ X✝
g : W ⟶ Y✝
h : X✝ ⟶ Z
i : Y✝ ⟶ Z
X E Y YE : C
c : BinaryCofan X E
hc : IsColimit c
f : X ⟶ Y
iY : Y ⟶ YE
fE : c.pt ⟶ YE
H✝ : CommSq f (BinaryCofan.inl c) iY fE
H : IsPushout f (BinaryCofan.inl c) iY fE
⊢ ∀ (s : BinaryCofan ((pair X E).obj { as := WalkingPair.right }) Y),
    iY ≫
        IsColimit.desc (IsPushout.isColimit H)
          (PushoutCocone.mk (BinaryCofan.inr s)
            (IsColimit.desc hc (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)))
            (_ :
              (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)).ι.app { as := WalkingPair.left } =
                c.ι.app { as := WalkingPair.left } ≫
                  IsColimit.desc hc (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)))) =
      BinaryCofan.inr s

Next tactic:
intro s
theorem is_coprod_iff_isPushout {X E Y YE : C} (c : BinaryCofan X E) (hc : IsColimit c) {f : X ⟶ Y}
    {iY : Y ⟶ YE} {fE : c.pt ⟶ YE} (H : CommSq f c.inl iY fE) :
    Nonempty (IsColimit (BinaryCofan.mk (c.inr ≫ fE) iY)) ↔ IsPushout f c.inl iY fE := by
  constructor
  · rintro ⟨h⟩
    refine' ⟨H, ⟨Limits.PushoutCocone.isColimitAux' _ _⟩⟩
    intro s
    dsimp only [PushoutCocone.inr, PushoutCocone.mk] -- Porting note: Originally `dsimp`
    refine' ⟨h.desc (BinaryCofan.mk (c.inr ≫ s.inr) s.inl), h.fac _ ⟨WalkingPair.right⟩, _, _⟩
    · apply BinaryCofan.IsColimit.hom_ext hc
      · rw [← H.w_assoc]; erw [h.fac _ ⟨WalkingPair.right⟩]; exact s.condition
      · rw [← Category.assoc]; exact h.fac _ ⟨WalkingPair.left⟩
    · intro m e₁ e₂
      apply BinaryCofan.IsColimit.hom_ext h
      · dsimp only [BinaryCofan.mk, id] -- Porting note: Originally `dsimp`
        rw [Category.assoc, e₂, eq_comm]; exact h.fac _ ⟨WalkingPair.left⟩
      · refine' e₁.trans (Eq.symm _); exact h.fac _ _
  · refine' fun H => ⟨_⟩
    fapply Limits.BinaryCofan.isColimitMk
    · exact fun s => H.isColimit.desc (PushoutCocone.mk s.inr _ <|
        (hc.fac (BinaryCofan.mk (f ≫ s.inr) s.inl) ⟨WalkingPair.left⟩).symm)
    · intro s
      erw [Category.assoc, H.isColimit.fac _ WalkingSpan.right, hc.fac]; rfl
    · intro s; 

Proof state:
case mpr.fac_right
J : Type v'
inst✝¹ : Category.{u', v'} J
C : Type u
inst✝ : Category.{v, u} C
W X✝ Y✝ Z : C
f✝ : W ⟶ X✝
g : W ⟶ Y✝
h : X✝ ⟶ Z
i : Y✝ ⟶ Z
X E Y YE : C
c : BinaryCofan X E
hc : IsColimit c
f : X ⟶ Y
iY : Y ⟶ YE
fE : c.pt ⟶ YE
H✝ : CommSq f (BinaryCofan.inl c) iY fE
H : IsPushout f (BinaryCofan.inl c) iY fE
s : BinaryCofan ((pair X E).obj { as := WalkingPair.right }) Y
⊢ iY ≫
      IsColimit.desc (IsPushout.isColimit H)
        (PushoutCocone.mk (BinaryCofan.inr s)
          (IsColimit.desc hc (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)))
          (_ :
            (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)).ι.app { as := WalkingPair.left } =
              c.ι.app { as := WalkingPair.left } ≫
                IsColimit.desc hc (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)))) =
    BinaryCofan.inr s

Next tactic:
exact H.isColimit.fac _ WalkingSpan.left
theorem is_coprod_iff_isPushout {X E Y YE : C} (c : BinaryCofan X E) (hc : IsColimit c) {f : X ⟶ Y}
    {iY : Y ⟶ YE} {fE : c.pt ⟶ YE} (H : CommSq f c.inl iY fE) :
    Nonempty (IsColimit (BinaryCofan.mk (c.inr ≫ fE) iY)) ↔ IsPushout f c.inl iY fE := by
  constructor
  · rintro ⟨h⟩
    refine' ⟨H, ⟨Limits.PushoutCocone.isColimitAux' _ _⟩⟩
    intro s
    dsimp only [PushoutCocone.inr, PushoutCocone.mk] -- Porting note: Originally `dsimp`
    refine' ⟨h.desc (BinaryCofan.mk (c.inr ≫ s.inr) s.inl), h.fac _ ⟨WalkingPair.right⟩, _, _⟩
    · apply BinaryCofan.IsColimit.hom_ext hc
      · rw [← H.w_assoc]; erw [h.fac _ ⟨WalkingPair.right⟩]; exact s.condition
      · rw [← Category.assoc]; exact h.fac _ ⟨WalkingPair.left⟩
    · intro m e₁ e₂
      apply BinaryCofan.IsColimit.hom_ext h
      · dsimp only [BinaryCofan.mk, id] -- Porting note: Originally `dsimp`
        rw [Category.assoc, e₂, eq_comm]; exact h.fac _ ⟨WalkingPair.left⟩
      · refine' e₁.trans (Eq.symm _); exact h.fac _ _
  · refine' fun H => ⟨_⟩
    fapply Limits.BinaryCofan.isColimitMk
    · exact fun s => H.isColimit.desc (PushoutCocone.mk s.inr _ <|
        (hc.fac (BinaryCofan.mk (f ≫ s.inr) s.inl) ⟨WalkingPair.left⟩).symm)
    · intro s
      erw [Category.assoc, H.isColimit.fac _ WalkingSpan.right, hc.fac]; rfl
    · intro s; exact H.isColimit.fac _ WalkingSpan.left
    · 

Proof state:
case mpr.uniq
J : Type v'
inst✝¹ : Category.{u', v'} J
C : Type u
inst✝ : Category.{v, u} C
W X✝ Y✝ Z : C
f✝ : W ⟶ X✝
g : W ⟶ Y✝
h : X✝ ⟶ Z
i : Y✝ ⟶ Z
X E Y YE : C
c : BinaryCofan X E
hc : IsColimit c
f : X ⟶ Y
iY : Y ⟶ YE
fE : c.pt ⟶ YE
H✝ : CommSq f (BinaryCofan.inl c) iY fE
H : IsPushout f (BinaryCofan.inl c) iY fE
⊢ ∀ (s : BinaryCofan ((pair X E).obj { as := WalkingPair.right }) Y) (m : YE ⟶ s.pt),
    (BinaryCofan.inr c ≫ fE) ≫ m = BinaryCofan.inl s →
      iY ≫ m = BinaryCofan.inr s →
        m =
          IsColimit.desc (IsPushout.isColimit H)
            (PushoutCocone.mk (BinaryCofan.inr s)
              (IsColimit.desc hc (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)))
              (_ :
                (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)).ι.app { as := WalkingPair.left } =
                  c.ι.app { as := WalkingPair.left } ≫
                    IsColimit.desc hc (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s))))

Next tactic:
intro s m e₁ e₂
theorem is_coprod_iff_isPushout {X E Y YE : C} (c : BinaryCofan X E) (hc : IsColimit c) {f : X ⟶ Y}
    {iY : Y ⟶ YE} {fE : c.pt ⟶ YE} (H : CommSq f c.inl iY fE) :
    Nonempty (IsColimit (BinaryCofan.mk (c.inr ≫ fE) iY)) ↔ IsPushout f c.inl iY fE := by
  constructor
  · rintro ⟨h⟩
    refine' ⟨H, ⟨Limits.PushoutCocone.isColimitAux' _ _⟩⟩
    intro s
    dsimp only [PushoutCocone.inr, PushoutCocone.mk] -- Porting note: Originally `dsimp`
    refine' ⟨h.desc (BinaryCofan.mk (c.inr ≫ s.inr) s.inl), h.fac _ ⟨WalkingPair.right⟩, _, _⟩
    · apply BinaryCofan.IsColimit.hom_ext hc
      · rw [← H.w_assoc]; erw [h.fac _ ⟨WalkingPair.right⟩]; exact s.condition
      · rw [← Category.assoc]; exact h.fac _ ⟨WalkingPair.left⟩
    · intro m e₁ e₂
      apply BinaryCofan.IsColimit.hom_ext h
      · dsimp only [BinaryCofan.mk, id] -- Porting note: Originally `dsimp`
        rw [Category.assoc, e₂, eq_comm]; exact h.fac _ ⟨WalkingPair.left⟩
      · refine' e₁.trans (Eq.symm _); exact h.fac _ _
  · refine' fun H => ⟨_⟩
    fapply Limits.BinaryCofan.isColimitMk
    · exact fun s => H.isColimit.desc (PushoutCocone.mk s.inr _ <|
        (hc.fac (BinaryCofan.mk (f ≫ s.inr) s.inl) ⟨WalkingPair.left⟩).symm)
    · intro s
      erw [Category.assoc, H.isColimit.fac _ WalkingSpan.right, hc.fac]; rfl
    · intro s; exact H.isColimit.fac _ WalkingSpan.left
    · intro s m e₁ e₂
      

Proof state:
case mpr.uniq
J : Type v'
inst✝¹ : Category.{u', v'} J
C : Type u
inst✝ : Category.{v, u} C
W X✝ Y✝ Z : C
f✝ : W ⟶ X✝
g : W ⟶ Y✝
h : X✝ ⟶ Z
i : Y✝ ⟶ Z
X E Y YE : C
c : BinaryCofan X E
hc : IsColimit c
f : X ⟶ Y
iY : Y ⟶ YE
fE : c.pt ⟶ YE
H✝ : CommSq f (BinaryCofan.inl c) iY fE
H : IsPushout f (BinaryCofan.inl c) iY fE
s : BinaryCofan ((pair X E).obj { as := WalkingPair.right }) Y
m : YE ⟶ s.pt
e₁ : (BinaryCofan.inr c ≫ fE) ≫ m = BinaryCofan.inl s
e₂ : iY ≫ m = BinaryCofan.inr s
⊢ m =
    IsColimit.desc (IsPushout.isColimit H)
      (PushoutCocone.mk (BinaryCofan.inr s)
        (IsColimit.desc hc (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)))
        (_ :
          (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)).ι.app { as := WalkingPair.left } =
            c.ι.app { as := WalkingPair.left } ≫
              IsColimit.desc hc (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s))))

Next tactic:
apply PushoutCocone.IsColimit.hom_ext H.isColimit
theorem is_coprod_iff_isPushout {X E Y YE : C} (c : BinaryCofan X E) (hc : IsColimit c) {f : X ⟶ Y}
    {iY : Y ⟶ YE} {fE : c.pt ⟶ YE} (H : CommSq f c.inl iY fE) :
    Nonempty (IsColimit (BinaryCofan.mk (c.inr ≫ fE) iY)) ↔ IsPushout f c.inl iY fE := by
  constructor
  · rintro ⟨h⟩
    refine' ⟨H, ⟨Limits.PushoutCocone.isColimitAux' _ _⟩⟩
    intro s
    dsimp only [PushoutCocone.inr, PushoutCocone.mk] -- Porting note: Originally `dsimp`
    refine' ⟨h.desc (BinaryCofan.mk (c.inr ≫ s.inr) s.inl), h.fac _ ⟨WalkingPair.right⟩, _, _⟩
    · apply BinaryCofan.IsColimit.hom_ext hc
      · rw [← H.w_assoc]; erw [h.fac _ ⟨WalkingPair.right⟩]; exact s.condition
      · rw [← Category.assoc]; exact h.fac _ ⟨WalkingPair.left⟩
    · intro m e₁ e₂
      apply BinaryCofan.IsColimit.hom_ext h
      · dsimp only [BinaryCofan.mk, id] -- Porting note: Originally `dsimp`
        rw [Category.assoc, e₂, eq_comm]; exact h.fac _ ⟨WalkingPair.left⟩
      · refine' e₁.trans (Eq.symm _); exact h.fac _ _
  · refine' fun H => ⟨_⟩
    fapply Limits.BinaryCofan.isColimitMk
    · exact fun s => H.isColimit.desc (PushoutCocone.mk s.inr _ <|
        (hc.fac (BinaryCofan.mk (f ≫ s.inr) s.inl) ⟨WalkingPair.left⟩).symm)
    · intro s
      erw [Category.assoc, H.isColimit.fac _ WalkingSpan.right, hc.fac]; rfl
    · intro s; exact H.isColimit.fac _ WalkingSpan.left
    · intro s m e₁ e₂
      apply PushoutCocone.IsColimit.hom_ext H.isColimit
      · 

Proof state:
case mpr.uniq.h₀
J : Type v'
inst✝¹ : Category.{u', v'} J
C : Type u
inst✝ : Category.{v, u} C
W X✝ Y✝ Z : C
f✝ : W ⟶ X✝
g : W ⟶ Y✝
h : X✝ ⟶ Z
i : Y✝ ⟶ Z
X E Y YE : C
c : BinaryCofan X E
hc : IsColimit c
f : X ⟶ Y
iY : Y ⟶ YE
fE : c.pt ⟶ YE
H✝ : CommSq f (BinaryCofan.inl c) iY fE
H : IsPushout f (BinaryCofan.inl c) iY fE
s : BinaryCofan ((pair X E).obj { as := WalkingPair.right }) Y
m : YE ⟶ s.pt
e₁ : (BinaryCofan.inr c ≫ fE) ≫ m = BinaryCofan.inl s
e₂ : iY ≫ m = BinaryCofan.inr s
⊢ PushoutCocone.inl (IsPushout.cocone H) ≫ m =
    PushoutCocone.inl (IsPushout.cocone H) ≫
      IsColimit.desc (IsPushout.isColimit H)
        (PushoutCocone.mk (BinaryCofan.inr s)
          (IsColimit.desc hc (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)))
          (_ :
            (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)).ι.app { as := WalkingPair.left } =
              c.ι.app { as := WalkingPair.left } ≫
                IsColimit.desc hc (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s))))

Next tactic:
symm
theorem is_coprod_iff_isPushout {X E Y YE : C} (c : BinaryCofan X E) (hc : IsColimit c) {f : X ⟶ Y}
    {iY : Y ⟶ YE} {fE : c.pt ⟶ YE} (H : CommSq f c.inl iY fE) :
    Nonempty (IsColimit (BinaryCofan.mk (c.inr ≫ fE) iY)) ↔ IsPushout f c.inl iY fE := by
  constructor
  · rintro ⟨h⟩
    refine' ⟨H, ⟨Limits.PushoutCocone.isColimitAux' _ _⟩⟩
    intro s
    dsimp only [PushoutCocone.inr, PushoutCocone.mk] -- Porting note: Originally `dsimp`
    refine' ⟨h.desc (BinaryCofan.mk (c.inr ≫ s.inr) s.inl), h.fac _ ⟨WalkingPair.right⟩, _, _⟩
    · apply BinaryCofan.IsColimit.hom_ext hc
      · rw [← H.w_assoc]; erw [h.fac _ ⟨WalkingPair.right⟩]; exact s.condition
      · rw [← Category.assoc]; exact h.fac _ ⟨WalkingPair.left⟩
    · intro m e₁ e₂
      apply BinaryCofan.IsColimit.hom_ext h
      · dsimp only [BinaryCofan.mk, id] -- Porting note: Originally `dsimp`
        rw [Category.assoc, e₂, eq_comm]; exact h.fac _ ⟨WalkingPair.left⟩
      · refine' e₁.trans (Eq.symm _); exact h.fac _ _
  · refine' fun H => ⟨_⟩
    fapply Limits.BinaryCofan.isColimitMk
    · exact fun s => H.isColimit.desc (PushoutCocone.mk s.inr _ <|
        (hc.fac (BinaryCofan.mk (f ≫ s.inr) s.inl) ⟨WalkingPair.left⟩).symm)
    · intro s
      erw [Category.assoc, H.isColimit.fac _ WalkingSpan.right, hc.fac]; rfl
    · intro s; exact H.isColimit.fac _ WalkingSpan.left
    · intro s m e₁ e₂
      apply PushoutCocone.IsColimit.hom_ext H.isColimit
      · symm; 

Proof state:
case mpr.uniq.h₀
J : Type v'
inst✝¹ : Category.{u', v'} J
C : Type u
inst✝ : Category.{v, u} C
W X✝ Y✝ Z : C
f✝ : W ⟶ X✝
g : W ⟶ Y✝
h : X✝ ⟶ Z
i : Y✝ ⟶ Z
X E Y YE : C
c : BinaryCofan X E
hc : IsColimit c
f : X ⟶ Y
iY : Y ⟶ YE
fE : c.pt ⟶ YE
H✝ : CommSq f (BinaryCofan.inl c) iY fE
H : IsPushout f (BinaryCofan.inl c) iY fE
s : BinaryCofan ((pair X E).obj { as := WalkingPair.right }) Y
m : YE ⟶ s.pt
e₁ : (BinaryCofan.inr c ≫ fE) ≫ m = BinaryCofan.inl s
e₂ : iY ≫ m = BinaryCofan.inr s
⊢ PushoutCocone.inl (IsPushout.cocone H) ≫
      IsColimit.desc (IsPushout.isColimit H)
        (PushoutCocone.mk (BinaryCofan.inr s)
          (IsColimit.desc hc (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)))
          (_ :
            (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)).ι.app { as := WalkingPair.left } =
              c.ι.app { as := WalkingPair.left } ≫
                IsColimit.desc hc (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)))) =
    PushoutCocone.inl (IsPushout.cocone H) ≫ m

Next tactic:
exact (H.isColimit.fac _ WalkingSpan.left).trans e₂.symm
theorem is_coprod_iff_isPushout {X E Y YE : C} (c : BinaryCofan X E) (hc : IsColimit c) {f : X ⟶ Y}
    {iY : Y ⟶ YE} {fE : c.pt ⟶ YE} (H : CommSq f c.inl iY fE) :
    Nonempty (IsColimit (BinaryCofan.mk (c.inr ≫ fE) iY)) ↔ IsPushout f c.inl iY fE := by
  constructor
  · rintro ⟨h⟩
    refine' ⟨H, ⟨Limits.PushoutCocone.isColimitAux' _ _⟩⟩
    intro s
    dsimp only [PushoutCocone.inr, PushoutCocone.mk] -- Porting note: Originally `dsimp`
    refine' ⟨h.desc (BinaryCofan.mk (c.inr ≫ s.inr) s.inl), h.fac _ ⟨WalkingPair.right⟩, _, _⟩
    · apply BinaryCofan.IsColimit.hom_ext hc
      · rw [← H.w_assoc]; erw [h.fac _ ⟨WalkingPair.right⟩]; exact s.condition
      · rw [← Category.assoc]; exact h.fac _ ⟨WalkingPair.left⟩
    · intro m e₁ e₂
      apply BinaryCofan.IsColimit.hom_ext h
      · dsimp only [BinaryCofan.mk, id] -- Porting note: Originally `dsimp`
        rw [Category.assoc, e₂, eq_comm]; exact h.fac _ ⟨WalkingPair.left⟩
      · refine' e₁.trans (Eq.symm _); exact h.fac _ _
  · refine' fun H => ⟨_⟩
    fapply Limits.BinaryCofan.isColimitMk
    · exact fun s => H.isColimit.desc (PushoutCocone.mk s.inr _ <|
        (hc.fac (BinaryCofan.mk (f ≫ s.inr) s.inl) ⟨WalkingPair.left⟩).symm)
    · intro s
      erw [Category.assoc, H.isColimit.fac _ WalkingSpan.right, hc.fac]; rfl
    · intro s; exact H.isColimit.fac _ WalkingSpan.left
    · intro s m e₁ e₂
      apply PushoutCocone.IsColimit.hom_ext H.isColimit
      · symm; exact (H.isColimit.fac _ WalkingSpan.left).trans e₂.symm
      · 

Proof state:
case mpr.uniq.h₁
J : Type v'
inst✝¹ : Category.{u', v'} J
C : Type u
inst✝ : Category.{v, u} C
W X✝ Y✝ Z : C
f✝ : W ⟶ X✝
g : W ⟶ Y✝
h : X✝ ⟶ Z
i : Y✝ ⟶ Z
X E Y YE : C
c : BinaryCofan X E
hc : IsColimit c
f : X ⟶ Y
iY : Y ⟶ YE
fE : c.pt ⟶ YE
H✝ : CommSq f (BinaryCofan.inl c) iY fE
H : IsPushout f (BinaryCofan.inl c) iY fE
s : BinaryCofan ((pair X E).obj { as := WalkingPair.right }) Y
m : YE ⟶ s.pt
e₁ : (BinaryCofan.inr c ≫ fE) ≫ m = BinaryCofan.inl s
e₂ : iY ≫ m = BinaryCofan.inr s
⊢ PushoutCocone.inr (IsPushout.cocone H) ≫ m =
    PushoutCocone.inr (IsPushout.cocone H) ≫
      IsColimit.desc (IsPushout.isColimit H)
        (PushoutCocone.mk (BinaryCofan.inr s)
          (IsColimit.desc hc (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)))
          (_ :
            (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)).ι.app { as := WalkingPair.left } =
              c.ι.app { as := WalkingPair.left } ≫
                IsColimit.desc hc (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s))))

Next tactic:
erw [H.isColimit.fac _ WalkingSpan.right]
theorem is_coprod_iff_isPushout {X E Y YE : C} (c : BinaryCofan X E) (hc : IsColimit c) {f : X ⟶ Y}
    {iY : Y ⟶ YE} {fE : c.pt ⟶ YE} (H : CommSq f c.inl iY fE) :
    Nonempty (IsColimit (BinaryCofan.mk (c.inr ≫ fE) iY)) ↔ IsPushout f c.inl iY fE := by
  constructor
  · rintro ⟨h⟩
    refine' ⟨H, ⟨Limits.PushoutCocone.isColimitAux' _ _⟩⟩
    intro s
    dsimp only [PushoutCocone.inr, PushoutCocone.mk] -- Porting note: Originally `dsimp`
    refine' ⟨h.desc (BinaryCofan.mk (c.inr ≫ s.inr) s.inl), h.fac _ ⟨WalkingPair.right⟩, _, _⟩
    · apply BinaryCofan.IsColimit.hom_ext hc
      · rw [← H.w_assoc]; erw [h.fac _ ⟨WalkingPair.right⟩]; exact s.condition
      · rw [← Category.assoc]; exact h.fac _ ⟨WalkingPair.left⟩
    · intro m e₁ e₂
      apply BinaryCofan.IsColimit.hom_ext h
      · dsimp only [BinaryCofan.mk, id] -- Porting note: Originally `dsimp`
        rw [Category.assoc, e₂, eq_comm]; exact h.fac _ ⟨WalkingPair.left⟩
      · refine' e₁.trans (Eq.symm _); exact h.fac _ _
  · refine' fun H => ⟨_⟩
    fapply Limits.BinaryCofan.isColimitMk
    · exact fun s => H.isColimit.desc (PushoutCocone.mk s.inr _ <|
        (hc.fac (BinaryCofan.mk (f ≫ s.inr) s.inl) ⟨WalkingPair.left⟩).symm)
    · intro s
      erw [Category.assoc, H.isColimit.fac _ WalkingSpan.right, hc.fac]; rfl
    · intro s; exact H.isColimit.fac _ WalkingSpan.left
    · intro s m e₁ e₂
      apply PushoutCocone.IsColimit.hom_ext H.isColimit
      · symm; exact (H.isColimit.fac _ WalkingSpan.left).trans e₂.symm
      · erw [H.isColimit.fac _ WalkingSpan.right]
        

Proof state:
case mpr.uniq.h₁
J : Type v'
inst✝¹ : Category.{u', v'} J
C : Type u
inst✝ : Category.{v, u} C
W X✝ Y✝ Z : C
f✝ : W ⟶ X✝
g : W ⟶ Y✝
h : X✝ ⟶ Z
i : Y✝ ⟶ Z
X E Y YE : C
c : BinaryCofan X E
hc : IsColimit c
f : X ⟶ Y
iY : Y ⟶ YE
fE : c.pt ⟶ YE
H✝ : CommSq f (BinaryCofan.inl c) iY fE
H : IsPushout f (BinaryCofan.inl c) iY fE
s : BinaryCofan ((pair X E).obj { as := WalkingPair.right }) Y
m : YE ⟶ s.pt
e₁ : (BinaryCofan.inr c ≫ fE) ≫ m = BinaryCofan.inl s
e₂ : iY ≫ m = BinaryCofan.inr s
⊢ PushoutCocone.inr (IsPushout.cocone H) ≫ m =
    (PushoutCocone.mk (BinaryCofan.inr s)
            (IsColimit.desc hc (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)))
            (_ :
              (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)).ι.app { as := WalkingPair.left } =
                c.ι.app { as := WalkingPair.left } ≫
                  IsColimit.desc hc (BinaryCofan.mk (f ≫ BinaryCofan.inr s) (BinaryCofan.inl s)))).ι.app
      WalkingSpan.right

Next tactic:
apply BinaryCofan.IsColimit.hom_ext hc