Theorem: CategoryTheory.Presieve.isSheaf_iff_preservesFiniteProducts
File: Mathlib/CategoryTheory/Sites/Coherent/ExtensiveSheaves.lean

tactic: refine ⟨fun hF ↦ ⟨⟨fun α _ ↦ ⟨fun {K} ↦ ?_⟩⟩⟩, fun hF ↦ ?_⟩
state_before: C : Type u_1
inst✝³ : Category.{u_3, u_1} C
D : Type u_2
inst✝² : Category.{?u.9436, u_2} D
inst✝¹ : FinitaryPreExtensive C
inst✝ : FinitaryExtensive C
F : Cᵒᵖ ⥤ Type w
⊢ IsSheaf (extensiveTopology C) F ↔ Nonempty (PreservesFiniteProducts F)
state_after: case refine_1
C : Type u_1
inst✝³ : Category.{u_3, u_1} C
D : Type u_2
inst✝² : Category.{?u.9436, u_2} D
inst✝¹ : FinitaryPreExtensive C
inst✝ : FinitaryExtensive C
F : Cᵒᵖ ⥤ Type w
hF : IsSheaf (extensiveTopology C) F
α : Type
x✝ : Fintype α
K : Discrete α ⥤ Cᵒᵖ
⊢ PreservesLimit K F

case refine_2
C : Type u_1
inst✝³ : Category.{u_3, u_1} C
D : Type u_2
inst✝² : Category.{?u.9436, u_2} D
inst✝¹ : FinitaryPreExtensive C
inst✝ : FinitaryExtensive C
F : Cᵒᵖ ⥤ Type w
hF : Nonempty (PreservesFiniteProducts F)
⊢ IsSheaf (extensiveTopology C) F

tactic: erw [Presieve.isSheaf_coverage] at hF
state_before: case refine_1
C : Type u_1
inst✝³ : Category.{u_3, u_1} C
D : Type u_2
inst✝² : Category.{?u.9436, u_2} D
inst✝¹ : FinitaryPreExtensive C
inst✝ : FinitaryExtensive C
F : Cᵒᵖ ⥤ Type w
hF : IsSheaf (extensiveTopology C) F
α : Type
x✝ : Fintype α
K : Discrete α ⥤ Cᵒᵖ
⊢ PreservesLimit K F
state_after: case refine_1
C : Type u_1
inst✝³ : Category.{u_3, u_1} C
D : Type u_2
inst✝² : Category.{?u.9436, u_2} D
inst✝¹ : FinitaryPreExtensive C
inst✝ : FinitaryExtensive C
F : Cᵒᵖ ⥤ Type w
hF : ∀ {X : C}, ∀ R ∈ (extensiveCoverage C).covering X, IsSheafFor F R
α : Type
x✝ : Fintype α
K : Discrete α ⥤ Cᵒᵖ
⊢ PreservesLimit K F

tactic: let Z : α → C := fun i ↦ unop (K.obj ⟨i⟩)
state_before: case refine_1
C : Type u_1
inst✝³ : Category.{u_3, u_1} C
D : Type u_2
inst✝² : Category.{?u.9436, u_2} D
inst✝¹ : FinitaryPreExtensive C
inst✝ : FinitaryExtensive C
F : Cᵒᵖ ⥤ Type w
hF : ∀ {X : C}, ∀ R ∈ (extensiveCoverage C).covering X, IsSheafFor F R
α : Type
x✝ : Fintype α
K : Discrete α ⥤ Cᵒᵖ
⊢ PreservesLimit K F
state_after: case refine_1
C : Type u_1
inst✝³ : Category.{u_3, u_1} C
D : Type u_2
inst✝² : Category.{?u.9436, u_2} D
inst✝¹ : FinitaryPreExtensive C
inst✝ : FinitaryExtensive C
F : Cᵒᵖ ⥤ Type w
hF : ∀ {X : C}, ∀ R ∈ (extensiveCoverage C).covering X, IsSheafFor F R
α : Type
x✝ : Fintype α
K : Discrete α ⥤ Cᵒᵖ
Z : α → C := fun i => (K.obj { as := i }).unop
⊢ PreservesLimit K F

tactic: have : (Presieve.ofArrows Z (Cofan.mk (∐ Z) (Sigma.ι Z)).inj).hasPullbacks :=
  (inferInstance : (Presieve.ofArrows Z (Sigma.ι Z)).hasPullbacks)
state_before: case refine_1
C : Type u_1
inst✝³ : Category.{u_3, u_1} C
D : Type u_2
inst✝² : Category.{?u.9436, u_2} D
inst✝¹ : FinitaryPreExtensive C
inst✝ : FinitaryExtensive C
F : Cᵒᵖ ⥤ Type w
hF : ∀ {X : C}, ∀ R ∈ (extensiveCoverage C).covering X, IsSheafFor F R
α : Type
x✝ : Fintype α
K : Discrete α ⥤ Cᵒᵖ
Z : α → C := fun i => (K.obj { as := i }).unop
⊢ PreservesLimit K F
state_after: case refine_1
C : Type u_1
inst✝³ : Category.{u_3, u_1} C
D : Type u_2
inst✝² : Category.{?u.9436, u_2} D
inst✝¹ : FinitaryPreExtensive C
inst✝ : FinitaryExtensive C
F : Cᵒᵖ ⥤ Type w
hF : ∀ {X : C}, ∀ R ∈ (extensiveCoverage C).covering X, IsSheafFor F R
α : Type
x✝ : Fintype α
K : Discrete α ⥤ Cᵒᵖ
Z : α → C := fun i => (K.obj { as := i }).unop
this : (ofArrows Z (Cofan.mk (∐ Z) (Sigma.ι Z)).inj).hasPullbacks
⊢ PreservesLimit K F

