awhecmu/canonical-drafter-extract-mathlib huggingface dataset:
-- Lean 4 proof step from Mathlib.CategoryTheory.Sites.Preserves (goal)
Goal:
C : Type u
inst : Category.{v, u} C
F : Functor.{v, w, u, w + 1} Cᵒᵖ (Type w)
α : Type u_1
inst_1 : Small.{w, u_1} α
X : α → C
c : Cofan.{u_1, v, u} X
hc : IsColimit c
inst_2 : (ofArrows X c.inj).HasPairwisePullbacks
inst_3 : PreservesLimit.{u_1, u_1, v, w, u, w + 1} (J := Discrete α) (Discrete.functor fun (x : α) ↦ op (X x)) F
⊢ IsSheafFor F (ofArrows X c.inj)
have rw : ∀ (y : Equalizer.Presieve.Arrows.FirstObj F X),
  Eq (α := (fun (X : Type w) ↦ X) (Equalizer.Presieve.Arrows.SecondObj F X c.inj))
      ((ConcreteCategory.hom (FC := TypeCat.Fun) (Equalizer.Presieve.Arrows.firstMap F X c.inj) :
            (a : (fun (X : Type w) ↦ X) (Equalizer.Presieve.Arrows.FirstObj F X)) →
              (fun (X : Type w) ↦ X) (Equalizer.Presieve.Arrows.SecondObj F X c.inj))
          y :
        (fun (X : Type w) ↦ X) (Equalizer.Presieve.Arrows.SecondObj F X c.inj))
      ((ConcreteCategory.hom (FC := TypeCat.Fun) (Equalizer.Presieve.Arrows.secondMap F X c.inj) :
            (a : (fun (X : Type w) ↦ X) (Equalizer.Presieve.Arrows.FirstObj F X)) →
              (fun (X : Type w) ↦ X) (Equalizer.Presieve.Arrows.SecondObj F X c.inj))
          y :
        (fun (X : Type w) ↦ X) (Equalizer.Presieve.Arrows.SecondObj F X c.inj)) →
    ∃! x : F.obj (op c.pt),
      (ConcreteCategory.hom (FC := TypeCat.Fun) (Equalizer.Presieve.Arrows.forkMap F X c.inj) :
            (a : (fun (X : Type w) ↦ X) (F.obj (op c.pt))) →
              (fun (X : Type w) ↦ X) (Equalizer.Presieve.Arrows.FirstObj F X))
          x =
        y
Tactic: rw [Equalizer.Presieve.Arrows.sheaf_condition, Limits.Types.type_equalizer_iff_unique]
-- Lean 4 proof step from Mathlib.CategoryTheory.Sites.Preserves (hypothesis)
Goal:
C : Type u
inst : Category.{v, u} C
F : Functor.{v, w, u, w + 1} Cᵒᵖ (Type w)
α : Type u_1
inst_1 : Small.{w, u_1} α
X : α → C
c : Cofan.{u_1, v, u} X
hc : IsColimit c
inst_2 : (ofArrows X c.inj).HasPairwisePullbacks
inst_3 : PreservesLimit.{u_1, u_1, v, w, u, w + 1} (J := Discrete α) (Discrete.functor fun (x : α) ↦ op (X x)) F
⊢ ∀ (y : Equalizer.Presieve.Arrows.FirstObj F X),
    Eq (α := (fun (X : Type w) ↦ X) (Equalizer.Presieve.Arrows.SecondObj F X c.inj))
        ((ConcreteCategory.hom (FC := TypeCat.Fun) (Equalizer.Presieve.Arrows.firstMap F X c.inj) :
              (a : (fun (X : Type w) ↦ X) (Equalizer.Presieve.Arrows.FirstObj F X)) →
                (fun (X : Type w) ↦ X) (Equalizer.Presieve.Arrows.SecondObj F X c.inj))
            y :
          (fun (X : Type w) ↦ X) (Equalizer.Presieve.Arrows.SecondObj F X c.inj))
        ((ConcreteCategory.hom (FC := TypeCat.Fun) (Equalizer.Presieve.Arrows.secondMap F X c.inj) :
              (a : (fun (X : Type w) ↦ X) (Equalizer.Presieve.Arrows.FirstObj F X)) →
                (fun (X : Type w) ↦ X) (Equalizer.Presieve.Arrows.SecondObj F X c.inj))
            y :
          (fun (X : Type w) ↦ X) (Equalizer.Presieve.Arrows.SecondObj F X c.inj)) →
      ∃! x : F.obj (op c.pt),
        (ConcreteCategory.hom (FC := TypeCat.Fun) (Equalizer.Presieve.Arrows.forkMap F X c.inj) :
              (a : (fun (X : Type w) ↦ X) (F.obj (op c.pt))) →
                (fun (X : Type w) ↦ X) (Equalizer.Presieve.Arrows.FirstObj F X))
            x =
          y
