l3lab/ntp-mathlib huggingface dataset:
theorem eq_mk_iff_exists {X : C} {P : Cᵒᵖ ⥤ D} {S T : J.Cover X} (x : Meq P S) (y : Meq P T) :
    mk x = mk y ↔ ∃ (W : J.Cover X) (h1 : W ⟶ S) (h2 : W ⟶ T), x.refine h1 = y.refine h2 := by
  constructor
  · intro h
    obtain ⟨W, h1, h2, hh⟩ := Concrete.colimit_exists_of_rep_eq _ _ _ h
    use W.unop, h1.unop, h2.unop
    ext I
    apply_fun Multiequalizer.ι (W.unop.index P) I at hh
    convert hh
    all_goals
      dsimp [diagram]
      erw [← comp_apply, Multiequalizer.lift_ι, Meq.equiv_symm_eq_apply]
      

Proof state:
case h.e'_3.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)
inst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)
X : C
P : Cᵒᵖ ⥤ D
S T : Cover J X
x : Meq P S
y : Meq P T
h : mk x = mk y
W : (Cover J X)ᵒᵖ
h1 : op S ⟶ W
h2 : op T ⟶ W
I : Cover.Arrow W.unop
hh :
  (Multiequalizer.ι (Cover.index W.unop P) I) (((diagram J P X).map h1) ((Meq.equiv P S).symm x)) =
    (Multiequalizer.ι (Cover.index W.unop P) I) (((diagram J P X).map h2) ((Meq.equiv P T).symm y))
e_1✝ : (forget D).obj (P.obj (op I.Y)) = (forget D).obj (MulticospanIndex.left (Cover.index W.unop P) I)
⊢ ↑y { Y := I.Y, f := I.f, hf := (_ : ((fun a => ↑a) T).arrows I.f) } = ↑y (Cover.Arrow.map I h2.unop)

Next tactic:
cases I
theorem eq_mk_iff_exists {X : C} {P : Cᵒᵖ ⥤ D} {S T : J.Cover X} (x : Meq P S) (y : Meq P T) :
    mk x = mk y ↔ ∃ (W : J.Cover X) (h1 : W ⟶ S) (h2 : W ⟶ T), x.refine h1 = y.refine h2 := by
  constructor
  · intro h
    obtain ⟨W, h1, h2, hh⟩ := Concrete.colimit_exists_of_rep_eq _ _ _ h
    use W.unop, h1.unop, h2.unop
    ext I
    apply_fun Multiequalizer.ι (W.unop.index P) I at hh
    convert hh
    all_goals
      dsimp [diagram]
      erw [← comp_apply, Multiequalizer.lift_ι, Meq.equiv_symm_eq_apply]
      cases I; 

Proof state:
case h.e'_3.h.mk
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
S T : Cover J X
x : Meq P S
y : Meq P T
h : mk x = mk y
W : (Cover J X)ᵒᵖ
h1 : op S ⟶ W
h2 : op T ⟶ W
Y✝ : C
f✝ : Y✝ ⟶ X
hf✝ : (Cover.sieve W.unop).arrows f✝
hh :
  (Multiequalizer.ι (Cover.index W.unop P) { Y := Y✝, f := f✝, hf := hf✝ })
      (((diagram J P X).map h1) ((Meq.equiv P S).symm x)) =
    (Multiequalizer.ι (Cover.index W.unop P) { Y := Y✝, f := f✝, hf := hf✝ })
      (((diagram J P X).map h2) ((Meq.equiv P T).symm y))
e_1✝ :
  (forget D).obj (P.obj (op { Y := Y✝, f := f✝, hf := hf✝ }.Y)) =
    (forget D).obj (MulticospanIndex.left (Cover.index W.unop P) { Y := Y✝, f := f✝, hf := hf✝ })
⊢ ↑y
      { Y := { Y := Y✝, f := f✝, hf := hf✝ }.Y, f := { Y := Y✝, f := f✝, hf := hf✝ }.f,
        hf := (_ : ((fun a => ↑a) T).arrows { Y := Y✝, f := f✝, hf := hf✝ }.f) } =
    ↑y (Cover.Arrow.map { Y := Y✝, f := f✝, hf := hf✝ } h2.unop)