tactic: have : ∀ (i : α), Mono (Cofan.inj (Cofan.mk (∐ Z) (Sigma.ι Z)) i) :=
  (inferInstance : ∀ (i : α), Mono (Sigma.ι Z i))
state_before: case refine_1
C : Type u_1
inst✝³ : Category.{u_3, u_1} C
D : Type u_2
inst✝² : Category.{?u.9436, u_2} D
inst✝¹ : FinitaryPreExtensive C
inst✝ : FinitaryExtensive C
F : Cᵒᵖ ⥤ Type w
hF : ∀ {X : C}, ∀ R ∈ (extensiveCoverage C).covering X, IsSheafFor F R
α : Type
x✝ : Fintype α
K : Discrete α ⥤ Cᵒᵖ
Z : α → C := fun i => (K.obj { as := i }).unop
this : (ofArrows Z (Cofan.mk (∐ Z) (Sigma.ι Z)).inj).hasPullbacks
⊢ PreservesLimit K F
state_after: case refine_1
C : Type u_1
inst✝³ : Category.{u_3, u_1} C
D : Type u_2
inst✝² : Category.{?u.9436, u_2} D
inst✝¹ : FinitaryPreExtensive C
inst✝ : FinitaryExtensive C
F : Cᵒᵖ ⥤ Type w
hF : ∀ {X : C}, ∀ R ∈ (extensiveCoverage C).covering X, IsSheafFor F R
α : Type
x✝ : Fintype α
K : Discrete α ⥤ Cᵒᵖ
Z : α → C := fun i => (K.obj { as := i }).unop
this✝ : (ofArrows Z (Cofan.mk (∐ Z) (Sigma.ι Z)).inj).hasPullbacks
this : ∀ (i : α), Mono ((Cofan.mk (∐ Z) (Sigma.ι Z)).inj i)
⊢ PreservesLimit K F

tactic: let i : K ≅ Discrete.functor (fun i ↦ op (Z i)) := Discrete.natIsoFunctor
state_before: case refine_1
C : Type u_1
inst✝³ : Category.{u_3, u_1} C
D : Type u_2
inst✝² : Category.{?u.9436, u_2} D
inst✝¹ : FinitaryPreExtensive C
inst✝ : FinitaryExtensive C
F : Cᵒᵖ ⥤ Type w
hF : ∀ {X : C}, ∀ R ∈ (extensiveCoverage C).covering X, IsSheafFor F R
α : Type
x✝ : Fintype α
K : Discrete α ⥤ Cᵒᵖ
Z : α → C := fun i => (K.obj { as := i }).unop
this✝ : (ofArrows Z (Cofan.mk (∐ Z) (Sigma.ι Z)).inj).hasPullbacks
this : ∀ (i : α), Mono ((Cofan.mk (∐ Z) (Sigma.ι Z)).inj i)
⊢ PreservesLimit K F
state_after: case refine_1
C : Type u_1
inst✝³ : Category.{u_3, u_1} C
D : Type u_2
inst✝² : Category.{?u.9436, u_2} D
inst✝¹ : FinitaryPreExtensive C
inst✝ : FinitaryExtensive C
F : Cᵒᵖ ⥤ Type w
hF : ∀ {X : C}, ∀ R ∈ (extensiveCoverage C).covering X, IsSheafFor F R
α : Type
x✝ : Fintype α
K : Discrete α ⥤ Cᵒᵖ
Z : α → C := fun i => (K.obj { as := i }).unop
this✝ : (ofArrows Z (Cofan.mk (∐ Z) (Sigma.ι Z)).inj).hasPullbacks
this : ∀ (i : α), Mono ((Cofan.mk (∐ Z) (Sigma.ι Z)).inj i)
i : K ≅ Discrete.functor fun i => { unop := Z i } := Discrete.natIsoFunctor
⊢ PreservesLimit K F

tactic: let _ : PreservesLimit (Discrete.functor (fun i ↦ op (Z i))) F :=
    Presieve.preservesProductOfIsSheafFor F ?_ initialIsInitial _ (coproductIsCoproduct Z)
    (FinitaryExtensive.isPullback_initial_to_sigma_ι Z)
    (hF (Presieve.ofArrows Z (fun i ↦ Sigma.ι Z i)) ?_)
state_before: case refine_1
C : Type u_1
inst✝³ : Category.{u_3, u_1} C
D : Type u_2
inst✝² : Category.{?u.9436, u_2} D
inst✝¹ : FinitaryPreExtensive C
inst✝ : FinitaryExtensive C
F : Cᵒᵖ ⥤ Type w
hF : ∀ {X : C}, ∀ R ∈ (extensiveCoverage C).covering X, IsSheafFor F R
α : Type
x✝ : Fintype α
K : Discrete α ⥤ Cᵒᵖ
Z : α → C := fun i => (K.obj { as := i }).unop
this✝ : (ofArrows Z (Cofan.mk (∐ Z) (Sigma.ι Z)).inj).hasPullbacks
this : ∀ (i : α), Mono ((Cofan.mk (∐ Z) (Sigma.ι Z)).inj i)
i : K ≅ Discrete.functor fun i => { unop := Z i } := Discrete.natIsoFunctor
⊢ PreservesLimit K F
state_after: case refine_1.refine_3
C : Type u_1
inst✝³ : Category.{u_3, u_1} C
D : Type u_2
inst✝² : Category.{?u.9436, u_2} D
inst✝¹ : FinitaryPreExtensive C
inst✝ : FinitaryExtensive C
F : Cᵒᵖ ⥤ Type w
hF : ∀ {X : C}, ∀ R ∈ (extensiveCoverage C).covering X, IsSheafFor F R
α : Type
x✝¹ : Fintype α
K : Discrete α ⥤ Cᵒᵖ
Z : α → C := fun i => (K.obj { as := i }).unop
this✝ : (ofArrows Z (Cofan.mk (∐ Z) (Sigma.ι Z)).inj).hasPullbacks
this : ∀ (i : α), Mono ((Cofan.mk (∐ Z) (Sigma.ι Z)).inj i)
i : K ≅ Discrete.functor fun i => { unop := Z i } := Discrete.natIsoFunctor
x✝ : PreservesLimit (Discrete.functor fun i => { unop := Z i }) F :=
  preservesProductOfIsSheafFor F ?refine_1.refine_1 initialIsInitial (Cofan.mk (∐ Z) (Sigma.ι Z))
    (coproductIsCoproduct Z) ⋯ ⋯
