l3lab/ntp-mathlib huggingface dataset:
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]
  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 : 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)
      ((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)) =
    ((diagramPullback J P I.f).app (op S)) ((Meq.equiv P S).symm x)

Next tactic:
apply Concrete.multiequalizer_ext
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]
  apply congr_arg
  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 : 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 ≤ ⊤)
⊢ ∀ (t : (Cover.index (op ((pullback J I.f).obj (op S).unop)).unop P).L),
    (Multiequalizer.ι (Cover.index (op ((pullback J I.f).obj (op S).unop)).unop P) t)
        (((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))) =
      (Multiequalizer.ι (Cover.index (op ((pullback J I.f).obj (op S).unop)).unop P) t)
        (((diagramPullback J P I.f).app (op S)) ((Meq.equiv P S).symm x))

Next tactic:
intro i
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]
  apply congr_arg
  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 : 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 ≤ ⊤)
i : (Cover.index (op ((pullback J I.f).obj (op S).unop)).unop P).L
⊢ (Multiequalizer.ι (Cover.index (op ((pullback J I.f).obj (op S).unop)).unop P) i)
      (((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))) =
    (Multiequalizer.ι (Cover.index (op ((pullback J I.f).obj (op S).unop)).unop P) i)
      (((diagramPullback J P I.f).app (op S)) ((Meq.equiv P S).symm x))

Next tactic:
dsimp [diagram]
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]
  apply congr_arg
  apply Concrete.multiequalizer_ext
  intro i
  dsimp [diagram]
  rw [← comp_apply, ← comp_apply, ← comp_apply, Multiequalizer.lift_ι, Multiequalizer.lift_ι,
    Multiequalizer.lift_ι]
  

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 : 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 ≤ ⊤)
i : (Cover.index (op ((pullback J I.f).obj (op S).unop)).unop P).L
⊢ (P.map (Cover.Arrow.map i (homOfLE (_ : Cover.pullback S I.f ≤ ⊤))).f.op) (↑x I) =
    (Multiequalizer.ι (Cover.index S P) (Cover.Arrow.base i)) ((Meq.equiv P S).symm x)

Next tactic:
erw [Meq.equiv_symm_eq_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]
  apply congr_arg
  apply Concrete.multiequalizer_ext
  intro i
  dsimp [diagram]
  rw [← comp_apply, ← comp_apply, ← comp_apply, Multiequalizer.lift_ι, Multiequalizer.lift_ι,
    Multiequalizer.lift_ι]
  erw [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 : 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 ≤ ⊤)
i : (Cover.index (op ((pullback J I.f).obj (op S).unop)).unop P).L
⊢ (P.map (Cover.Arrow.map i (homOfLE (_ : Cover.pullback S I.f ≤ ⊤))).f.op) (↑x I) = ↑x (Cover.Arrow.base i)

Next tactic:
let RR : S.Relation :=
    ⟨_, _, _, i.f, 𝟙 _, I.f, i.f ≫ I.f, I.hf, Sieve.downward_closed _ I.hf _, by simp⟩
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]
  apply congr_arg
  apply Concrete.multiequalizer_ext
  intro i
  dsimp [diagram]
  rw [← comp_apply, ← comp_apply, ← comp_apply, Multiequalizer.lift_ι, Multiequalizer.lift_ι,
    Multiequalizer.lift_ι]
  erw [Meq.equiv_symm_eq_apply]
  let RR : S.Relation :=
    ⟨_, _, _, i.f, 𝟙 _, I.f, i.f ≫ I.f, I.hf, Sieve.downward_closed _ I.hf _, 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
e : (pullback J I.f).obj (op S).unop ⟶ ⊤ := homOfLE (_ : (pullback J I.f).obj (op S).unop ≤ ⊤)
i : (Cover.index (op ((pullback J I.f).obj (op S).unop)).unop P).L
⊢ i.f ≫ I.f = 𝟙 i.Y ≫ i.f ≫ I.f

Next tactic:
simp
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]
  apply congr_arg
  apply Concrete.multiequalizer_ext
  intro i
  dsimp [diagram]
  rw [← comp_apply, ← comp_apply, ← comp_apply, Multiequalizer.lift_ι, Multiequalizer.lift_ι,
    Multiequalizer.lift_ι]
  erw [Meq.equiv_symm_eq_apply]
  let RR : S.Relation :=
    ⟨_, _, _, i.f, 𝟙 _, I.f, i.f ≫ I.f, I.hf, Sieve.downward_closed _ I.hf _, by simp⟩
  

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 : 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 ≤ ⊤)
i : (Cover.index (op ((pullback J I.f).obj (op S).unop)).unop P).L
RR : Cover.Relation S :=
  { Y₁ := I.Y, Y₂ := i.Y, Z := i.Y, g₁ := i.f, g₂ := 𝟙 i.Y, f₁ := I.f, f₂ := i.f ≫ I.f,
    h₁ := (_ : (Cover.sieve S).arrows I.f), h₂ := (_ : (Cover.sieve S).arrows (i.f ≫ I.f)),
    w := (_ : i.f ≫ I.f = 𝟙 i.Y ≫ i.f ≫ I.f) }
