l3lab/ntp-mathlib huggingface dataset:
@[simp]
theorem diagramNatTrans_id (X : C) (P : Cᵒᵖ ⥤ D) :
    J.diagramNatTrans (𝟙 P) X = 𝟙 (J.diagram P X) := by
  ext : 2
  refine' Multiequalizer.hom_ext _ _ _ (fun i => _)
  dsimp
  

Proof state:
case w.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
X : C
P : Cᵒᵖ ⥤ D
x✝ : (Cover J X)ᵒᵖ
i : (Cover.index x✝.unop P).L
⊢ Multiequalizer.lift (Cover.index x✝.unop P) (multiequalizer (Cover.index x✝.unop P))
        (fun i => Multiequalizer.ι (Cover.index x✝.unop P) i ≫ 𝟙 (P.obj (op i.Y)))
        (_ :
          ∀ (i : (Cover.index x✝.unop P).R),
            (fun i => Multiequalizer.ι (Cover.index x✝.unop P) i ≫ (𝟙 P).app (op i.Y))
                  (MulticospanIndex.fstTo (Cover.index x✝.unop P) i) ≫
                MulticospanIndex.fst (Cover.index x✝.unop P) i =
              (fun i => Multiequalizer.ι (Cover.index x✝.unop P) i ≫ (𝟙 P).app (op i.Y))
                  (MulticospanIndex.sndTo (Cover.index x✝.unop P) i) ≫
                MulticospanIndex.snd (Cover.index x✝.unop P) i) ≫
      Multiequalizer.ι (Cover.index x✝.unop P) i =
    𝟙 (multiequalizer (Cover.index x✝.unop P)) ≫ Multiequalizer.ι (Cover.index x✝.unop P) i

Next tactic:
simp only [limit.lift_π, Multifork.ofι_pt, Multifork.ofι_π_app, Category.id_comp]
@[simp]
theorem diagramNatTrans_id (X : C) (P : Cᵒᵖ ⥤ D) :
    J.diagramNatTrans (𝟙 P) X = 𝟙 (J.diagram P X) := by
  ext : 2
  refine' Multiequalizer.hom_ext _ _ _ (fun i => _)
  dsimp
  simp only [limit.lift_π, Multifork.ofι_pt, Multifork.ofι_π_app, Category.id_comp]
  

Proof state:
case w.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
X : C
P : Cᵒᵖ ⥤ D
x✝ : (Cover J X)ᵒᵖ
i : (Cover.index x✝.unop P).L
⊢ Multiequalizer.ι (Cover.index x✝.unop P) i ≫ 𝟙 (P.obj (op i.Y)) = Multiequalizer.ι (Cover.index x✝.unop P) i

Next tactic:
erw [Category.comp_id]
@[simp]
theorem diagramNatTrans_zero [Preadditive D] (X : C) (P Q : Cᵒᵖ ⥤ D) :
    J.diagramNatTrans (0 : P ⟶ Q) X = 0 := 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✝ : Preadditive D
X : C
P Q : Cᵒᵖ ⥤ D
⊢ diagramNatTrans J 0 X = 0

Next tactic:
ext : 2
@[simp]
theorem diagramNatTrans_zero [Preadditive D] (X : C) (P Q : Cᵒᵖ ⥤ D) :
    J.diagramNatTrans (0 : P ⟶ Q) X = 0 := by
  ext : 2
  

Proof state:
case w.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✝ : Preadditive D
X : C
P Q : Cᵒᵖ ⥤ D
x✝ : (Cover J X)ᵒᵖ
⊢ (diagramNatTrans J 0 X).app x✝ = 0.app x✝

Next tactic:
refine' Multiequalizer.hom_ext _ _ _ (fun i => _)
@[simp]
theorem diagramNatTrans_zero [Preadditive D] (X : C) (P Q : Cᵒᵖ ⥤ D) :
    J.diagramNatTrans (0 : P ⟶ Q) X = 0 := by
  ext : 2
  refine' Multiequalizer.hom_ext _ _ _ (fun i => _)
  

Proof state:
case w.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✝ : Preadditive D
X : C
P Q : Cᵒᵖ ⥤ D
x✝ : (Cover J X)ᵒᵖ
i : (Cover.index x✝.unop Q).L
⊢ (diagramNatTrans J 0 X).app x✝ ≫ Multiequalizer.ι (Cover.index x✝.unop Q) i =
    0.app x✝ ≫ Multiequalizer.ι (Cover.index x✝.unop Q) i

Next tactic:
dsimp
@[simp]
theorem diagramNatTrans_zero [Preadditive D] (X : C) (P Q : Cᵒᵖ ⥤ D) :
    J.diagramNatTrans (0 : P ⟶ Q) X = 0 := by
  ext : 2
  refine' Multiequalizer.hom_ext _ _ _ (fun i => _)
  dsimp
  