⊢ PreservesLimit K F

case refine_1.refine_1
C : Type u_1
inst✝³ : Category.{u_3, u_1} C
D : Type u_2
inst✝² : Category.{?u.9436, u_2} D
inst✝¹ : FinitaryPreExtensive C
inst✝ : FinitaryExtensive C
F : Cᵒᵖ ⥤ Type w
hF : ∀ {X : C}, ∀ R ∈ (extensiveCoverage C).covering X, IsSheafFor F R
α : Type
x✝ : Fintype α
K : Discrete α ⥤ Cᵒᵖ
Z : α → C := fun i => (K.obj { as := i }).unop
this✝ : (ofArrows Z (Cofan.mk (∐ Z) (Sigma.ι Z)).inj).hasPullbacks
this : ∀ (i : α), Mono ((Cofan.mk (∐ Z) (Sigma.ι Z)).inj i)
i : K ≅ Discrete.functor fun i => { unop := Z i } := Discrete.natIsoFunctor
⊢ IsSheafFor F (ofArrows Empty.elim fun a => instIsEmptyEmpty.elim a)

case refine_1.refine_2
C : Type u_1
inst✝³ : Category.{u_3, u_1} C
D : Type u_2
inst✝² : Category.{?u.9436, u_2} D
inst✝¹ : FinitaryPreExtensive C
inst✝ : FinitaryExtensive C
F : Cᵒᵖ ⥤ Type w
hF : ∀ {X : C}, ∀ R ∈ (extensiveCoverage C).covering X, IsSheafFor F R
α : Type
x✝ : Fintype α
K : Discrete α ⥤ Cᵒᵖ
Z : α → C := fun i => (K.obj { as := i }).unop
this✝ : (ofArrows Z (Cofan.mk (∐ Z) (Sigma.ι Z)).inj).hasPullbacks
this : ∀ (i : α), Mono ((Cofan.mk (∐ Z) (Sigma.ι Z)).inj i)
i : K ≅ Discrete.functor fun i => { unop := Z i } := Discrete.natIsoFunctor
⊢ (ofArrows Z fun i => Sigma.ι Z i) ∈ (extensiveCoverage C).covering (∐ Z)

tactic: exact preservesLimitOfIsoDiagram F i.symm
state_before: case refine_1.refine_3
C : Type u_1
inst✝³ : Category.{u_3, u_1} C
D : Type u_2
inst✝² : Category.{?u.9436, u_2} D
inst✝¹ : FinitaryPreExtensive C
inst✝ : FinitaryExtensive C
F : Cᵒᵖ ⥤ Type w
hF : ∀ {X : C}, ∀ R ∈ (extensiveCoverage C).covering X, IsSheafFor F R
α : Type
x✝¹ : Fintype α
K : Discrete α ⥤ Cᵒᵖ
Z : α → C := fun i => (K.obj { as := i }).unop
this✝ : (ofArrows Z (Cofan.mk (∐ Z) (Sigma.ι Z)).inj).hasPullbacks
this : ∀ (i : α), Mono ((Cofan.mk (∐ Z) (Sigma.ι Z)).inj i)
i : K ≅ Discrete.functor fun i => { unop := Z i } := Discrete.natIsoFunctor
x✝ : PreservesLimit (Discrete.functor fun i => { unop := Z i }) F :=
  preservesProductOfIsSheafFor F ?refine_1.refine_1 initialIsInitial (Cofan.mk (∐ Z) (Sigma.ι Z))
    (coproductIsCoproduct Z) ⋯ ⋯
⊢ PreservesLimit K F
state_after: no goals

