l3lab/ntp-mathlib huggingface dataset:
theorem toPlus_mk {X : C} {P : Cᵒᵖ ⥤ D} (S : J.Cover X) (x : P.obj (op X)) :
    (J.toPlus P).app _ x = mk (Meq.mk S x) := by
  dsimp [mk, toPlus]
  let e : S ⟶ ⊤ := homOfLE (OrderTop.le_top _)
  rw [← colimit.w _ e.op]
  delta Cover.toMultiequalizer
  erw [comp_apply, comp_apply]
  

Proof state:
C : Type u
inst✝⁵ : Category.{v, u} C
J : GrothendieckTopology C
D : Type w
inst✝⁴ : Category.{max v u, w} D
inst✝³ : ConcreteCategory D
inst✝² : PreservesLimits (forget D)
inst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D
inst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)
X : C
P : Cᵒᵖ ⥤ D
S : Cover J X
x : (forget D).obj (P.obj (op X))
e : S ⟶ ⊤ := homOfLE (_ : S ≤ ⊤)
⊢ (colimit.ι (diagram J P X) (op S))
      (((diagram J P X).map e.op)
        ((Multiequalizer.lift (Cover.index ⊤ P) (P.obj (op X)) (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))
          x)) =
    (colimit.ι (diagram J P X) (op S)) ((Meq.equiv P S).symm (Meq.mk S x))

Next tactic:
apply congr_arg
theorem toPlus_mk {X : C} {P : Cᵒᵖ ⥤ D} (S : J.Cover X) (x : P.obj (op X)) :
    (J.toPlus P).app _ x = mk (Meq.mk S x) := by
  dsimp [mk, toPlus]
  let e : S ⟶ ⊤ := homOfLE (OrderTop.le_top _)
  rw [← colimit.w _ e.op]
  delta Cover.toMultiequalizer
  erw [comp_apply, comp_apply]
  apply congr_arg
  

Proof state:
case h
C : Type u
inst✝⁵ : Category.{v, u} C
J : GrothendieckTopology C
D : Type w
inst✝⁴ : Category.{max v u, w} D
inst✝³ : ConcreteCategory D
inst✝² : PreservesLimits (forget D)
inst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D
inst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)
X : C
P : Cᵒᵖ ⥤ D
S : Cover J X
x : (forget D).obj (P.obj (op X))
e : S ⟶ ⊤ := homOfLE (_ : S ≤ ⊤)
⊢ ((diagram J P X).map e.op)
      ((Multiequalizer.lift (Cover.index ⊤ P) (P.obj (op X)) (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))
        x) =
    (Meq.equiv P S).symm (Meq.mk S x)

Next tactic:
dsimp [diagram]
theorem toPlus_mk {X : C} {P : Cᵒᵖ ⥤ D} (S : J.Cover X) (x : P.obj (op X)) :
    (J.toPlus P).app _ x = mk (Meq.mk S x) := by
  dsimp [mk, toPlus]
  let e : S ⟶ ⊤ := homOfLE (OrderTop.le_top _)
  rw [← colimit.w _ e.op]
  delta Cover.toMultiequalizer
  erw [comp_apply, comp_apply]
  apply congr_arg
  dsimp [diagram]
  

Proof state:
case h
C : Type u
inst✝⁵ : Category.{v, u} C
J : GrothendieckTopology C
D : Type w
inst✝⁴ : Category.{max v u, w} D
inst✝³ : ConcreteCategory D
inst✝² : PreservesLimits (forget D)
inst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D
inst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)
X : C
P : Cᵒᵖ ⥤ D
S : Cover J X
x : (forget D).obj (P.obj (op X))
e : S ⟶ ⊤ := homOfLE (_ : S ≤ ⊤)
⊢ (Multiequalizer.lift (Cover.index S P) (multiequalizer (Cover.index ⊤ P))
        (fun I => Multiequalizer.ι (Cover.index ⊤ P) (Cover.Arrow.map I (homOfLE (_ : S ≤ ⊤))))
        (_ :
          ∀ (I : (Cover.index (op S).unop P).R),
            Multiequalizer.ι (Cover.index (op ⊤).unop P)
                  (MulticospanIndex.fstTo (Cover.index (op ⊤).unop P)
                    (Cover.Relation.map I (homOfLE (_ : S ≤ ⊤)).op.unop)) ≫
                MulticospanIndex.fst (Cover.index (op ⊤).unop P) (Cover.Relation.map I (homOfLE (_ : S ≤ ⊤)).op.unop) =
              Multiequalizer.ι (Cover.index (op ⊤).unop P)
                  (MulticospanIndex.sndTo (Cover.index (op ⊤).unop P)
                    (Cover.Relation.map I (homOfLE (_ : S ≤ ⊤)).op.unop)) ≫
                MulticospanIndex.snd (Cover.index (op ⊤).unop P) (Cover.Relation.map I (homOfLE (_ : S ≤ ⊤)).op.unop)))
      ((Multiequalizer.lift (Cover.index ⊤ P) (P.obj (op X)) (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))
        x) =
    (Meq.equiv P S).symm (Meq.mk S x)

