Theorem: TopCat.Opens.coverDense_iff_isBasis
File: Mathlib/Topology/Sheaves/SheafCondition/Sites.lean

tactic: rw [Opens.isBasis_iff_nbhd]
state_before: X : TopCat
ι : Type u_1
inst✝ : Category.{u_2, u_1} ι
B : ι ⥤ Opens ↑X
⊢ B.IsCoverDense (Opens.grothendieckTopology ↑X) ↔ Opens.IsBasis (Set.range B.obj)
state_after: X : TopCat
ι : Type u_1
inst✝ : Category.{u_2, u_1} ι
B : ι ⥤ Opens ↑X
⊢ B.IsCoverDense (Opens.grothendieckTopology ↑X) ↔
    ∀ {U : Opens ↑X} {x : ↑X}, x ∈ U → ∃ U' ∈ Set.range B.obj, x ∈ U' ∧ U' ≤ U

tactic: constructor
state_before: X : TopCat
ι : Type u_1
inst✝ : Category.{u_2, u_1} ι
B : ι ⥤ Opens ↑X
⊢ B.IsCoverDense (Opens.grothendieckTopology ↑X) ↔
    ∀ {U : Opens ↑X} {x : ↑X}, x ∈ U → ∃ U' ∈ Set.range B.obj, x ∈ U' ∧ U' ≤ U
state_after: case mp
X : TopCat
ι : Type u_1
inst✝ : Category.{u_2, u_1} ι
B : ι ⥤ Opens ↑X
⊢ B.IsCoverDense (Opens.grothendieckTopology ↑X) →
    ∀ {U : Opens ↑X} {x : ↑X}, x ∈ U → ∃ U' ∈ Set.range B.obj, x ∈ U' ∧ U' ≤ U

