Theorem: exists_subset_nhds_of_isCompact'
File: Mathlib/Topology/Compactness/Compact.lean

tactic: obtain ⟨W, hsubW, W_op, hWU⟩ := exists_open_set_nhds hU
state_before: X : Type u
Y : Type v
ι : Type u_1
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
s t : Set X
inst✝ : Nonempty ι
V : ι → Set X
hV : Directed (fun x x_1 => x ⊇ x_1) V
hV_cpct : ∀ (i : ι), IsCompact (V i)
hV_closed : ∀ (i : ι), IsClosed (V i)
U : Set X
hU : ∀ x ∈ ⋂ i, V i, U ∈ 𝓝 x
⊢ ∃ i, V i ⊆ U
state_after: case intro.intro.intro
X : Type u
Y : Type v
ι : Type u_1
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
s t : Set X
inst✝ : Nonempty ι
V : ι → Set X
hV : Directed (fun x x_1 => x ⊇ x_1) V
hV_cpct : ∀ (i : ι), IsCompact (V i)
hV_closed : ∀ (i : ι), IsClosed (V i)
U : Set X
hU : ∀ x ∈ ⋂ i, V i, U ∈ 𝓝 x
W : Set X
hsubW : ⋂ i, V i ⊆ W
W_op : IsOpen W
hWU : W ⊆ U
⊢ ∃ i, V i ⊆ U

tactic: suffices ∃ i, V i ⊆ W from this.imp fun i hi => hi.trans hWU
state_before: case intro.intro.intro
X : Type u
Y : Type v
ι : Type u_1
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
s t : Set X
inst✝ : Nonempty ι
V : ι → Set X
hV : Directed (fun x x_1 => x ⊇ x_1) V
hV_cpct : ∀ (i : ι), IsCompact (V i)
hV_closed : ∀ (i : ι), IsClosed (V i)
U : Set X
hU : ∀ x ∈ ⋂ i, V i, U ∈ 𝓝 x
W : Set X
hsubW : ⋂ i, V i ⊆ W
W_op : IsOpen W
hWU : W ⊆ U
⊢ ∃ i, V i ⊆ U
state_after: case intro.intro.intro
X : Type u
Y : Type v
ι : Type u_1
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
s t : Set X
inst✝ : Nonempty ι
V : ι → Set X
hV : Directed (fun x x_1 => x ⊇ x_1) V
hV_cpct : ∀ (i : ι), IsCompact (V i)
hV_closed : ∀ (i : ι), IsClosed (V i)
U : Set X
hU : ∀ x ∈ ⋂ i, V i, U ∈ 𝓝 x
W : Set X
hsubW : ⋂ i, V i ⊆ W
W_op : IsOpen W
hWU : W ⊆ U
⊢ ∃ i, V i ⊆ W

tactic: by_contra! H
state_before: case intro.intro.intro
X : Type u
Y : Type v
ι : Type u_1
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
s t : Set X
inst✝ : Nonempty ι
V : ι → Set X
hV : Directed (fun x x_1 => x ⊇ x_1) V
hV_cpct : ∀ (i : ι), IsCompact (V i)
hV_closed : ∀ (i : ι), IsClosed (V i)
U : Set X
hU : ∀ x ∈ ⋂ i, V i, U ∈ 𝓝 x
W : Set X
hsubW : ⋂ i, V i ⊆ W
W_op : IsOpen W
hWU : W ⊆ U
⊢ ∃ i, V i ⊆ W
state_after: case intro.intro.intro
X : Type u
Y : Type v
ι : Type u_1
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
s t : Set X
inst✝ : Nonempty ι
V : ι → Set X
hV : Directed (fun x x_1 => x ⊇ x_1) V
hV_cpct : ∀ (i : ι), IsCompact (V i)
hV_closed : ∀ (i : ι), IsClosed (V i)
U : Set X
hU : ∀ x ∈ ⋂ i, V i, U ∈ 𝓝 x
W : Set X
hsubW : ⋂ i, V i ⊆ W
W_op : IsOpen W
hWU : W ⊆ U
H : ∀ (i : ι), ¬V i ⊆ W
⊢ False