tactic: apply hF
state_before: case refine_1.refine_1
C : Type u_1
inst✝³ : Category.{u_3, u_1} C
D : Type u_2
inst✝² : Category.{?u.9436, u_2} D
inst✝¹ : FinitaryPreExtensive C
inst✝ : FinitaryExtensive C
F : Cᵒᵖ ⥤ Type w
hF : ∀ {X : C}, ∀ R ∈ (extensiveCoverage C).covering X, IsSheafFor F R
α : Type
x✝ : Fintype α
K : Discrete α ⥤ Cᵒᵖ
Z : α → C := fun i => (K.obj { as := i }).unop
this✝ : (ofArrows Z (Cofan.mk (∐ Z) (Sigma.ι Z)).inj).hasPullbacks
this : ∀ (i : α), Mono ((Cofan.mk (∐ Z) (Sigma.ι Z)).inj i)
i : K ≅ Discrete.functor fun i => { unop := Z i } := Discrete.natIsoFunctor
⊢ IsSheafFor F (ofArrows Empty.elim fun a => instIsEmptyEmpty.elim a)
state_after: case refine_1.refine_1.a
C : Type u_1
inst✝³ : Category.{u_3, u_1} C
D : Type u_2
inst✝² : Category.{?u.9436, u_2} D
inst✝¹ : FinitaryPreExtensive C
inst✝ : FinitaryExtensive C
F : Cᵒᵖ ⥤ Type w
hF : ∀ {X : C}, ∀ R ∈ (extensiveCoverage C).covering X, IsSheafFor F R
α : Type
x✝ : Fintype α
K : Discrete α ⥤ Cᵒᵖ
Z : α → C := fun i => (K.obj { as := i }).unop
this✝ : (ofArrows Z (Cofan.mk (∐ Z) (Sigma.ι Z)).inj).hasPullbacks
this : ∀ (i : α), Mono ((Cofan.mk (∐ Z) (Sigma.ι Z)).inj i)
i : K ≅ Discrete.functor fun i => { unop := Z i } := Discrete.natIsoFunctor
⊢ (ofArrows Empty.elim fun a => instIsEmptyEmpty.elim a) ∈ (extensiveCoverage C).covering (⊥_ C)

tactic: refine ⟨Empty, inferInstance, Empty.elim, IsEmpty.elim inferInstance, rfl, ⟨default,?_, ?_⟩⟩
state_before: case refine_1.refine_1.a
C : Type u_1
inst✝³ : Category.{u_3, u_1} C
D : Type u_2
inst✝² : Category.{?u.9436, u_2} D
inst✝¹ : FinitaryPreExtensive C
inst✝ : FinitaryExtensive C
F : Cᵒᵖ ⥤ Type w
hF : ∀ {X : C}, ∀ R ∈ (extensiveCoverage C).covering X, IsSheafFor F R
α : Type
x✝ : Fintype α
K : Discrete α ⥤ Cᵒᵖ
Z : α → C := fun i => (K.obj { as := i }).unop
this✝ : (ofArrows Z (Cofan.mk (∐ Z) (Sigma.ι Z)).inj).hasPullbacks
this : ∀ (i : α), Mono ((Cofan.mk (∐ Z) (Sigma.ι Z)).inj i)
i : K ≅ Discrete.functor fun i => { unop := Z i } := Discrete.natIsoFunctor
⊢ (ofArrows Empty.elim fun a => instIsEmptyEmpty.elim a) ∈ (extensiveCoverage C).covering (⊥_ C)
state_after: case refine_1.refine_1.a.refine_1
C : Type u_1
inst✝³ : Category.{u_3, u_1} C
D : Type u_2
inst✝² : Category.{?u.9436, u_2} D
inst✝¹ : FinitaryPreExtensive C
inst✝ : FinitaryExtensive C
F : Cᵒᵖ ⥤ Type w
hF : ∀ {X : C}, ∀ R ∈ (extensiveCoverage C).covering X, IsSheafFor F R
α : Type
x✝ : Fintype α
K : Discrete α ⥤ Cᵒᵖ
Z : α → C := fun i => (K.obj { as := i }).unop
this✝ : (ofArrows Z (Cofan.mk (∐ Z) (Sigma.ι Z)).inj).hasPullbacks
this : ∀ (i : α), Mono ((Cofan.mk (∐ Z) (Sigma.ι Z)).inj i)
i : K ≅ Discrete.functor fun i => { unop := Z i } := Discrete.natIsoFunctor
⊢ (Sigma.desc fun a => ⋯.elim a) ≫ default = 𝟙 (∐ Empty.elim)

case refine_1.refine_1.a.refine_2
C : Type u_1
inst✝³ : Category.{u_3, u_1} C
D : Type u_2
inst✝² : Category.{?u.9436, u_2} D
inst✝¹ : FinitaryPreExtensive C
inst✝ : FinitaryExtensive C
F : Cᵒᵖ ⥤ Type w
hF : ∀ {X : C}, ∀ R ∈ (extensiveCoverage C).covering X, IsSheafFor F R
α : Type
x✝ : Fintype α
K : Discrete α ⥤ Cᵒᵖ
Z : α → C := fun i => (K.obj { as := i }).unop
this✝ : (ofArrows Z (Cofan.mk (∐ Z) (Sigma.ι Z)).inj).hasPullbacks
this : ∀ (i : α), Mono ((Cofan.mk (∐ Z) (Sigma.ι Z)).inj i)
i : K ≅ Discrete.functor fun i => { unop := Z i } := Discrete.natIsoFunctor
⊢ (default ≫ Sigma.desc fun a => ⋯.elim a) = 𝟙 (⊥_ C)

