l3lab/ntp-mathlib huggingface dataset:
/-- 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 => _)
    

Proof state:
case h.e'_2.h.h.e'_6.h
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 : Cᵒᵖ
S : (Cover J X.unop)ᵒᵖ
e : Cover.pullback S.unop (𝟙 X.unop) ≅ S.unop := Cover.pullbackId S.unop
e_1✝ :
  (multiequalizer (Cover.index S.unop P) ⟶ colimit (diagram J P X.unop)) =
    ((diagram J P X.unop).obj S ⟶ colimit (diagram J P X.unop))
e_4✝ : (diagram J P X.unop).obj (op S.unop) = (diagram J P X.unop).obj S
I : (Cover.index (op S.unop).unop P).L
⊢ (Multiequalizer.lift (Cover.index (op (Cover.pullback S.unop (𝟙 X.unop))).unop P) ((diagram J P X.unop).obj S)
          (fun I => Multiequalizer.ι (Cover.index S.unop P) (Cover.Arrow.base I))
          (_ :
            ∀ (I : (Cover.index ((pullback J (𝟙 X.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)) ≫
        (diagram J P X.unop).map e.inv.op) ≫
      Multiequalizer.ι (Cover.index (op S.unop).unop P) I =
    𝟙 ((diagram J P X.unop).obj S) ≫ Multiequalizer.ι (Cover.index (op S.unop).unop P) I

Next tactic:
dsimp
/-- 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]
    

Proof state:
case h.e'_2.h.h.e'_6.h
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 : Cᵒᵖ
S : (Cover J X.unop)ᵒᵖ
e : Cover.pullback S.unop (𝟙 X.unop) ≅ S.unop := Cover.pullbackId S.unop
e_1✝ :
  (multiequalizer (Cover.index S.unop P) ⟶ colimit (diagram J P X.unop)) =
    ((diagram J P X.unop).obj S ⟶ colimit (diagram J P X.unop))
e_4✝ : (diagram J P X.unop).obj (op S.unop) = (diagram J P X.unop).obj S
I : (Cover.index (op S.unop).unop P).L
⊢ Multiequalizer.ι (Cover.index S.unop P) (Cover.Arrow.base (Cover.Arrow.map I (Cover.pullbackId S.unop).inv)) =
    Multiequalizer.ι (Cover.index S.unop P) I

Next tactic:
dsimp [Cover.Arrow.map, Cover.Arrow.base]
/-- 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]
    

Proof state:
case h.e'_2.h.h.e'_6.h
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 : Cᵒᵖ
S : (Cover J X.unop)ᵒᵖ
e : Cover.pullback S.unop (𝟙 X.unop) ≅ S.unop := Cover.pullbackId S.unop
e_1✝ :
  (multiequalizer (Cover.index S.unop P) ⟶ colimit (diagram J P X.unop)) =
    ((diagram J P X.unop).obj S ⟶ colimit (diagram J P X.unop))
e_4✝ : (diagram J P X.unop).obj (op S.unop) = (diagram J P X.unop).obj S
I : (Cover.index (op S.unop).unop P).L
⊢ Multiequalizer.ι (Cover.index S.unop P)
      { Y := I.Y, f := I.f ≫ 𝟙 X.unop,
        hf :=
          (_ :
            (Cover.sieve (Cover.pullback S.unop (𝟙 X.unop))).arrows
              { Y := I.Y, f := I.f, hf := (_ : ((fun a => ↑a) (Cover.pullback S.unop (𝟙 X.unop))).arrows I.f) }.f) } =
    Multiequalizer.ι (Cover.index S.unop P) I

Next tactic:
cases I
/-- 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
    

Proof state:
case h.e'_2.h.h.e'_6.h.mk
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 : Cᵒᵖ
S : (Cover J X.unop)ᵒᵖ
e : Cover.pullback S.unop (𝟙 X.unop) ≅ S.unop := Cover.pullbackId S.unop
e_1✝ :
  (multiequalizer (Cover.index S.unop P) ⟶ colimit (diagram J P X.unop)) =
    ((diagram J P X.unop).obj S ⟶ colimit (diagram J P X.unop))
e_4✝ : (diagram J P X.unop).obj (op S.unop) = (diagram J P X.unop).obj S
Y✝ : C
f✝ : Y✝ ⟶ X.unop
hf✝ : (Cover.sieve (op S.unop).unop).arrows f✝
⊢ Multiequalizer.ι (Cover.index S.unop P)
      { Y := { Y := Y✝, f := f✝, hf := hf✝ }.Y, f := { Y := Y✝, f := f✝, hf := hf✝ }.f ≫ 𝟙 X.unop,
        hf :=
          (_ :
            (Cover.sieve (Cover.pullback S.unop (𝟙 X.unop))).arrows
              { Y := { Y := Y✝, f := f✝, hf := hf✝ }.Y, f := { Y := Y✝, f := f✝, hf := hf✝ }.f,
                  hf :=
                    (_ :
                      ((fun a => ↑a) (Cover.pullback S.unop (𝟙 X.unop))).arrows
                        { Y := Y✝, f := f✝, hf := hf✝ }.f) }.f) } =
    Multiequalizer.ι (Cover.index S.unop P) { Y := Y✝, f := f✝, hf := hf✝ }

Next tactic:
congr
/-- 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
    

Proof state:
case h.e'_2.h.h.e'_6.h.mk.h.e_5.h.e_f
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 : Cᵒᵖ
S : (Cover J X.unop)ᵒᵖ
e : Cover.pullback S.unop (𝟙 X.unop) ≅ S.unop := Cover.pullbackId S.unop
e_1✝ :
  (multiequalizer (Cover.index S.unop P) ⟶ colimit (diagram J P X.unop)) =
    ((diagram J P X.unop).obj S ⟶ colimit (diagram J P X.unop))
e_4✝ : (diagram J P X.unop).obj (op S.unop) = (diagram J P X.unop).obj S
Y✝ : C
f✝ : Y✝ ⟶ X.unop
hf✝ : (Cover.sieve (op S.unop).unop).arrows f✝
⊢ { Y := Y✝, f := f✝, hf := hf✝ }.f ≫ 𝟙 X.unop = f✝

Next tactic:
simp
/-- 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
    

Proof state:
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),
    { obj := fun X => colimit (diagram J P X.unop),
            map := fun {X Y} f =>
              colimMap (diagramPullback J P f.unop) ≫ colimit.pre (diagram J P Y.unop) (pullback J f.unop).op }.map
        (f ≫ g) =
      { obj := fun X => colimit (diagram J P X.unop),
              map := fun {X Y} f =>
                colimMap (diagramPullback J P f.unop) ≫ colimit.pre (diagram J P Y.unop) (pullback J f.unop).op }.map
          f ≫
        { obj := fun X => colimit (diagram J P X.unop),
              map := fun {X Y} f =>
                colimMap (diagramPullback J P f.unop) ≫ colimit.pre (diagram J P Y.unop) (pullback J f.unop).op }.map
          g

Next tactic:
intro X Y Z f g
/-- 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
    

Proof state:
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
⊢ { obj := fun X => colimit (diagram J P X.unop),
          map := fun {X Y} f =>
            colimMap (diagramPullback J P f.unop) ≫ colimit.pre (diagram J P Y.unop) (pullback J f.unop).op }.map
      (f ≫ g) =
    { obj := fun X => colimit (diagram J P X.unop),
            map := fun {X Y} f =>
              colimMap (diagramPullback J P f.unop) ≫ colimit.pre (diagram J P Y.unop) (pullback J f.unop).op }.map
        f ≫
      { obj := fun X => colimit (diagram J P X.unop),
            map := fun {X Y} f =>
              colimMap (diagramPullback J P f.unop) ≫ colimit.pre (diagram J P Y.unop) (pullback J f.unop).op }.map
        g

Next tactic:
refine' colimit.hom_ext (fun S => _)
/-- 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 => _)
    