Next tactic:
apply Concrete.multiequalizer_ext
theorem toPlus_mk {X : C} {P : Cᵒᵖ ⥤ D} (S : J.Cover X) (x : P.obj (op X)) :
    (J.toPlus P).app _ x = mk (Meq.mk S x) := by
  dsimp [mk, toPlus]
  let e : S ⟶ ⊤ := homOfLE (OrderTop.le_top _)
  rw [← colimit.w _ e.op]
  delta Cover.toMultiequalizer
  erw [comp_apply, comp_apply]
  apply congr_arg
  dsimp [diagram]
  apply Concrete.multiequalizer_ext
  

Proof state:
case h.h
C : Type u
inst✝⁵ : Category.{v, u} C
J : GrothendieckTopology C
D : Type w
inst✝⁴ : Category.{max v u, w} D
inst✝³ : ConcreteCategory D
inst✝² : PreservesLimits (forget D)
inst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D
inst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)
X : C
P : Cᵒᵖ ⥤ D
S : Cover J X
x : (forget D).obj (P.obj (op X))
e : S ⟶ ⊤ := homOfLE (_ : S ≤ ⊤)
⊢ ∀ (t : (Cover.index S P).L),
    (Multiequalizer.ι (Cover.index S P) t)
        ((Multiequalizer.lift (Cover.index S P) (multiequalizer (Cover.index ⊤ P))
            (fun I => Multiequalizer.ι (Cover.index ⊤ P) (Cover.Arrow.map I (homOfLE (_ : S ≤ ⊤))))
            (_ :
              ∀ (I : (Cover.index (op S).unop P).R),
                Multiequalizer.ι (Cover.index (op ⊤).unop P)
                      (MulticospanIndex.fstTo (Cover.index (op ⊤).unop P)
                        (Cover.Relation.map I (homOfLE (_ : S ≤ ⊤)).op.unop)) ≫
                    MulticospanIndex.fst (Cover.index (op ⊤).unop P)
                      (Cover.Relation.map I (homOfLE (_ : S ≤ ⊤)).op.unop) =
                  Multiequalizer.ι (Cover.index (op ⊤).unop P)
                      (MulticospanIndex.sndTo (Cover.index (op ⊤).unop P)
                        (Cover.Relation.map I (homOfLE (_ : S ≤ ⊤)).op.unop)) ≫
                    MulticospanIndex.snd (Cover.index (op ⊤).unop P)
                      (Cover.Relation.map I (homOfLE (_ : S ≤ ⊤)).op.unop)))
          ((Multiequalizer.lift (Cover.index ⊤ P) (P.obj (op X)) (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))
            x)) =
      (Multiequalizer.ι (Cover.index S P) t) ((Meq.equiv P S).symm (Meq.mk S x))

Next tactic:
intro i
theorem toPlus_mk {X : C} {P : Cᵒᵖ ⥤ D} (S : J.Cover X) (x : P.obj (op X)) :
    (J.toPlus P).app _ x = mk (Meq.mk S x) := by
  dsimp [mk, toPlus]
  let e : S ⟶ ⊤ := homOfLE (OrderTop.le_top _)
  rw [← colimit.w _ e.op]
  delta Cover.toMultiequalizer
  erw [comp_apply, comp_apply]
  apply congr_arg
  dsimp [diagram]
  apply Concrete.multiequalizer_ext
  intro i
  

