l3lab/ntp-mathlib huggingface dataset:
/-- The canonical map from `P` to `J.plusObj P`.
See `toPlusNatTrans` for a functorial version. -/
def toPlus : P ⟶ J.plusObj P where
  app X := Cover.toMultiequalizer (⊤ : J.Cover X.unop) P ≫ colimit.ι (J.diagram P X.unop) (op ⊤)
  naturality := by
    intro X Y f
    

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 : Cᵒᵖ
f : X ⟶ Y
⊢ P.map f ≫ (fun X => Cover.toMultiequalizer ⊤ P ≫ colimit.ι (diagram J P X.unop) (op ⊤)) Y =
    (fun X => Cover.toMultiequalizer ⊤ P ≫ colimit.ι (diagram J P X.unop) (op ⊤)) X ≫ (plusObj J P).map f

Next tactic:
dsimp [plusObj]
/-- The canonical map from `P` to `J.plusObj P`.
See `toPlusNatTrans` for a functorial version. -/
def toPlus : P ⟶ J.plusObj P where
  app X := Cover.toMultiequalizer (⊤ : J.Cover X.unop) P ≫ colimit.ι (J.diagram P X.unop) (op ⊤)
  naturality := by
    intro X Y f
    dsimp [plusObj]
    

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 : Cᵒᵖ
f : X ⟶ Y
⊢ P.map f ≫ Cover.toMultiequalizer ⊤ P ≫ colimit.ι (diagram J P Y.unop) (op ⊤) =
    (Cover.toMultiequalizer ⊤ P ≫ colimit.ι (diagram J P X.unop) (op ⊤)) ≫
      colimMap (diagramPullback J P f.unop) ≫ colimit.pre (diagram J P Y.unop) (pullback J f.unop).op

Next tactic:
delta Cover.toMultiequalizer
/-- The canonical map from `P` to `J.plusObj P`.
See `toPlusNatTrans` for a functorial version. -/
def toPlus : P ⟶ J.plusObj P where
  app X := Cover.toMultiequalizer (⊤ : J.Cover X.unop) P ≫ colimit.ι (J.diagram P X.unop) (op ⊤)
  naturality := by
    intro X Y f
    dsimp [plusObj]
    delta Cover.toMultiequalizer
    

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 : Cᵒᵖ
f : X ⟶ Y
⊢ P.map f ≫
      Multiequalizer.lift (Cover.index ⊤ P) (P.obj (op Y.unop)) (fun I => P.map I.f.op)
          (_ :
            ∀ (I : (Cover.index ⊤ P).R),
              (fun I => P.map I.f.op) (MulticospanIndex.fstTo (Cover.index ⊤ P) I) ≫
                  MulticospanIndex.fst (Cover.index ⊤ P) I =
                (fun I => P.map I.f.op) (MulticospanIndex.sndTo (Cover.index ⊤ P) I) ≫
                  MulticospanIndex.snd (Cover.index ⊤ P) I) ≫
        colimit.ι (diagram J P Y.unop) (op ⊤) =
    (Multiequalizer.lift (Cover.index ⊤ P) (P.obj (op X.unop)) (fun I => P.map I.f.op)
          (_ :
            ∀ (I : (Cover.index ⊤ P).R),
              (fun I => P.map I.f.op) (MulticospanIndex.fstTo (Cover.index ⊤ P) I) ≫
                  MulticospanIndex.fst (Cover.index ⊤ P) I =
                (fun I => P.map I.f.op) (MulticospanIndex.sndTo (Cover.index ⊤ P) I) ≫
                  MulticospanIndex.snd (Cover.index ⊤ P) I) ≫
        colimit.ι (diagram J P X.unop) (op ⊤)) ≫
      colimMap (diagramPullback J P f.unop) ≫ colimit.pre (diagram J P Y.unop) (pullback J f.unop).op