Proof state:
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)ᵒᵖ
⊢ colimit.ι (diagram J P X.unop) S ≫
      { obj := fun X => colimit (diagram J P X.unop),
            map := fun {X Y} f =>
              colimMap (diagramPullback J P f.unop) ≫ colimit.pre (diagram J P Y.unop) (pullback J f.unop).op }.map
        (f ≫ g) =
    colimit.ι (diagram J P X.unop) S ≫
      { obj := fun X => colimit (diagram J P X.unop),
              map := fun {X Y} f =>
                colimMap (diagramPullback J P f.unop) ≫ colimit.pre (diagram J P Y.unop) (pullback J f.unop).op }.map
          f ≫
        { obj := fun X => colimit (diagram J P X.unop),
              map := fun {X Y} f =>
                colimMap (diagramPullback J P f.unop) ≫ colimit.pre (diagram J P Y.unop) (pullback J f.unop).op }.map
          g

Next tactic:
dsimp
/-- 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
    

Proof state:
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)ᵒᵖ
⊢ colimit.ι (diagram J P X.unop) S ≫
      colimMap (diagramPullback J P (g.unop ≫ f.unop)) ≫
        colimit.pre (diagram J P Z.unop) (pullback J (g.unop ≫ f.unop)).op =
    colimit.ι (diagram J P X.unop) S ≫
      (colimMap (diagramPullback J P f.unop) ≫ colimit.pre (diagram J P Y.unop) (pullback J f.unop).op) ≫
        colimMap (diagramPullback J P g.unop) ≫ colimit.pre (diagram J P Z.unop) (pullback J g.unop).op

