Theorem: TopCat.Presheaf.coveringOfPresieve.iSup_eq_of_mem_grothendieck
File: Mathlib/Topology/Sheaves/SheafCondition/Sites.lean

tactic: apply le_antisymm
state_before: X : TopCat
U : Opens ↑X
R : Presieve U
hR : Sieve.generate R ∈ (Opens.grothendieckTopology ↑X).sieves U
⊢ iSup (coveringOfPresieve U R) = U
state_after: case a
X : TopCat
U : Opens ↑X
R : Presieve U
hR : Sieve.generate R ∈ (Opens.grothendieckTopology ↑X).sieves U
⊢ iSup (coveringOfPresieve U R) ≤ U

case a
X : TopCat
U : Opens ↑X
R : Presieve U
hR : Sieve.generate R ∈ (Opens.grothendieckTopology ↑X).sieves U
⊢ U ≤ iSup (coveringOfPresieve U R)

tactic: intro x hxU
state_before: case a
X : TopCat
U : Opens ↑X
R : Presieve U
hR : Sieve.generate R ∈ (Opens.grothendieckTopology ↑X).sieves U
⊢ U ≤ iSup (coveringOfPresieve U R)
state_after: case a
X : TopCat
U : Opens ↑X
R : Presieve U
hR : Sieve.generate R ∈ (Opens.grothendieckTopology ↑X).sieves U
x : ↑X
hxU : x ∈ ↑U
⊢ x ∈ ↑(iSup (coveringOfPresieve U R))

tactic: rw [Opens.coe_iSup, Set.mem_iUnion]
state_before: case a
X : TopCat
U : Opens ↑X
R : Presieve U
hR : Sieve.generate R ∈ (Opens.grothendieckTopology ↑X).sieves U
x : ↑X
hxU : x ∈ ↑U
⊢ x ∈ ↑(iSup (coveringOfPresieve U R))
state_after: case a
X : TopCat
U : Opens ↑X
R : Presieve U
hR : Sieve.generate R ∈ (Opens.grothendieckTopology ↑X).sieves U
x : ↑X
hxU : x ∈ ↑U
⊢ ∃ i, x ∈ ↑(coveringOfPresieve U R i)

tactic: obtain ⟨V, iVU, ⟨W, iVW, iWU, hiWU, -⟩, hxV⟩ := hR x hxU
state_before: case a
X : TopCat
U : Opens ↑X
R : Presieve U
hR : Sieve.generate R ∈ (Opens.grothendieckTopology ↑X).sieves U
x : ↑X
hxU : x ∈ ↑U
⊢ ∃ i, x ∈ ↑(coveringOfPresieve U R i)
state_after: case a.intro.intro.intro.intro.intro.intro.intro
X : TopCat
U : Opens ↑X
R : Presieve U
hR : Sieve.generate R ∈ (Opens.grothendieckTopology ↑X).sieves U
x : ↑X
hxU : x ∈ ↑U
V : Opens ↑X
iVU : V ⟶ U
hxV : x ∈ V
W : Opens ↑X
iVW : V ⟶ W
iWU : W ⟶ U
hiWU : R iWU
⊢ ∃ i, x ∈ ↑(coveringOfPresieve U R i)

tactic: exact ⟨⟨W, ⟨iWU, hiWU⟩⟩, iVW.le hxV⟩
state_before: case a.intro.intro.intro.intro.intro.intro.intro
X : TopCat
U : Opens ↑X
R : Presieve U
hR : Sieve.generate R ∈ (Opens.grothendieckTopology ↑X).sieves U
x : ↑X
hxU : x ∈ ↑U
V : Opens ↑X
iVU : V ⟶ U
hxV : x ∈ V
W : Opens ↑X
iVW : V ⟶ W
iWU : W ⟶ U
hiWU : R iWU
⊢ ∃ i, x ∈ ↑(coveringOfPresieve U R i)
state_after: no goals

tactic: refine iSup_le ?_
state_before: case a
X : TopCat
U : Opens ↑X
R : Presieve U
hR : Sieve.generate R ∈ (Opens.grothendieckTopology ↑X).sieves U
⊢ iSup (coveringOfPresieve U R) ≤ U
state_after: case a
X : TopCat
U : Opens ↑X
R : Presieve U
hR : Sieve.generate R ∈ (Opens.grothendieckTopology ↑X).sieves U
⊢ ∀ (i : (V : Opens ↑X) × { f // R f }), coveringOfPresieve U R i ≤ U

tactic: intro f
state_before: case a
X : TopCat
U : Opens ↑X
R : Presieve U
hR : Sieve.generate R ∈ (Opens.grothendieckTopology ↑X).sieves U
⊢ ∀ (i : (V : Opens ↑X) × { f // R f }), coveringOfPresieve U R i ≤ U
state_after: case a
X : TopCat
U : Opens ↑X
R : Presieve U
hR : Sieve.generate R ∈ (Opens.grothendieckTopology ↑X).sieves U
f : (V : Opens ↑X) × { f // R f }
⊢ coveringOfPresieve U R f ≤ U

tactic: exact f.2.1.le
state_before: case a
X : TopCat
U : Opens ↑X
R : Presieve U
hR : Sieve.generate R ∈ (Opens.grothendieckTopology ↑X).sieves U
f : (V : Opens ↑X) × { f // R f }
⊢ coveringOfPresieve U R f ≤ U
state_after: no goals