Next tactic:
rfl
theorem eq_mk_iff_exists {X : C} {P : Cᵒᵖ ⥤ D} {S T : J.Cover X} (x : Meq P S) (y : Meq P T) :
    mk x = mk y ↔ ∃ (W : J.Cover X) (h1 : W ⟶ S) (h2 : W ⟶ T), x.refine h1 = y.refine h2 := by
  constructor
  · intro h
    obtain ⟨W, h1, h2, hh⟩ := Concrete.colimit_exists_of_rep_eq _ _ _ h
    use W.unop, h1.unop, h2.unop
    ext I
    apply_fun Multiequalizer.ι (W.unop.index P) I at hh
    convert hh
    all_goals
      dsimp [diagram]
      erw [← comp_apply, Multiequalizer.lift_ι, Meq.equiv_symm_eq_apply]
      cases I; rfl
  · 

Proof state:
case mpr
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
S T : Cover J X
x : Meq P S
y : Meq P T
⊢ (∃ W h1 h2, Meq.refine x h1 = Meq.refine y h2) → mk x = mk y

Next tactic:
rintro ⟨S, h1, h2, e⟩
theorem eq_mk_iff_exists {X : C} {P : Cᵒᵖ ⥤ D} {S T : J.Cover X} (x : Meq P S) (y : Meq P T) :
    mk x = mk y ↔ ∃ (W : J.Cover X) (h1 : W ⟶ S) (h2 : W ⟶ T), x.refine h1 = y.refine h2 := by
  constructor
  · intro h
    obtain ⟨W, h1, h2, hh⟩ := Concrete.colimit_exists_of_rep_eq _ _ _ h
    use W.unop, h1.unop, h2.unop
    ext I
    apply_fun Multiequalizer.ι (W.unop.index P) I at hh
    convert hh
    all_goals
      dsimp [diagram]
      erw [← comp_apply, Multiequalizer.lift_ι, Meq.equiv_symm_eq_apply]
      cases I; rfl
  · rintro ⟨S, h1, h2, e⟩
    

Proof state:
case mpr.intro.intro.intro
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
S✝ T : Cover J X
x : Meq P S✝
y : Meq P T
S : Cover J X
h1 : S ⟶ S✝
h2 : S ⟶ T
e : Meq.refine x h1 = Meq.refine y h2
⊢ mk x = mk y

Next tactic:
apply Concrete.colimit_rep_eq_of_exists
theorem eq_mk_iff_exists {X : C} {P : Cᵒᵖ ⥤ D} {S T : J.Cover X} (x : Meq P S) (y : Meq P T) :
    mk x = mk y ↔ ∃ (W : J.Cover X) (h1 : W ⟶ S) (h2 : W ⟶ T), x.refine h1 = y.refine h2 := by
  constructor
  · intro h
    obtain ⟨W, h1, h2, hh⟩ := Concrete.colimit_exists_of_rep_eq _ _ _ h
    use W.unop, h1.unop, h2.unop
    ext I
    apply_fun Multiequalizer.ι (W.unop.index P) I at hh
    convert hh
    all_goals
      dsimp [diagram]
      erw [← comp_apply, Multiequalizer.lift_ι, Meq.equiv_symm_eq_apply]
      cases I; rfl
  · rintro ⟨S, h1, h2, e⟩
    apply Concrete.colimit_rep_eq_of_exists
    

Proof state:
case mpr.intro.intro.intro.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)
inst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)
X : C
P : Cᵒᵖ ⥤ D
S✝ T : Cover J X
x : Meq P S✝
y : Meq P T
S : Cover J X
h1 : S ⟶ S✝
h2 : S ⟶ T
e : Meq.refine x h1 = Meq.refine y h2
⊢ ∃ k f g, ((diagram J P X).map f) ((Meq.equiv P S✝).symm x) = ((diagram J P X).map g) ((Meq.equiv P T).symm y)

Next tactic:
use op S, h1.op, h2.op
theorem eq_mk_iff_exists {X : C} {P : Cᵒᵖ ⥤ D} {S T : J.Cover X} (x : Meq P S) (y : Meq P T) :
    mk x = mk y ↔ ∃ (W : J.Cover X) (h1 : W ⟶ S) (h2 : W ⟶ T), x.refine h1 = y.refine h2 := by
  constructor
  · intro h
    obtain ⟨W, h1, h2, hh⟩ := Concrete.colimit_exists_of_rep_eq _ _ _ h
    use W.unop, h1.unop, h2.unop
    ext I
    apply_fun Multiequalizer.ι (W.unop.index P) I at hh
    convert hh
    all_goals
      dsimp [diagram]
      erw [← comp_apply, Multiequalizer.lift_ι, Meq.equiv_symm_eq_apply]
      cases I; rfl
  · rintro ⟨S, h1, h2, e⟩
    apply Concrete.colimit_rep_eq_of_exists
    use op S, h1.op, h2.op
    

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)
inst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)
X : C
P : Cᵒᵖ ⥤ D
S✝ T : Cover J X
x : Meq P S✝
y : Meq P T
S : Cover J X
h1 : S ⟶ S✝
h2 : S ⟶ T
e : Meq.refine x h1 = Meq.refine y h2
⊢ ((diagram J P X).map h1.op) ((Meq.equiv P S✝).symm x) = ((diagram J P X).map h2.op) ((Meq.equiv P T).symm y)