tactic: replace H : ∀ i, (V i ∩ Wᶜ).Nonempty := fun i => Set.inter_compl_nonempty_iff.mpr (H i)
state_before: case intro.intro.intro
X : Type u
Y : Type v
ι : Type u_1
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
s t : Set X
inst✝ : Nonempty ι
V : ι → Set X
hV : Directed (fun x x_1 => x ⊇ x_1) V
hV_cpct : ∀ (i : ι), IsCompact (V i)
hV_closed : ∀ (i : ι), IsClosed (V i)
U : Set X
hU : ∀ x ∈ ⋂ i, V i, U ∈ 𝓝 x
W : Set X
hsubW : ⋂ i, V i ⊆ W
W_op : IsOpen W
hWU : W ⊆ U
H : ∀ (i : ι), ¬V i ⊆ W
⊢ False
state_after: case intro.intro.intro
X : Type u
Y : Type v
ι : Type u_1
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
s t : Set X
inst✝ : Nonempty ι
V : ι → Set X
hV : Directed (fun x x_1 => x ⊇ x_1) V
hV_cpct : ∀ (i : ι), IsCompact (V i)
hV_closed : ∀ (i : ι), IsClosed (V i)
U : Set X
hU : ∀ x ∈ ⋂ i, V i, U ∈ 𝓝 x
W : Set X
hsubW : ⋂ i, V i ⊆ W
W_op : IsOpen W
hWU : W ⊆ U
H : ∀ (i : ι), (V i ∩ Wᶜ).Nonempty
⊢ False

tactic: have : (⋂ i, V i ∩ Wᶜ).Nonempty := by
  refine
    IsCompact.nonempty_iInter_of_directed_nonempty_isCompact_isClosed _ (fun i j => ?_) H
      (fun i => (hV_cpct i).inter_right W_op.isClosed_compl) fun i =>
      (hV_closed i).inter W_op.isClosed_compl
  rcases hV i j with ⟨k, hki, hkj⟩
  refine ⟨k, ⟨fun x => ?_, fun x => ?_⟩⟩ <;> simp only [and_imp, mem_inter_iff, mem_compl_iff] <;>
    tauto
state_before: case intro.intro.intro
X : Type u
Y : Type v
ι : Type u_1
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
s t : Set X
inst✝ : Nonempty ι
V : ι → Set X
hV : Directed (fun x x_1 => x ⊇ x_1) V
hV_cpct : ∀ (i : ι), IsCompact (V i)
hV_closed : ∀ (i : ι), IsClosed (V i)
U : Set X
hU : ∀ x ∈ ⋂ i, V i, U ∈ 𝓝 x
W : Set X
hsubW : ⋂ i, V i ⊆ W
W_op : IsOpen W
hWU : W ⊆ U
H : ∀ (i : ι), (V i ∩ Wᶜ).Nonempty
⊢ False
state_after: case intro.intro.intro
X : Type u
Y : Type v
ι : Type u_1
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
s t : Set X
inst✝ : Nonempty ι
V : ι → Set X
hV : Directed (fun x x_1 => x ⊇ x_1) V
hV_cpct : ∀ (i : ι), IsCompact (V i)
hV_closed : ∀ (i : ι), IsClosed (V i)
U : Set X
hU : ∀ x ∈ ⋂ i, V i, U ∈ 𝓝 x
W : Set X
hsubW : ⋂ i, V i ⊆ W
W_op : IsOpen W
hWU : W ⊆ U
H : ∀ (i : ι), (V i ∩ Wᶜ).Nonempty
this : (⋂ i, V i ∩ Wᶜ).Nonempty
⊢ False