tactic: ext b
state_before: case refine_1.refine_1.a.refine_1
C : Type u_1
inst✝³ : Category.{u_3, u_1} C
D : Type u_2
inst✝² : Category.{?u.9436, u_2} D
inst✝¹ : FinitaryPreExtensive C
inst✝ : FinitaryExtensive C
F : Cᵒᵖ ⥤ Type w
hF : ∀ {X : C}, ∀ R ∈ (extensiveCoverage C).covering X, IsSheafFor F R
α : Type
x✝ : Fintype α
K : Discrete α ⥤ Cᵒᵖ
Z : α → C := fun i => (K.obj { as := i }).unop
this✝ : (ofArrows Z (Cofan.mk (∐ Z) (Sigma.ι Z)).inj).hasPullbacks
this : ∀ (i : α), Mono ((Cofan.mk (∐ Z) (Sigma.ι Z)).inj i)
i : K ≅ Discrete.functor fun i => { unop := Z i } := Discrete.natIsoFunctor
⊢ (Sigma.desc fun a => ⋯.elim a) ≫ default = 𝟙 (∐ Empty.elim)
state_after: case refine_1.refine_1.a.refine_1.h
C : Type u_1
inst✝³ : Category.{u_3, u_1} C
D : Type u_2
inst✝² : Category.{?u.9436, u_2} D
inst✝¹ : FinitaryPreExtensive C
inst✝ : FinitaryExtensive C
F : Cᵒᵖ ⥤ Type w
hF : ∀ {X : C}, ∀ R ∈ (extensiveCoverage C).covering X, IsSheafFor F R
α : Type
x✝ : Fintype α
K : Discrete α ⥤ Cᵒᵖ
Z : α → C := fun i => (K.obj { as := i }).unop
this✝ : (ofArrows Z (Cofan.mk (∐ Z) (Sigma.ι Z)).inj).hasPullbacks
this : ∀ (i : α), Mono ((Cofan.mk (∐ Z) (Sigma.ι Z)).inj i)
i : K ≅ Discrete.functor fun i => { unop := Z i } := Discrete.natIsoFunctor
b : Empty
⊢ Sigma.ι Empty.elim b ≫ (Sigma.desc fun a => ⋯.elim a) ≫ default = Sigma.ι Empty.elim b ≫ 𝟙 (∐ Empty.elim)

tactic: cases b
state_before: case refine_1.refine_1.a.refine_1.h
C : Type u_1
inst✝³ : Category.{u_3, u_1} C
D : Type u_2
inst✝² : Category.{?u.9436, u_2} D
inst✝¹ : FinitaryPreExtensive C
inst✝ : FinitaryExtensive C
F : Cᵒᵖ ⥤ Type w
hF : ∀ {X : C}, ∀ R ∈ (extensiveCoverage C).covering X, IsSheafFor F R
α : Type
x✝ : Fintype α
K : Discrete α ⥤ Cᵒᵖ
Z : α → C := fun i => (K.obj { as := i }).unop
this✝ : (ofArrows Z (Cofan.mk (∐ Z) (Sigma.ι Z)).inj).hasPullbacks
this : ∀ (i : α), Mono ((Cofan.mk (∐ Z) (Sigma.ι Z)).inj i)
i : K ≅ Discrete.functor fun i => { unop := Z i } := Discrete.natIsoFunctor
b : Empty
⊢ Sigma.ι Empty.elim b ≫ (Sigma.desc fun a => ⋯.elim a) ≫ default = Sigma.ι Empty.elim b ≫ 𝟙 (∐ Empty.elim)
state_after: no goals

tactic: simp only [eq_iff_true_of_subsingleton]
state_before: case refine_1.refine_1.a.refine_2
C : Type u_1
inst✝³ : Category.{u_3, u_1} C
D : Type u_2
inst✝² : Category.{?u.9436, u_2} D
inst✝¹ : FinitaryPreExtensive C
inst✝ : FinitaryExtensive C
F : Cᵒᵖ ⥤ Type w
hF : ∀ {X : C}, ∀ R ∈ (extensiveCoverage C).covering X, IsSheafFor F R
α : Type
x✝ : Fintype α
K : Discrete α ⥤ Cᵒᵖ
Z : α → C := fun i => (K.obj { as := i }).unop
this✝ : (ofArrows Z (Cofan.mk (∐ Z) (Sigma.ι Z)).inj).hasPullbacks
this : ∀ (i : α), Mono ((Cofan.mk (∐ Z) (Sigma.ι Z)).inj i)
i : K ≅ Discrete.functor fun i => { unop := Z i } := Discrete.natIsoFunctor
⊢ (default ≫ Sigma.desc fun a => ⋯.elim a) = 𝟙 (⊥_ C)
state_after: no goals

tactic: refine ⟨α, inferInstance, Z, (fun i ↦ Sigma.ι Z i), rfl, ?_⟩
state_before: case refine_1.refine_2
C : Type u_1
inst✝³ : Category.{u_3, u_1} C
D : Type u_2
inst✝² : Category.{?u.9436, u_2} D
inst✝¹ : FinitaryPreExtensive C
inst✝ : FinitaryExtensive C
F : Cᵒᵖ ⥤ Type w
hF : ∀ {X : C}, ∀ R ∈ (extensiveCoverage C).covering X, IsSheafFor F R
α : Type
x✝ : Fintype α
K : Discrete α ⥤ Cᵒᵖ
Z : α → C := fun i => (K.obj { as := i }).unop
this✝ : (ofArrows Z (Cofan.mk (∐ Z) (Sigma.ι Z)).inj).hasPullbacks
this : ∀ (i : α), Mono ((Cofan.mk (∐ Z) (Sigma.ι Z)).inj i)
i : K ≅ Discrete.functor fun i => { unop := Z i } := Discrete.natIsoFunctor
⊢ (ofArrows Z fun i => Sigma.ι Z i) ∈ (extensiveCoverage C).covering (∐ Z)
state_after: case refine_1.refine_2
C : Type u_1
inst✝³ : Category.{u_3, u_1} C
D : Type u_2
inst✝² : Category.{?u.9436, u_2} D
inst✝¹ : FinitaryPreExtensive C
inst✝ : FinitaryExtensive C
F : Cᵒᵖ ⥤ Type w
hF : ∀ {X : C}, ∀ R ∈ (extensiveCoverage C).covering X, IsSheafFor F R
α : Type
x✝ : Fintype α
K : Discrete α ⥤ Cᵒᵖ
Z : α → C := fun i => (K.obj { as := i }).unop
this✝ : (ofArrows Z (Cofan.mk (∐ Z) (Sigma.ι Z)).inj).hasPullbacks
this : ∀ (i : α), Mono ((Cofan.mk (∐ Z) (Sigma.ι Z)).inj i)
i : K ≅ Discrete.functor fun i => { unop := Z i } := Discrete.natIsoFunctor
⊢ IsIso (Sigma.desc fun i => Sigma.ι Z i)