Next tactic:
apply Concrete.multiequalizer_ext
theorem eq_mk_iff_exists {X : C} {P : Cᵒᵖ ⥤ D} {S T : J.Cover X} (x : Meq P S) (y : Meq P T) :
    mk x = mk y ↔ ∃ (W : J.Cover X) (h1 : W ⟶ S) (h2 : W ⟶ T), x.refine h1 = y.refine h2 := by
  constructor
  · intro h
    obtain ⟨W, h1, h2, hh⟩ := Concrete.colimit_exists_of_rep_eq _ _ _ h
    use W.unop, h1.unop, h2.unop
    ext I
    apply_fun Multiequalizer.ι (W.unop.index P) I at hh
    convert hh
    all_goals
      dsimp [diagram]
      erw [← comp_apply, Multiequalizer.lift_ι, Meq.equiv_symm_eq_apply]
      cases I; rfl
  · rintro ⟨S, h1, h2, e⟩
    apply Concrete.colimit_rep_eq_of_exists
    use op S, h1.op, h2.op
    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)
inst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)
X : C
P : Cᵒᵖ ⥤ D
S✝ T : Cover J X
x : Meq P S✝
y : Meq P T
S : Cover J X
h1 : S ⟶ S✝
h2 : S ⟶ T
e : Meq.refine x h1 = Meq.refine y h2
⊢ ∀ (t : (Cover.index (op S).unop P).L),
    (Multiequalizer.ι (Cover.index (op S).unop P) t) (((diagram J P X).map h1.op) ((Meq.equiv P S✝).symm x)) =
      (Multiequalizer.ι (Cover.index (op S).unop P) t) (((diagram J P X).map h2.op) ((Meq.equiv P T).symm y))

Next tactic:
intro i
theorem eq_mk_iff_exists {X : C} {P : Cᵒᵖ ⥤ D} {S T : J.Cover X} (x : Meq P S) (y : Meq P T) :
    mk x = mk y ↔ ∃ (W : J.Cover X) (h1 : W ⟶ S) (h2 : W ⟶ T), x.refine h1 = y.refine h2 := by
  constructor
  · intro h
    obtain ⟨W, h1, h2, hh⟩ := Concrete.colimit_exists_of_rep_eq _ _ _ h
    use W.unop, h1.unop, h2.unop
    ext I
    apply_fun Multiequalizer.ι (W.unop.index P) I at hh
    convert hh
    all_goals
      dsimp [diagram]
      erw [← comp_apply, Multiequalizer.lift_ι, Meq.equiv_symm_eq_apply]
      cases I; rfl
  · rintro ⟨S, h1, h2, e⟩
    apply Concrete.colimit_rep_eq_of_exists
    use op S, h1.op, h2.op
    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)
inst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)
X : C
P : Cᵒᵖ ⥤ D
S✝ T : Cover J X
x : Meq P S✝
y : Meq P T
S : Cover J X
h1 : S ⟶ S✝
h2 : S ⟶ T
e : Meq.refine x h1 = Meq.refine y h2
i : (Cover.index (op S).unop P).L
⊢ (Multiequalizer.ι (Cover.index (op S).unop P) i) (((diagram J P X).map h1.op) ((Meq.equiv P S✝).symm x)) =
    (Multiequalizer.ι (Cover.index (op S).unop P) i) (((diagram J P X).map h2.op) ((Meq.equiv P T).symm y))

