Theorem: countable_cover_nhdsWithin_of_sigma_compact
File: Mathlib/Topology/SubsetProperties.lean

tactic: simp only [nhdsWithin, mem_inf_principal] at hf
state_before: α : Type u
β : Type v
ι : Type ?u.164016
π : ι → Type ?u.164021
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
s✝ t : Set α
inst✝ : SigmaCompactSpace α
f : α → Set α
s : Set α
hs : IsClosed s
hf : ∀ (x : α), x ∈ s → f x ∈ 𝓝[s] x
⊢ ∃ t x, Set.Countable t ∧ s ⊆ ⋃ (x : α) (_ : x ∈ t), f x

tactic: choose t ht hsub using fun n =>
  ((isCompact_compactCovering α n).inter_right hs).elim_nhds_subcover _ fun x hx => hf x hx.right
state_before: α : Type u
β : Type v
ι : Type ?u.164016
π : ι → Type ?u.164021
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
s✝ t : Set α
inst✝ : SigmaCompactSpace α
f : α → Set α
s : Set α
hs : IsClosed s
hf : ∀ (x : α), x ∈ s → {x_1 | x_1 ∈ s → x_1 ∈ f x} ∈ 𝓝 x
⊢ ∃ t x, Set.Countable t ∧ s ⊆ ⋃ (x : α) (_ : x ∈ t), f x

tactic: refine'
  ⟨⋃ n, (t n : Set α), iUnion_subset fun n x hx => (ht n x hx).2,
    countable_iUnion fun n => (t n).countable_toSet, fun x hx => mem_iUnion₂.2 _⟩
state_before: α : Type u
β : Type v
ι : Type ?u.164016
π : ι → Type ?u.164021
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
s✝ t✝ : Set α
inst✝ : SigmaCompactSpace α
f : α → Set α
s : Set α
hs : IsClosed s
hf : ∀ (x : α), x ∈ s → {x_1 | x_1 ∈ s → x_1 ∈ f x} ∈ 𝓝 x
t : ℕ → Finset α
ht : ∀ (n : ℕ) (x : α), x ∈ t n → x ∈ compactCovering α n ∩ s
hsub : ∀ (n : ℕ), compactCovering α n ∩ s ⊆ ⋃ (x : α) (_ : x ∈ t n), {x_1 | x_1 ∈ s → x_1 ∈ f x}
⊢ ∃ t x, Set.Countable t ∧ s ⊆ ⋃ (x : α) (_ : x ∈ t), f x

tactic: rcases exists_mem_compactCovering x with ⟨n, hn⟩
state_before: α : Type u
β : Type v
ι : Type ?u.164016
π : ι → Type ?u.164021
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
s✝ t✝ : Set α
inst✝ : SigmaCompactSpace α
f : α → Set α
s : Set α
hs : IsClosed s
hf : ∀ (x : α), x ∈ s → {x_1 | x_1 ∈ s → x_1 ∈ f x} ∈ 𝓝 x
t : ℕ → Finset α
ht : ∀ (n : ℕ) (x : α), x ∈ t n → x ∈ compactCovering α n ∩ s
hsub : ∀ (n : ℕ), compactCovering α n ∩ s ⊆ ⋃ (x : α) (_ : x ∈ t n), {x_1 | x_1 ∈ s → x_1 ∈ f x}
x : α
hx : x ∈ s
⊢ ∃ i j, x ∈ f i

tactic: rcases mem_iUnion₂.1 (hsub n ⟨hn, hx⟩) with ⟨y, hyt : y ∈ t n, hyf : x ∈ s → x ∈ f y⟩
state_before: case intro
α : Type u
β : Type v
ι : Type ?u.164016
π : ι → Type ?u.164021
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
s✝ t✝ : Set α
inst✝ : SigmaCompactSpace α
f : α → Set α
s : Set α
hs : IsClosed s
hf : ∀ (x : α), x ∈ s → {x_1 | x_1 ∈ s → x_1 ∈ f x} ∈ 𝓝 x
t : ℕ → Finset α
ht : ∀ (n : ℕ) (x : α), x ∈ t n → x ∈ compactCovering α n ∩ s
hsub : ∀ (n : ℕ), compactCovering α n ∩ s ⊆ ⋃ (x : α) (_ : x ∈ t n), {x_1 | x_1 ∈ s → x_1 ∈ f x}
x : α
hx : x ∈ s
n : ℕ
hn : x ∈ compactCovering α n
⊢ ∃ i j, x ∈ f i

tactic: exact ⟨y, mem_iUnion.2 ⟨n, hyt⟩, hyf hx⟩
state_before: case intro.intro.intro
α : Type u
β : Type v
ι : Type ?u.164016
π : ι → Type ?u.164021
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
s✝ t✝ : Set α
inst✝ : SigmaCompactSpace α
f : α → Set α
s : Set α
hs : IsClosed s
hf : ∀ (x : α), x ∈ s → {x_1 | x_1 ∈ s → x_1 ∈ f x} ∈ 𝓝 x
t : ℕ → Finset α
ht : ∀ (n : ℕ) (x : α), x ∈ t n → x ∈ compactCovering α n ∩ s
hsub : ∀ (n : ℕ), compactCovering α n ∩ s ⊆ ⋃ (x : α) (_ : x ∈ t n), {x_1 | x_1 ∈ s → x_1 ∈ f x}
x : α
hx : x ∈ s
n : ℕ
hn : x ∈ compactCovering α n
y : α
hyt : y ∈ t n
hyf : x ∈ s → x ∈ f y
⊢ ∃ i j, x ∈ f i