Proof state:
case h.h
C : Type u
inst✝⁵ : Category.{v, u} C
J : GrothendieckTopology C
D : Type w
inst✝⁴ : Category.{max v u, w} D
inst✝³ : ConcreteCategory D
inst✝² : PreservesLimits (forget D)
inst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D
inst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)
X : C
P : Cᵒᵖ ⥤ D
S : Cover J X
x : (forget D).obj (P.obj (op X))
e : S ⟶ ⊤ := homOfLE (_ : S ≤ ⊤)
i : (Cover.index S P).L
⊢ (Multiequalizer.ι (Cover.index S P) i)
      ((Multiequalizer.lift (Cover.index S P) (multiequalizer (Cover.index ⊤ P))
          (fun I => Multiequalizer.ι (Cover.index ⊤ P) (Cover.Arrow.map I (homOfLE (_ : S ≤ ⊤))))
          (_ :
            ∀ (I : (Cover.index (op S).unop P).R),
              Multiequalizer.ι (Cover.index (op ⊤).unop P)
                    (MulticospanIndex.fstTo (Cover.index (op ⊤).unop P)
                      (Cover.Relation.map I (homOfLE (_ : S ≤ ⊤)).op.unop)) ≫
                  MulticospanIndex.fst (Cover.index (op ⊤).unop P)
                    (Cover.Relation.map I (homOfLE (_ : S ≤ ⊤)).op.unop) =
                Multiequalizer.ι (Cover.index (op ⊤).unop P)
                    (MulticospanIndex.sndTo (Cover.index (op ⊤).unop P)
                      (Cover.Relation.map I (homOfLE (_ : S ≤ ⊤)).op.unop)) ≫
                  MulticospanIndex.snd (Cover.index (op ⊤).unop P)
                    (Cover.Relation.map I (homOfLE (_ : S ≤ ⊤)).op.unop)))
        ((Multiequalizer.lift (Cover.index ⊤ P) (P.obj (op X)) (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))
          x)) =
    (Multiequalizer.ι (Cover.index S P) i) ((Meq.equiv P S).symm (Meq.mk S x))

Next tactic:
simp only [← comp_apply, Category.assoc, Multiequalizer.lift_ι, Category.comp_id,
    Meq.equiv_symm_eq_apply]
theorem toPlus_mk {X : C} {P : Cᵒᵖ ⥤ D} (S : J.Cover X) (x : P.obj (op X)) :
    (J.toPlus P).app _ x = mk (Meq.mk S x) := by
  dsimp [mk, toPlus]
  let e : S ⟶ ⊤ := homOfLE (OrderTop.le_top _)
  rw [← colimit.w _ e.op]
  delta Cover.toMultiequalizer
  erw [comp_apply, comp_apply]
  apply congr_arg
  dsimp [diagram]
  apply Concrete.multiequalizer_ext
  intro i
  simp only [← comp_apply, Category.assoc, Multiequalizer.lift_ι, Category.comp_id,
    Meq.equiv_symm_eq_apply]
  

Proof state:
case h.h
C : Type u
inst✝⁵ : Category.{v, u} C
J : GrothendieckTopology C
D : Type w
inst✝⁴ : Category.{max v u, w} D
inst✝³ : ConcreteCategory D
inst✝² : PreservesLimits (forget D)
inst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D
inst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)
X : C
P : Cᵒᵖ ⥤ D
S : Cover J X
x : (forget D).obj (P.obj (op X))
e : S ⟶ ⊤ := homOfLE (_ : S ≤ ⊤)
i : (Cover.index S P).L
⊢ (P.map (Cover.Arrow.map i (homOfLE (_ : S ≤ ⊤))).f.op) x = ↑(Meq.mk S x) i

Next tactic:
rfl
theorem toPlus_apply {X : C} {P : Cᵒᵖ ⥤ D} (S : J.Cover X) (x : Meq P S) (I : S.Arrow) :
    (J.toPlus P).app _ (x I) = (J.plusObj P).map I.f.op (mk 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✝³ : ConcreteCategory D
inst✝² : PreservesLimits (forget D)
inst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D
inst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)
X : C
P : Cᵒᵖ ⥤ D
S : Cover J X
x : Meq P S
I : Cover.Arrow S
⊢ ((toPlus J P).app (op I.Y)) (↑x I) = ((plusObj J P).map I.f.op) (mk x)