tactic: have : ¬⋂ i : ι, V i ⊆ W := by simpa [← iInter_inter, inter_compl_nonempty_iff]
state_before: case intro.intro.intro
X : Type u
Y : Type v
ι : Type u_1
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
s t : Set X
inst✝ : Nonempty ι
V : ι → Set X
hV : Directed (fun x x_1 => x ⊇ x_1) V
hV_cpct : ∀ (i : ι), IsCompact (V i)
hV_closed : ∀ (i : ι), IsClosed (V i)
U : Set X
hU : ∀ x ∈ ⋂ i, V i, U ∈ 𝓝 x
W : Set X
hsubW : ⋂ i, V i ⊆ W
W_op : IsOpen W
hWU : W ⊆ U
H : ∀ (i : ι), (V i ∩ Wᶜ).Nonempty
this : (⋂ i, V i ∩ Wᶜ).Nonempty
⊢ False
state_after: case intro.intro.intro
X : Type u
Y : Type v
ι : Type u_1
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
s t : Set X
inst✝ : Nonempty ι
V : ι → Set X
hV : Directed (fun x x_1 => x ⊇ x_1) V
hV_cpct : ∀ (i : ι), IsCompact (V i)
hV_closed : ∀ (i : ι), IsClosed (V i)
U : Set X
hU : ∀ x ∈ ⋂ i, V i, U ∈ 𝓝 x
W : Set X
hsubW : ⋂ i, V i ⊆ W
W_op : IsOpen W
hWU : W ⊆ U
H : ∀ (i : ι), (V i ∩ Wᶜ).Nonempty
this✝ : (⋂ i, V i ∩ Wᶜ).Nonempty
this : ¬⋂ i, V i ⊆ W
⊢ False

tactic: contradiction
state_before: case intro.intro.intro
X : Type u
Y : Type v
ι : Type u_1
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
s t : Set X
inst✝ : Nonempty ι
V : ι → Set X
hV : Directed (fun x x_1 => x ⊇ x_1) V
hV_cpct : ∀ (i : ι), IsCompact (V i)
hV_closed : ∀ (i : ι), IsClosed (V i)
U : Set X
hU : ∀ x ∈ ⋂ i, V i, U ∈ 𝓝 x
W : Set X
hsubW : ⋂ i, V i ⊆ W
W_op : IsOpen W
hWU : W ⊆ U
H : ∀ (i : ι), (V i ∩ Wᶜ).Nonempty
this✝ : (⋂ i, V i ∩ Wᶜ).Nonempty
this : ¬⋂ i, V i ⊆ W
⊢ False
state_after: no goals

tactic: refine
  IsCompact.nonempty_iInter_of_directed_nonempty_isCompact_isClosed _ (fun i j => ?_) H
    (fun i => (hV_cpct i).inter_right W_op.isClosed_compl) fun i =>
    (hV_closed i).inter W_op.isClosed_compl
state_before: X : Type u
Y : Type v
ι : Type u_1
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
s t : Set X
inst✝ : Nonempty ι
V : ι → Set X
hV : Directed (fun x x_1 => x ⊇ x_1) V
hV_cpct : ∀ (i : ι), IsCompact (V i)
hV_closed : ∀ (i : ι), IsClosed (V i)
U : Set X
hU : ∀ x ∈ ⋂ i, V i, U ∈ 𝓝 x
W : Set X
hsubW : ⋂ i, V i ⊆ W
W_op : IsOpen W
hWU : W ⊆ U
H : ∀ (i : ι), (V i ∩ Wᶜ).Nonempty
⊢ (⋂ i, V i ∩ Wᶜ).Nonempty
state_after: X : Type u
Y : Type v
ι : Type u_1
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
s t : Set X
inst✝ : Nonempty ι
V : ι → Set X
hV : Directed (fun x x_1 => x ⊇ x_1) V
hV_cpct : ∀ (i : ι), IsCompact (V i)
hV_closed : ∀ (i : ι), IsClosed (V i)
U : Set X
hU : ∀ x ∈ ⋂ i, V i, U ∈ 𝓝 x
W : Set X
hsubW : ⋂ i, V i ⊆ W
W_op : IsOpen W
hWU : W ⊆ U
H : ∀ (i : ι), (V i ∩ Wᶜ).Nonempty
i j : ι
⊢ ∃ z, (fun x x_1 => x ⊇ x_1) (V i ∩ Wᶜ) (V z ∩ Wᶜ) ∧ (fun x x_1 => x ⊇ x_1) (V j ∩ Wᶜ) (V z ∩ Wᶜ)