Next tactic:
apply_fun fun ee => ee i at e
theorem eq_mk_iff_exists {X : C} {P : Cᵒᵖ ⥤ D} {S T : J.Cover X} (x : Meq P S) (y : Meq P T) :
    mk x = mk y ↔ ∃ (W : J.Cover X) (h1 : W ⟶ S) (h2 : W ⟶ T), x.refine h1 = y.refine h2 := by
  constructor
  · intro h
    obtain ⟨W, h1, h2, hh⟩ := Concrete.colimit_exists_of_rep_eq _ _ _ h
    use W.unop, h1.unop, h2.unop
    ext I
    apply_fun Multiequalizer.ι (W.unop.index P) I at hh
    convert hh
    all_goals
      dsimp [diagram]
      erw [← comp_apply, Multiequalizer.lift_ι, Meq.equiv_symm_eq_apply]
      cases I; rfl
  · rintro ⟨S, h1, h2, e⟩
    apply Concrete.colimit_rep_eq_of_exists
    use op S, h1.op, h2.op
    apply Concrete.multiequalizer_ext
    intro i
    apply_fun fun ee => ee i at e
    

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)
inst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)
X : C
P : Cᵒᵖ ⥤ D
S✝ T : Cover J X
x : Meq P S✝
y : Meq P T
S : Cover J X
h1 : S ⟶ S✝
h2 : S ⟶ T
i : (Cover.index (op S).unop P).L
e : ↑(Meq.refine x h1) i = ↑(Meq.refine y h2) i
⊢ (Multiequalizer.ι (Cover.index (op S).unop P) i) (((diagram J P X).map h1.op) ((Meq.equiv P S✝).symm x)) =
    (Multiequalizer.ι (Cover.index (op S).unop P) i) (((diagram J P X).map h2.op) ((Meq.equiv P T).symm y))

Next tactic:
convert e
theorem eq_mk_iff_exists {X : C} {P : Cᵒᵖ ⥤ D} {S T : J.Cover X} (x : Meq P S) (y : Meq P T) :
    mk x = mk y ↔ ∃ (W : J.Cover X) (h1 : W ⟶ S) (h2 : W ⟶ T), x.refine h1 = y.refine h2 := by
  constructor
  · intro h
    obtain ⟨W, h1, h2, hh⟩ := Concrete.colimit_exists_of_rep_eq _ _ _ h
    use W.unop, h1.unop, h2.unop
    ext I
    apply_fun Multiequalizer.ι (W.unop.index P) I at hh
    convert hh
    all_goals
      dsimp [diagram]
      erw [← comp_apply, Multiequalizer.lift_ι, Meq.equiv_symm_eq_apply]
      cases I; rfl
  · rintro ⟨S, h1, h2, e⟩
    apply Concrete.colimit_rep_eq_of_exists
    use op S, h1.op, h2.op
    apply Concrete.multiequalizer_ext
    intro i
    apply_fun fun ee => ee i at e
    convert e
    

Proof state:
case h.e'_2.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)
inst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)
X : C
P : Cᵒᵖ ⥤ D
S✝ T : Cover J X
x : Meq P S✝
y : Meq P T
S : Cover J X
h1 : S ⟶ S✝
h2 : S ⟶ T
i : (Cover.index (op S).unop P).L
e : ↑(Meq.refine x h1) i = ↑(Meq.refine y h2) i
e_1✝ : (forget D).obj (MulticospanIndex.left (Cover.index (op S).unop P) i) = (forget D).obj (P.obj (op i.Y))
⊢ (Multiequalizer.ι (Cover.index (op S).unop P) i) (((diagram J P X).map h1.op) ((Meq.equiv P S✝).symm x)) =
    ↑(Meq.refine x h1) i
case h.e'_3.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)
inst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)
X : C
P : Cᵒᵖ ⥤ D
S✝ T : Cover J X
x : Meq P S✝
y : Meq P T
S : Cover J X
h1 : S ⟶ S✝
h2 : S ⟶ T
i : (Cover.index (op S).unop P).L
e : ↑(Meq.refine x h1) i = ↑(Meq.refine y h2) i
e_1✝ : (forget D).obj (MulticospanIndex.left (Cover.index (op S).unop P) i) = (forget D).obj (P.obj (op i.Y))
⊢ (Multiequalizer.ι (Cover.index (op S).unop P) i) (((diagram J P X).map h2.op) ((Meq.equiv P T).symm y)) =
    ↑(Meq.refine y h2) i

Next tactic:
all_goals
      dsimp [diagram]
      rw [← comp_apply, Multiequalizer.lift_ι]
      erw [Meq.equiv_symm_eq_apply]
      cases i; rfl
