theorem Subpresheaf.sheafify_isSheaf (hF : Presieve.IsSheaf J F) :
    Presieve.IsSheaf J (G.sheafify J).toPresheaf := by
  intro U S hS x hx
  let S' := Sieve.bind S fun Y f hf => G.sieveOfSection (x f hf).1
  have := fun (V) (i : V ⟶ U) (hi : S' i) => hi
  -- porting note: change to explicit variable so that `choose` can find the correct
  -- dependent functions. Thus everything follows need two additional explicit variables.
  choose W i₁ i₂ hi₂ h₁ h₂ using this
  dsimp [-Sieve.bind_apply] at *
  let x'' : Presieve.FamilyOfElements F S' := fun V i hi => F.map (i₁ V i hi).op (x _ (hi₂ V i hi))
  have H : ∀ s, x.IsAmalgamation s ↔ x''.IsAmalgamation s.1 := by
    intro s
    constructor
    · intro H V i hi
      dsimp only [show x'' = fun V i hi => F.map (i₁ V i hi).op (x _ (hi₂ V i hi)) from rfl]
      conv_lhs => rw [← h₂ _ _ hi]
      rw [← H _ (hi₂ _ _ hi)]
      exact FunctorToTypes.map_comp_apply F (i₂ _ _ hi).op (i₁ _ _ hi).op _
    · intro H V i hi
      refine Subtype.ext ?_
      apply (hF _ (x i hi).2).isSeparatedFor.ext
      intro V' i' hi'
      have hi'' : S' (i' ≫ i) := ⟨_, _, _, hi, hi', rfl⟩
      have := H _ hi''
      rw [op_comp, F.map_comp] at this
      refine' this.trans (congr_arg Subtype.val (hx _ _ (hi₂ _ _ hi'') hi (h₂ _ _ hi'')))
  have : x''.Compatible := by
    intro V₁ V₂ V₃ g₁ g₂ g₃ g₄ S₁ S₂ e
    rw [← FunctorToTypes.map_comp_apply, ← FunctorToTypes.map_comp_apply]
    exact
      congr_arg Subtype.val
        (hx (g₁ ≫ i₁ _ _ S₁) (g₂ ≫ i₁ _ _ S₂) (hi₂ _ _ S₁) (hi₂ _ _ S₂)
        (by simp only [Category.assoc, h₂, e]))
  obtain ⟨t, ht, ht'⟩ := hF _ (J.bind_covering hS fun V i hi => (x i hi).2) _ this
  refine' ⟨⟨t, _⟩, (H ⟨t, _⟩).mpr ht, fun y hy => Subtype.ext (ht' _ ((H _).mp hy))⟩
  

Proof state:
case intro.intro
C : Type u
inst✝ : Category.{v, u} C
J : GrothendieckTopology C
F F' F'' : Cᵒᵖ ⥤ Type w
G G' : Subpresheaf F
hF : Presieve.IsSheaf J F
U : C
S : Sieve U
hS : S ∈ sieves J U
x : Presieve.FamilyOfElements (toPresheaf (sheafify J G)) S.arrows
hx : Presieve.FamilyOfElements.Compatible x
S' : Sieve U := Sieve.bind S.arrows fun Y f hf => sieveOfSection G ↑(x f hf)
W : (V : C) → (i : V ⟶ U) → S'.arrows i → C
i₁ : (V : C) → (i : V ⟶ U) → (hi : S'.arrows i) → V ⟶ W V i hi
i₂ : (V : C) → (i : V ⟶ U) → (hi : S'.arrows i) → W V i hi ⟶ U
hi₂ : ∀ (V : C) (i : V ⟶ U) (hi : S'.arrows i), S.arrows (i₂ V i hi)
h₁ :
  ∀ (V : C) (i : V ⟶ U) (hi : (Sieve.bind S.arrows fun Y f hf => sieveOfSection G ↑(x f hf)).arrows i),
    F.map (i₁ V i hi).op ↑(x (i₂ V i hi) (_ : S.arrows (i₂ V i hi))) ∈ obj G (op V)
h₂ :
  ∀ (V : C) (i : V ⟶ U) (hi : (Sieve.bind S.arrows fun Y f hf => sieveOfSection G ↑(x f hf)).arrows i),
    i₁ V i hi ≫ i₂ V i hi = i
x'' : Presieve.FamilyOfElements F S'.arrows :=
  fun V i hi => F.map (i₁ V i hi).op ↑(x (i₂ V i hi) (_ : S.arrows (i₂ V i hi)))
H :
  ∀ (s : (toPresheaf (sheafify J G)).obj (op U)),
    Presieve.FamilyOfElements.IsAmalgamation x s ↔ Presieve.FamilyOfElements.IsAmalgamation x'' ↑s
this : Presieve.FamilyOfElements.Compatible x''
t : F.obj (op U)
ht : Presieve.FamilyOfElements.IsAmalgamation x'' t
ht' : ∀ (y : F.obj (op U)), (fun t => Presieve.FamilyOfElements.IsAmalgamation x'' t) y → y = t
⊢ t ∈ obj (sheafify J G) (op U)

Next tactic:
refine' J.superset_covering _ (J.bind_covering hS fun V i hi => (x i hi).2)