/-- If a functor preserves coequalizers and the appropriate coproducts, it preserves colimits. -/
noncomputable def preservesColimitOfPreservesCoequalizersAndCoproduct :
    PreservesColimitsOfShape J G where
  preservesColimit {K} := by
    let P := ∐ K.obj
    let Q := ∐ fun f : Σp : J × J, p.fst ⟶ p.snd => K.obj f.1.1
    let s : Q ⟶ P := Sigma.desc fun f => K.map f.2 ≫ colimit.ι (Discrete.functor K.obj) ⟨_⟩
    let t : Q ⟶ P := Sigma.desc fun f => colimit.ι (Discrete.functor K.obj) ⟨f.1.1⟩
    let I := coequalizer s t
    let i : P ⟶ I := coequalizer.π s t
    apply
      preservesColimitOfPreservesColimitCocone
        (buildIsColimit s t (by simp) (by simp) (colimit.isColimit _) (colimit.isColimit _)
          (colimit.isColimit _))
    refine' IsColimit.ofIsoColimit (buildIsColimit _ _ _ _ _ _ _) _
    · refine Cofan.mk (G.obj Q) fun j => G.map ?_
      apply Sigma.ι _ j
    -- fun j => G.map (Sigma.ι _ j)
    · exact Cofan.mk _ fun f => G.map (Sigma.ι _ f)
    · apply G.map s
    · apply G.map t
    · intro f
      dsimp [Cofan.mk]
      simp only [← G.map_comp, colimit.ι_desc]
      congr
    · intro f
      dsimp [Cofan.mk]
      simp only [← G.map_comp, colimit.ι_desc]
      dsimp
    · refine Cofork.ofπ (G.map i) ?_
      rw [← G.map_comp, ← G.map_comp]
      apply congrArg G.map
      apply coequalizer.condition
    · apply isColimitOfHasCoproductOfPreservesColimit
    · apply isColimitOfHasCoproductOfPreservesColimit
    · apply isColimitCoforkMapOfIsColimit
      apply coequalizerIsCoequalizer
    refine' Cocones.ext (Iso.refl _) _
    intro j
    

Proof state:
case refine'_11
C : Type u
inst✝⁸ : Category.{v, u} C
J : Type w
inst✝⁷ : SmallCategory J
D : Type u₂
inst✝⁶ : Category.{v₂, u₂} D
inst✝⁵ : HasColimitsOfShape (Discrete J) C
inst✝⁴ : HasColimitsOfShape (Discrete ((p : J × J) × (p.1 ⟶ p.2))) C
inst✝³ : HasCoequalizers C
G : C ⥤ D
inst✝² : PreservesColimitsOfShape WalkingParallelPair G
inst✝¹ : PreservesColimitsOfShape (Discrete J) G
inst✝ : PreservesColimitsOfShape (Discrete ((p : J × J) × (p.1 ⟶ p.2))) G
K : J ⥤ C
P : C := ∐ K.obj
Q : C := ∐ fun f => K.obj f.fst.1
s : Q ⟶ P := Sigma.desc fun f => K.map f.snd ≫ colimit.ι (Discrete.functor K.obj) { as := f.fst.2 }
t : Q ⟶ P := Sigma.desc fun f => colimit.ι (Discrete.functor K.obj) { as := f.fst.1 }
I : C := coequalizer s t
i : P ⟶ I := coequalizer.π s t
j : J
⊢ (buildColimit (G.map s) (G.map t)
              (_ :
                ∀ (f : (p : J × J) × (p.1 ⟶ p.2)),
                  (Cofan.mk (G.obj Q) fun j => G.map (Sigma.ι (fun j => K.obj j.fst.1) j)).ι.app { as := f } ≫ G.map s =
                    (K ⋙ G).map f.snd ≫
                      (Cofan.mk (G.obj (∐ K.obj)) fun f => G.map (Sigma.ι K.obj f)).ι.app { as := f.fst.2 })
              (_ :
                ∀ (f : (p : J × J) × (p.1 ⟶ p.2)),
                  (Cofan.mk (G.obj Q) fun j => G.map (Sigma.ι (fun j => K.obj j.fst.1) j)).ι.app { as := f } ≫ G.map t =
                    (Cofan.mk (G.obj (∐ K.obj)) fun f => G.map (Sigma.ι K.obj f)).ι.app { as := f.fst.1 })
              (Cofork.ofπ (G.map i) (_ : G.map s ≫ G.map i = G.map t ≫ G.map i))).ι.app
        j ≫
      (Iso.refl
          (buildColimit (G.map s) (G.map t)
              (_ :
                ∀ (f : (p : J × J) × (p.1 ⟶ p.2)),
                  (Cofan.mk (G.obj Q) fun j => G.map (Sigma.ι (fun j => K.obj j.fst.1) j)).ι.app { as := f } ≫ G.map s =
                    (K ⋙ G).map f.snd ≫
                      (Cofan.mk (G.obj (∐ K.obj)) fun f => G.map (Sigma.ι K.obj f)).ι.app { as := f.fst.2 })
              (_ :
                ∀ (f : (p : J × J) × (p.1 ⟶ p.2)),
                  (Cofan.mk (G.obj Q) fun j => G.map (Sigma.ι (fun j => K.obj j.fst.1) j)).ι.app { as := f } ≫ G.map t =
                    (Cofan.mk (G.obj (∐ K.obj)) fun f => G.map (Sigma.ι K.obj f)).ι.app { as := f.fst.1 })
              (Cofork.ofπ (G.map i) (_ : G.map s ≫ G.map i = G.map t ≫ G.map i))).pt).hom =
    (G.mapCocone
            (buildColimit s t
              (_ :
                ∀ (a : (p : J × J) × (p.1 ⟶ p.2)),
                  colimit.ι (Discrete.functor fun f => K.obj f.fst.1) { as := a } ≫
                      colimit.desc (Discrete.functor fun f => K.obj f.fst.1)
                        (Cofan.mk (∐ K.obj) fun f =>
                          K.map f.snd ≫ colimit.ι (Discrete.functor K.obj) { as := f.fst.2 }) =
                    K.map a.snd ≫ colimit.ι (Discrete.functor K.obj) { as := a.fst.2 })
              (_ :
                ∀ (a : (p : J × J) × (p.1 ⟶ p.2)),
                  colimit.ι (Discrete.functor fun f => K.obj f.fst.1) { as := a } ≫
                      colimit.desc (Discrete.functor fun f => K.obj f.fst.1)
                        (Cofan.mk (∐ K.obj) fun f => colimit.ι (Discrete.functor K.obj) { as := f.fst.1 }) =
                    colimit.ι (Discrete.functor K.obj) { as := a.fst.1 })
              (colimit.cocone (parallelPair s t)))).ι.app
      j

Next tactic:
dsimp