theorem eq_mk_iff_exists {X : C} {P : Cᵒᵖ ⥤ D} {S T : J.Cover X} (x : Meq P S) (y : Meq P T) :
    mk x = mk y ↔ ∃ (W : J.Cover X) (h1 : W ⟶ S) (h2 : W ⟶ T), x.refine h1 = y.refine h2 := by
  constructor
  · intro h
    obtain ⟨W, h1, h2, hh⟩ := Concrete.colimit_exists_of_rep_eq _ _ _ h
    use W.unop, h1.unop, h2.unop
    ext I
    apply_fun Multiequalizer.ι (W.unop.index P) I at hh
    convert hh
    all_goals
      dsimp [diagram]
      erw [← comp_apply, Multiequalizer.lift_ι, Meq.equiv_symm_eq_apply]
      cases I; rfl
  · rintro ⟨S, h1, h2, e⟩
    apply Concrete.colimit_rep_eq_of_exists
    use op S, h1.op, h2.op
    apply Concrete.multiequalizer_ext
    intro i
    apply_fun fun ee => ee i at e
    convert e
    all_goals
      

Proof state:
case h.e'_2.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)
inst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)
X : C
P : Cᵒᵖ ⥤ D
S✝ T : Cover J X
x : Meq P S✝
y : Meq P T
S : Cover J X
h1 : S ⟶ S✝
h2 : S ⟶ T
i : (Cover.index (op S).unop P).L
e : ↑(Meq.refine x h1) i = ↑(Meq.refine y h2) i
e_1✝ : (forget D).obj (MulticospanIndex.left (Cover.index (op S).unop P) i) = (forget D).obj (P.obj (op i.Y))
⊢ (Multiequalizer.ι (Cover.index (op S).unop P) i) (((diagram J P X).map h1.op) ((Meq.equiv P S✝).symm x)) =
    ↑(Meq.refine x h1) i

Next tactic:
dsimp [diagram]
theorem eq_mk_iff_exists {X : C} {P : Cᵒᵖ ⥤ D} {S T : J.Cover X} (x : Meq P S) (y : Meq P T) :
    mk x = mk y ↔ ∃ (W : J.Cover X) (h1 : W ⟶ S) (h2 : W ⟶ T), x.refine h1 = y.refine h2 := by
  constructor
  · intro h
    obtain ⟨W, h1, h2, hh⟩ := Concrete.colimit_exists_of_rep_eq _ _ _ h
    use W.unop, h1.unop, h2.unop
    ext I
    apply_fun Multiequalizer.ι (W.unop.index P) I at hh
    convert hh
    all_goals
      dsimp [diagram]
      erw [← comp_apply, Multiequalizer.lift_ι, Meq.equiv_symm_eq_apply]
      cases I; rfl
  · rintro ⟨S, h1, h2, e⟩
    apply Concrete.colimit_rep_eq_of_exists
    use op S, h1.op, h2.op
    apply Concrete.multiequalizer_ext
    intro i
    apply_fun fun ee => ee i at e
    convert e
    all_goals
      dsimp [diagram]
      

Proof state:
case h.e'_2.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)
inst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)
X : C
P : Cᵒᵖ ⥤ D
S✝ T : Cover J X
x : Meq P S✝
y : Meq P T
S : Cover J X
h1 : S ⟶ S✝
h2 : S ⟶ T
i : (Cover.index (op S).unop P).L
e : ↑(Meq.refine x h1) i = ↑(Meq.refine y h2) i
e_1✝ : (forget D).obj (MulticospanIndex.left (Cover.index (op S).unop P) i) = (forget D).obj (P.obj (op i.Y))
⊢ (Multiequalizer.ι (Cover.index S P) i)
      ((Multiequalizer.lift (Cover.index S P) (multiequalizer (Cover.index S✝ P))
          (fun I => Multiequalizer.ι (Cover.index S✝ P) (Cover.Arrow.map I h1))
          (_ :
            ∀ (I : (Cover.index (op S).unop P).R),
              Multiequalizer.ι (Cover.index (op S✝).unop P)
                    (MulticospanIndex.fstTo (Cover.index (op S✝).unop P) (Cover.Relation.map I h1.op.unop)) ≫
                  MulticospanIndex.fst (Cover.index (op S✝).unop P) (Cover.Relation.map I h1.op.unop) =
                Multiequalizer.ι (Cover.index (op S✝).unop P)
                    (MulticospanIndex.sndTo (Cover.index (op S✝).unop P) (Cover.Relation.map I h1.op.unop)) ≫
                  MulticospanIndex.snd (Cover.index (op S✝).unop P) (Cover.Relation.map I h1.op.unop)))
        ((Meq.equiv P S✝).symm x)) =
    ↑x { Y := i.Y, f := i.f, hf := (_ : ((fun a => ↑a) S✝).arrows i.f) }