Next tactic:
dsimp only [toPlus, plusObj]
theorem toPlus_apply {X : C} {P : Cᵒᵖ ⥤ D} (S : J.Cover X) (x : Meq P S) (I : S.Arrow) :
    (J.toPlus P).app _ (x I) = (J.plusObj P).map I.f.op (mk x) := by
  dsimp only [toPlus, 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✝³ : ConcreteCategory D
inst✝² : PreservesLimits (forget D)
inst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D
inst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)
X : C
P : Cᵒᵖ ⥤ D
S : Cover J X
x : Meq P S
I : Cover.Arrow S
⊢ (Cover.toMultiequalizer ⊤ P ≫ colimit.ι (diagram J P (op I.Y).unop) (op ⊤)) (↑x I) =
    (colimMap (diagramPullback J P I.f.op.unop) ≫ colimit.pre (diagram J P (op I.Y).unop) (pullback J I.f.op.unop).op)
      (mk x)

Next tactic:
delta Cover.toMultiequalizer
theorem toPlus_apply {X : C} {P : Cᵒᵖ ⥤ D} (S : J.Cover X) (x : Meq P S) (I : S.Arrow) :
    (J.toPlus P).app _ (x I) = (J.plusObj P).map I.f.op (mk x) := by
  dsimp only [toPlus, 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✝³ : ConcreteCategory D
inst✝² : PreservesLimits (forget D)
inst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D
inst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)
X : C
P : Cᵒᵖ ⥤ D
S : Cover J X
x : Meq P S
I : Cover.Arrow S
⊢ (Multiequalizer.lift (Cover.index ⊤ P) (P.obj (op (op I.Y).unop)) (fun I_1 => P.map I_1.f.op)
          (_ :
            ∀ (I_1 : (Cover.index ⊤ P).R),
              (fun I_2 => P.map I_2.f.op) (MulticospanIndex.fstTo (Cover.index ⊤ P) I_1) ≫
                  MulticospanIndex.fst (Cover.index ⊤ P) I_1 =
                (fun I_2 => P.map I_2.f.op) (MulticospanIndex.sndTo (Cover.index ⊤ P) I_1) ≫
                  MulticospanIndex.snd (Cover.index ⊤ P) I_1) ≫
        colimit.ι (diagram J P (op I.Y).unop) (op ⊤))
      (↑x I) =
    (colimMap (diagramPullback J P I.f.op.unop) ≫ colimit.pre (diagram J P (op I.Y).unop) (pullback J I.f.op.unop).op)
      (mk x)

Next tactic:
dsimp [mk]
theorem toPlus_apply {X : C} {P : Cᵒᵖ ⥤ D} (S : J.Cover X) (x : Meq P S) (I : S.Arrow) :
    (J.toPlus P).app _ (x I) = (J.plusObj P).map I.f.op (mk x) := by
  dsimp only [toPlus, plusObj]
  delta Cover.toMultiequalizer
  dsimp [mk]
  

Proof state:
C : Type u
inst✝⁵ : Category.{v, u} C
J : GrothendieckTopology C
D : Type w
inst✝⁴ : Category.{max v u, w} D
inst✝³ : ConcreteCategory D
inst✝² : PreservesLimits (forget D)
inst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D
inst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)
X : C
P : Cᵒᵖ ⥤ D
S : Cover J X
x : Meq P S
I : Cover.Arrow S
⊢ (Multiequalizer.lift (Cover.index ⊤ P) (P.obj (op I.Y)) (fun I_1 => P.map I_1.f.op)
          (_ :
            ∀ (I_1 : (Cover.index ⊤ P).R),
              (fun I_2 => P.map I_2.f.op) (MulticospanIndex.fstTo (Cover.index ⊤ P) I_1) ≫
                  MulticospanIndex.fst (Cover.index ⊤ P) I_1 =
                (fun I_2 => P.map I_2.f.op) (MulticospanIndex.sndTo (Cover.index ⊤ P) I_1) ≫
                  MulticospanIndex.snd (Cover.index ⊤ P) I_1) ≫
        colimit.ι (diagram J P I.Y) (op ⊤))
      (↑x I) =
    (colimMap (diagramPullback J P I.f) ≫ colimit.pre (diagram J P I.Y) (pullback J I.f).op)
      ((colimit.ι (diagram J P X) (op S)) ((Meq.equiv P S).symm x))

