/-- (Implementation) An auxiliary lemma for the proof that `TopCat` is finitary extensive. -/
-- Porting note : needs to add noncomputable modifier
noncomputable def finitaryExtensiveTopCatAux (Z : TopCat.{u})
    (f : Z ⟶ TopCat.of (Sum PUnit.{u + 1} PUnit.{u + 1})) :
    IsColimit (BinaryCofan.mk
      (TopCat.pullbackFst f (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)).inl)
      (TopCat.pullbackFst f (TopCat.binaryCofan (TopCat.of PUnit) (TopCat.of PUnit)).inr)) := by
  have : ∀ x, f x = Sum.inl PUnit.unit ∨ f x = Sum.inr PUnit.unit := by
    intro x
    rcases f x with (⟨⟨⟩⟩ | ⟨⟨⟩⟩)
    exacts [Or.inl rfl, Or.inr rfl]
  letI eX : { p : Z × PUnit // f p.fst = Sum.inl p.snd } ≃ { x : Z // f x = Sum.inl PUnit.unit } :=
    ⟨fun p => ⟨p.1.1, p.2.trans (congr_arg Sum.inl <| Subsingleton.elim _ _)⟩,
      fun x => ⟨⟨_, PUnit.unit⟩, x.2⟩, fun _ => by ext; rfl, fun _ => by ext; rfl⟩
  letI eY : { p : Z × PUnit // f p.fst = Sum.inr p.snd } ≃ { x : Z // f x = Sum.inr PUnit.unit } :=
    ⟨fun p => ⟨p.1.1, p.2.trans (congr_arg Sum.inr <| Subsingleton.elim _ _)⟩,
      fun x => ⟨⟨_, PUnit.unit⟩, x.2⟩, fun _ => by ext; rfl, fun _ => by ext; rfl⟩
  

Proof state:
J : Type v'
inst✝² : Category.{u', v'} J
C : Type u
inst✝¹ : Category.{v, u} C
D : Type u''
inst✝ : Category.{v'', u''} D
X Y : C
Z : TopCat
f : Z ⟶ TopCat.of (PUnit.{u + 1} ⊕ PUnit.{u + 1})
this : ∀ (x : (forget TopCat).obj Z), f x = Sum.inl PUnit.unit ∨ f x = Sum.inr PUnit.unit
eX : { p // f p.1 = Sum.inl p.2 } ≃ { x // f x = Sum.inl PUnit.unit } :=
  { toFun := fun p => { val := (↑p).1, property := (_ : f (↑p).1 = Sum.inl PUnit.unit) },
    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) },
    left_inv :=
      (_ :
        ∀ (x : { p // f p.1 = Sum.inl p.2 }),
          (fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) })
              ((fun p => { val := (↑p).1, property := (_ : f (↑p).1 = Sum.inl PUnit.unit) }) x) =
            x),
    right_inv :=
      (_ :
        ∀ (x : { x // f x = Sum.inl PUnit.unit }),
          (fun p => { val := (↑p).1, property := (_ : f (↑p).1 = Sum.inl PUnit.unit) })
              ((fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inl PUnit.unit) }) x) =
            x) }
eY : { p // f p.1 = Sum.inr p.2 } ≃ { x // f x = Sum.inr PUnit.unit } :=
  { toFun := fun p => { val := (↑p).1, property := (_ : f (↑p).1 = Sum.inr PUnit.unit) },
    invFun := fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) },
    left_inv :=
      (_ :
        ∀ (x : { p // f p.1 = Sum.inr p.2 }),
          (fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) })
              ((fun p => { val := (↑p).1, property := (_ : f (↑p).1 = Sum.inr PUnit.unit) }) x) =
            x),
    right_inv :=
      (_ :
        ∀ (x : { x // f x = Sum.inr PUnit.unit }),
          (fun p => { val := (↑p).1, property := (_ : f (↑p).1 = Sum.inr PUnit.unit) })
              ((fun x => { val := (x.1, PUnit.unit), property := (_ : f ↑x = Sum.inr PUnit.unit) }) x) =
            x) }
⊢ IsColimit
    (BinaryCofan.mk
      (TopCat.pullbackFst f (BinaryCofan.inl (TopCat.binaryCofan (TopCat.of PUnit.{u + 1}) (TopCat.of PUnit.{u + 1}))))
      (TopCat.pullbackFst f (BinaryCofan.inr (TopCat.binaryCofan (TopCat.of PUnit.{u + 1}) (TopCat.of PUnit.{u + 1})))))

Next tactic:
fapply BinaryCofan.isColimitMk