Next tactic:
rw [← comp_apply, Multiequalizer.lift_ι]
theorem eq_mk_iff_exists {X : C} {P : Cᵒᵖ ⥤ D} {S T : J.Cover X} (x : Meq P S) (y : Meq P T) :
    mk x = mk y ↔ ∃ (W : J.Cover X) (h1 : W ⟶ S) (h2 : W ⟶ T), x.refine h1 = y.refine h2 := by
  constructor
  · intro h
    obtain ⟨W, h1, h2, hh⟩ := Concrete.colimit_exists_of_rep_eq _ _ _ h
    use W.unop, h1.unop, h2.unop
    ext I
    apply_fun Multiequalizer.ι (W.unop.index P) I at hh
    convert hh
    all_goals
      dsimp [diagram]
      erw [← comp_apply, Multiequalizer.lift_ι, Meq.equiv_symm_eq_apply]
      cases I; rfl
  · rintro ⟨S, h1, h2, e⟩
    apply Concrete.colimit_rep_eq_of_exists
    use op S, h1.op, h2.op
    apply Concrete.multiequalizer_ext
    intro i
    apply_fun fun ee => ee i at e
    convert e
    all_goals
      dsimp [diagram]
      rw [← comp_apply, Multiequalizer.lift_ι]
      

Proof state:
case h.e'_2.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)
inst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)
X : C
P : Cᵒᵖ ⥤ D
S✝ T : Cover J X
x : Meq P S✝
y : Meq P T
S : Cover J X
h1 : S ⟶ S✝
h2 : S ⟶ T
i : (Cover.index (op S).unop P).L
e : ↑(Meq.refine x h1) i = ↑(Meq.refine y h2) i
e_1✝ : (forget D).obj (MulticospanIndex.left (Cover.index (op S).unop P) i) = (forget D).obj (P.obj (op i.Y))
⊢ (Multiequalizer.ι (Cover.index S✝ P) (Cover.Arrow.map i h1)) ((Meq.equiv P S✝).symm x) =
    ↑x { Y := i.Y, f := i.f, hf := (_ : ((fun a => ↑a) S✝).arrows i.f) }

Next tactic:
erw [Meq.equiv_symm_eq_apply]
theorem eq_mk_iff_exists {X : C} {P : Cᵒᵖ ⥤ D} {S T : J.Cover X} (x : Meq P S) (y : Meq P T) :
    mk x = mk y ↔ ∃ (W : J.Cover X) (h1 : W ⟶ S) (h2 : W ⟶ T), x.refine h1 = y.refine h2 := by
  constructor
  · intro h
    obtain ⟨W, h1, h2, hh⟩ := Concrete.colimit_exists_of_rep_eq _ _ _ h
    use W.unop, h1.unop, h2.unop
    ext I
    apply_fun Multiequalizer.ι (W.unop.index P) I at hh
    convert hh
    all_goals
      dsimp [diagram]
      erw [← comp_apply, Multiequalizer.lift_ι, Meq.equiv_symm_eq_apply]
      cases I; rfl
  · rintro ⟨S, h1, h2, e⟩
    apply Concrete.colimit_rep_eq_of_exists
    use op S, h1.op, h2.op
    apply Concrete.multiequalizer_ext
    intro i
    apply_fun fun ee => ee i at e
    convert e
    all_goals
      dsimp [diagram]
      rw [← comp_apply, Multiequalizer.lift_ι]
      erw [Meq.equiv_symm_eq_apply]
      

Proof state:
case h.e'_2.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)
inst✝ : (X : C) → PreservesColimitsOfShape (Cover J X)ᵒᵖ (forget D)
X : C
P : Cᵒᵖ ⥤ D
S✝ T : Cover J X
x : Meq P S✝
y : Meq P T
S : Cover J X
h1 : S ⟶ S✝
h2 : S ⟶ T
i : (Cover.index (op S).unop P).L
e : ↑(Meq.refine x h1) i = ↑(Meq.refine y h2) i
e_1✝ : (forget D).obj (MulticospanIndex.left (Cover.index (op S).unop P) i) = (forget D).obj (P.obj (op i.Y))
⊢ ↑x (Cover.Arrow.map i h1) = ↑x { Y := i.Y, f := i.f, hf := (_ : ((fun a => ↑a) S✝).arrows i.f) }

Next tactic:
cases i