case mpr
X : TopCat
ι : Type u_1
inst✝ : Category.{u_2, u_1} ι
B : ι ⥤ Opens ↑X
⊢ (∀ {U : Opens ↑X} {x : ↑X}, x ∈ U → ∃ U' ∈ Set.range B.obj, x ∈ U' ∧ U' ≤ U) →
    B.IsCoverDense (Opens.grothendieckTopology ↑X)

tactic: intro hb
state_before: case mpr
X : TopCat
ι : Type u_1
inst✝ : Category.{u_2, u_1} ι
B : ι ⥤ Opens ↑X
⊢ (∀ {U : Opens ↑X} {x : ↑X}, x ∈ U → ∃ U' ∈ Set.range B.obj, x ∈ U' ∧ U' ≤ U) →
    B.IsCoverDense (Opens.grothendieckTopology ↑X)
state_after: case mpr
X : TopCat
ι : Type u_1
inst✝ : Category.{u_2, u_1} ι
B : ι ⥤ Opens ↑X
hb : ∀ {U : Opens ↑X} {x : ↑X}, x ∈ U → ∃ U' ∈ Set.range B.obj, x ∈ U' ∧ U' ≤ U
⊢ B.IsCoverDense (Opens.grothendieckTopology ↑X)

tactic: constructor
state_before: case mpr
X : TopCat
ι : Type u_1
inst✝ : Category.{u_2, u_1} ι
B : ι ⥤ Opens ↑X
hb : ∀ {U : Opens ↑X} {x : ↑X}, x ∈ U → ∃ U' ∈ Set.range B.obj, x ∈ U' ∧ U' ≤ U
⊢ B.IsCoverDense (Opens.grothendieckTopology ↑X)
state_after: case mpr.is_cover
X : TopCat
ι : Type u_1
inst✝ : Category.{u_2, u_1} ι
B : ι ⥤ Opens ↑X
hb : ∀ {U : Opens ↑X} {x : ↑X}, x ∈ U → ∃ U' ∈ Set.range B.obj, x ∈ U' ∧ U' ≤ U
⊢ ∀ (U : Opens ↑X), Sieve.coverByImage B U ∈ (Opens.grothendieckTopology ↑X).sieves U

tactic: intro U x hx
state_before: case mpr.is_cover
X : TopCat
ι : Type u_1
inst✝ : Category.{u_2, u_1} ι
B : ι ⥤ Opens ↑X
hb : ∀ {U : Opens ↑X} {x : ↑X}, x ∈ U → ∃ U' ∈ Set.range B.obj, x ∈ U' ∧ U' ≤ U
⊢ ∀ (U : Opens ↑X), Sieve.coverByImage B U ∈ (Opens.grothendieckTopology ↑X).sieves U
state_after: case mpr.is_cover
X : TopCat
ι : Type u_1
inst✝ : Category.{u_2, u_1} ι
B : ι ⥤ Opens ↑X
hb : ∀ {U : Opens ↑X} {x : ↑X}, x ∈ U → ∃ U' ∈ Set.range B.obj, x ∈ U' ∧ U' ≤ U
U : Opens ↑X
x : ↑X
hx : x ∈ U
⊢ ∃ U_1 f, (Sieve.coverByImage B U).arrows f ∧ x ∈ U_1

tactic: rcases hb hx with ⟨_, ⟨i, rfl⟩, hx, hi⟩
state_before: case mpr.is_cover
X : TopCat
ι : Type u_1
inst✝ : Category.{u_2, u_1} ι
B : ι ⥤ Opens ↑X
hb : ∀ {U : Opens ↑X} {x : ↑X}, x ∈ U → ∃ U' ∈ Set.range B.obj, x ∈ U' ∧ U' ≤ U
U : Opens ↑X
x : ↑X
hx : x ∈ U
⊢ ∃ U_1 f, (Sieve.coverByImage B U).arrows f ∧ x ∈ U_1
state_after: case mpr.is_cover.intro.intro.intro.intro
X : TopCat
ι : Type u_1
inst✝ : Category.{u_2, u_1} ι
B : ι ⥤ Opens ↑X
hb : ∀ {U : Opens ↑X} {x : ↑X}, x ∈ U → ∃ U' ∈ Set.range B.obj, x ∈ U' ∧ U' ≤ U
U : Opens ↑X
x : ↑X
hx✝ : x ∈ U
i : ι
hx : x ∈ B.obj i
hi : B.obj i ≤ U
⊢ ∃ U_1 f, (Sieve.coverByImage B U).arrows f ∧ x ∈ U_1

tactic: exact ⟨B.obj i, ⟨⟨hi⟩⟩, ⟨⟨i, 𝟙 _, ⟨⟨hi⟩⟩, rfl⟩⟩, hx⟩
state_before: case mpr.is_cover.intro.intro.intro.intro
X : TopCat
ι : Type u_1
inst✝ : Category.{u_2, u_1} ι
B : ι ⥤ Opens ↑X
hb : ∀ {U : Opens ↑X} {x : ↑X}, x ∈ U → ∃ U' ∈ Set.range B.obj, x ∈ U' ∧ U' ≤ U
U : Opens ↑X
x : ↑X
hx✝ : x ∈ U
i : ι
hx : x ∈ B.obj i
hi : B.obj i ≤ U
⊢ ∃ U_1 f, (Sieve.coverByImage B U).arrows f ∧ x ∈ U_1
state_after: no goals

tactic: intro hd U x hx
state_before: case mp
X : TopCat
ι : Type u_1
inst✝ : Category.{u_2, u_1} ι
B : ι ⥤ Opens ↑X
⊢ B.IsCoverDense (Opens.grothendieckTopology ↑X) →
    ∀ {U : Opens ↑X} {x : ↑X}, x ∈ U → ∃ U' ∈ Set.range B.obj, x ∈ U' ∧ U' ≤ U
state_after: case mp
X : TopCat
ι : Type u_1
inst✝ : Category.{u_2, u_1} ι
B : ι ⥤ Opens ↑X
hd : B.IsCoverDense (Opens.grothendieckTopology ↑X)
U : Opens ↑X
x : ↑X
hx : x ∈ U
⊢ ∃ U' ∈ Set.range B.obj, x ∈ U' ∧ U' ≤ U

tactic: rcases hd.1 U x hx with ⟨V, f, ⟨i, f₁, f₂, _⟩, hV⟩
state_before: case mp
X : TopCat
ι : Type u_1
inst✝ : Category.{u_2, u_1} ι
B : ι ⥤ Opens ↑X
hd : B.IsCoverDense (Opens.grothendieckTopology ↑X)
U : Opens ↑X
x : ↑X
hx : x ∈ U
⊢ ∃ U' ∈ Set.range B.obj, x ∈ U' ∧ U' ≤ U
state_after: case mp.intro.intro.intro.intro.mk
X : TopCat
ι : Type u_1
inst✝ : Category.{u_2, u_1} ι
B : ι ⥤ Opens ↑X
hd : B.IsCoverDense (Opens.grothendieckTopology ↑X)
U : Opens ↑X
x : ↑X
hx : x ∈ U
V : Opens ↑X
f : V ⟶ U
hV : x ∈ V
i : ι
f₁ : V ⟶ B.obj i
f₂ : B.obj i ⟶ U
fac✝ : f₁ ≫ f₂ = f
⊢ ∃ U' ∈ Set.range B.obj, x ∈ U' ∧ U' ≤ U

tactic: exact ⟨B.obj i, ⟨i, rfl⟩, f₁.le hV, f₂.le⟩
state_before: case mp.intro.intro.intro.intro.mk
X : TopCat
ι : Type u_1
inst✝ : Category.{u_2, u_1} ι
B : ι ⥤ Opens ↑X
hd : B.IsCoverDense (Opens.grothendieckTopology ↑X)
U : Opens ↑X
x : ↑X
hx : x ∈ U
V : Opens ↑X
f : V ⟶ U
hV : x ∈ V
i : ι
f₁ : V ⟶ B.obj i
f₂ : B.obj i ⟶ U
fac✝ : f₁ ≫ f₂ = f
⊢ ∃ U' ∈ Set.range B.obj, x ∈ U' ∧ U' ≤ U
state_after: no goals