l3lab/ntp-mathlib huggingface dataset:
/--
If `F` is a presheaf which `IsSheafFor` a presieve of arrows and the empty presieve, then it
preserves the product corresponding to the presieve of arrows.
-/
noncomputable
def preservesProductOfIsSheafFor (hF' : (ofArrows X c.inj).IsSheafFor F) :
    PreservesLimit (Discrete.functor (fun x ↦ op (X x))) F := by
  have : HasCoproduct X := ⟨⟨c, hc⟩⟩
  refine @PreservesProduct.ofIsoComparison _ _ _ _ F _ (fun x ↦ op (X x)) _ _ ?_
  rw [piComparison_fac (hc := hc)]
  refine @IsIso.comp_isIso _ _ _ _ _ _ _ inferInstance ?_
  rw [isIso_iff_bijective, Function.bijective_iff_existsUnique]
  rw [Equalizer.Presieve.Arrows.sheaf_condition, Limits.Types.type_equalizer_iff_unique] at hF'
  

Proof state:
C : Type u
inst✝³ : Category.{v, u} C
I : C
F : Cᵒᵖ ⥤ Type (max u v)
hF : IsSheafFor F (ofArrows Empty.elim fun a => IsEmpty.elim instIsEmptyEmpty a)
hI : IsInitial I
α : Type
X : α → C
c : Cofan X
hc : IsColimit c
inst✝² : hasPullbacks (ofArrows X (Cofan.inj c))
inst✝¹ : HasInitial C
inst✝ : ∀ (i : α), Mono (Cofan.inj c i)
hd : ∀ (i j : α), i ≠ j → IsPullback (initial.to (X i)) (initial.to (X j)) (Cofan.inj c i) (Cofan.inj c j)
hF' :
  ∀ (y : Equalizer.Presieve.Arrows.FirstObj F X),
    Equalizer.Presieve.Arrows.firstMap F X (Cofan.inj c) y = Equalizer.Presieve.Arrows.secondMap F X (Cofan.inj c) y →
      ∃! x, Equalizer.Presieve.Arrows.forkMap F X (Cofan.inj c) x = y
this : HasCoproduct X
⊢ ∀ (b : ∏ fun b => F.obj ((fun x => op (X x)) b)), ∃! a, Equalizer.Presieve.Arrows.forkMap F X (Cofan.inj c) a = b

Next tactic:
exact fun b ↦ hF' b (congr_fun (firstMap_eq_secondMap F hF hI c hd) b)
/--
If `F` preserves a particular product, then it `IsSheafFor` the corresponging presieve of arrows.
-/
theorem isSheafFor_of_preservesProduct [PreservesLimit (Discrete.functor (fun x ↦ op (X x))) F] :
    (ofArrows X c.inj).IsSheafFor F := by
  

Proof state:
C : Type u
inst✝⁴ : Category.{v, u} C
I : C
F : Cᵒᵖ ⥤ Type (max u v)
hF : IsSheafFor F (ofArrows Empty.elim fun a => IsEmpty.elim instIsEmptyEmpty a)
hI : IsInitial I
α : Type
X : α → C
c : Cofan X
hc : IsColimit c
inst✝³ : hasPullbacks (ofArrows X (Cofan.inj c))
inst✝² : HasInitial C
inst✝¹ : ∀ (i : α), Mono (Cofan.inj c i)
hd : ∀ (i j : α), i ≠ j → IsPullback (initial.to (X i)) (initial.to (X j)) (Cofan.inj c i) (Cofan.inj c j)
inst✝ : PreservesLimit (Discrete.functor fun x => op (X x)) F
⊢ IsSheafFor F (ofArrows X (Cofan.inj c))

Next tactic:
rw [Equalizer.Presieve.Arrows.sheaf_condition, Limits.Types.type_equalizer_iff_unique]
/--
If `F` preserves a particular product, then it `IsSheafFor` the corresponging presieve of arrows.
-/
theorem isSheafFor_of_preservesProduct [PreservesLimit (Discrete.functor (fun x ↦ op (X x))) F] :
    (ofArrows X c.inj).IsSheafFor F := by
  rw [Equalizer.Presieve.Arrows.sheaf_condition, Limits.Types.type_equalizer_iff_unique]
  

Proof state:
C : Type u
inst✝⁴ : Category.{v, u} C
I : C
F : Cᵒᵖ ⥤ Type (max u v)
hF : IsSheafFor F (ofArrows Empty.elim fun a => IsEmpty.elim instIsEmptyEmpty a)
hI : IsInitial I
α : Type
X : α → C
c : Cofan X
hc : IsColimit c
inst✝³ : hasPullbacks (ofArrows X (Cofan.inj c))
inst✝² : HasInitial C
inst✝¹ : ∀ (i : α), Mono (Cofan.inj c i)
hd : ∀ (i j : α), i ≠ j → IsPullback (initial.to (X i)) (initial.to (X j)) (Cofan.inj c i) (Cofan.inj c j)
inst✝ : PreservesLimit (Discrete.functor fun x => op (X x)) F
⊢ ∀ (y : Equalizer.Presieve.Arrows.FirstObj F X),
    Equalizer.Presieve.Arrows.firstMap F X (Cofan.inj c) y = Equalizer.Presieve.Arrows.secondMap F X (Cofan.inj c) y →
      ∃! x, Equalizer.Presieve.Arrows.forkMap F X (Cofan.inj c) x = y

Next tactic:
have : HasCoproduct X := ⟨⟨c, hc⟩⟩
/--
If `F` preserves a particular product, then it `IsSheafFor` the corresponging presieve of arrows.
-/
theorem isSheafFor_of_preservesProduct [PreservesLimit (Discrete.functor (fun x ↦ op (X x))) F] :
    (ofArrows X c.inj).IsSheafFor F := by
  rw [Equalizer.Presieve.Arrows.sheaf_condition, Limits.Types.type_equalizer_iff_unique]
  have : HasCoproduct X := ⟨⟨c, hc⟩⟩
  

Proof state:
C : Type u
inst✝⁴ : Category.{v, u} C
I : C
F : Cᵒᵖ ⥤ Type (max u v)
hF : IsSheafFor F (ofArrows Empty.elim fun a => IsEmpty.elim instIsEmptyEmpty a)
hI : IsInitial I
α : Type
X : α → C
c : Cofan X
hc : IsColimit c
inst✝³ : hasPullbacks (ofArrows X (Cofan.inj c))
inst✝² : HasInitial C
inst✝¹ : ∀ (i : α), Mono (Cofan.inj c i)
hd : ∀ (i j : α), i ≠ j → IsPullback (initial.to (X i)) (initial.to (X j)) (Cofan.inj c i) (Cofan.inj c j)
inst✝ : PreservesLimit (Discrete.functor fun x => op (X x)) F
this : HasCoproduct X
⊢ ∀ (y : Equalizer.Presieve.Arrows.FirstObj F X),
    Equalizer.Presieve.Arrows.firstMap F X (Cofan.inj c) y = Equalizer.Presieve.Arrows.secondMap F X (Cofan.inj c) y →
      ∃! x, Equalizer.Presieve.Arrows.forkMap F X (Cofan.inj c) x = y

Next tactic:
have hi : IsIso (piComparison F (fun x ↦ op (X x))) := inferInstance
/--
If `F` preserves a particular product, then it `IsSheafFor` the corresponging presieve of arrows.
-/
theorem isSheafFor_of_preservesProduct [PreservesLimit (Discrete.functor (fun x ↦ op (X x))) F] :
    (ofArrows X c.inj).IsSheafFor F := by
  rw [Equalizer.Presieve.Arrows.sheaf_condition, Limits.Types.type_equalizer_iff_unique]
  have : HasCoproduct X := ⟨⟨c, hc⟩⟩
  have hi : IsIso (piComparison F (fun x ↦ op (X x))) := inferInstance
  

Proof state:
C : Type u
inst✝⁴ : Category.{v, u} C
I : C
F : Cᵒᵖ ⥤ Type (max u v)
hF : IsSheafFor F (ofArrows Empty.elim fun a => IsEmpty.elim instIsEmptyEmpty a)
hI : IsInitial I
α : Type
X : α → C
c : Cofan X
hc : IsColimit c
inst✝³ : hasPullbacks (ofArrows X (Cofan.inj c))
inst✝² : HasInitial C
inst✝¹ : ∀ (i : α), Mono (Cofan.inj c i)
hd : ∀ (i j : α), i ≠ j → IsPullback (initial.to (X i)) (initial.to (X j)) (Cofan.inj c i) (Cofan.inj c j)
inst✝ : PreservesLimit (Discrete.functor fun x => op (X x)) F
this : HasCoproduct X
hi : IsIso (piComparison F fun x => op (X x))
⊢ ∀ (y : Equalizer.Presieve.Arrows.FirstObj F X),
    Equalizer.Presieve.Arrows.firstMap F X (Cofan.inj c) y = Equalizer.Presieve.Arrows.secondMap F X (Cofan.inj c) y →
      ∃! x, Equalizer.Presieve.Arrows.forkMap F X (Cofan.inj c) x = y

Next tactic:
rw [piComparison_fac (hc := hc), isIso_iff_bijective, Function.bijective_iff_existsUnique] at hi
/--
If `F` preserves a particular product, then it `IsSheafFor` the corresponging presieve of arrows.
-/
theorem isSheafFor_of_preservesProduct [PreservesLimit (Discrete.functor (fun x ↦ op (X x))) F] :
    (ofArrows X c.inj).IsSheafFor F := by
  rw [Equalizer.Presieve.Arrows.sheaf_condition, Limits.Types.type_equalizer_iff_unique]
  have : HasCoproduct X := ⟨⟨c, hc⟩⟩
  have hi : IsIso (piComparison F (fun x ↦ op (X x))) := inferInstance
  rw [piComparison_fac (hc := hc), isIso_iff_bijective, Function.bijective_iff_existsUnique] at hi
  

Proof state:
C : Type u
inst✝⁴ : Category.{v, u} C
I : C
F : Cᵒᵖ ⥤ Type (max u v)
hF : IsSheafFor F (ofArrows Empty.elim fun a => IsEmpty.elim instIsEmptyEmpty a)
hI : IsInitial I
α : Type
X : α → C
c : Cofan X
hc : IsColimit c
inst✝³ : hasPullbacks (ofArrows X (Cofan.inj c))
inst✝² : HasInitial C
inst✝¹ : ∀ (i : α), Mono (Cofan.inj c i)
hd : ∀ (i j : α), i ≠ j → IsPullback (initial.to (X i)) (initial.to (X j)) (Cofan.inj c i) (Cofan.inj c j)
inst✝ : PreservesLimit (Discrete.functor fun x => op (X x)) F
this : HasCoproduct X
hi :
  ∀ (b : ∏ fun b => F.obj (op (X b))),
    ∃! a,
      (F.map (opCoproductIsoProduct' hc (productIsProduct fun x => op (X x))).inv ≫
            Equalizer.Presieve.Arrows.forkMap F X (Cofan.inj c))
          a =
        b
⊢ ∀ (y : Equalizer.Presieve.Arrows.FirstObj F X),
    Equalizer.Presieve.Arrows.firstMap F X (Cofan.inj c) y = Equalizer.Presieve.Arrows.secondMap F X (Cofan.inj c) y →
      ∃! x, Equalizer.Presieve.Arrows.forkMap F X (Cofan.inj c) x = y

Next tactic:
intro b _
/--
If `F` preserves a particular product, then it `IsSheafFor` the corresponging presieve of arrows.
-/
theorem isSheafFor_of_preservesProduct [PreservesLimit (Discrete.functor (fun x ↦ op (X x))) F] :
    (ofArrows X c.inj).IsSheafFor F := by
  rw [Equalizer.Presieve.Arrows.sheaf_condition, Limits.Types.type_equalizer_iff_unique]
  have : HasCoproduct X := ⟨⟨c, hc⟩⟩
  have hi : IsIso (piComparison F (fun x ↦ op (X x))) := inferInstance
  rw [piComparison_fac (hc := hc), isIso_iff_bijective, Function.bijective_iff_existsUnique] at hi
  intro b _
  

Proof state:
C : Type u
inst✝⁴ : Category.{v, u} C
I : C
F : Cᵒᵖ ⥤ Type (max u v)
hF : IsSheafFor F (ofArrows Empty.elim fun a => IsEmpty.elim instIsEmptyEmpty a)
hI : IsInitial I
α : Type
X : α → C
c : Cofan X
hc : IsColimit c
inst✝³ : hasPullbacks (ofArrows X (Cofan.inj c))
inst✝² : HasInitial C
inst✝¹ : ∀ (i : α), Mono (Cofan.inj c i)
hd : ∀ (i j : α), i ≠ j → IsPullback (initial.to (X i)) (initial.to (X j)) (Cofan.inj c i) (Cofan.inj c j)
inst✝ : PreservesLimit (Discrete.functor fun x => op (X x)) F
this : HasCoproduct X
hi :
  ∀ (b : ∏ fun b => F.obj (op (X b))),
    ∃! a,
      (F.map (opCoproductIsoProduct' hc (productIsProduct fun x => op (X x))).inv ≫
            Equalizer.Presieve.Arrows.forkMap F X (Cofan.inj c))
          a =
        b
b : Equalizer.Presieve.Arrows.FirstObj F X
a✝ : Equalizer.Presieve.Arrows.firstMap F X (Cofan.inj c) b = Equalizer.Presieve.Arrows.secondMap F X (Cofan.inj c) b
⊢ ∃! x, Equalizer.Presieve.Arrows.forkMap F X (Cofan.inj c) x = b

Next tactic:
obtain ⟨t, ht₁, ht₂⟩ := hi b
/--
If `F` preserves a particular product, then it `IsSheafFor` the corresponging presieve of arrows.
-/
theorem isSheafFor_of_preservesProduct [PreservesLimit (Discrete.functor (fun x ↦ op (X x))) F] :
    (ofArrows X c.inj).IsSheafFor F := by
  rw [Equalizer.Presieve.Arrows.sheaf_condition, Limits.Types.type_equalizer_iff_unique]
  have : HasCoproduct X := ⟨⟨c, hc⟩⟩
  have hi : IsIso (piComparison F (fun x ↦ op (X x))) := inferInstance
  rw [piComparison_fac (hc := hc), isIso_iff_bijective, Function.bijective_iff_existsUnique] at hi
  intro b _
  obtain ⟨t, ht₁, ht₂⟩ := hi b
  

Proof state:
case intro.intro
C : Type u
inst✝⁴ : Category.{v, u} C
I : C
F : Cᵒᵖ ⥤ Type (max u v)
hF : IsSheafFor F (ofArrows Empty.elim fun a => IsEmpty.elim instIsEmptyEmpty a)
hI : IsInitial I
α : Type
X : α → C
c : Cofan X
hc : IsColimit c
inst✝³ : hasPullbacks (ofArrows X (Cofan.inj c))
inst✝² : HasInitial C
inst✝¹ : ∀ (i : α), Mono (Cofan.inj c i)
hd : ∀ (i j : α), i ≠ j → IsPullback (initial.to (X i)) (initial.to (X j)) (Cofan.inj c i) (Cofan.inj c j)
inst✝ : PreservesLimit (Discrete.functor fun x => op (X x)) F
this : HasCoproduct X
hi :
  ∀ (b : ∏ fun b => F.obj (op (X b))),
    ∃! a,
      (F.map (opCoproductIsoProduct' hc (productIsProduct fun x => op (X x))).inv ≫
            Equalizer.Presieve.Arrows.forkMap F X (Cofan.inj c))
          a =
        b
b : Equalizer.Presieve.Arrows.FirstObj F X
a✝ : Equalizer.Presieve.Arrows.firstMap F X (Cofan.inj c) b = Equalizer.Presieve.Arrows.secondMap F X (Cofan.inj c) b
t : F.obj (∏ fun x => op (X x))
ht₁ :
  (F.map (opCoproductIsoProduct' hc (productIsProduct fun x => op (X x))).inv ≫
        Equalizer.Presieve.Arrows.forkMap F X (Cofan.inj c))
      t =
    b
ht₂ :
  ∀ (y : F.obj (∏ fun x => op (X x))),
    (fun a =>
          (F.map (opCoproductIsoProduct' hc (productIsProduct fun x => op (X x))).inv ≫
                Equalizer.Presieve.Arrows.forkMap F X (Cofan.inj c))
              a =
            b)
        y →
      y = t
⊢ ∃! x, Equalizer.Presieve.Arrows.forkMap F X (Cofan.inj c) x = b

Next tactic:
refine ⟨F.map ((opCoproductIsoProduct' hc (productIsProduct _)).inv) t, ht₁, fun y hy ↦ ?_⟩
/--
If `F` preserves a particular product, then it `IsSheafFor` the corresponging presieve of arrows.
-/
theorem isSheafFor_of_preservesProduct [PreservesLimit (Discrete.functor (fun x ↦ op (X x))) F] :
    (ofArrows X c.inj).IsSheafFor F := by
  rw [Equalizer.Presieve.Arrows.sheaf_condition, Limits.Types.type_equalizer_iff_unique]
  have : HasCoproduct X := ⟨⟨c, hc⟩⟩
  have hi : IsIso (piComparison F (fun x ↦ op (X x))) := inferInstance
  rw [piComparison_fac (hc := hc), isIso_iff_bijective, Function.bijective_iff_existsUnique] at hi
  intro b _
  obtain ⟨t, ht₁, ht₂⟩ := hi b
  refine ⟨F.map ((opCoproductIsoProduct' hc (productIsProduct _)).inv) t, ht₁, fun y hy ↦ ?_⟩
  

Proof state:
case intro.intro
C : Type u
inst✝⁴ : Category.{v, u} C
I : C
F : Cᵒᵖ ⥤ Type (max u v)
hF : IsSheafFor F (ofArrows Empty.elim fun a => IsEmpty.elim instIsEmptyEmpty a)
hI : IsInitial I
α : Type
X : α → C
c : Cofan X
hc : IsColimit c
inst✝³ : hasPullbacks (ofArrows X (Cofan.inj c))
inst✝² : HasInitial C
inst✝¹ : ∀ (i : α), Mono (Cofan.inj c i)
hd : ∀ (i j : α), i ≠ j → IsPullback (initial.to (X i)) (initial.to (X j)) (Cofan.inj c i) (Cofan.inj c j)
inst✝ : PreservesLimit (Discrete.functor fun x => op (X x)) F
this : HasCoproduct X
hi :
  ∀ (b : ∏ fun b => F.obj (op (X b))),
    ∃! a,
      (F.map (opCoproductIsoProduct' hc (productIsProduct fun x => op (X x))).inv ≫
            Equalizer.Presieve.Arrows.forkMap F X (Cofan.inj c))
          a =
        b
b : Equalizer.Presieve.Arrows.FirstObj F X
a✝ : Equalizer.Presieve.Arrows.firstMap F X (Cofan.inj c) b = Equalizer.Presieve.Arrows.secondMap F X (Cofan.inj c) b
t : F.obj (∏ fun x => op (X x))
ht₁ :
  (F.map (opCoproductIsoProduct' hc (productIsProduct fun x => op (X x))).inv ≫
        Equalizer.Presieve.Arrows.forkMap F X (Cofan.inj c))
      t =
    b
ht₂ :
  ∀ (y : F.obj (∏ fun x => op (X x))),
    (fun a =>
          (F.map (opCoproductIsoProduct' hc (productIsProduct fun x => op (X x))).inv ≫
                Equalizer.Presieve.Arrows.forkMap F X (Cofan.inj c))
              a =
            b)
        y →
      y = t
y : F.obj (op c.pt)
hy : (fun x => Equalizer.Presieve.Arrows.forkMap F X (Cofan.inj c) x = b) y
⊢ y = F.map (opCoproductIsoProduct' hc (productIsProduct fun x => op (X x))).inv t

Next tactic:
apply_fun F.map ((opCoproductIsoProduct' hc (productIsProduct _)).hom) using injective_of_mono _
/--
If `F` preserves a particular product, then it `IsSheafFor` the corresponging presieve of arrows.
-/
theorem isSheafFor_of_preservesProduct [PreservesLimit (Discrete.functor (fun x ↦ op (X x))) F] :
    (ofArrows X c.inj).IsSheafFor F := by
  rw [Equalizer.Presieve.Arrows.sheaf_condition, Limits.Types.type_equalizer_iff_unique]
  have : HasCoproduct X := ⟨⟨c, hc⟩⟩
  have hi : IsIso (piComparison F (fun x ↦ op (X x))) := inferInstance
  rw [piComparison_fac (hc := hc), isIso_iff_bijective, Function.bijective_iff_existsUnique] at hi
  intro b _
  obtain ⟨t, ht₁, ht₂⟩ := hi b
  refine ⟨F.map ((opCoproductIsoProduct' hc (productIsProduct _)).inv) t, ht₁, fun y hy ↦ ?_⟩
  apply_fun F.map ((opCoproductIsoProduct' hc (productIsProduct _)).hom) using injective_of_mono _
  

Proof state:
case intro.intro
C : Type u
inst✝⁴ : Category.{v, u} C
I : C
F : Cᵒᵖ ⥤ Type (max u v)
hF : IsSheafFor F (ofArrows Empty.elim fun a => IsEmpty.elim instIsEmptyEmpty a)
hI : IsInitial I
α : Type
X : α → C
c : Cofan X
hc : IsColimit c
inst✝³ : hasPullbacks (ofArrows X (Cofan.inj c))
inst✝² : HasInitial C
inst✝¹ : ∀ (i : α), Mono (Cofan.inj c i)
hd : ∀ (i j : α), i ≠ j → IsPullback (initial.to (X i)) (initial.to (X j)) (Cofan.inj c i) (Cofan.inj c j)
inst✝ : PreservesLimit (Discrete.functor fun x => op (X x)) F
this : HasCoproduct X
hi :
  ∀ (b : ∏ fun b => F.obj (op (X b))),
    ∃! a,
      (F.map (opCoproductIsoProduct' hc (productIsProduct fun x => op (X x))).inv ≫
            Equalizer.Presieve.Arrows.forkMap F X (Cofan.inj c))
          a =
        b
b : Equalizer.Presieve.Arrows.FirstObj F X
a✝ : Equalizer.Presieve.Arrows.firstMap F X (Cofan.inj c) b = Equalizer.Presieve.Arrows.secondMap F X (Cofan.inj c) b
t : F.obj (∏ fun x => op (X x))
ht₁ :
  (F.map (opCoproductIsoProduct' hc (productIsProduct fun x => op (X x))).inv ≫
        Equalizer.Presieve.Arrows.forkMap F X (Cofan.inj c))
      t =
    b
ht₂ :
  ∀ (y : F.obj (∏ fun x => op (X x))),
    (fun a =>
          (F.map (opCoproductIsoProduct' hc (productIsProduct fun x => op (X x))).inv ≫
                Equalizer.Presieve.Arrows.forkMap F X (Cofan.inj c))
              a =
            b)
        y →
      y = t
y : F.obj (op c.pt)
hy : (fun x => Equalizer.Presieve.Arrows.forkMap F X (Cofan.inj c) x = b) y
⊢ F.map (opCoproductIsoProduct' hc (productIsProduct fun x => op (X x))).hom y =
    F.map (opCoproductIsoProduct' hc (productIsProduct fun x => op (X x))).hom
      (F.map (opCoproductIsoProduct' hc (productIsProduct fun x => op (X x))).inv t)

Next tactic:
simp only [← FunctorToTypes.map_comp_apply, Iso.op, Category.assoc]
/--
If `F` preserves a particular product, then it `IsSheafFor` the corresponging presieve of arrows.
-/
theorem isSheafFor_of_preservesProduct [PreservesLimit (Discrete.functor (fun x ↦ op (X x))) F] :
    (ofArrows X c.inj).IsSheafFor F := by
  rw [Equalizer.Presieve.Arrows.sheaf_condition, Limits.Types.type_equalizer_iff_unique]
  have : HasCoproduct X := ⟨⟨c, hc⟩⟩
  have hi : IsIso (piComparison F (fun x ↦ op (X x))) := inferInstance
  rw [piComparison_fac (hc := hc), isIso_iff_bijective, Function.bijective_iff_existsUnique] at hi
  intro b _
  obtain ⟨t, ht₁, ht₂⟩ := hi b
  refine ⟨F.map ((opCoproductIsoProduct' hc (productIsProduct _)).inv) t, ht₁, fun y hy ↦ ?_⟩
  apply_fun F.map ((opCoproductIsoProduct' hc (productIsProduct _)).hom) using injective_of_mono _
  simp only [← FunctorToTypes.map_comp_apply, Iso.op, Category.assoc]
  

Proof state:
case intro.intro
C : Type u
inst✝⁴ : Category.{v, u} C
I : C
F : Cᵒᵖ ⥤ Type (max u v)
hF : IsSheafFor F (ofArrows Empty.elim fun a => IsEmpty.elim instIsEmptyEmpty a)
hI : IsInitial I
α : Type
X : α → C
c : Cofan X
hc : IsColimit c
inst✝³ : hasPullbacks (ofArrows X (Cofan.inj c))
inst✝² : HasInitial C
inst✝¹ : ∀ (i : α), Mono (Cofan.inj c i)
hd : ∀ (i j : α), i ≠ j → IsPullback (initial.to (X i)) (initial.to (X j)) (Cofan.inj c i) (Cofan.inj c j)
inst✝ : PreservesLimit (Discrete.functor fun x => op (X x)) F
this : HasCoproduct X
hi :
  ∀ (b : ∏ fun b => F.obj (op (X b))),
    ∃! a,
      (F.map (opCoproductIsoProduct' hc (productIsProduct fun x => op (X x))).inv ≫
            Equalizer.Presieve.Arrows.forkMap F X (Cofan.inj c))
          a =
        b
b : Equalizer.Presieve.Arrows.FirstObj F X
a✝ : Equalizer.Presieve.Arrows.firstMap F X (Cofan.inj c) b = Equalizer.Presieve.Arrows.secondMap F X (Cofan.inj c) b
t : F.obj (∏ fun x => op (X x))
ht₁ :
  (F.map (opCoproductIsoProduct' hc (productIsProduct fun x => op (X x))).inv ≫
        Equalizer.Presieve.Arrows.forkMap F X (Cofan.inj c))
      t =
    b
ht₂ :
  ∀ (y : F.obj (∏ fun x => op (X x))),
    (fun a =>
          (F.map (opCoproductIsoProduct' hc (productIsProduct fun x => op (X x))).inv ≫
                Equalizer.Presieve.Arrows.forkMap F X (Cofan.inj c))
              a =
            b)
        y →
      y = t
y : F.obj (op c.pt)
hy : (fun x => Equalizer.Presieve.Arrows.forkMap F X (Cofan.inj c) x = b) y
⊢ F.map (opCoproductIsoProduct' hc (productIsProduct fun x => op (X x))).hom y =
    F.map
      ((opCoproductIsoProduct' hc (productIsProduct fun x => op (X x))).inv ≫
        (opCoproductIsoProduct' hc (productIsProduct fun x => op (X x))).hom)
      t

Next tactic:
rw [ht₂ (F.map ((opCoproductIsoProduct' hc (productIsProduct _)).hom) y) (by simp [← hy])]
/--
If `F` preserves a particular product, then it `IsSheafFor` the corresponging presieve of arrows.
-/
theorem isSheafFor_of_preservesProduct [PreservesLimit (Discrete.functor (fun x ↦ op (X x))) F] :
    (ofArrows X c.inj).IsSheafFor F := by
  rw [Equalizer.Presieve.Arrows.sheaf_condition, Limits.Types.type_equalizer_iff_unique]
  have : HasCoproduct X := ⟨⟨c, hc⟩⟩
  have hi : IsIso (piComparison F (fun x ↦ op (X x))) := inferInstance
  rw [piComparison_fac (hc := hc), isIso_iff_bijective, Function.bijective_iff_existsUnique] at hi
  intro b _
  obtain ⟨t, ht₁, ht₂⟩ := hi b
  refine ⟨F.map ((opCoproductIsoProduct' hc (productIsProduct _)).inv) t, ht₁, fun y hy ↦ ?_⟩
  apply_fun F.map ((opCoproductIsoProduct' hc (productIsProduct _)).hom) using injective_of_mono _
  simp only [← FunctorToTypes.map_comp_apply, Iso.op, Category.assoc]
  rw [ht₂ (F.map ((opCoproductIsoProduct' hc (productIsProduct _)).hom) y) (by 

Proof state:
C : Type u
inst✝⁴ : Category.{v, u} C
I : C
F : Cᵒᵖ ⥤ Type (max u v)
hF : IsSheafFor F (ofArrows Empty.elim fun a => IsEmpty.elim instIsEmptyEmpty a)
hI : IsInitial I
α : Type
X : α → C
c : Cofan X
hc : IsColimit c
inst✝³ : hasPullbacks (ofArrows X (Cofan.inj c))
inst✝² : HasInitial C
inst✝¹ : ∀ (i : α), Mono (Cofan.inj c i)
hd : ∀ (i j : α), i ≠ j → IsPullback (initial.to (X i)) (initial.to (X j)) (Cofan.inj c i) (Cofan.inj c j)
inst✝ : PreservesLimit (Discrete.functor fun x => op (X x)) F
this : HasCoproduct X
hi :
  ∀ (b : ∏ fun b => F.obj (op (X b))),
    ∃! a,
      (F.map (opCoproductIsoProduct' hc (productIsProduct fun x => op (X x))).inv ≫
            Equalizer.Presieve.Arrows.forkMap F X (Cofan.inj c))
          a =
        b
b : Equalizer.Presieve.Arrows.FirstObj F X
a✝ : Equalizer.Presieve.Arrows.firstMap F X (Cofan.inj c) b = Equalizer.Presieve.Arrows.secondMap F X (Cofan.inj c) b
t : F.obj (∏ fun x => op (X x))
ht₁ :
  (F.map (opCoproductIsoProduct' hc (productIsProduct fun x => op (X x))).inv ≫
        Equalizer.Presieve.Arrows.forkMap F X (Cofan.inj c))
      t =
    b
ht₂ :
  ∀ (y : F.obj (∏ fun x => op (X x))),
    (fun a =>
          (F.map (opCoproductIsoProduct' hc (productIsProduct fun x => op (X x))).inv ≫
                Equalizer.Presieve.Arrows.forkMap F X (Cofan.inj c))
              a =
            b)
        y →
      y = t
y : F.obj (op c.pt)
hy : (fun x => Equalizer.Presieve.Arrows.forkMap F X (Cofan.inj c) x = b) y
⊢ (fun a =>
      (F.map (opCoproductIsoProduct' hc (productIsProduct fun x => op (X x))).inv ≫
            Equalizer.Presieve.Arrows.forkMap F X (Cofan.inj c))
          a =
        b)
    (F.map (opCoproductIsoProduct' hc (productIsProduct fun x => op (X x))).hom y)

Next tactic:
simp [← hy]