Next tactic:
erw [← comp_apply]
theorem toPlus_apply {X : C} {P : Cᵒᵖ ⥤ D} (S : J.Cover X) (x : Meq P S) (I : S.Arrow) :
    (J.toPlus P).app _ (x I) = (J.plusObj P).map I.f.op (mk x) := by
  dsimp only [toPlus, plusObj]
  delta Cover.toMultiequalizer
  dsimp [mk]
  erw [← comp_apply]
  

Proof state:
C : Type u
inst✝⁵ : Category.{v, u} C
J : GrothendieckTopology C
D : Type w
inst✝⁴ : Category.{max v u, w} D
inst✝³ : ConcreteCategory D
inst✝² : PreservesLimits (forget D)
inst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D
inst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)
X : C
P : Cᵒᵖ ⥤ D
S : Cover J X
x : Meq P S
I : Cover.Arrow S
⊢ (Multiequalizer.lift (Cover.index ⊤ P) (P.obj (op I.Y)) (fun I_1 => P.map I_1.f.op)
          (_ :
            ∀ (I_1 : (Cover.index ⊤ P).R),
              (fun I_2 => P.map I_2.f.op) (MulticospanIndex.fstTo (Cover.index ⊤ P) I_1) ≫
                  MulticospanIndex.fst (Cover.index ⊤ P) I_1 =
                (fun I_2 => P.map I_2.f.op) (MulticospanIndex.sndTo (Cover.index ⊤ P) I_1) ≫
                  MulticospanIndex.snd (Cover.index ⊤ P) I_1) ≫
        colimit.ι (diagram J P I.Y) (op ⊤))
      (↑x I) =
    (colimit.ι (diagram J P X) (op S) ≫
        colimMap (diagramPullback J P I.f) ≫ colimit.pre (diagram J P I.Y) (pullback J I.f).op)
      ((Meq.equiv P S).symm x)

Next tactic:
rw [ι_colimMap_assoc, colimit.ι_pre, comp_apply, comp_apply]
theorem toPlus_apply {X : C} {P : Cᵒᵖ ⥤ D} (S : J.Cover X) (x : Meq P S) (I : S.Arrow) :
    (J.toPlus P).app _ (x I) = (J.plusObj P).map I.f.op (mk x) := by
  dsimp only [toPlus, plusObj]
  delta Cover.toMultiequalizer
  dsimp [mk]
  erw [← comp_apply]
  rw [ι_colimMap_assoc, colimit.ι_pre, comp_apply, comp_apply]
  

Proof state:
C : Type u
inst✝⁵ : Category.{v, u} C
J : GrothendieckTopology C
D : Type w
inst✝⁴ : Category.{max v u, w} D
inst✝³ : ConcreteCategory D
inst✝² : PreservesLimits (forget D)
inst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D
inst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)
X : C
P : Cᵒᵖ ⥤ D
S : Cover J X
x : Meq P S
I : Cover.Arrow S
⊢ (colimit.ι (diagram J P I.Y) (op ⊤))
      ((Multiequalizer.lift (Cover.index ⊤ P) (P.obj (op I.Y)) (fun I_1 => P.map I_1.f.op)
          (_ :
            ∀ (I_1 : (Cover.index ⊤ P).R),
              (fun I_2 => P.map I_2.f.op) (MulticospanIndex.fstTo (Cover.index ⊤ P) I_1) ≫
                  MulticospanIndex.fst (Cover.index ⊤ P) I_1 =
                (fun I_2 => P.map I_2.f.op) (MulticospanIndex.sndTo (Cover.index ⊤ P) I_1) ≫
                  MulticospanIndex.snd (Cover.index ⊤ P) I_1))
        (↑x I)) =
    (colimit.ι (diagram J P I.Y) ((pullback J I.f).op.obj (op S)))
      (((diagramPullback J P I.f).app (op S)) ((Meq.equiv P S).symm x))