Proof state:
case w.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✝ : Preadditive D
X : C
P Q : Cᵒᵖ ⥤ D
x✝ : (Cover J X)ᵒᵖ
i : (Cover.index x✝.unop Q).L
⊢ Multiequalizer.lift (Cover.index x✝.unop Q) (multiequalizer (Cover.index x✝.unop P))
        (fun i => Multiequalizer.ι (Cover.index x✝.unop P) i ≫ 0)
        (_ :
          ∀ (i : (Cover.index x✝.unop Q).R),
            (fun i => Multiequalizer.ι (Cover.index x✝.unop P) i ≫ 0.app (op i.Y))
                  (MulticospanIndex.fstTo (Cover.index x✝.unop Q) i) ≫
                MulticospanIndex.fst (Cover.index x✝.unop Q) i =
              (fun i => Multiequalizer.ι (Cover.index x✝.unop P) i ≫ 0.app (op i.Y))
                  (MulticospanIndex.sndTo (Cover.index x✝.unop Q) i) ≫
                MulticospanIndex.snd (Cover.index x✝.unop Q) i) ≫
      Multiequalizer.ι (Cover.index x✝.unop Q) i =
    0 ≫ Multiequalizer.ι (Cover.index x✝.unop Q) i

Next tactic:
rw [zero_comp, Multiequalizer.lift_ι, comp_zero]
@[simp]
theorem diagramNatTrans_comp {P Q R : Cᵒᵖ ⥤ D} (η : P ⟶ Q) (γ : Q ⟶ R) (X : C) :
    J.diagramNatTrans (η ≫ γ) X = J.diagramNatTrans η X ≫ J.diagramNatTrans γ X := 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✝ P Q R : Cᵒᵖ ⥤ D
η : P ⟶ Q
γ : Q ⟶ R
X : C
⊢ diagramNatTrans J (η ≫ γ) X = diagramNatTrans J η X ≫ diagramNatTrans J γ X

Next tactic:
ext : 2
@[simp]
theorem diagramNatTrans_comp {P Q R : Cᵒᵖ ⥤ D} (η : P ⟶ Q) (γ : Q ⟶ R) (X : C) :
    J.diagramNatTrans (η ≫ γ) X = J.diagramNatTrans η X ≫ J.diagramNatTrans γ X := by
  ext : 2
  

Proof state:
case w.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✝ P Q R : Cᵒᵖ ⥤ D
η : P ⟶ Q
γ : Q ⟶ R
X : C
x✝ : (Cover J X)ᵒᵖ
⊢ (diagramNatTrans J (η ≫ γ) X).app x✝ = (diagramNatTrans J η X ≫ diagramNatTrans J γ X).app x✝

Next tactic:
refine' Multiequalizer.hom_ext _ _ _ (fun i => _)
@[simp]
theorem diagramNatTrans_comp {P Q R : Cᵒᵖ ⥤ D} (η : P ⟶ Q) (γ : Q ⟶ R) (X : C) :
    J.diagramNatTrans (η ≫ γ) X = J.diagramNatTrans η X ≫ J.diagramNatTrans γ X := by
  ext : 2
  refine' Multiequalizer.hom_ext _ _ _ (fun i => _)
  

Proof state:
case w.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✝ P Q R : Cᵒᵖ ⥤ D
η : P ⟶ Q
γ : Q ⟶ R
X : C
x✝ : (Cover J X)ᵒᵖ
i : (Cover.index x✝.unop R).L
⊢ (diagramNatTrans J (η ≫ γ) X).app x✝ ≫ Multiequalizer.ι (Cover.index x✝.unop R) i =
    (diagramNatTrans J η X ≫ diagramNatTrans J γ X).app x✝ ≫ Multiequalizer.ι (Cover.index x✝.unop R) i

Next tactic:
dsimp
@[simp]
theorem diagramNatTrans_comp {P Q R : Cᵒᵖ ⥤ D} (η : P ⟶ Q) (γ : Q ⟶ R) (X : C) :
    J.diagramNatTrans (η ≫ γ) X = J.diagramNatTrans η X ≫ J.diagramNatTrans γ X := by
  ext : 2
  refine' Multiequalizer.hom_ext _ _ _ (fun i => _)
  dsimp
  