have this : HasCoproduct.{u_1, v, u} X
Tactic: have : HasCoproduct X := ⟨⟨c, hc⟩⟩
-- Lean 4 proof step from Mathlib.CategoryTheory.Sites.Preserves (hypothesis)
Goal:
C : Type u
inst : Category.{v, u} C
F : Functor.{v, w, u, w + 1} Cᵒᵖ (Type w)
α : Type u_1
inst_1 : Small.{w, u_1} α
X : α → C
c : Cofan.{u_1, v, u} X
hc : IsColimit c
inst_2 : (ofArrows X c.inj).HasPairwisePullbacks
inst_3 : PreservesLimit.{u_1, u_1, v, w, u, w + 1} (J := Discrete α) (Discrete.functor fun (x : α) ↦ op (X x)) F
this : HasCoproduct.{u_1, v, u} X
⊢ ∀ (y : Equalizer.Presieve.Arrows.FirstObj F X),
    Eq (α := (fun (X : Type w) ↦ X) (Equalizer.Presieve.Arrows.SecondObj F X c.inj))
        ((ConcreteCategory.hom (FC := TypeCat.Fun) (Equalizer.Presieve.Arrows.firstMap F X c.inj) :
              (a : (fun (X : Type w) ↦ X) (Equalizer.Presieve.Arrows.FirstObj F X)) →
                (fun (X : Type w) ↦ X) (Equalizer.Presieve.Arrows.SecondObj F X c.inj))
            y :
          (fun (X : Type w) ↦ X) (Equalizer.Presieve.Arrows.SecondObj F X c.inj))
        ((ConcreteCategory.hom (FC := TypeCat.Fun) (Equalizer.Presieve.Arrows.secondMap F X c.inj) :
              (a : (fun (X : Type w) ↦ X) (Equalizer.Presieve.Arrows.FirstObj F X)) →
                (fun (X : Type w) ↦ X) (Equalizer.Presieve.Arrows.SecondObj F X c.inj))
            y :
          (fun (X : Type w) ↦ X) (Equalizer.Presieve.Arrows.SecondObj F X c.inj)) →
      ∃! x : F.obj (op c.pt),
        (ConcreteCategory.hom (FC := TypeCat.Fun) (Equalizer.Presieve.Arrows.forkMap F X c.inj) :
              (a : (fun (X : Type w) ↦ X) (F.obj (op c.pt))) →
                (fun (X : Type w) ↦ X) (Equalizer.Presieve.Arrows.FirstObj F X))
            x =
          y
have hi : IsIso (X := F.obj (piObj.{u_1, v, u} fun (x : α) ↦ op (X x))) (Y := ∏ᶜ fun (b : α) ↦ F.obj (op (X b)))
  (piComparison F fun (x : α) ↦ op (X x))
Tactic: have hi : IsIso (piComparison F (fun x ↦ op (X x))) := inferInstance
-- Lean 4 proof step from Mathlib.CategoryTheory.Sites.Preserves (hypothesis)
Goal:
C : Type u
inst : Category.{v, u} C
F : Functor.{v, w, u, w + 1} Cᵒᵖ (Type w)
α : Type u_1
inst_1 : Small.{w, u_1} α
X : α → C
c : Cofan.{u_1, v, u} X
hc : IsColimit c
inst_2 : (ofArrows X c.inj).HasPairwisePullbacks
inst_3 : PreservesLimit.{u_1, u_1, v, w, u, w + 1} (J := Discrete α) (Discrete.functor fun (x : α) ↦ op (X x)) F
this : HasCoproduct.{u_1, v, u} X
hi :
  IsIso (X := F.obj (piObj.{u_1, v, u} fun (x : α) ↦ op (X x))) (Y := ∏ᶜ fun (b : α) ↦ F.obj (op (X b)))
    (piComparison F fun (x : α) ↦ op (X x))
