theorem exists_of_sep (P : Cᵒᵖ ⥤ D)
    (hsep :
      ∀ (X : C) (S : J.Cover X) (x y : P.obj (op X)),
        (∀ I : S.Arrow, P.map I.f.op x = P.map I.f.op y) → x = y)
    (X : C) (S : J.Cover X) (s : Meq (J.plusObj P) S) :
    ∃ t : (J.plusObj P).obj (op X), Meq.mk S t = s := by
  have inj : ∀ X : C, Function.Injective ((J.toPlus P).app (op X)) := inj_of_sep _ hsep
  -- Choose representatives for the given local sections.
  choose T t ht using fun I => exists_rep (s I)
  -- Construct a large cover over which we will define a representative that will
  -- provide the gluing of the given local sections.
  let B : J.Cover X := S.bind T
  choose Z e1 e2 he2 _ _ using fun I : B.Arrow => I.hf
  -- Construct a compatible system of local sections over this large cover, using the chosen
  -- representatives of our local sections.
  -- The compatibility here follows from the separatedness assumption.
  let w : Meq P B := meqOfSep P hsep X S s T t ht
  -- The associated gluing will be the candidate section.
  use mk w
  ext I
  dsimp [Meq.mk]
  erw [ht, res_mk_eq_mk_pullback]
  -- Use the separatedness of `P⁺` to prove that this is indeed a gluing of our
  -- original local sections.
  apply sep P (T I)
  intro II
  simp only [res_mk_eq_mk_pullback, eq_mk_iff_exists]
  -- It suffices to prove equality for representatives over a
  -- convenient sufficiently large cover...
  use (J.pullback II.f).obj (T I)
  let e0 : (J.pullback II.f).obj (T I) ⟶ (J.pullback II.f).obj ((J.pullback I.f).obj B) :=
    homOfLE
      (by
        intro Y f hf
        apply Sieve.le_pullback_bind _ _ _ I.hf
        · cases I
          exact hf)
  use e0, 𝟙 _
  ext IV
  let IA : B.Arrow := ⟨_, (IV.f ≫ II.f) ≫ I.f,
    ⟨I.Y, _, _, I.hf, Sieve.downward_closed _ II.hf _, rfl⟩⟩
  let IB : S.Arrow := IA.fromMiddle
  let IC : (T IB).Arrow := IA.toMiddle
  let ID : (T I).Arrow := ⟨IV.Y, IV.f ≫ II.f, Sieve.downward_closed (T I).sieve II.hf IV.f⟩
  change t IB IC = t I ID
  

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)
P : Cᵒᵖ ⥤ D
hsep :
  ∀ (X : C) (S : Cover J X) (x y : (forget D).obj (P.obj (op X))),
    (∀ (I : Cover.Arrow S), (P.map I.f.op) x = (P.map I.f.op) y) → x = y
X : C
S : Cover J X
s : Meq (plusObj J P) S
inj : ∀ (X : C), Function.Injective ⇑((toPlus J P).app (op X))
T : (I : Cover.Arrow S) → Cover J I.Y
t : (I : Cover.Arrow S) → Meq P (T I)
ht : ∀ (I : Cover.Arrow S), ↑s I = mk (t I)
B : Cover J X := Cover.bind S T
Z : Cover.Arrow B → C
e1 : (I : Cover.Arrow B) → I.Y ⟶ Z I
e2 : (I : Cover.Arrow B) → Z I ⟶ X
he2 : ∀ (I : Cover.Arrow B), (Cover.sieve S).arrows (e2 I)
h✝ :
  ∀ (I : Cover.Arrow B),
    (fun Y f h => ((fun Y f hf => Cover.sieve (T { Y := Y, f := f, hf := hf })) Y f h).arrows) (Z I) (e2 I)
      (_ : (Cover.sieve S).arrows (e2 I)) (e1 I)
✝ : ∀ (I : Cover.Arrow B), e1 I ≫ e2 I = I.f
w : Meq P B := meqOfSep P hsep X S s T t ht
I : Cover.Arrow S
II : Cover.Arrow (T I)
e0 : (pullback J II.f).obj (T I) ⟶ (pullback J II.f).obj ((pullback J I.f).obj B) :=
  homOfLE
    (_ :
      ∀ ⦃Y : C⦄ (f : Y ⟶ II.Y),
        ((fun a => ↑a) ((pullback J II.f).obj (T I))).arrows f →
          (Sieve.pullback I.f
                (Sieve.bind (Cover.sieve S).arrows fun Y f H =>
                  (fun Y f hf => Cover.sieve (T { Y := Y, f := f, hf := hf })) Y f H)).arrows
            (f ≫ II.f))
IV : Cover.Arrow ((pullback J II.f).obj (T I))
IA : Cover.Arrow B :=
  { Y := IV.Y, f := (IV.f ≫ II.f) ≫ I.f,
    hf :=
      (_ :
        ∃ Y g f,
          ∃ (H : (Cover.sieve S).arrows f),
            (fun Y f h => ((fun Y f hf => Cover.sieve (T { Y := Y, f := f, hf := hf })) Y f h).arrows) Y f H g ∧
              g ≫ f = (IV.f ≫ II.f) ≫ I.f) }
IB : Cover.Arrow S := Cover.Arrow.fromMiddle IA
IC : Cover.Arrow (T IB) := Cover.Arrow.toMiddle IA
ID : Cover.Arrow (T I) := { Y := IV.Y, f := IV.f ≫ II.f, hf := (_ : (Cover.sieve (T I)).arrows (IV.f ≫ II.f)) }
⊢ ↑(t IB) IC = ↑(t I) ID

Next tactic:
apply inj IV.Y