Next tactic:
dsimp only [Functor.op]
theorem toPlus_apply {X : C} {P : Cᵒᵖ ⥤ D} (S : J.Cover X) (x : Meq P S) (I : S.Arrow) :
    (J.toPlus P).app _ (x I) = (J.plusObj P).map I.f.op (mk x) := by
  dsimp only [toPlus, plusObj]
  delta Cover.toMultiequalizer
  dsimp [mk]
  erw [← comp_apply]
  rw [ι_colimMap_assoc, colimit.ι_pre, comp_apply, comp_apply]
  dsimp only [Functor.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✝³ : ConcreteCategory D
inst✝² : PreservesLimits (forget D)
inst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D
inst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)
X : C
P : Cᵒᵖ ⥤ D
S : Cover J X
x : Meq P S
I : Cover.Arrow S
⊢ (colimit.ι (diagram J P I.Y) (op ⊤))
      ((Multiequalizer.lift (Cover.index ⊤ P) (P.obj (op I.Y)) (fun I_1 => P.map I_1.f.op)
          (_ :
            ∀ (I_1 : (Cover.index ⊤ P).R),
              (fun I_2 => P.map I_2.f.op) (MulticospanIndex.fstTo (Cover.index ⊤ P) I_1) ≫
                  MulticospanIndex.fst (Cover.index ⊤ P) I_1 =
                (fun I_2 => P.map I_2.f.op) (MulticospanIndex.sndTo (Cover.index ⊤ P) I_1) ≫
                  MulticospanIndex.snd (Cover.index ⊤ P) I_1))
        (↑x I)) =
    (colimit.ι (diagram J P I.Y) (op ((pullback J I.f).obj (op S).unop)))
      (((diagramPullback J P I.f).app (op S)) ((Meq.equiv P S).symm x))

Next tactic:
let e : (J.pullback I.f).obj (unop (op S)) ⟶ ⊤ := homOfLE (OrderTop.le_top _)
theorem toPlus_apply {X : C} {P : Cᵒᵖ ⥤ D} (S : J.Cover X) (x : Meq P S) (I : S.Arrow) :
    (J.toPlus P).app _ (x I) = (J.plusObj P).map I.f.op (mk x) := by
  dsimp only [toPlus, plusObj]
  delta Cover.toMultiequalizer
  dsimp [mk]
  erw [← comp_apply]
  rw [ι_colimMap_assoc, colimit.ι_pre, comp_apply, comp_apply]
  dsimp only [Functor.op]
  let e : (J.pullback I.f).obj (unop (op S)) ⟶ ⊤ := 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✝³ : ConcreteCategory D
inst✝² : PreservesLimits (forget D)
inst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D
inst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)
X : C
P : Cᵒᵖ ⥤ D
S : Cover J X
x : Meq P S
I : Cover.Arrow S
e : (pullback J I.f).obj (op S).unop ⟶ ⊤ := homOfLE (_ : (pullback J I.f).obj (op S).unop ≤ ⊤)
⊢ (colimit.ι (diagram J P I.Y) (op ⊤))
      ((Multiequalizer.lift (Cover.index ⊤ P) (P.obj (op I.Y)) (fun I_1 => P.map I_1.f.op)
          (_ :
            ∀ (I_1 : (Cover.index ⊤ P).R),
              (fun I_2 => P.map I_2.f.op) (MulticospanIndex.fstTo (Cover.index ⊤ P) I_1) ≫
                  MulticospanIndex.fst (Cover.index ⊤ P) I_1 =
                (fun I_2 => P.map I_2.f.op) (MulticospanIndex.sndTo (Cover.index ⊤ P) I_1) ≫
                  MulticospanIndex.snd (Cover.index ⊤ P) I_1))
        (↑x I)) =
    (colimit.ι (diagram J P I.Y) (op ((pullback J I.f).obj (op S).unop)))
      (((diagramPullback J P I.f).app (op S)) ((Meq.equiv P S).symm x))

