/-- The plus construction, associating a presheaf to any presheaf.
See `plusFunctor` below for a functorial version. -/
def plusObj : Cᵒᵖ ⥤ D where
  obj X := colimit (J.diagram P X.unop)
  map f := colimMap (J.diagramPullback P f.unop) ≫ colimit.pre _ _
  map_id := by
    intro X
    refine' colimit.hom_ext (fun S => _)
    dsimp
    simp only [diagramPullback_app, colimit.ι_pre, ι_colimMap_assoc, Category.comp_id]
    let e := S.unop.pullbackId
    dsimp only [Functor.op, pullback_obj]
    erw [← colimit.w _ e.inv.op, ← Category.assoc]
    convert Category.id_comp (colimit.ι (diagram J P (unop X)) S)
    refine' Multiequalizer.hom_ext _ _ _ (fun I => _)
    dsimp
    simp only [Multiequalizer.lift_ι, Category.id_comp, Category.assoc]
    dsimp [Cover.Arrow.map, Cover.Arrow.base]
    cases I
    congr
    simp
  map_comp := by
    intro X Y Z f g
    refine' colimit.hom_ext (fun S => _)
    dsimp
    simp only [diagramPullback_app, colimit.ι_pre_assoc, colimit.ι_pre, ι_colimMap_assoc,
      Category.assoc]
    let e := S.unop.pullbackComp g.unop f.unop
    dsimp only [Functor.op, pullback_obj]
    erw [← colimit.w _ e.inv.op, ← Category.assoc, ← Category.assoc]
    congr 1
    refine' Multiequalizer.hom_ext _ _ _ (fun I => _)
    dsimp
    

Proof state:
case e_a
C : Type u
inst✝³ : Category.{v, u} C
J : GrothendieckTopology C
D : Type w
inst✝² : Category.{max v u, w} D
inst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)
P : Cᵒᵖ ⥤ D
inst✝ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D
X Y Z : Cᵒᵖ
f : X ⟶ Y
g : Y ⟶ Z
S : (Cover J X.unop)ᵒᵖ
e : Cover.pullback S.unop (g.unop ≫ f.unop) ≅ Cover.pullback (Cover.pullback S.unop f.unop) g.unop :=
  Cover.pullbackComp S.unop g.unop f.unop