Proof state:
case w.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✝ P Q R : Cᵒᵖ ⥤ D
η : P ⟶ Q
γ : Q ⟶ R
X : C
x✝ : (Cover J X)ᵒᵖ
i : (Cover.index x✝.unop R).L
⊢ Multiequalizer.lift (Cover.index x✝.unop R) (multiequalizer (Cover.index x✝.unop P))
        (fun i => Multiequalizer.ι (Cover.index x✝.unop P) i ≫ η.app (op i.Y) ≫ γ.app (op i.Y))
        (_ :
          ∀ (i : (Cover.index x✝.unop R).R),
            (fun i => Multiequalizer.ι (Cover.index x✝.unop P) i ≫ (η ≫ γ).app (op i.Y))
                  (MulticospanIndex.fstTo (Cover.index x✝.unop R) i) ≫
                MulticospanIndex.fst (Cover.index x✝.unop R) i =
              (fun i => Multiequalizer.ι (Cover.index x✝.unop P) i ≫ (η ≫ γ).app (op i.Y))
                  (MulticospanIndex.sndTo (Cover.index x✝.unop R) i) ≫
                MulticospanIndex.snd (Cover.index x✝.unop R) i) ≫
      Multiequalizer.ι (Cover.index x✝.unop R) i =
    (Multiequalizer.lift (Cover.index x✝.unop Q) (multiequalizer (Cover.index x✝.unop P))
          (fun i => Multiequalizer.ι (Cover.index x✝.unop P) i ≫ η.app (op i.Y))
          (_ :
            ∀ (i : (Cover.index x✝.unop Q).R),
              (fun i => Multiequalizer.ι (Cover.index x✝.unop P) i ≫ η.app (op i.Y))
                    (MulticospanIndex.fstTo (Cover.index x✝.unop Q) i) ≫
                  MulticospanIndex.fst (Cover.index x✝.unop Q) i =
                (fun i => Multiequalizer.ι (Cover.index x✝.unop P) i ≫ η.app (op i.Y))
                    (MulticospanIndex.sndTo (Cover.index x✝.unop Q) i) ≫
                  MulticospanIndex.snd (Cover.index x✝.unop Q) i) ≫
        Multiequalizer.lift (Cover.index x✝.unop R) (multiequalizer (Cover.index x✝.unop Q))
          (fun i => Multiequalizer.ι (Cover.index x✝.unop Q) i ≫ γ.app (op i.Y))
          (_ :
            ∀ (i : (Cover.index x✝.unop R).R),
              (fun i => Multiequalizer.ι (Cover.index x✝.unop Q) i ≫ γ.app (op i.Y))
                    (MulticospanIndex.fstTo (Cover.index x✝.unop R) i) ≫
                  MulticospanIndex.fst (Cover.index x✝.unop R) i =
                (fun i => Multiequalizer.ι (Cover.index x✝.unop Q) i ≫ γ.app (op i.Y))
                    (MulticospanIndex.sndTo (Cover.index x✝.unop R) i) ≫
                  MulticospanIndex.snd (Cover.index x✝.unop R) i)) ≫
      Multiequalizer.ι (Cover.index x✝.unop R) i

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
    

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 : Cᵒᵖ),
    { 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
        (𝟙 X) =
      𝟙
        ({ 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 }.obj
          X)

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

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 : Cᵒᵖ
⊢ { 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
      (𝟙 X) =
    𝟙
      ({ 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 }.obj
        X)

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 => _)
    

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 : Cᵒᵖ
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
        (𝟙 X) =
    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 }.obj
          X)

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
    

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 : Cᵒᵖ
S : (Cover J X.unop)ᵒᵖ
⊢ colimit.ι (diagram J P X.unop) S ≫
      colimMap (diagramPullback J P (𝟙 X.unop)) ≫ colimit.pre (diagram J P X.unop) (pullback J (𝟙 X.unop)).op =
    colimit.ι (diagram J P X.unop) S ≫ 𝟙 (colimit (diagram J P X.unop))

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

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 : Cᵒᵖ
S : (Cover J X.unop)ᵒᵖ
⊢ Multiequalizer.lift (Cover.index ((pullback J (𝟙 X.unop)).op.obj S).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)) ≫
      colimit.ι (diagram J P X.unop) ((pullback J (𝟙 X.unop)).op.obj S) =
    colimit.ι (diagram J P X.unop) S

Next tactic:
let e := S.unop.pullbackId
/-- 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
    

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 : Cᵒᵖ
S : (Cover J X.unop)ᵒᵖ
e : Cover.pullback S.unop (𝟙 X.unop) ≅ S.unop := Cover.pullbackId S.unop
⊢ Multiequalizer.lift (Cover.index ((pullback J (𝟙 X.unop)).op.obj S).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)) ≫
      colimit.ι (diagram J P X.unop) ((pullback J (𝟙 X.unop)).op.obj S) =
    colimit.ι (diagram J P X.unop) S

Next tactic:
dsimp only [Functor.op, pullback_obj]
/-- 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]
    

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 : Cᵒᵖ
S : (Cover J X.unop)ᵒᵖ
e : Cover.pullback S.unop (𝟙 X.unop) ≅ S.unop := Cover.pullbackId S.unop
⊢ 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)) ≫
      colimit.ι (diagram J P X.unop) (op (Cover.pullback S.unop (𝟙 X.unop))) =
    colimit.ι (diagram J P X.unop) S

Next tactic:
erw [← colimit.w _ e.inv.op, ← 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]
    

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 : Cᵒᵖ
S : (Cover J X.unop)ᵒᵖ
e : Cover.pullback S.unop (𝟙 X.unop) ≅ S.unop := Cover.pullbackId S.unop
⊢ (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) ≫
      colimit.ι (diagram J P X.unop) (op S.unop) =
    colimit.ι (diagram J P X.unop) S

Next tactic:
convert Category.id_comp (colimit.ι (diagram J P (unop X)) 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)
    

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
⊢ 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 =
    𝟙 ((diagram J P X.unop).obj S)

Next tactic:
refine' Multiequalizer.hom_ext _ _ _ (fun I => _)