⊢ (P.map (Cover.Arrow.map i (homOfLE (_ : Cover.pullback S I.f ≤ ⊤))).f.op) (↑x I) = ↑x (Cover.Arrow.base i)

Next tactic:
erw [x.condition RR]
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]
  apply congr_arg
  apply Concrete.multiequalizer_ext
  intro i
  dsimp [diagram]
  rw [← comp_apply, ← comp_apply, ← comp_apply, Multiequalizer.lift_ι, Multiequalizer.lift_ι,
    Multiequalizer.lift_ι]
  erw [Meq.equiv_symm_eq_apply]
  let RR : S.Relation :=
    ⟨_, _, _, i.f, 𝟙 _, I.f, i.f ≫ I.f, I.hf, Sieve.downward_closed _ I.hf _, by simp⟩
  erw [x.condition RR]
  

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 : 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 ≤ ⊤)
i : (Cover.index (op ((pullback J I.f).obj (op S).unop)).unop P).L
RR : Cover.Relation S :=
  { Y₁ := I.Y, Y₂ := i.Y, Z := i.Y, g₁ := i.f, g₂ := 𝟙 i.Y, f₁ := I.f, f₂ := i.f ≫ I.f,
    h₁ := (_ : (Cover.sieve S).arrows I.f), h₂ := (_ : (Cover.sieve S).arrows (i.f ≫ I.f)),
    w := (_ : i.f ≫ I.f = 𝟙 i.Y ≫ i.f ≫ I.f) }
⊢ (P.map RR.g₂.op) (↑x (MulticospanIndex.sndTo (Cover.index S P) RR)) = ↑x (Cover.Arrow.base i)

Next tactic:
simp only [unop_op, pullback_obj, op_id, Functor.map_id, id_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]
  apply congr_arg
  apply Concrete.multiequalizer_ext
  intro i
  dsimp [diagram]
  rw [← comp_apply, ← comp_apply, ← comp_apply, Multiequalizer.lift_ι, Multiequalizer.lift_ι,
    Multiequalizer.lift_ι]
  erw [Meq.equiv_symm_eq_apply]
  let RR : S.Relation :=
    ⟨_, _, _, i.f, 𝟙 _, I.f, i.f ≫ I.f, I.hf, Sieve.downward_closed _ I.hf _, by simp⟩
  erw [x.condition RR]
  simp only [unop_op, pullback_obj, op_id, Functor.map_id, id_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 : 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 ≤ ⊤)
i : (Cover.index (op ((pullback J I.f).obj (op S).unop)).unop P).L
RR : Cover.Relation S :=
  { Y₁ := I.Y, Y₂ := i.Y, Z := i.Y, g₁ := i.f, g₂ := 𝟙 i.Y, f₁ := I.f, f₂ := i.f ≫ I.f,
    h₁ := (_ : (Cover.sieve S).arrows I.f), h₂ := (_ : (Cover.sieve S).arrows (i.f ≫ I.f)),
    w := (_ : i.f ≫ I.f = 𝟙 i.Y ≫ i.f ≫ I.f) }
⊢ ↑x
      (MulticospanIndex.sndTo (Cover.index S P)
        { Y₁ := I.Y, Y₂ := i.Y, Z := i.Y, g₁ := i.f, g₂ := 𝟙 i.Y, f₁ := I.f, f₂ := i.f ≫ I.f,
          h₁ := (_ : (Cover.sieve S).arrows I.f), h₂ := (_ : (Cover.sieve S).arrows (i.f ≫ I.f)),
          w := (_ : i.f ≫ I.f = 𝟙 i.Y ≫ i.f ≫ I.f) }) =
    ↑x (Cover.Arrow.base i)