I : (Cover.index (op (Cover.pullback (Cover.pullback S.unop f.unop) g.unop)).unop P).L
⊢ (Multiequalizer.lift (Cover.index (Cover.pullback S.unop (g.unop ≫ f.unop)) P) (multiequalizer (Cover.index S.unop P))
          (fun I => Multiequalizer.ι (Cover.index S.unop P) (Cover.Arrow.base I))
          (_ :
            ∀ (I : (Cover.index ((pullback J (g.unop ≫ f.unop)).op.obj S).unop P).R),
              Multiequalizer.ι (Cover.index S.unop P)
                    (MulticospanIndex.fstTo (Cover.index S.unop P) (Cover.Relation.base I)) ≫
                  MulticospanIndex.fst (Cover.index S.unop P) (Cover.Relation.base I) =
                Multiequalizer.ι (Cover.index S.unop P)
                    (MulticospanIndex.sndTo (Cover.index S.unop P) (Cover.Relation.base I)) ≫
                  MulticospanIndex.snd (Cover.index S.unop P) (Cover.Relation.base I)) ≫
        Multiequalizer.lift (Cover.index (Cover.pullback (Cover.pullback S.unop f.unop) g.unop) P)
          (multiequalizer (Cover.index (Cover.pullback S.unop (g.unop ≫ f.unop)) P))
          (fun I =>
            Multiequalizer.ι (Cover.index (Cover.pullback S.unop (g.unop ≫ f.unop)) P)
              (Cover.Arrow.map I (Cover.pullbackComp S.unop g.unop f.unop).inv))
          (_ :
            ∀ (I : (Cover.index (op (Cover.pullback (Cover.pullback S.unop f.unop) g.unop)).unop P).R),
              Multiequalizer.ι (Cover.index (op (Cover.pullback S.unop (g.unop ≫ f.unop))).unop P)
                    (MulticospanIndex.fstTo (Cover.index (op (Cover.pullback S.unop (g.unop ≫ f.unop))).unop P)
                      (Cover.Relation.map I (Cover.pullbackComp S.unop g.unop f.unop).inv.op.unop)) ≫
                  MulticospanIndex.fst (Cover.index (op (Cover.pullback S.unop (g.unop ≫ f.unop))).unop P)
                    (Cover.Relation.map I (Cover.pullbackComp S.unop g.unop f.unop).inv.op.unop) =
                Multiequalizer.ι (Cover.index (op (Cover.pullback S.unop (g.unop ≫ f.unop))).unop P)
                    (MulticospanIndex.sndTo (Cover.index (op (Cover.pullback S.unop (g.unop ≫ f.unop))).unop P)
                      (Cover.Relation.map I (Cover.pullbackComp S.unop g.unop f.unop).inv.op.unop)) ≫
                  MulticospanIndex.snd (Cover.index (op (Cover.pullback S.unop (g.unop ≫ f.unop))).unop P)
                    (Cover.Relation.map I (Cover.pullbackComp S.unop g.unop f.unop).inv.op.unop))) ≫
      Multiequalizer.ι (Cover.index (Cover.pullback (Cover.pullback S.unop f.unop) g.unop) P) I =
    (Multiequalizer.lift (Cover.index (Cover.pullback S.unop f.unop) P) (multiequalizer (Cover.index S.unop P))
          (fun I => Multiequalizer.ι (Cover.index S.unop P) (Cover.Arrow.base I))
          (_ :
            ∀ (I : (Cover.index ((pullback J f.unop).op.obj S).unop P).R),
              Multiequalizer.ι (Cover.index S.unop P)
                    (MulticospanIndex.fstTo (Cover.index S.unop P) (Cover.Relation.base I)) ≫
                  MulticospanIndex.fst (Cover.index S.unop P) (Cover.Relation.base I) =
                Multiequalizer.ι (Cover.index S.unop P)
                    (MulticospanIndex.sndTo (Cover.index S.unop P) (Cover.Relation.base I)) ≫
                  MulticospanIndex.snd (Cover.index S.unop P) (Cover.Relation.base I)) ≫
        Multiequalizer.lift (Cover.index (Cover.pullback (Cover.pullback S.unop f.unop) g.unop) P)
          (multiequalizer (Cover.index (Cover.pullback S.unop f.unop) P))
          (fun I => Multiequalizer.ι (Cover.index (Cover.pullback S.unop f.unop) P) (Cover.Arrow.base I))
          (_ :
            ∀ (I : (Cover.index ((pullback J g.unop).op.obj (op (Cover.pullback S.unop f.unop))).unop P).R),
              Multiequalizer.ι (Cover.index (op (Cover.pullback S.unop f.unop)).unop P)
                    (MulticospanIndex.fstTo (Cover.index (op (Cover.pullback S.unop f.unop)).unop P)
                      (Cover.Relation.base I)) ≫
                  MulticospanIndex.fst (Cover.index (op (Cover.pullback S.unop f.unop)).unop P)
                    (Cover.Relation.base I) =
                Multiequalizer.ι (Cover.index (op (Cover.pullback S.unop f.unop)).unop P)
                    (MulticospanIndex.sndTo (Cover.index (op (Cover.pullback S.unop f.unop)).unop P)
                      (Cover.Relation.base I)) ≫
                  MulticospanIndex.snd (Cover.index (op (Cover.pullback S.unop f.unop)).unop P)
                    (Cover.Relation.base I))) ≫
      Multiequalizer.ι (Cover.index (Cover.pullback (Cover.pullback S.unop f.unop) g.unop) P) I

Next tactic:
simp only [Multiequalizer.lift_ι, Category.assoc]