Next tactic:
rw [← colimit.w _ e.op]
theorem toPlus_apply {X : C} {P : Cᵒᵖ ⥤ D} (S : J.Cover X) (x : Meq P S) (I : S.Arrow) :
    (J.toPlus P).app _ (x I) = (J.plusObj P).map I.f.op (mk x) := by
  dsimp only [toPlus, plusObj]
  delta Cover.toMultiequalizer
  dsimp [mk]
  erw [← comp_apply]
  rw [ι_colimMap_assoc, colimit.ι_pre, comp_apply, comp_apply]
  dsimp only [Functor.op]
  let e : (J.pullback I.f).obj (unop (op S)) ⟶ ⊤ := homOfLE (OrderTop.le_top _)
  rw [← colimit.w _ e.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✝³ : ConcreteCategory D
inst✝² : PreservesLimits (forget D)
inst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D
inst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)
X : C
P : Cᵒᵖ ⥤ D
S : Cover J X
x : Meq P S
I : Cover.Arrow S
e : (pullback J I.f).obj (op S).unop ⟶ ⊤ := homOfLE (_ : (pullback J I.f).obj (op S).unop ≤ ⊤)
⊢ ((diagram J P I.Y).map e.op ≫ colimit.ι (diagram J P I.Y) (op ((pullback J I.f).obj (op S).unop)))
      ((Multiequalizer.lift (Cover.index ⊤ P) (P.obj (op I.Y)) (fun I_1 => P.map I_1.f.op)
          (_ :
            ∀ (I_1 : (Cover.index ⊤ P).R),
              (fun I_2 => P.map I_2.f.op) (MulticospanIndex.fstTo (Cover.index ⊤ P) I_1) ≫
                  MulticospanIndex.fst (Cover.index ⊤ P) I_1 =
                (fun I_2 => P.map I_2.f.op) (MulticospanIndex.sndTo (Cover.index ⊤ P) I_1) ≫
                  MulticospanIndex.snd (Cover.index ⊤ P) I_1))
        (↑x I)) =
    (colimit.ι (diagram J P I.Y) (op ((pullback J I.f).obj (op S).unop)))
      (((diagramPullback J P I.f).app (op S)) ((Meq.equiv P S).symm x))

Next tactic:
erw [comp_apply]
theorem toPlus_apply {X : C} {P : Cᵒᵖ ⥤ D} (S : J.Cover X) (x : Meq P S) (I : S.Arrow) :
    (J.toPlus P).app _ (x I) = (J.plusObj P).map I.f.op (mk x) := by
  dsimp only [toPlus, plusObj]
  delta Cover.toMultiequalizer
  dsimp [mk]
  erw [← comp_apply]
  rw [ι_colimMap_assoc, colimit.ι_pre, comp_apply, comp_apply]
  dsimp only [Functor.op]
  let e : (J.pullback I.f).obj (unop (op S)) ⟶ ⊤ := homOfLE (OrderTop.le_top _)
  rw [← colimit.w _ e.op]
  erw [comp_apply]
  

Proof state:
C : Type u
inst✝⁵ : Category.{v, u} C
J : GrothendieckTopology C
D : Type w
inst✝⁴ : Category.{max v u, w} D
inst✝³ : ConcreteCategory D
inst✝² : PreservesLimits (forget D)
inst✝¹ : ∀ (X : C), HasColimitsOfShape (Cover J X)ᵒᵖ D
inst✝ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : Cover J X), HasMultiequalizer (Cover.index S P)
X : C
P : Cᵒᵖ ⥤ D
S : Cover J X
x : Meq P S
I : Cover.Arrow S
e : (pullback J I.f).obj (op S).unop ⟶ ⊤ := homOfLE (_ : (pullback J I.f).obj (op S).unop ≤ ⊤)
⊢ (colimit.ι (diagram J P I.Y) (op ((pullback J I.f).obj (op S).unop)))
      (((diagram J P I.Y).map e.op)
        ((Multiequalizer.lift (Cover.index ⊤ P) (P.obj (op I.Y)) (fun I_1 => P.map I_1.f.op)
            (_ :
              ∀ (I_1 : (Cover.index ⊤ P).R),
                (fun I_2 => P.map I_2.f.op) (MulticospanIndex.fstTo (Cover.index ⊤ P) I_1) ≫
                    MulticospanIndex.fst (Cover.index ⊤ P) I_1 =
                  (fun I_2 => P.map I_2.f.op) (MulticospanIndex.sndTo (Cover.index ⊤ P) I_1) ≫
                    MulticospanIndex.snd (Cover.index ⊤ P) I_1))
          (↑x I))) =
    (colimit.ι (diagram J P I.Y) (op ((pullback J I.f).obj (op S).unop)))
      (((diagramPullback J P I.f).app (op S)) ((Meq.equiv P S).symm x))

Next tactic:
apply congr_arg