Theorem: TopCat.Presheaf.isSheaf_iff_isSheafOpensLeCover
File: Mathlib/Topology/Sheaves/SheafCondition/OpensLeCover.lean

tactic: refine' (Presheaf.isSheaf_iff_isLimit _ _).trans _
state_before: C : Type u
inst✝ : Category C
X : TopCat
F : Presheaf C X
ι : Type w
U : ι → Opens ↑X
Y : Opens ↑X
hY : Y = iSup U
⊢ IsSheaf F ↔ IsSheafOpensLeCover F

tactic: constructor
state_before: C : Type u
inst✝ : Category C
X : TopCat
F : Presheaf C X
ι : Type w
U : ι → Opens ↑X
Y : Opens ↑X
hY : Y = iSup U
⊢ (∀ ⦃X_1 : Opens ↑X⦄ (S : Sieve X_1),
      S ∈ GrothendieckTopology.sieves (Opens.grothendieckTopology ↑X) X_1 →
        Nonempty (IsLimit (F.mapCone (Cocone.op (Presieve.cocone S.arrows))))) ↔
    IsSheafOpensLeCover F

tactic: intro h ι U
state_before: case mp
C : Type u
inst✝ : Category C
X : TopCat
F : Presheaf C X
ι : Type w
U : ι → Opens ↑X
Y : Opens ↑X
hY : Y = iSup U
⊢ (∀ ⦃X_1 : Opens ↑X⦄ (S : Sieve X_1),
      S ∈ GrothendieckTopology.sieves (Opens.grothendieckTopology ↑X) X_1 →
        Nonempty (IsLimit (F.mapCone (Cocone.op (Presieve.cocone S.arrows))))) →
    IsSheafOpensLeCover F

tactic: rw [(isLimitOpensLeEquivGenerate₁ F U rfl).nonempty_congr]
state_before: case mp
C : Type u
inst✝ : Category C
X : TopCat
F : Presheaf C X
ι✝ : Type w
U✝ : ι✝ → Opens ↑X
Y : Opens ↑X
hY : Y = iSup U✝
h :
  ∀ ⦃X_1 : Opens ↑X⦄ (S : Sieve X_1),
    S ∈ GrothendieckTopology.sieves (Opens.grothendieckTopology ↑X) X_1 →
      Nonempty (IsLimit (F.mapCone (Cocone.op (Presieve.cocone S.arrows))))
ι : Type w
U : ι → Opens ↑X
⊢ Nonempty (IsLimit (F.mapCone (Cocone.op (opensLeCoverCocone U))))

tactic: apply h
state_before: case mp
C : Type u
inst✝ : Category C
X : TopCat
F : Presheaf C X
ι✝ : Type w
U✝ : ι✝ → Opens ↑X
Y : Opens ↑X
hY : Y = iSup U✝
h :
  ∀ ⦃X_1 : Opens ↑X⦄ (S : Sieve X_1),
    S ∈ GrothendieckTopology.sieves (Opens.grothendieckTopology ↑X) X_1 →
      Nonempty (IsLimit (F.mapCone (Cocone.op (Presieve.cocone S.arrows))))
ι : Type w
U : ι → Opens ↑X
⊢ Nonempty
    (IsLimit (F.mapCone (Cocone.op (Presieve.cocone (Sieve.generate (presieveOfCoveringAux U (iSup U))).arrows))))

tactic: apply presieveOfCovering.mem_grothendieckTopology
state_before: case mp.a
C : Type u
inst✝ : Category C
X : TopCat
F : Presheaf C X
ι✝ : Type w
U✝ : ι✝ → Opens ↑X
Y : Opens ↑X
hY : Y = iSup U✝
h :
  ∀ ⦃X_1 : Opens ↑X⦄ (S : Sieve X_1),
    S ∈ GrothendieckTopology.sieves (Opens.grothendieckTopology ↑X) X_1 →
      Nonempty (IsLimit (F.mapCone (Cocone.op (Presieve.cocone S.arrows))))
ι : Type w
U : ι → Opens ↑X
⊢ Sieve.generate (presieveOfCoveringAux U (iSup U)) ∈
    GrothendieckTopology.sieves (Opens.grothendieckTopology ↑X) (iSup U)

tactic: intro h Y S
state_before: case mpr
C : Type u
inst✝ : Category C
X : TopCat
F : Presheaf C X
ι : Type w
U : ι → Opens ↑X
Y : Opens ↑X
hY : Y = iSup U
⊢ IsSheafOpensLeCover F →
    ∀ ⦃X_1 : Opens ↑X⦄ (S : Sieve X_1),
      S ∈ GrothendieckTopology.sieves (Opens.grothendieckTopology ↑X) X_1 →
        Nonempty (IsLimit (F.mapCone (Cocone.op (Presieve.cocone S.arrows))))

tactic: rw [← Sieve.generate_sieve S]
state_before: case mpr
C : Type u
inst✝ : Category C
X : TopCat
F : Presheaf C X
ι : Type w
U : ι → Opens ↑X
Y✝ : Opens ↑X
hY : Y✝ = iSup U
h : IsSheafOpensLeCover F
Y : Opens ↑X
S : Sieve Y
⊢ S ∈ GrothendieckTopology.sieves (Opens.grothendieckTopology ↑X) Y →
    Nonempty (IsLimit (F.mapCone (Cocone.op (Presieve.cocone S.arrows))))

tactic: intro hS
state_before: case mpr
C : Type u
inst✝ : Category C
X : TopCat
F : Presheaf C X
ι : Type w
U : ι → Opens ↑X
Y✝ : Opens ↑X
hY : Y✝ = iSup U
h : IsSheafOpensLeCover F
Y : Opens ↑X
S : Sieve Y
⊢ Sieve.generate S.arrows ∈ GrothendieckTopology.sieves (Opens.grothendieckTopology ↑X) Y →
    Nonempty (IsLimit (F.mapCone (Cocone.op (Presieve.cocone (Sieve.generate S.arrows).arrows))))

tactic: rw [← (isLimitOpensLeEquivGenerate₂ F S.1 hS).nonempty_congr]
state_before: case mpr
C : Type u
inst✝ : Category C
X : TopCat
F : Presheaf C X
ι : Type w
U : ι → Opens ↑X
Y✝ : Opens ↑X
hY : Y✝ = iSup U
h : IsSheafOpensLeCover F
Y : Opens ↑X
S : Sieve Y
hS : Sieve.generate S.arrows ∈ GrothendieckTopology.sieves (Opens.grothendieckTopology ↑X) Y
⊢ Nonempty (IsLimit (F.mapCone (Cocone.op (Presieve.cocone (Sieve.generate S.arrows).arrows))))

tactic: apply h
state_before: case mpr
C : Type u
inst✝ : Category C
X : TopCat
F : Presheaf C X
ι : Type w
U : ι → Opens ↑X
Y✝ : Opens ↑X
hY : Y✝ = iSup U
h : IsSheafOpensLeCover F
Y : Opens ↑X
S : Sieve Y
hS : Sieve.generate S.arrows ∈ GrothendieckTopology.sieves (Opens.grothendieckTopology ↑X) Y
⊢ Nonempty (IsLimit (F.mapCone (Cocone.op (opensLeCoverCocone (coveringOfPresieve Y S.arrows)))))