⊢ ∀ (y : Equalizer.Presieve.Arrows.FirstObj F X),
    Eq (α := (fun (X : Type w) ↦ X) (Equalizer.Presieve.Arrows.SecondObj F X c.inj))
        ((ConcreteCategory.hom (FC := TypeCat.Fun) (Equalizer.Presieve.Arrows.firstMap F X c.inj) :
              (a : (fun (X : Type w) ↦ X) (Equalizer.Presieve.Arrows.FirstObj F X)) →
                (fun (X : Type w) ↦ X) (Equalizer.Presieve.Arrows.SecondObj F X c.inj))
            y :
          (fun (X : Type w) ↦ X) (Equalizer.Presieve.Arrows.SecondObj F X c.inj))
        ((ConcreteCategory.hom (FC := TypeCat.Fun) (Equalizer.Presieve.Arrows.secondMap F X c.inj) :
              (a : (fun (X : Type w) ↦ X) (Equalizer.Presieve.Arrows.FirstObj F X)) →
                (fun (X : Type w) ↦ X) (Equalizer.Presieve.Arrows.SecondObj F X c.inj))
            y :
          (fun (X : Type w) ↦ X) (Equalizer.Presieve.Arrows.SecondObj F X c.inj)) →
      ∃! x : F.obj (op c.pt),
        (ConcreteCategory.hom (FC := TypeCat.Fun) (Equalizer.Presieve.Arrows.forkMap F X c.inj) :
              (a : (fun (X : Type w) ↦ X) (F.obj (op c.pt))) →
                (fun (X : Type w) ↦ X) (Equalizer.Presieve.Arrows.FirstObj F X))
            x =
          y