Next tactic:
simp only [diagramPullback_app, colimit.ι_pre, ι_colimMap_assoc, Category.assoc]
/-- The canonical map from `P` to `J.plusObj P`.
See `toPlusNatTrans` for a functorial version. -/
def toPlus : P ⟶ J.plusObj P where
  app X := Cover.toMultiequalizer (⊤ : J.Cover X.unop) P ≫ colimit.ι (J.diagram P X.unop) (op ⊤)
  naturality := by
    intro X Y f
    dsimp [plusObj]
    delta Cover.toMultiequalizer
    simp only [diagramPullback_app, colimit.ι_pre, ι_colimMap_assoc, 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 Y : Cᵒᵖ
f : X ⟶ Y
⊢ P.map f ≫
      Multiequalizer.lift (Cover.index ⊤ P) (P.obj (op Y.unop)) (fun I => P.map I.f.op)
          (_ :
            ∀ (I : (Cover.index ⊤ P).R),
              (fun I => P.map I.f.op) (MulticospanIndex.fstTo (Cover.index ⊤ P) I) ≫
                  MulticospanIndex.fst (Cover.index ⊤ P) I =
                (fun I => P.map I.f.op) (MulticospanIndex.sndTo (Cover.index ⊤ P) I) ≫
                  MulticospanIndex.snd (Cover.index ⊤ P) I) ≫
        colimit.ι (diagram J P Y.unop) (op ⊤) =
    Multiequalizer.lift (Cover.index ⊤ P) (P.obj (op X.unop)) (fun I => P.map I.f.op)
        (_ :
          ∀ (I : (Cover.index ⊤ P).R),
            (fun I => P.map I.f.op) (MulticospanIndex.fstTo (Cover.index ⊤ P) I) ≫
                MulticospanIndex.fst (Cover.index ⊤ P) I =
              (fun I => P.map I.f.op) (MulticospanIndex.sndTo (Cover.index ⊤ P) I) ≫
                MulticospanIndex.snd (Cover.index ⊤ P) I) ≫
      Multiequalizer.lift (Cover.index ((pullback J f.unop).op.obj (op ⊤)).unop P) ((diagram J P X.unop).obj (op ⊤))
          (fun I => Multiequalizer.ι (Cover.index (op ⊤).unop P) (Cover.Arrow.base I))
          (_ :
            ∀ (I : (Cover.index ((pullback J f.unop).op.obj (op ⊤)).unop P).R),
              Multiequalizer.ι (Cover.index (op ⊤).unop P)
                    (MulticospanIndex.fstTo (Cover.index (op ⊤).unop P) (Cover.Relation.base I)) ≫
                  MulticospanIndex.fst (Cover.index (op ⊤).unop P) (Cover.Relation.base I) =
                Multiequalizer.ι (Cover.index (op ⊤).unop P)
                    (MulticospanIndex.sndTo (Cover.index (op ⊤).unop P) (Cover.Relation.base I)) ≫
                  MulticospanIndex.snd (Cover.index (op ⊤).unop P) (Cover.Relation.base I)) ≫
        colimit.ι (diagram J P Y.unop) ((pullback J f.unop).op.obj (op ⊤))

Next tactic:
dsimp only [Functor.op, unop_op]
/-- The canonical map from `P` to `J.plusObj P`.
See `toPlusNatTrans` for a functorial version. -/
def toPlus : P ⟶ J.plusObj P where
  app X := Cover.toMultiequalizer (⊤ : J.Cover X.unop) P ≫ colimit.ι (J.diagram P X.unop) (op ⊤)
  naturality := by
    intro X Y f
    dsimp [plusObj]
    delta Cover.toMultiequalizer
    simp only [diagramPullback_app, colimit.ι_pre, ι_colimMap_assoc, Category.assoc]
    dsimp only [Functor.op, unop_op]
    

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 : Cᵒᵖ
f : X ⟶ Y
⊢ P.map f ≫
      Multiequalizer.lift (Cover.index ⊤ P) (P.obj (op Y.unop)) (fun I => P.map I.f.op)
          (_ :
            ∀ (I : (Cover.index ⊤ P).R),
              (fun I => P.map I.f.op) (MulticospanIndex.fstTo (Cover.index ⊤ P) I) ≫
                  MulticospanIndex.fst (Cover.index ⊤ P) I =
                (fun I => P.map I.f.op) (MulticospanIndex.sndTo (Cover.index ⊤ P) I) ≫
                  MulticospanIndex.snd (Cover.index ⊤ P) I) ≫
        colimit.ι (diagram J P Y.unop) (op ⊤) =
    Multiequalizer.lift (Cover.index ⊤ P) (P.obj (op X.unop)) (fun I => P.map I.f.op)
        (_ :
          ∀ (I : (Cover.index ⊤ P).R),
            (fun I => P.map I.f.op) (MulticospanIndex.fstTo (Cover.index ⊤ P) I) ≫
                MulticospanIndex.fst (Cover.index ⊤ P) I =
              (fun I => P.map I.f.op) (MulticospanIndex.sndTo (Cover.index ⊤ P) I) ≫
                MulticospanIndex.snd (Cover.index ⊤ P) I) ≫
      Multiequalizer.lift (Cover.index ((pullback J f.unop).obj ⊤) P) ((diagram J P X.unop).obj (op ⊤))
          (fun I => Multiequalizer.ι (Cover.index ⊤ P) (Cover.Arrow.base I))
          (_ :
            ∀ (I : (Cover.index ((pullback J f.unop).op.obj (op ⊤)).unop P).R),
              Multiequalizer.ι (Cover.index (op ⊤).unop P)
                    (MulticospanIndex.fstTo (Cover.index (op ⊤).unop P) (Cover.Relation.base I)) ≫
                  MulticospanIndex.fst (Cover.index (op ⊤).unop P) (Cover.Relation.base I) =
                Multiequalizer.ι (Cover.index (op ⊤).unop P)
                    (MulticospanIndex.sndTo (Cover.index (op ⊤).unop P) (Cover.Relation.base I)) ≫
                  MulticospanIndex.snd (Cover.index (op ⊤).unop P) (Cover.Relation.base I)) ≫
        colimit.ι (diagram J P Y.unop) (op ((pullback J f.unop).obj ⊤))

Next tactic:
let e : (J.pullback f.unop).obj ⊤ ⟶ ⊤ := homOfLE (OrderTop.le_top _)
/-- The canonical map from `P` to `J.plusObj P`.
See `toPlusNatTrans` for a functorial version. -/
def toPlus : P ⟶ J.plusObj P where
  app X := Cover.toMultiequalizer (⊤ : J.Cover X.unop) P ≫ colimit.ι (J.diagram P X.unop) (op ⊤)
  naturality := by
    intro X Y f
    dsimp [plusObj]
    delta Cover.toMultiequalizer
    simp only [diagramPullback_app, colimit.ι_pre, ι_colimMap_assoc, Category.assoc]
    dsimp only [Functor.op, unop_op]
    let e : (J.pullback f.unop).obj ⊤ ⟶ ⊤ := homOfLE (OrderTop.le_top _)
    

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 : Cᵒᵖ
f : X ⟶ Y
e : (pullback J f.unop).obj ⊤ ⟶ ⊤ := homOfLE (_ : (pullback J f.unop).obj ⊤ ≤ ⊤)
⊢ P.map f ≫
      Multiequalizer.lift (Cover.index ⊤ P) (P.obj (op Y.unop)) (fun I => P.map I.f.op)
          (_ :
            ∀ (I : (Cover.index ⊤ P).R),
              (fun I => P.map I.f.op) (MulticospanIndex.fstTo (Cover.index ⊤ P) I) ≫
                  MulticospanIndex.fst (Cover.index ⊤ P) I =
                (fun I => P.map I.f.op) (MulticospanIndex.sndTo (Cover.index ⊤ P) I) ≫
                  MulticospanIndex.snd (Cover.index ⊤ P) I) ≫
        colimit.ι (diagram J P Y.unop) (op ⊤) =
    Multiequalizer.lift (Cover.index ⊤ P) (P.obj (op X.unop)) (fun I => P.map I.f.op)
        (_ :
          ∀ (I : (Cover.index ⊤ P).R),
            (fun I => P.map I.f.op) (MulticospanIndex.fstTo (Cover.index ⊤ P) I) ≫
                MulticospanIndex.fst (Cover.index ⊤ P) I =
              (fun I => P.map I.f.op) (MulticospanIndex.sndTo (Cover.index ⊤ P) I) ≫
                MulticospanIndex.snd (Cover.index ⊤ P) I) ≫
      Multiequalizer.lift (Cover.index ((pullback J f.unop).obj ⊤) P) ((diagram J P X.unop).obj (op ⊤))
          (fun I => Multiequalizer.ι (Cover.index ⊤ P) (Cover.Arrow.base I))
          (_ :
            ∀ (I : (Cover.index ((pullback J f.unop).op.obj (op ⊤)).unop P).R),
              Multiequalizer.ι (Cover.index (op ⊤).unop P)
                    (MulticospanIndex.fstTo (Cover.index (op ⊤).unop P) (Cover.Relation.base I)) ≫
                  MulticospanIndex.fst (Cover.index (op ⊤).unop P) (Cover.Relation.base I) =
                Multiequalizer.ι (Cover.index (op ⊤).unop P)
                    (MulticospanIndex.sndTo (Cover.index (op ⊤).unop P) (Cover.Relation.base I)) ≫
                  MulticospanIndex.snd (Cover.index (op ⊤).unop P) (Cover.Relation.base I)) ≫
        colimit.ι (diagram J P Y.unop) (op ((pullback J f.unop).obj ⊤))

Next tactic:
rw [← colimit.w _ e.op, ← Category.assoc, ← Category.assoc, ← Category.assoc]
/-- The canonical map from `P` to `J.plusObj P`.
See `toPlusNatTrans` for a functorial version. -/
def toPlus : P ⟶ J.plusObj P where
  app X := Cover.toMultiequalizer (⊤ : J.Cover X.unop) P ≫ colimit.ι (J.diagram P X.unop) (op ⊤)
  naturality := by
    intro X Y f
    dsimp [plusObj]
    delta Cover.toMultiequalizer
    simp only [diagramPullback_app, colimit.ι_pre, ι_colimMap_assoc, Category.assoc]
    dsimp only [Functor.op, unop_op]
    let e : (J.pullback f.unop).obj ⊤ ⟶ ⊤ := homOfLE (OrderTop.le_top _)
    rw [← colimit.w _ e.op, ← Category.assoc, ← Category.assoc, ← 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 Y : Cᵒᵖ
f : X ⟶ Y
e : (pullback J f.unop).obj ⊤ ⟶ ⊤ := homOfLE (_ : (pullback J f.unop).obj ⊤ ≤ ⊤)
⊢ ((P.map f ≫
          Multiequalizer.lift (Cover.index ⊤ P) (P.obj (op Y.unop)) (fun I => P.map I.f.op)
            (_ :
              ∀ (I : (Cover.index ⊤ P).R),
                (fun I => P.map I.f.op) (MulticospanIndex.fstTo (Cover.index ⊤ P) I) ≫
                    MulticospanIndex.fst (Cover.index ⊤ P) I =
                  (fun I => P.map I.f.op) (MulticospanIndex.sndTo (Cover.index ⊤ P) I) ≫
                    MulticospanIndex.snd (Cover.index ⊤ P) I)) ≫
        (diagram J P Y.unop).map e.op) ≫
      colimit.ι (diagram J P Y.unop) (op ((pullback J f.unop).obj ⊤)) =
    (Multiequalizer.lift (Cover.index ⊤ P) (P.obj (op X.unop)) (fun I => P.map I.f.op)
          (_ :
            ∀ (I : (Cover.index ⊤ P).R),
              (fun I => P.map I.f.op) (MulticospanIndex.fstTo (Cover.index ⊤ P) I) ≫
                  MulticospanIndex.fst (Cover.index ⊤ P) I =
                (fun I => P.map I.f.op) (MulticospanIndex.sndTo (Cover.index ⊤ P) I) ≫
                  MulticospanIndex.snd (Cover.index ⊤ P) I) ≫
        Multiequalizer.lift (Cover.index ((pullback J f.unop).obj ⊤) P) ((diagram J P X.unop).obj (op ⊤))
          (fun I => Multiequalizer.ι (Cover.index ⊤ P) (Cover.Arrow.base I))
          (_ :
            ∀ (I : (Cover.index ((pullback J f.unop).op.obj (op ⊤)).unop P).R),
              Multiequalizer.ι (Cover.index (op ⊤).unop P)
                    (MulticospanIndex.fstTo (Cover.index (op ⊤).unop P) (Cover.Relation.base I)) ≫
                  MulticospanIndex.fst (Cover.index (op ⊤).unop P) (Cover.Relation.base I) =
                Multiequalizer.ι (Cover.index (op ⊤).unop P)
                    (MulticospanIndex.sndTo (Cover.index (op ⊤).unop P) (Cover.Relation.base I)) ≫
                  MulticospanIndex.snd (Cover.index (op ⊤).unop P) (Cover.Relation.base I))) ≫
      colimit.ι (diagram J P Y.unop) (op ((pullback J f.unop).obj ⊤))

Next tactic:
congr 1
/-- The canonical map from `P` to `J.plusObj P`.
See `toPlusNatTrans` for a functorial version. -/
def toPlus : P ⟶ J.plusObj P where
  app X := Cover.toMultiequalizer (⊤ : J.Cover X.unop) P ≫ colimit.ι (J.diagram P X.unop) (op ⊤)
  naturality := by
    intro X Y f
    dsimp [plusObj]
    delta Cover.toMultiequalizer
    simp only [diagramPullback_app, colimit.ι_pre, ι_colimMap_assoc, Category.assoc]
    dsimp only [Functor.op, unop_op]
    let e : (J.pullback f.unop).obj ⊤ ⟶ ⊤ := homOfLE (OrderTop.le_top _)
    rw [← colimit.w _ e.op, ← Category.assoc, ← Category.assoc, ← Category.assoc]
    congr 1
    

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 : Cᵒᵖ
f : X ⟶ Y
e : (pullback J f.unop).obj ⊤ ⟶ ⊤ := homOfLE (_ : (pullback J f.unop).obj ⊤ ≤ ⊤)
⊢ (P.map f ≫
        Multiequalizer.lift (Cover.index ⊤ P) (P.obj (op Y.unop)) (fun I => P.map I.f.op)
          (_ :
            ∀ (I : (Cover.index ⊤ P).R),
              (fun I => P.map I.f.op) (MulticospanIndex.fstTo (Cover.index ⊤ P) I) ≫
                  MulticospanIndex.fst (Cover.index ⊤ P) I =
                (fun I => P.map I.f.op) (MulticospanIndex.sndTo (Cover.index ⊤ P) I) ≫
                  MulticospanIndex.snd (Cover.index ⊤ P) I)) ≫
      (diagram J P Y.unop).map e.op =
    Multiequalizer.lift (Cover.index ⊤ P) (P.obj (op X.unop)) (fun I => P.map I.f.op)
        (_ :
          ∀ (I : (Cover.index ⊤ P).R),
            (fun I => P.map I.f.op) (MulticospanIndex.fstTo (Cover.index ⊤ P) I) ≫
                MulticospanIndex.fst (Cover.index ⊤ P) I =
              (fun I => P.map I.f.op) (MulticospanIndex.sndTo (Cover.index ⊤ P) I) ≫
                MulticospanIndex.snd (Cover.index ⊤ P) I) ≫
      Multiequalizer.lift (Cover.index ((pullback J f.unop).obj ⊤) P) ((diagram J P X.unop).obj (op ⊤))
        (fun I => Multiequalizer.ι (Cover.index ⊤ P) (Cover.Arrow.base I))
        (_ :
          ∀ (I : (Cover.index ((pullback J f.unop).op.obj (op ⊤)).unop P).R),
            Multiequalizer.ι (Cover.index (op ⊤).unop P)
                  (MulticospanIndex.fstTo (Cover.index (op ⊤).unop P) (Cover.Relation.base I)) ≫
                MulticospanIndex.fst (Cover.index (op ⊤).unop P) (Cover.Relation.base I) =
              Multiequalizer.ι (Cover.index (op ⊤).unop P)
                  (MulticospanIndex.sndTo (Cover.index (op ⊤).unop P) (Cover.Relation.base I)) ≫
                MulticospanIndex.snd (Cover.index (op ⊤).unop P) (Cover.Relation.base I))

Next tactic:
refine' Multiequalizer.hom_ext _ _ _ (fun I => _)
/-- The canonical map from `P` to `J.plusObj P`.
See `toPlusNatTrans` for a functorial version. -/
def toPlus : P ⟶ J.plusObj P where
  app X := Cover.toMultiequalizer (⊤ : J.Cover X.unop) P ≫ colimit.ι (J.diagram P X.unop) (op ⊤)
  naturality := by
    intro X Y f
    dsimp [plusObj]
    delta Cover.toMultiequalizer
    simp only [diagramPullback_app, colimit.ι_pre, ι_colimMap_assoc, Category.assoc]
    dsimp only [Functor.op, unop_op]
    let e : (J.pullback f.unop).obj ⊤ ⟶ ⊤ := homOfLE (OrderTop.le_top _)
    rw [← colimit.w _ e.op, ← Category.assoc, ← Category.assoc, ← Category.assoc]
    congr 1
    refine' Multiequalizer.hom_ext _ _ _ (fun I => _)
    

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 : Cᵒᵖ
f : X ⟶ Y
e : (pullback J f.unop).obj ⊤ ⟶ ⊤ := homOfLE (_ : (pullback J f.unop).obj ⊤ ≤ ⊤)
I : (Cover.index (op ((pullback J f.unop).obj ⊤)).unop P).L
⊢ ((P.map f ≫
          Multiequalizer.lift (Cover.index ⊤ P) (P.obj (op Y.unop)) (fun I => P.map I.f.op)
            (_ :
              ∀ (I : (Cover.index ⊤ P).R),
                (fun I => P.map I.f.op) (MulticospanIndex.fstTo (Cover.index ⊤ P) I) ≫
                    MulticospanIndex.fst (Cover.index ⊤ P) I =
                  (fun I => P.map I.f.op) (MulticospanIndex.sndTo (Cover.index ⊤ P) I) ≫
                    MulticospanIndex.snd (Cover.index ⊤ P) I)) ≫
        (diagram J P Y.unop).map e.op) ≫
      Multiequalizer.ι (Cover.index (op ((pullback J f.unop).obj ⊤)).unop P) I =
    (Multiequalizer.lift (Cover.index ⊤ P) (P.obj (op X.unop)) (fun I => P.map I.f.op)
          (_ :
            ∀ (I : (Cover.index ⊤ P).R),
              (fun I => P.map I.f.op) (MulticospanIndex.fstTo (Cover.index ⊤ P) I) ≫
                  MulticospanIndex.fst (Cover.index ⊤ P) I =
                (fun I => P.map I.f.op) (MulticospanIndex.sndTo (Cover.index ⊤ P) I) ≫
                  MulticospanIndex.snd (Cover.index ⊤ P) I) ≫
        Multiequalizer.lift (Cover.index ((pullback J f.unop).obj ⊤) P) ((diagram J P X.unop).obj (op ⊤))
          (fun I => Multiequalizer.ι (Cover.index ⊤ P) (Cover.Arrow.base I))
          (_ :
            ∀ (I : (Cover.index ((pullback J f.unop).op.obj (op ⊤)).unop P).R),
              Multiequalizer.ι (Cover.index (op ⊤).unop P)
                    (MulticospanIndex.fstTo (Cover.index (op ⊤).unop P) (Cover.Relation.base I)) ≫
                  MulticospanIndex.fst (Cover.index (op ⊤).unop P) (Cover.Relation.base I) =
                Multiequalizer.ι (Cover.index (op ⊤).unop P)
                    (MulticospanIndex.sndTo (Cover.index (op ⊤).unop P) (Cover.Relation.base I)) ≫
                  MulticospanIndex.snd (Cover.index (op ⊤).unop P) (Cover.Relation.base I))) ≫
      Multiequalizer.ι (Cover.index (op ((pullback J f.unop).obj ⊤)).unop P) I

Next tactic:
simp only [Multiequalizer.lift_ι, Category.assoc]
/-- The canonical map from `P` to `J.plusObj P`.
See `toPlusNatTrans` for a functorial version. -/
def toPlus : P ⟶ J.plusObj P where
  app X := Cover.toMultiequalizer (⊤ : J.Cover X.unop) P ≫ colimit.ι (J.diagram P X.unop) (op ⊤)
  naturality := by
    intro X Y f
    dsimp [plusObj]
    delta Cover.toMultiequalizer
    simp only [diagramPullback_app, colimit.ι_pre, ι_colimMap_assoc, Category.assoc]
    dsimp only [Functor.op, unop_op]
    let e : (J.pullback f.unop).obj ⊤ ⟶ ⊤ := homOfLE (OrderTop.le_top _)
    rw [← colimit.w _ e.op, ← Category.assoc, ← Category.assoc, ← Category.assoc]
    congr 1
    refine' Multiequalizer.hom_ext _ _ _ (fun I => _)
    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 : Cᵒᵖ
f : X ⟶ Y
e : (pullback J f.unop).obj ⊤ ⟶ ⊤ := homOfLE (_ : (pullback J f.unop).obj ⊤ ≤ ⊤)
I : (Cover.index (op ((pullback J f.unop).obj ⊤)).unop P).L
⊢ P.map f ≫
      Multiequalizer.lift (Cover.index ⊤ P) (P.obj (op Y.unop)) (fun I => P.map I.f.op)
          (_ :
            ∀ (I : (Cover.index ⊤ P).R),
              (fun I => P.map I.f.op) (MulticospanIndex.fstTo (Cover.index ⊤ P) I) ≫
                  MulticospanIndex.fst (Cover.index ⊤ P) I =
                (fun I => P.map I.f.op) (MulticospanIndex.sndTo (Cover.index ⊤ P) I) ≫
                  MulticospanIndex.snd (Cover.index ⊤ P) I) ≫
        (diagram J P Y.unop).map (homOfLE (_ : (pullback J f.unop).obj ⊤ ≤ ⊤)).op ≫
          Multiequalizer.ι (Cover.index (op ((pullback J f.unop).obj ⊤)).unop P) I =
    Multiequalizer.lift (Cover.index ⊤ P) (P.obj (op X.unop)) (fun I => P.map I.f.op)
        (_ :
          ∀ (I : (Cover.index ⊤ P).R),
            (fun I => P.map I.f.op) (MulticospanIndex.fstTo (Cover.index ⊤ P) I) ≫
                MulticospanIndex.fst (Cover.index ⊤ P) I =
              (fun I => P.map I.f.op) (MulticospanIndex.sndTo (Cover.index ⊤ P) I) ≫
                MulticospanIndex.snd (Cover.index ⊤ P) I) ≫
      Multiequalizer.lift (Cover.index ((pullback J f.unop).obj ⊤) P) ((diagram J P X.unop).obj (op ⊤))
          (fun I => Multiequalizer.ι (Cover.index ⊤ P) (Cover.Arrow.base I))
          (_ :
            ∀ (I : (Cover.index ((pullback J f.unop).op.obj (op ⊤)).unop P).R),
              Multiequalizer.ι (Cover.index (op ⊤).unop P)
                    (MulticospanIndex.fstTo (Cover.index (op ⊤).unop P) (Cover.Relation.base I)) ≫
                  MulticospanIndex.fst (Cover.index (op ⊤).unop P) (Cover.Relation.base I) =
                Multiequalizer.ι (Cover.index (op ⊤).unop P)
                    (MulticospanIndex.sndTo (Cover.index (op ⊤).unop P) (Cover.Relation.base I)) ≫
                  MulticospanIndex.snd (Cover.index (op ⊤).unop P) (Cover.Relation.base I)) ≫
        Multiequalizer.ι (Cover.index (op ((pullback J f.unop).obj ⊤)).unop P) I

Next tactic:
dsimp [Cover.Arrow.base]
@[reassoc (attr := simp)]
theorem toPlus_naturality {P Q : Cᵒᵖ ⥤ D} (η : P ⟶ Q) :
    η ≫ J.toPlus Q = J.toPlus _ ≫ J.plusMap η := 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
P Q : Cᵒᵖ ⥤ D
η : P ⟶ Q
⊢ η ≫ toPlus J Q = toPlus J P ≫ plusMap J η

Next tactic:
ext
@[reassoc (attr := simp)]
theorem toPlus_naturality {P Q : Cᵒᵖ ⥤ D} (η : P ⟶ Q) :
    η ≫ J.toPlus Q = J.toPlus _ ≫ J.plusMap η := by
  ext
  

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✝ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D
P Q : Cᵒᵖ ⥤ D
η : P ⟶ Q
x✝ : Cᵒᵖ
⊢ (η ≫ toPlus J Q).app x✝ = (toPlus J P ≫ plusMap J η).app x✝

Next tactic:
dsimp [toPlus, plusMap]