Next tactic:
rfl
theorem toPlus_eq_mk {X : C} {P : Cᵒᵖ ⥤ D} (x : P.obj (op X)) :
    (J.toPlus P).app _ x = mk (Meq.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
x : (forget D).obj (P.obj (op X))
⊢ ((toPlus J P).app (op X)) x = mk (Meq.mk ⊤ x)

Next tactic:
dsimp [mk, toPlus]
theorem toPlus_eq_mk {X : C} {P : Cᵒᵖ ⥤ D} (x : P.obj (op X)) :
    (J.toPlus P).app _ x = mk (Meq.mk ⊤ x) := by
  dsimp [mk, toPlus]
  

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
x : (forget D).obj (P.obj (op X))
⊢ (Cover.toMultiequalizer ⊤ P ≫ colimit.ι (diagram J P X) (op ⊤)) x =
    (colimit.ι (diagram J P X) (op ⊤)) ((Meq.equiv P ⊤).symm (Meq.mk ⊤ x))

Next tactic:
delta Cover.toMultiequalizer
theorem toPlus_eq_mk {X : C} {P : Cᵒᵖ ⥤ D} (x : P.obj (op X)) :
    (J.toPlus P).app _ x = mk (Meq.mk ⊤ x) := by
  dsimp [mk, toPlus]
  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
x : (forget D).obj (P.obj (op X))
⊢ (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) ≫
        colimit.ι (diagram J P X) (op ⊤))
      x =
    (colimit.ι (diagram J P X) (op ⊤)) ((Meq.equiv P ⊤).symm (Meq.mk ⊤ x))

Next tactic:
simp only [comp_apply]
theorem toPlus_eq_mk {X : C} {P : Cᵒᵖ ⥤ D} (x : P.obj (op X)) :
    (J.toPlus P).app _ x = mk (Meq.mk ⊤ x) := by
  dsimp [mk, toPlus]
  delta Cover.toMultiequalizer
  simp only [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
x : (forget D).obj (P.obj (op X))
⊢ (colimit.ι (diagram J P X) (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 ⊤)) ((Meq.equiv P ⊤).symm (Meq.mk ⊤ x))

Next tactic:
apply congr_arg
theorem toPlus_eq_mk {X : C} {P : Cᵒᵖ ⥤ D} (x : P.obj (op X)) :
    (J.toPlus P).app _ x = mk (Meq.mk ⊤ x) := by
  dsimp [mk, toPlus]
  delta Cover.toMultiequalizer
  simp only [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
x : (forget D).obj (P.obj (op X))
⊢ (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 ⊤).symm (Meq.mk ⊤ x)

Next tactic:
apply (Meq.equiv P ⊤).injective
theorem toPlus_eq_mk {X : C} {P : Cᵒᵖ ⥤ D} (x : P.obj (op X)) :
    (J.toPlus P).app _ x = mk (Meq.mk ⊤ x) := by
  dsimp [mk, toPlus]
  delta Cover.toMultiequalizer
  simp only [comp_apply]
  apply congr_arg
  apply (Meq.equiv P ⊤).injective
  

Proof state:
case h.a
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
x : (forget D).obj (P.obj (op X))
⊢ (Meq.equiv P ⊤)
      ((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 ⊤) ((Meq.equiv P ⊤).symm (Meq.mk ⊤ x))

Next tactic:
ext i
theorem toPlus_eq_mk {X : C} {P : Cᵒᵖ ⥤ D} (x : P.obj (op X)) :
    (J.toPlus P).app _ x = mk (Meq.mk ⊤ x) := by
  dsimp [mk, toPlus]
  delta Cover.toMultiequalizer
  simp only [comp_apply]
  apply congr_arg
  apply (Meq.equiv P ⊤).injective
  ext i
  

Proof state:
case h.a.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
x : (forget D).obj (P.obj (op X))
i : Cover.Arrow ⊤
⊢ ↑((Meq.equiv P ⊤)
          ((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))
      i =
    ↑((Meq.equiv P ⊤) ((Meq.equiv P ⊤).symm (Meq.mk ⊤ x))) i

Next tactic:
rw [Meq.equiv_apply, Equiv.apply_symm_apply, ← comp_apply, Multiequalizer.lift_ι]
theorem toPlus_eq_mk {X : C} {P : Cᵒᵖ ⥤ D} (x : P.obj (op X)) :
    (J.toPlus P).app _ x = mk (Meq.mk ⊤ x) := by
  dsimp [mk, toPlus]
  delta Cover.toMultiequalizer
  simp only [comp_apply]
  apply congr_arg
  apply (Meq.equiv P ⊤).injective
  ext i
  rw [Meq.equiv_apply, Equiv.apply_symm_apply, ← comp_apply, Multiequalizer.lift_ι]
  

Proof state:
case h.a.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
x : (forget D).obj (P.obj (op X))
i : Cover.Arrow ⊤
⊢ (P.map i.f.op) x = ↑(Meq.mk ⊤ x) i

Next tactic:
rfl
theorem exists_rep {X : C} {P : Cᵒᵖ ⥤ D} (x : (J.plusObj P).obj (op X)) :
    ∃ (S : J.Cover X) (y : Meq P S), x = mk y := 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)
inst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)
X : C
P : Cᵒᵖ ⥤ D
x : (forget D).obj ((plusObj J P).obj (op X))
⊢ ∃ S y, x = mk y

Next tactic:
obtain ⟨S, y, h⟩ := Concrete.colimit_exists_rep (J.diagram P X) x