tactic: suffices Sigma.desc (fun i ↦ Sigma.ι Z i) = 𝟙 _ by rw [this]; infer_instance
state_before: case refine_1.refine_2
C : Type u_1
inst✝³ : Category.{u_3, u_1} C
D : Type u_2
inst✝² : Category.{?u.9436, u_2} D
inst✝¹ : FinitaryPreExtensive C
inst✝ : FinitaryExtensive C
F : Cᵒᵖ ⥤ Type w
hF : ∀ {X : C}, ∀ R ∈ (extensiveCoverage C).covering X, IsSheafFor F R
α : Type
x✝ : Fintype α
K : Discrete α ⥤ Cᵒᵖ
Z : α → C := fun i => (K.obj { as := i }).unop
this✝ : (ofArrows Z (Cofan.mk (∐ Z) (Sigma.ι Z)).inj).hasPullbacks
this : ∀ (i : α), Mono ((Cofan.mk (∐ Z) (Sigma.ι Z)).inj i)
i : K ≅ Discrete.functor fun i => { unop := Z i } := Discrete.natIsoFunctor
⊢ IsIso (Sigma.desc fun i => Sigma.ι Z i)
state_after: case refine_1.refine_2
C : Type u_1
inst✝³ : Category.{u_3, u_1} C
D : Type u_2
inst✝² : Category.{?u.9436, u_2} D
inst✝¹ : FinitaryPreExtensive C
inst✝ : FinitaryExtensive C
F : Cᵒᵖ ⥤ Type w
hF : ∀ {X : C}, ∀ R ∈ (extensiveCoverage C).covering X, IsSheafFor F R
α : Type
x✝ : Fintype α
K : Discrete α ⥤ Cᵒᵖ
Z : α → C := fun i => (K.obj { as := i }).unop
this✝ : (ofArrows Z (Cofan.mk (∐ Z) (Sigma.ι Z)).inj).hasPullbacks
this : ∀ (i : α), Mono ((Cofan.mk (∐ Z) (Sigma.ι Z)).inj i)
i : K ≅ Discrete.functor fun i => { unop := Z i } := Discrete.natIsoFunctor
⊢ (Sigma.desc fun i => Sigma.ι Z i) = 𝟙 (∐ Z)

tactic: ext
state_before: case refine_1.refine_2
C : Type u_1
inst✝³ : Category.{u_3, u_1} C
D : Type u_2
inst✝² : Category.{?u.9436, u_2} D
inst✝¹ : FinitaryPreExtensive C
inst✝ : FinitaryExtensive C
F : Cᵒᵖ ⥤ Type w
hF : ∀ {X : C}, ∀ R ∈ (extensiveCoverage C).covering X, IsSheafFor F R
α : Type
x✝ : Fintype α
K : Discrete α ⥤ Cᵒᵖ
Z : α → C := fun i => (K.obj { as := i }).unop
this✝ : (ofArrows Z (Cofan.mk (∐ Z) (Sigma.ι Z)).inj).hasPullbacks
this : ∀ (i : α), Mono ((Cofan.mk (∐ Z) (Sigma.ι Z)).inj i)
i : K ≅ Discrete.functor fun i => { unop := Z i } := Discrete.natIsoFunctor
⊢ (Sigma.desc fun i => Sigma.ι Z i) = 𝟙 (∐ Z)
state_after: case refine_1.refine_2.h
C : Type u_1
inst✝³ : Category.{u_3, u_1} C
D : Type u_2
inst✝² : Category.{?u.9436, u_2} D
inst✝¹ : FinitaryPreExtensive C
inst✝ : FinitaryExtensive C
F : Cᵒᵖ ⥤ Type w
hF : ∀ {X : C}, ∀ R ∈ (extensiveCoverage C).covering X, IsSheafFor F R
α : Type
x✝ : Fintype α
K : Discrete α ⥤ Cᵒᵖ
Z : α → C := fun i => (K.obj { as := i }).unop
this✝ : (ofArrows Z (Cofan.mk (∐ Z) (Sigma.ι Z)).inj).hasPullbacks
this : ∀ (i : α), Mono ((Cofan.mk (∐ Z) (Sigma.ι Z)).inj i)
i : K ≅ Discrete.functor fun i => { unop := Z i } := Discrete.natIsoFunctor
b✝ : α
⊢ (Sigma.ι Z b✝ ≫ Sigma.desc fun i => Sigma.ι Z i) = Sigma.ι Z b✝ ≫ 𝟙 (∐ Z)

tactic: simp
state_before: case refine_1.refine_2.h
C : Type u_1
inst✝³ : Category.{u_3, u_1} C
D : Type u_2
inst✝² : Category.{?u.9436, u_2} D
inst✝¹ : FinitaryPreExtensive C
inst✝ : FinitaryExtensive C
F : Cᵒᵖ ⥤ Type w
hF : ∀ {X : C}, ∀ R ∈ (extensiveCoverage C).covering X, IsSheafFor F R
α : Type
x✝ : Fintype α
K : Discrete α ⥤ Cᵒᵖ
Z : α → C := fun i => (K.obj { as := i }).unop
this✝ : (ofArrows Z (Cofan.mk (∐ Z) (Sigma.ι Z)).inj).hasPullbacks
this : ∀ (i : α), Mono ((Cofan.mk (∐ Z) (Sigma.ι Z)).inj i)
i : K ≅ Discrete.functor fun i => { unop := Z i } := Discrete.natIsoFunctor
b✝ : α
⊢ (Sigma.ι Z b✝ ≫ Sigma.desc fun i => Sigma.ι Z i) = Sigma.ι Z b✝ ≫ 𝟙 (∐ Z)
state_after: no goals