tactic: rcases hV i j with ⟨k, hki, hkj⟩
state_before: X : Type u
Y : Type v
ι : Type u_1
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
s t : Set X
inst✝ : Nonempty ι
V : ι → Set X
hV : Directed (fun x x_1 => x ⊇ x_1) V
hV_cpct : ∀ (i : ι), IsCompact (V i)
hV_closed : ∀ (i : ι), IsClosed (V i)
U : Set X
hU : ∀ x ∈ ⋂ i, V i, U ∈ 𝓝 x
W : Set X
hsubW : ⋂ i, V i ⊆ W
W_op : IsOpen W
hWU : W ⊆ U
H : ∀ (i : ι), (V i ∩ Wᶜ).Nonempty
i j : ι
⊢ ∃ z, (fun x x_1 => x ⊇ x_1) (V i ∩ Wᶜ) (V z ∩ Wᶜ) ∧ (fun x x_1 => x ⊇ x_1) (V j ∩ Wᶜ) (V z ∩ Wᶜ)
state_after: case intro.intro
X : Type u
Y : Type v
ι : Type u_1
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
s t : Set X
inst✝ : Nonempty ι
V : ι → Set X
hV : Directed (fun x x_1 => x ⊇ x_1) V
hV_cpct : ∀ (i : ι), IsCompact (V i)
hV_closed : ∀ (i : ι), IsClosed (V i)
U : Set X
hU : ∀ x ∈ ⋂ i, V i, U ∈ 𝓝 x
W : Set X
hsubW : ⋂ i, V i ⊆ W
W_op : IsOpen W
hWU : W ⊆ U
H : ∀ (i : ι), (V i ∩ Wᶜ).Nonempty
i j k : ι
hki : V i ⊇ V k
hkj : V j ⊇ V k
⊢ ∃ z, (fun x x_1 => x ⊇ x_1) (V i ∩ Wᶜ) (V z ∩ Wᶜ) ∧ (fun x x_1 => x ⊇ x_1) (V j ∩ Wᶜ) (V z ∩ Wᶜ)

tactic: refine ⟨k, ⟨fun x => ?_, fun x => ?_⟩⟩ <;> simp only [and_imp, mem_inter_iff, mem_compl_iff] <;>
  tauto
state_before: case intro.intro
X : Type u
Y : Type v
ι : Type u_1
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
s t : Set X
inst✝ : Nonempty ι
V : ι → Set X
hV : Directed (fun x x_1 => x ⊇ x_1) V
hV_cpct : ∀ (i : ι), IsCompact (V i)
hV_closed : ∀ (i : ι), IsClosed (V i)
U : Set X
hU : ∀ x ∈ ⋂ i, V i, U ∈ 𝓝 x
W : Set X
hsubW : ⋂ i, V i ⊆ W
W_op : IsOpen W
hWU : W ⊆ U
H : ∀ (i : ι), (V i ∩ Wᶜ).Nonempty
i j k : ι
hki : V i ⊇ V k
hkj : V j ⊇ V k
⊢ ∃ z, (fun x x_1 => x ⊇ x_1) (V i ∩ Wᶜ) (V z ∩ Wᶜ) ∧ (fun x x_1 => x ⊇ x_1) (V j ∩ Wᶜ) (V z ∩ Wᶜ)
state_after: no goals

tactic: simpa [← iInter_inter, inter_compl_nonempty_iff]
state_before: X : Type u
Y : Type v
ι : Type u_1
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
s t : Set X
inst✝ : Nonempty ι
V : ι → Set X
hV : Directed (fun x x_1 => x ⊇ x_1) V
hV_cpct : ∀ (i : ι), IsCompact (V i)
hV_closed : ∀ (i : ι), IsClosed (V i)
U : Set X
hU : ∀ x ∈ ⋂ i, V i, U ∈ 𝓝 x
W : Set X
hsubW : ⋂ i, V i ⊆ W
W_op : IsOpen W
hWU : W ⊆ U
H : ∀ (i : ι), (V i ∩ Wᶜ).Nonempty
this : (⋂ i, V i ∩ Wᶜ).Nonempty
⊢ ¬⋂ i, V i ⊆ W
state_after: no goals