Next tactic:
simp only [diagramPullback_app, colimit.ι_pre_assoc, colimit.ι_pre, ι_colimMap_assoc,
      Category.assoc]
/-- 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
    simp only [Multiequalizer.lift_ι, Category.assoc]
    

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.ι (Cover.index S.unop P)
      (Cover.Arrow.base (Cover.Arrow.map I (Cover.pullbackComp S.unop g.unop f.unop).inv)) =
    Multiequalizer.ι (Cover.index S.unop P) (Cover.Arrow.base (Cover.Arrow.base I))

Next tactic:
cases I
/-- 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
    simp only [Multiequalizer.lift_ι, Category.assoc]
    cases I
    

Proof state:
case e_a.mk
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
Y✝ : C
f✝ : Y✝ ⟶ Z.unop
hf✝ : (Cover.sieve (op (Cover.pullback (Cover.pullback S.unop f.unop) g.unop)).unop).arrows f✝
⊢ Multiequalizer.ι (Cover.index S.unop P)
      (Cover.Arrow.base
        (Cover.Arrow.map { Y := Y✝, f := f✝, hf := hf✝ } (Cover.pullbackComp S.unop g.unop f.unop).inv)) =
    Multiequalizer.ι (Cover.index S.unop P) (Cover.Arrow.base (Cover.Arrow.base { Y := Y✝, f := f✝, hf := hf✝ }))

Next tactic:
dsimp only [Cover.Arrow.base, Cover.Arrow.map]
/-- 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
    simp only [Multiequalizer.lift_ι, Category.assoc]
    cases I
    dsimp only [Cover.Arrow.base, Cover.Arrow.map]
    

Proof state:
case e_a.mk
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
Y✝ : C
f✝ : Y✝ ⟶ Z.unop
hf✝ : (Cover.sieve (op (Cover.pullback (Cover.pullback S.unop f.unop) g.unop)).unop).arrows f✝
⊢ Multiequalizer.ι (Cover.index S.unop P)
      { Y := Y✝, f := f✝ ≫ g.unop ≫ f.unop,
        hf :=
          (_ :
            (Cover.sieve (Cover.pullback S.unop (g.unop ≫ f.unop))).arrows
              { Y := Y✝, f := f✝,
                  hf :=
                    (_ :
                      ((fun a => ↑a) (Cover.pullback S.unop (g.unop ≫ f.unop))).arrows
                        { Y := Y✝, f := f✝, hf := hf✝ }.f) }.f) } =
    Multiequalizer.ι (Cover.index S.unop P)
      { Y := Y✝, f := (f✝ ≫ g.unop) ≫ f.unop,
        hf :=
          (_ :
            (Cover.sieve (Cover.pullback S.unop f.unop)).arrows
              { Y := Y✝, f := f✝ ≫ g.unop,
                  hf :=
                    (_ :
                      (Cover.sieve (Cover.pullback (Cover.pullback S.unop f.unop) g.unop)).arrows
                        { Y := Y✝, f := f✝, hf := hf✝ }.f) }.f) }

Next tactic:
congr 2