tactic: rw [this]
state_before: C : Type u_1
inst✝³ : Category.{u_3, u_1} C
D : Type u_2
inst✝² : Category.{?u.9436, u_2} D
inst✝¹ : FinitaryPreExtensive C
inst✝ : FinitaryExtensive C
F : Cᵒᵖ ⥤ Type w
hF : ∀ {X : C}, ∀ R ∈ (extensiveCoverage C).covering X, IsSheafFor F R
α : Type
x✝ : Fintype α
K : Discrete α ⥤ Cᵒᵖ
Z : α → C := fun i => (K.obj { as := i }).unop
this✝¹ : (ofArrows Z (Cofan.mk (∐ Z) (Sigma.ι Z)).inj).hasPullbacks
this✝ : ∀ (i : α), Mono ((Cofan.mk (∐ Z) (Sigma.ι Z)).inj i)
i : K ≅ Discrete.functor fun i => { unop := Z i } := Discrete.natIsoFunctor
this : (Sigma.desc fun i => Sigma.ι Z i) = 𝟙 (∐ Z)
⊢ IsIso (Sigma.desc fun i => Sigma.ι Z i)
state_after: C : Type u_1
inst✝³ : Category.{u_3, u_1} C
D : Type u_2
inst✝² : Category.{?u.9436, u_2} D
inst✝¹ : FinitaryPreExtensive C
inst✝ : FinitaryExtensive C
F : Cᵒᵖ ⥤ Type w
hF : ∀ {X : C}, ∀ R ∈ (extensiveCoverage C).covering X, IsSheafFor F R
α : Type
x✝ : Fintype α
K : Discrete α ⥤ Cᵒᵖ
Z : α → C := fun i => (K.obj { as := i }).unop
this✝¹ : (ofArrows Z (Cofan.mk (∐ Z) (Sigma.ι Z)).inj).hasPullbacks
this✝ : ∀ (i : α), Mono ((Cofan.mk (∐ Z) (Sigma.ι Z)).inj i)
i : K ≅ Discrete.functor fun i => { unop := Z i } := Discrete.natIsoFunctor
this : (Sigma.desc fun i => Sigma.ι Z i) = 𝟙 (∐ Z)
⊢ IsIso (𝟙 (∐ Z))

tactic: infer_instance
state_before: C : Type u_1
inst✝³ : Category.{u_3, u_1} C
D : Type u_2
inst✝² : Category.{?u.9436, u_2} D
inst✝¹ : FinitaryPreExtensive C
inst✝ : FinitaryExtensive C
F : Cᵒᵖ ⥤ Type w
hF : ∀ {X : C}, ∀ R ∈ (extensiveCoverage C).covering X, IsSheafFor F R
α : Type
x✝ : Fintype α
K : Discrete α ⥤ Cᵒᵖ
Z : α → C := fun i => (K.obj { as := i }).unop
this✝¹ : (ofArrows Z (Cofan.mk (∐ Z) (Sigma.ι Z)).inj).hasPullbacks
this✝ : ∀ (i : α), Mono ((Cofan.mk (∐ Z) (Sigma.ι Z)).inj i)
i : K ≅ Discrete.functor fun i => { unop := Z i } := Discrete.natIsoFunctor
this : (Sigma.desc fun i => Sigma.ι Z i) = 𝟙 (∐ Z)
⊢ IsIso (𝟙 (∐ Z))
state_after: no goals

tactic: let _ := hF.some
state_before: case refine_2
C : Type u_1
inst✝³ : Category.{u_3, u_1} C
D : Type u_2
inst✝² : Category.{?u.9436, u_2} D
inst✝¹ : FinitaryPreExtensive C
inst✝ : FinitaryExtensive C
F : Cᵒᵖ ⥤ Type w
hF : Nonempty (PreservesFiniteProducts F)
⊢ IsSheaf (extensiveTopology C) F
state_after: case refine_2
C : Type u_1
inst✝³ : Category.{u_3, u_1} C
D : Type u_2
inst✝² : Category.{?u.9436, u_2} D
inst✝¹ : FinitaryPreExtensive C
inst✝ : FinitaryExtensive C
F : Cᵒᵖ ⥤ Type w
hF : Nonempty (PreservesFiniteProducts F)
x✝ : PreservesFiniteProducts F := hF.some
⊢ IsSheaf (extensiveTopology C) F

tactic: erw [Presieve.isSheaf_coverage]
state_before: case refine_2
C : Type u_1
inst✝³ : Category.{u_3, u_1} C
D : Type u_2
inst✝² : Category.{?u.9436, u_2} D
inst✝¹ : FinitaryPreExtensive C
inst✝ : FinitaryExtensive C
F : Cᵒᵖ ⥤ Type w
hF : Nonempty (PreservesFiniteProducts F)
x✝ : PreservesFiniteProducts F := hF.some
⊢ IsSheaf (extensiveTopology C) F
state_after: case refine_2
C : Type u_1
inst✝³ : Category.{u_3, u_1} C
D : Type u_2
inst✝² : Category.{?u.9436, u_2} D
inst✝¹ : FinitaryPreExtensive C
inst✝ : FinitaryExtensive C
F : Cᵒᵖ ⥤ Type w
hF : Nonempty (PreservesFiniteProducts F)
x✝ : PreservesFiniteProducts F := hF.some
⊢ ∀ {X : C}, ∀ R ∈ (extensiveCoverage C).covering X, IsSheafFor F R