have hi₁ : ∀ (b : (fun (X : Type w) ↦ X) (∏ᶜ fun (b : α) ↦ F.obj (op (X b)))),
  ∃! a : (fun (X : Type w) ↦ X) (F.obj (piObj.{u_1, v, u} fun (x : α) ↦ op (X x))),
    ((ConcreteCategory.hom (FC := TypeCat.Fun)
              (F.map (Iso.inv (opCoproductIsoProduct' hc (productIsProduct fun (x : α) ↦ op (X x)))) ≫
                Equalizer.Presieve.Arrows.forkMap F X c.inj) :
            TypeCat.Fun (F.obj (piObj.{u_1, v, u} fun (x : α) ↦ op (X x))) (∏ᶜ fun (b : α) ↦ F.obj (op (X b)))) :
          (a : (fun (X : Type w) ↦ X) (F.obj (∏ᶜ fun (x : α) ↦ op (X x)))) →
            (fun (X : Type w) ↦ X) (∏ᶜ fun (b : α) ↦ F.obj (op (X b))))
        a =
      b
Tactic: rw [piComparison_fac (hc := hc), isIso_iff_bijective, Function.bijective_iff_existsUnique] at hi
Cleared hypotheses: hi
-- Lean 4 proof step from Mathlib.CategoryTheory.Sites.Preserves (goal)
Goal:
C : Type u
inst : Category.{v, u} C
I : C
F : Functor.{v, w, u, w + 1} Cᵒᵖ (Type w)
hF :
  IsSheafFor (X := I) F
    (ofArrows Empty.elim fun (a : Empty) ↦ Empty.instIsEmpty.elim (p := fun (x : Empty) ↦ x.elim ⟶ I) a)
hI : IsInitial.{v, u} I
α : Type u_1
inst_1 : Small.{w, u_1} α
X : α → C
c : Cofan.{u_1, v, u} X
inst_2 : (ofArrows X c.inj).HasPairwisePullbacks
inst_3 : HasInitial.{v, u} C
inst_4 : ∀ (i : α), Mono (c.inj i)
hd :
  Pairwise fun (i j : α) ↦ IsPullback (P := initial.{v, u} C) (initial.to (X i)) (initial.to (X j)) (c.inj i) (c.inj j)
⊢ Eq (α := Equalizer.Presieve.Arrows.FirstObj F X ⟶ Equalizer.Presieve.Arrows.SecondObj F X c.inj)
    (Equalizer.Presieve.Arrows.firstMap F X c.inj) (Equalizer.Presieve.Arrows.secondMap F X c.inj)
have h : ∀ (i j : α) (a : Equalizer.Presieve.Arrows.FirstObj F X),
  Eq (α := F.obj (op (pullback (X := X (i, j).1) (Y := X (i, j).2) (c.inj (i, j).1) (c.inj (i, j).2))))
    (TypeCat.Fun.toFun
        (ConcreteCategory.hom (FC := TypeCat.Fun)
          (CategoryStruct.comp (Y :=
            ∏ᶜ fun (ij : α × α) ↦ F.obj (op (pullback (X := X ij.1) (Y := X ij.2) (c.inj ij.1) (c.inj ij.2))))
            (Equalizer.Presieve.Arrows.firstMap F X c.inj :
              Equalizer.Presieve.Arrows.FirstObj F X ⟶ Equalizer.Presieve.Arrows.SecondObj F X c.inj)
            (Pi.π (fun (ij : α × α) ↦ F.obj (op (pullback (X := X ij.1) (Y := X ij.2) (c.inj ij.1) (c.inj ij.2))))
              (i, j))))
        a :
      F.obj (op (pullback (X := X (i, j).1) (Y := X (i, j).2) (c.inj (i, j).1) (c.inj (i, j).2))))
    (TypeCat.Fun.toFun
        (ConcreteCategory.hom (FC := TypeCat.Fun)
          (CategoryStruct.comp (Y :=
            ∏ᶜ fun (ij : α × α) ↦ F.obj (op (pullback (X := X ij.1) (Y := X ij.2) (c.inj ij.1) (c.inj ij.2))))
            (Equalizer.Presieve.Arrows.secondMap F X c.inj :
              Equalizer.Presieve.Arrows.FirstObj F X ⟶ Equalizer.Presieve.Arrows.SecondObj F X c.inj)
            (Pi.π (fun (ij : α × α) ↦ F.obj (op (pullback (X := X ij.1) (Y := X ij.2) (c.inj ij.1) (c.inj ij.2))))
              (i, j))))
        a :
      F.obj (op (pullback (X := X (i, j).1) (Y := X (i, j).2) (c.inj (i, j).1) (c.inj (i, j).2))))
Tactic: ext ⟨i, j⟩ a
-- Lean 4 proof step from Mathlib.CategoryTheory.Sites.Preserves (goal)
Goal:
C : Type u
inst : Category.{v, u} C
I : C
F : Functor.{v, w, u, w + 1} Cᵒᵖ (Type w)
hF :
  IsSheafFor (X := I) F
    (ofArrows Empty.elim fun (a : Empty) ↦ Empty.instIsEmpty.elim (p := fun (x : Empty) ↦ x.elim ⟶ I) a)
hI : IsInitial.{v, u} I
α : Type u_1
inst_1 : Small.{w, u_1} α
X : α → C
c : Cofan.{u_1, v, u} X
inst_2 : (ofArrows X c.inj).HasPairwisePullbacks
inst_3 : HasInitial.{v, u} C
inst_4 : ∀ (i : α), Mono (c.inj i)
hd :
  Pairwise fun (i j : α) ↦ IsPullback (P := initial.{v, u} C) (initial.to (X i)) (initial.to (X j)) (c.inj i) (c.inj j)
i j : α
a : Equalizer.Presieve.Arrows.FirstObj F X
⊢ Eq (α := F.obj (op (pullback (X := X (i, j).1) (Y := X (i, j).2) (c.inj (i, j).1) (c.inj (i, j).2))))
    (TypeCat.Fun.toFun
        (ConcreteCategory.hom (FC := TypeCat.Fun)
          (CategoryStruct.comp (Y :=
            ∏ᶜ fun (ij : α × α) ↦ F.obj (op (pullback (X := X ij.1) (Y := X ij.2) (c.inj ij.1) (c.inj ij.2))))
            (Equalizer.Presieve.Arrows.firstMap F X c.inj :
              Equalizer.Presieve.Arrows.FirstObj F X ⟶ Equalizer.Presieve.Arrows.SecondObj F X c.inj)
            (Pi.π (fun (ij : α × α) ↦ F.obj (op (pullback (X := X ij.1) (Y := X ij.2) (c.inj ij.1) (c.inj ij.2))))
              (i, j))))
        a :
      F.obj (op (pullback (X := X (i, j).1) (Y := X (i, j).2) (c.inj (i, j).1) (c.inj (i, j).2))))
    (TypeCat.Fun.toFun
        (ConcreteCategory.hom (FC := TypeCat.Fun)
          (CategoryStruct.comp (Y :=
            ∏ᶜ fun (ij : α × α) ↦ F.obj (op (pullback (X := X ij.1) (Y := X ij.2) (c.inj ij.1) (c.inj ij.2))))
            (Equalizer.Presieve.Arrows.secondMap F X c.inj :
              Equalizer.Presieve.Arrows.FirstObj F X ⟶ Equalizer.Presieve.Arrows.SecondObj F X c.inj)
            (Pi.π (fun (ij : α × α) ↦ F.obj (op (pullback (X := X ij.1) (Y := X ij.2) (c.inj ij.1) (c.inj ij.2))))
              (i, j))))
        a :
      F.obj (op (pullback (X := X (i, j).1) (Y := X (i, j).2) (c.inj (i, j).1) (c.inj (i, j).2))))
have h : Eq (α := F.obj (op (pullback (c.inj i) (c.inj j))))
  ((ConcreteCategory.hom (FC := TypeCat.Fun) (F.map (Quiver.Hom.op (pullback.fst (c.inj i) (c.inj j)))) :
        (a : F.obj (op (X i))) → F.obj (op (pullback (c.inj i) (c.inj j))))
      ((ConcreteCategory.hom (FC := TypeCat.Fun) (Pi.π (fun (i : α) ↦ F.obj (op (X i))) i) :
            (a : Equalizer.Presieve.Arrows.FirstObj F X) → F.obj (op (X i)))
          a :
        F.obj (op (X i))) :
    F.obj (op (pullback (c.inj i) (c.inj j))))
  ((ConcreteCategory.hom (FC := TypeCat.Fun) (F.map (Quiver.Hom.op (pullback.snd (c.inj i) (c.inj j)))) :
        (a : F.obj (op (X j))) → F.obj (op (pullback (c.inj i) (c.inj j))))
      ((ConcreteCategory.hom (FC := TypeCat.Fun) (Pi.π (fun (i : α) ↦ F.obj (op (X i))) j) :
            (a : Equalizer.Presieve.Arrows.FirstObj F X) → F.obj (op (X j)))
          a :
        F.obj (op (X j))) :
    F.obj (op (pullback (c.inj i) (c.inj j))))
Tactic: simp only [Equalizer.Presieve.Arrows.firstMap, limit.lift_π, Fan.mk_pt, Fan.mk_π_app,
    TypeCat.Fun.toFun_apply, comp_apply, Equalizer.Presieve.Arrows.secondMap]
-- Lean 4 proof step from Mathlib.CategoryTheory.Sites.Preserves (goal)
Goal:
C : Type u
inst : Category.{v, u} C
I : C
F : Functor.{v, w, u, w + 1} Cᵒᵖ (Type w)
hF :
  IsSheafFor (X := I) F
    (ofArrows Empty.elim fun (a : Empty) ↦ Empty.instIsEmpty.elim (p := fun (x : Empty) ↦ x.elim ⟶ I) a)
hI : IsInitial.{v, u} I
α : Type u_1
inst_1 : Small.{w, u_1} α
X : α → C
c : Cofan.{u_1, v, u} X
inst_2 : (ofArrows X c.inj).HasPairwisePullbacks
inst_3 : HasInitial.{v, u} C
inst_4 : ∀ (i : α), Mono (c.inj i)
hd :
  Pairwise fun (i j : α) ↦ IsPullback (P := initial.{v, u} C) (initial.to (X i)) (initial.to (X j)) (c.inj i) (c.inj j)
i j : α
a : Equalizer.Presieve.Arrows.FirstObj F X
⊢ Eq (α := F.obj (op (pullback (c.inj i) (c.inj j))))
    ((ConcreteCategory.hom (FC := TypeCat.Fun) (F.map (Quiver.Hom.op (pullback.fst (c.inj i) (c.inj j)))) :
          (a : F.obj (op (X i))) → F.obj (op (pullback (c.inj i) (c.inj j))))
        ((ConcreteCategory.hom (FC := TypeCat.Fun) (Pi.π (fun (i : α) ↦ F.obj (op (X i))) i) :
              (a : Equalizer.Presieve.Arrows.FirstObj F X) → F.obj (op (X i)))
            a :
          F.obj (op (X i))) :
      F.obj (op (pullback (c.inj i) (c.inj j))))
    ((ConcreteCategory.hom (FC := TypeCat.Fun) (F.map (Quiver.Hom.op (pullback.snd (c.inj i) (c.inj j)))) :
          (a : F.obj (op (X j))) → F.obj (op (pullback (c.inj i) (c.inj j))))
        ((ConcreteCategory.hom (FC := TypeCat.Fun) (Pi.π (fun (i : α) ↦ F.obj (op (X i))) j) :
              (a : Equalizer.Presieve.Arrows.FirstObj F X) → F.obj (op (X j)))
            a :
          F.obj (op (X j))) :
      F.obj (op (pullback (c.inj i) (c.inj j))))
have pos : ∀ (hi : i = j),
  Eq (α := F.obj (op (pullback (c.inj i) (c.inj j))))
    ((ConcreteCategory.hom (FC := TypeCat.Fun) (F.map (Quiver.Hom.op (pullback.fst (c.inj i) (c.inj j)))) :
          (a : F.obj (op (X i))) → F.obj (op (pullback (c.inj i) (c.inj j))))
        ((ConcreteCategory.hom (FC := TypeCat.Fun) (Pi.π (fun (i : α) ↦ F.obj (op (X i))) i) :
              (a : Equalizer.Presieve.Arrows.FirstObj F X) → F.obj (op (X i)))
            a :
          F.obj (op (X i))) :
      F.obj (op (pullback (c.inj i) (c.inj j))))
    ((ConcreteCategory.hom (FC := TypeCat.Fun) (F.map (Quiver.Hom.op (pullback.snd (c.inj i) (c.inj j)))) :
          (a : F.obj (op (X j))) → F.obj (op (pullback (c.inj i) (c.inj j))))
        ((ConcreteCategory.hom (FC := TypeCat.Fun) (Pi.π (fun (i : α) ↦ F.obj (op (X i))) j) :
              (a : Equalizer.Presieve.Arrows.FirstObj F X) → F.obj (op (X j)))
            a :
          F.obj (op (X j))) :
      F.obj (op (pullback (c.inj i) (c.inj j))))
Tactic: by_cases hi : i = j
-- Lean 4 proof step from Mathlib.CategoryTheory.Sites.Preserves (goal)
Goal:
C : Type u
inst : Category.{v, u} C
I : C
F : Functor.{v, w, u, w + 1} Cᵒᵖ (Type w)
hF :
  IsSheafFor (X := I) F
    (ofArrows Empty.elim fun (a : Empty) ↦ Empty.instIsEmpty.elim (p := fun (x : Empty) ↦ x.elim ⟶ I) a)
hI : IsInitial.{v, u} I
α : Type u_1
inst_1 : Small.{w, u_1} α
X : α → C
c : Cofan.{u_1, v, u} X
inst_2 : (ofArrows X c.inj).HasPairwisePullbacks
inst_3 : HasInitial.{v, u} C
inst_4 : ∀ (i : α), Mono (c.inj i)
hd :
  Pairwise fun (i j : α) ↦ IsPullback (P := initial.{v, u} C) (initial.to (X i)) (initial.to (X j)) (c.inj i) (c.inj j)
i j : α
a : Equalizer.Presieve.Arrows.FirstObj F X
hi : i = j
⊢ Eq (α := F.obj (op (pullback (c.inj i) (c.inj j))))
    ((ConcreteCategory.hom (FC := TypeCat.Fun) (F.map (Quiver.Hom.op (pullback.fst (c.inj i) (c.inj j)))) :
          (a : F.obj (op (X i))) → F.obj (op (pullback (c.inj i) (c.inj j))))
        ((ConcreteCategory.hom (FC := TypeCat.Fun) (Pi.π (fun (i : α) ↦ F.obj (op (X i))) i) :
              (a : Equalizer.Presieve.Arrows.FirstObj F X) → F.obj (op (X i)))
            a :
          F.obj (op (X i))) :
      F.obj (op (pullback (c.inj i) (c.inj j))))
    ((ConcreteCategory.hom (FC := TypeCat.Fun) (F.map (Quiver.Hom.op (pullback.snd (c.inj i) (c.inj j)))) :
          (a : F.obj (op (X j))) → F.obj (op (pullback (c.inj i) (c.inj j))))
        ((ConcreteCategory.hom (FC := TypeCat.Fun) (Pi.π (fun (i : α) ↦ F.obj (op (X i))) j) :
              (a : Equalizer.Presieve.Arrows.FirstObj F X) → F.obj (op (X j)))
            a :
          F.obj (op (X j))) :
      F.obj (op (pullback (c.inj i) (c.inj j))))
have pos : Eq (α := F.obj (op (pullback (c.inj j) (c.inj j))))
  ((ConcreteCategory.hom (FC := TypeCat.Fun) (F.map (Quiver.Hom.op (pullback.fst (c.inj j) (c.inj j)))) :
        (a : F.obj (op (X j))) → F.obj (op (pullback (c.inj j) (c.inj j))))
      ((ConcreteCategory.hom (FC := TypeCat.Fun) (Pi.π (fun (i : α) ↦ F.obj (op (X i))) j) :
            (a : Equalizer.Presieve.Arrows.FirstObj F X) → F.obj (op (X j)))
          a :
        F.obj (op (X j))) :
    F.obj (op (pullback (c.inj j) (c.inj j))))
  ((ConcreteCategory.hom (FC := TypeCat.Fun) (F.map (Quiver.Hom.op (pullback.snd (c.inj j) (c.inj j)))) :
        (a : F.obj (op (X j))) → F.obj (op (pullback (c.inj j) (c.inj j))))
      ((ConcreteCategory.hom (FC := TypeCat.Fun) (Pi.π (fun (i : α) ↦ F.obj (op (X i))) j) :
            (a : Equalizer.Presieve.Arrows.FirstObj F X) → F.obj (op (X j)))
          a :
        F.obj (op (X j))) :
    F.obj (op (pullback (c.inj j) (c.inj j))))
Tactic: rw [hi, Mono.right_cancellation _ _ pullback.condition]
-- Lean 4 proof step from Mathlib.CategoryTheory.Sites.Preserves (hypothesis)
Goal:
C : Type u
inst : Category.{v, u} C
I : C
F : Functor.{v, w, u, w + 1} Cᵒᵖ (Type w)
hF :
  IsSheafFor (X := I) F
    (ofArrows Empty.elim fun (a : Empty) ↦ Empty.instIsEmpty.elim (p := fun (x : Empty) ↦ x.elim ⟶ I) a)
hI : IsInitial.{v, u} I
α : Type u_1
inst_1 : Small.{w, u_1} α
X : α → C
c : Cofan.{u_1, v, u} X
inst_2 : (ofArrows X c.inj).HasPairwisePullbacks
inst_3 : HasInitial.{v, u} C
inst_4 : ∀ (i : α), Mono (c.inj i)
hd :
  Pairwise fun (i j : α) ↦ IsPullback (P := initial.{v, u} C) (initial.to (X i)) (initial.to (X j)) (c.inj i) (c.inj j)
i j : α
a : Equalizer.Presieve.Arrows.FirstObj F X
hi : ¬i = j
⊢ Eq (α := F.obj (op (pullback (c.inj i) (c.inj j))))
    ((ConcreteCategory.hom (FC := TypeCat.Fun) (F.map (Quiver.Hom.op (pullback.fst (c.inj i) (c.inj j)))) :
          (a : F.obj (op (X i))) → F.obj (op (pullback (c.inj i) (c.inj j))))
        ((ConcreteCategory.hom (FC := TypeCat.Fun) (Pi.π (fun (i : α) ↦ F.obj (op (X i))) i) :
              (a : Equalizer.Presieve.Arrows.FirstObj F X) → F.obj (op (X i)))
            a :
          F.obj (op (X i))) :
      F.obj (op (pullback (c.inj i) (c.inj j))))
    ((ConcreteCategory.hom (FC := TypeCat.Fun) (F.map (Quiver.Hom.op (pullback.snd (c.inj i) (c.inj j)))) :
          (a : F.obj (op (X j))) → F.obj (op (pullback (c.inj i) (c.inj j))))
        ((ConcreteCategory.hom (FC := TypeCat.Fun) (Pi.π (fun (i : α) ↦ F.obj (op (X i))) j) :
              (a : Equalizer.Presieve.Arrows.FirstObj F X) → F.obj (op (X j)))
            a :
          F.obj (op (X j))) :
      F.obj (op (pullback (c.inj i) (c.inj j))))
have this : PreservesLimit (Functor.empty Cᵒᵖ) F
Tactic: have := preservesTerminal_of_isSheaf_for_empty F hF hI
-- Lean 4 proof step from Mathlib.CategoryTheory.Sites.Preserves (hypothesis)
Goal:
C : Type u
inst : Category.{v, u} C
I : C
F : Functor.{v, w, u, w + 1} Cᵒᵖ (Type w)
hF :
  IsSheafFor (X := I) F
    (ofArrows Empty.elim fun (a : Empty) ↦ Empty.instIsEmpty.elim (p := fun (x : Empty) ↦ x.elim ⟶ I) a)
hI : IsInitial.{v, u} I
α : Type u_1
inst_1 : Small.{w, u_1} α
X : α → C
c : Cofan.{u_1, v, u} X
hc : IsColimit c
inst_2 : (ofArrows X c.inj).HasPairwisePullbacks
inst_3 : HasInitial.{v, u} C
inst_4 : ∀ (i : α), Mono (c.inj i)
hd :
  Pairwise fun (i j : α) ↦ IsPullback (P := initial.{v, u} C) (initial.to (X i)) (initial.to (X j)) (c.inj i) (c.inj j)
hF' : IsSheafFor F (ofArrows X c.inj)
⊢ PreservesLimit.{u_1, u_1, v, w, u, w + 1} (J := Discrete α) (Discrete.functor fun (x : α) ↦ op (X x)) F
have this : HasCoproduct.{u_1, v, u} X
Tactic: have : HasCoproduct X := ⟨⟨c, hc⟩⟩
-- Lean 4 proof step from Mathlib.CategoryTheory.Sites.Preserves (goal)
Goal:
C : Type u
inst : Category.{v, u} C
I : C
F : Functor.{v, w, u, w + 1} Cᵒᵖ (Type w)
hF :
  IsSheafFor (X := I) F
    (ofArrows Empty.elim fun (a : Empty) ↦ Empty.instIsEmpty.elim (p := fun (x : Empty) ↦ x.elim ⟶ I) a)
hI : IsInitial.{v, u} I
α : Type u_1
inst_1 : Small.{w, u_1} α
X : α → C
c : Cofan.{u_1, v, u} X
hc : IsColimit c
inst_2 : (ofArrows X c.inj).HasPairwisePullbacks
inst_3 : HasInitial.{v, u} C
inst_4 : ∀ (i : α), Mono (c.inj i)
hd :
  Pairwise fun (i j : α) ↦ IsPullback (P := initial.{v, u} C) (initial.to (X i)) (initial.to (X j)) (c.inj i) (c.inj j)
hF' : IsSheafFor F (ofArrows X c.inj)
this : HasCoproduct.{u_1, v, u} X
⊢ PreservesLimit.{u_1, u_1, v, w, u, w + 1} (J := Discrete α) (Discrete.functor fun (x : α) ↦ op (X x)) F
have refine : IsIso (X := F.obj (piObj.{u_1, v, u} fun (x : α) ↦ op (X x))) (Y := ∏ᶜ fun (b : α) ↦ F.obj ((fun (x : α) ↦ op (X x)) b))
  (piComparison F fun (x : α) ↦ op (X x))
Tactic: refine @PreservesProduct.of_iso_comparison _ _ _ _ F _ (fun x ↦ op (X x)) _ _ ?_
-- Lean 4 proof step from Mathlib.CategoryTheory.Sites.Preserves (goal)
Goal:
C : Type u
inst : Category.{v, u} C
I : C
F : Functor.{v, w, u, w + 1} Cᵒᵖ (Type w)
hF :
  IsSheafFor (X := I) F
    (ofArrows Empty.elim fun (a : Empty) ↦ Empty.instIsEmpty.elim (p := fun (x : Empty) ↦ x.elim ⟶ I) a)
hI : IsInitial.{v, u} I
α : Type u_1
inst_1 : Small.{w, u_1} α
X : α → C
c : Cofan.{u_1, v, u} X
hc : IsColimit c
inst_2 : (ofArrows X c.inj).HasPairwisePullbacks
inst_3 : HasInitial.{v, u} C
inst_4 : ∀ (i : α), Mono (c.inj i)
hd :
  Pairwise fun (i j : α) ↦ IsPullback (P := initial.{v, u} C) (initial.to (X i)) (initial.to (X j)) (c.inj i) (c.inj j)
hF' : IsSheafFor F (ofArrows X c.inj)
this : HasCoproduct.{u_1, v, u} X
⊢ IsIso (X := F.obj (piObj.{u_1, v, u} fun (x : α) ↦ op (X x))) (Y :=
    ∏ᶜ fun (b : α) ↦ F.obj ((fun (x : α) ↦ op (X x)) b)) (piComparison F fun (x : α) ↦ op (X x))
have rw : IsIso (X := F.obj (piObj.{u_1, v, u} fun (x : α) ↦ op (X x))) (Y := ∏ᶜ fun (b : α) ↦ F.obj ((fun (x : α) ↦ op (X x)) b))
  (F.map (Iso.inv (opCoproductIsoProduct' hc (productIsProduct fun (x : α) ↦ op (X x)))) ≫
      Equalizer.Presieve.Arrows.forkMap F X c.inj :
    F.obj
        (Cone.pt.{u_1, v, u_1, u} (J := Discrete α) (F := Discrete.functor fun (x : α) ↦ op (X x))
          (Fan.mk (piObj.{u_1, v, u} fun (x : α) ↦ op (X x)) (Pi.π fun (x : α) ↦ op (X x)))) ⟶
      Equalizer.Presieve.Arrows.FirstObj F X)
Tactic: rw [piComparison_fac (hc := hc)]