tactic: intro X R ⟨Y, α, Z, π, hR, hi⟩
state_before: case refine_2
C : Type u_1
inst✝³ : Category.{u_3, u_1} C
D : Type u_2
inst✝² : Category.{?u.9436, u_2} D
inst✝¹ : FinitaryPreExtensive C
inst✝ : FinitaryExtensive C
F : Cᵒᵖ ⥤ Type w
hF : Nonempty (PreservesFiniteProducts F)
x✝ : PreservesFiniteProducts F := hF.some
⊢ ∀ {X : C}, ∀ R ∈ (extensiveCoverage C).covering X, IsSheafFor F R
state_after: case refine_2
C : Type u_1
inst✝³ : Category.{u_3, u_1} C
D : Type u_2
inst✝² : Category.{?u.9436, u_2} D
inst✝¹ : FinitaryPreExtensive C
inst✝ : FinitaryExtensive C
F : Cᵒᵖ ⥤ Type w
hF : Nonempty (PreservesFiniteProducts F)
x✝ : PreservesFiniteProducts F := hF.some
X : C
R : Presieve X
Y : Type
α : Finite Y
Z : Y → C
π : (a : Y) → Z a ⟶ X
hR : R = ofArrows Z π
hi : IsIso (Sigma.desc π)
⊢ IsSheafFor F R

tactic: have : IsIso (Sigma.desc (Cofan.inj (Cofan.mk X π))) := hi
state_before: case refine_2
C : Type u_1
inst✝³ : Category.{u_3, u_1} C
D : Type u_2
inst✝² : Category.{?u.9436, u_2} D
inst✝¹ : FinitaryPreExtensive C
inst✝ : FinitaryExtensive C
F : Cᵒᵖ ⥤ Type w
hF : Nonempty (PreservesFiniteProducts F)
x✝ : PreservesFiniteProducts F := hF.some
X : C
R : Presieve X
Y : Type
α : Finite Y
Z : Y → C
π : (a : Y) → Z a ⟶ X
hR : R = ofArrows Z π
hi : IsIso (Sigma.desc π)
⊢ IsSheafFor F R
state_after: case refine_2
C : Type u_1
inst✝³ : Category.{u_3, u_1} C
D : Type u_2
inst✝² : Category.{?u.9436, u_2} D
inst✝¹ : FinitaryPreExtensive C
inst✝ : FinitaryExtensive C
F : Cᵒᵖ ⥤ Type w
hF : Nonempty (PreservesFiniteProducts F)
x✝ : PreservesFiniteProducts F := hF.some
X : C
R : Presieve X
Y : Type
α : Finite Y
Z : Y → C
π : (a : Y) → Z a ⟶ X
hR : R = ofArrows Z π
hi : IsIso (Sigma.desc π)
this : IsIso (Sigma.desc (Cofan.mk X π).inj)
⊢ IsSheafFor F R

tactic: have : R.Extensive := ⟨Y, α, Z, π, hR, ⟨Cofan.isColimitOfIsIsoSigmaDesc (Cofan.mk X π)⟩⟩
state_before: case refine_2
C : Type u_1
inst✝³ : Category.{u_3, u_1} C
D : Type u_2
inst✝² : Category.{?u.9436, u_2} D
inst✝¹ : FinitaryPreExtensive C
inst✝ : FinitaryExtensive C
F : Cᵒᵖ ⥤ Type w
hF : Nonempty (PreservesFiniteProducts F)
x✝ : PreservesFiniteProducts F := hF.some
X : C
R : Presieve X
Y : Type
α : Finite Y
Z : Y → C
π : (a : Y) → Z a ⟶ X
hR : R = ofArrows Z π
hi : IsIso (Sigma.desc π)
this : IsIso (Sigma.desc (Cofan.mk X π).inj)
⊢ IsSheafFor F R
state_after: case refine_2
C : Type u_1
inst✝³ : Category.{u_3, u_1} C
D : Type u_2
inst✝² : Category.{?u.9436, u_2} D
inst✝¹ : FinitaryPreExtensive C
inst✝ : FinitaryExtensive C
F : Cᵒᵖ ⥤ Type w
hF : Nonempty (PreservesFiniteProducts F)
x✝ : PreservesFiniteProducts F := hF.some
X : C
R : Presieve X
Y : Type
α : Finite Y
Z : Y → C
π : (a : Y) → Z a ⟶ X
hR : R = ofArrows Z π
hi : IsIso (Sigma.desc π)
this✝ : IsIso (Sigma.desc (Cofan.mk X π).inj)
this : R.Extensive
⊢ IsSheafFor F R

tactic: exact isSheafFor_extensive_of_preservesFiniteProducts R F
state_before: case refine_2
C : Type u_1
inst✝³ : Category.{u_3, u_1} C
D : Type u_2
inst✝² : Category.{?u.9436, u_2} D
inst✝¹ : FinitaryPreExtensive C
inst✝ : FinitaryExtensive C
F : Cᵒᵖ ⥤ Type w
hF : Nonempty (PreservesFiniteProducts F)
x✝ : PreservesFiniteProducts F := hF.some
X : C
R : Presieve X
Y : Type
α : Finite Y
Z : Y → C
π : (a : Y) → Z a ⟶ X
hR : R = ofArrows Z π
hi : IsIso (Sigma.desc π)
this✝ : IsIso (Sigma.desc (Cofan.mk X π).inj)
this : R.Extensive
⊢ IsSheafFor F R
state_after: no goals