Theorem: UniformSpace.secondCountable_of_separable
File: Mathlib/Topology/UniformSpace/Cauchy.lean

tactic: rcases exists_countable_dense α with ⟨s, hsc, hsd⟩
state_before: α : Type u
β : Type v
inst✝² : UniformSpace α
inst✝¹ : IsCountablyGenerated (𝓤 α)
inst✝ : SeparableSpace α
⊢ SecondCountableTopology α

tactic: obtain
  ⟨t : ℕ → Set (α × α), hto : ∀ i : ℕ, t i ∈ (𝓤 α).sets ∧ IsOpen (t i) ∧ SymmetricRel (t i),
    h_basis : (𝓤 α).HasAntitoneBasis t⟩ :=
  (@uniformity_hasBasis_open_symmetric α _).exists_antitone_subbasis
state_before: case intro.intro
α : Type u
β : Type v
inst✝² : UniformSpace α
inst✝¹ : IsCountablyGenerated (𝓤 α)
inst✝ : SeparableSpace α
s : Set α
hsc : Set.Countable s
hsd : Dense s
⊢ SecondCountableTopology α

tactic: choose ht_mem hto hts using hto
state_before: case intro.intro.intro.intro
α : Type u
β : Type v
inst✝² : UniformSpace α
inst✝¹ : IsCountablyGenerated (𝓤 α)
inst✝ : SeparableSpace α
s : Set α
hsc : Set.Countable s
hsd : Dense s
t : ℕ → Set (α × α)
hto : ∀ (i : ℕ), t i ∈ (𝓤 α).sets ∧ IsOpen (t i) ∧ SymmetricRel (t i)
h_basis : HasAntitoneBasis (𝓤 α) t
⊢ SecondCountableTopology α

tactic: refine' ⟨⟨⋃ x ∈ s, range fun k => ball x (t k), hsc.biUnion fun x _ => countable_range _, _⟩⟩
state_before: case intro.intro.intro.intro
α : Type u
β : Type v
inst✝² : UniformSpace α
inst✝¹ : IsCountablyGenerated (𝓤 α)
inst✝ : SeparableSpace α
s : Set α
hsc : Set.Countable s
hsd : Dense s
t : ℕ → Set (α × α)
h_basis : HasAntitoneBasis (𝓤 α) t
ht_mem : ∀ (i : ℕ), t i ∈ (𝓤 α).sets
hto : ∀ (i : ℕ), IsOpen (t i)
hts : ∀ (i : ℕ), SymmetricRel (t i)
⊢ SecondCountableTopology α

tactic: refine' (isTopologicalBasis_of_open_of_nhds _ _).eq_generateFrom
state_before: case intro.intro.intro.intro
α : Type u
β : Type v
inst✝² : UniformSpace α
inst✝¹ : IsCountablyGenerated (𝓤 α)
inst✝ : SeparableSpace α
s : Set α
hsc : Set.Countable s
hsd : Dense s
t : ℕ → Set (α × α)
h_basis : HasAntitoneBasis (𝓤 α) t
ht_mem : ∀ (i : ℕ), t i ∈ (𝓤 α).sets
hto : ∀ (i : ℕ), IsOpen (t i)
hts : ∀ (i : ℕ), SymmetricRel (t i)
⊢ toTopologicalSpace = generateFrom (⋃ (x : α) (_ : x ∈ s), range fun k => ball x (t k))

tactic: simp only [mem_iUnion₂, mem_range]
state_before: case intro.intro.intro.intro.refine'_1
α : Type u
β : Type v
inst✝² : UniformSpace α
inst✝¹ : IsCountablyGenerated (𝓤 α)
inst✝ : SeparableSpace α
s : Set α
hsc : Set.Countable s
hsd : Dense s
t : ℕ → Set (α × α)
h_basis : HasAntitoneBasis (𝓤 α) t
ht_mem : ∀ (i : ℕ), t i ∈ (𝓤 α).sets
hto : ∀ (i : ℕ), IsOpen (t i)
hts : ∀ (i : ℕ), SymmetricRel (t i)
⊢ ∀ (u : Set α), (u ∈ ⋃ (x : α) (_ : x ∈ s), range fun k => ball x (t k)) → IsOpen u

tactic: rintro _ ⟨x, _, k, rfl⟩
state_before: case intro.intro.intro.intro.refine'_1
α : Type u
β : Type v
inst✝² : UniformSpace α
inst✝¹ : IsCountablyGenerated (𝓤 α)
inst✝ : SeparableSpace α
s : Set α
hsc : Set.Countable s
hsd : Dense s
t : ℕ → Set (α × α)
h_basis : HasAntitoneBasis (𝓤 α) t
ht_mem : ∀ (i : ℕ), t i ∈ (𝓤 α).sets
hto : ∀ (i : ℕ), IsOpen (t i)
hts : ∀ (i : ℕ), SymmetricRel (t i)
⊢ ∀ (u : Set α), (∃ i h y, ball i (t y) = u) → IsOpen u

tactic: exact isOpen_ball x (hto k)
state_before: case intro.intro.intro.intro.refine'_1.intro.intro.intro
α : Type u
β : Type v
inst✝² : UniformSpace α
inst✝¹ : IsCountablyGenerated (𝓤 α)
inst✝ : SeparableSpace α
s : Set α
hsc : Set.Countable s
hsd : Dense s
t : ℕ → Set (α × α)
h_basis : HasAntitoneBasis (𝓤 α) t
ht_mem : ∀ (i : ℕ), t i ∈ (𝓤 α).sets
hto : ∀ (i : ℕ), IsOpen (t i)
hts : ∀ (i : ℕ), SymmetricRel (t i)
x : α
w✝ : x ∈ s
k : ℕ
⊢ IsOpen (ball x (t k))

tactic: intro x V hxV hVo
state_before: case intro.intro.intro.intro.refine'_2
α : Type u
β : Type v
inst✝² : UniformSpace α
inst✝¹ : IsCountablyGenerated (𝓤 α)
inst✝ : SeparableSpace α
s : Set α
hsc : Set.Countable s
hsd : Dense s
t : ℕ → Set (α × α)
h_basis : HasAntitoneBasis (𝓤 α) t
ht_mem : ∀ (i : ℕ), t i ∈ (𝓤 α).sets
hto : ∀ (i : ℕ), IsOpen (t i)
hts : ∀ (i : ℕ), SymmetricRel (t i)
⊢ ∀ (a : α) (u : Set α),
    a ∈ u → IsOpen u → ∃ v, (v ∈ ⋃ (x : α) (_ : x ∈ s), range fun k => ball x (t k)) ∧ a ∈ v ∧ v ⊆ u

tactic: simp only [mem_iUnion₂, mem_range, exists_prop]
state_before: case intro.intro.intro.intro.refine'_2
α : Type u
β : Type v
inst✝² : UniformSpace α
inst✝¹ : IsCountablyGenerated (𝓤 α)
inst✝ : SeparableSpace α
s : Set α
hsc : Set.Countable s
hsd : Dense s
t : ℕ → Set (α × α)
h_basis : HasAntitoneBasis (𝓤 α) t
ht_mem : ∀ (i : ℕ), t i ∈ (𝓤 α).sets
hto : ∀ (i : ℕ), IsOpen (t i)
hts : ∀ (i : ℕ), SymmetricRel (t i)
x : α
V : Set α
hxV : x ∈ V
hVo : IsOpen V
⊢ ∃ v, (v ∈ ⋃ (x : α) (_ : x ∈ s), range fun k => ball x (t k)) ∧ x ∈ v ∧ v ⊆ V

tactic: rcases UniformSpace.mem_nhds_iff.1 (IsOpen.mem_nhds hVo hxV) with ⟨U, hU, hUV⟩
state_before: case intro.intro.intro.intro.refine'_2
α : Type u
β : Type v
inst✝² : UniformSpace α
inst✝¹ : IsCountablyGenerated (𝓤 α)
inst✝ : SeparableSpace α
s : Set α
hsc : Set.Countable s
hsd : Dense s
t : ℕ → Set (α × α)
h_basis : HasAntitoneBasis (𝓤 α) t
ht_mem : ∀ (i : ℕ), t i ∈ (𝓤 α).sets
hto : ∀ (i : ℕ), IsOpen (t i)
hts : ∀ (i : ℕ), SymmetricRel (t i)
x : α
V : Set α
hxV : x ∈ V
hVo : IsOpen V
⊢ ∃ v, (∃ i, i ∈ s ∧ ∃ y, ball i (t y) = v) ∧ x ∈ v ∧ v ⊆ V

tactic: rcases comp_symm_of_uniformity hU with ⟨U', hU', _, hUU'⟩
state_before: case intro.intro.intro.intro.refine'_2.intro.intro
α : Type u
β : Type v
inst✝² : UniformSpace α
inst✝¹ : IsCountablyGenerated (𝓤 α)
inst✝ : SeparableSpace α
s : Set α
hsc : Set.Countable s
hsd : Dense s
t : ℕ → Set (α × α)
h_basis : HasAntitoneBasis (𝓤 α) t
ht_mem : ∀ (i : ℕ), t i ∈ (𝓤 α).sets
hto : ∀ (i : ℕ), IsOpen (t i)
hts : ∀ (i : ℕ), SymmetricRel (t i)
x : α
V : Set α
hxV : x ∈ V
hVo : IsOpen V
U : Set (α × α)
hU : U ∈ 𝓤 α
hUV : ball x U ⊆ V
⊢ ∃ v, (∃ i, i ∈ s ∧ ∃ y, ball i (t y) = v) ∧ x ∈ v ∧ v ⊆ V

tactic: rcases h_basis.toHasBasis.mem_iff.1 hU' with ⟨k, -, hk⟩
state_before: case intro.intro.intro.intro.refine'_2.intro.intro.intro.intro.intro
α : Type u
β : Type v
inst✝² : UniformSpace α
inst✝¹ : IsCountablyGenerated (𝓤 α)
inst✝ : SeparableSpace α
s : Set α
hsc : Set.Countable s
hsd : Dense s
t : ℕ → Set (α × α)
h_basis : HasAntitoneBasis (𝓤 α) t
ht_mem : ∀ (i : ℕ), t i ∈ (𝓤 α).sets
hto : ∀ (i : ℕ), IsOpen (t i)
hts : ∀ (i : ℕ), SymmetricRel (t i)
x : α
V : Set α
hxV : x ∈ V
hVo : IsOpen V
U : Set (α × α)
hU : U ∈ 𝓤 α
hUV : ball x U ⊆ V
U' : Set (α × α)
hU' : U' ∈ 𝓤 α
left✝ : ∀ {a b : α}, (a, b) ∈ U' → (b, a) ∈ U'
hUU' : U' ○ U' ⊆ U
⊢ ∃ v, (∃ i, i ∈ s ∧ ∃ y, ball i (t y) = v) ∧ x ∈ v ∧ v ⊆ V

tactic: rcases hsd.inter_open_nonempty (ball x <| t k) (isOpen_ball x (hto k))
    ⟨x, UniformSpace.mem_ball_self _ (ht_mem k)⟩ with
  ⟨y, hxy, hys⟩
state_before: case intro.intro.intro.intro.refine'_2.intro.intro.intro.intro.intro.intro.intro
α : Type u
β : Type v
inst✝² : UniformSpace α
inst✝¹ : IsCountablyGenerated (𝓤 α)
inst✝ : SeparableSpace α
s : Set α
hsc : Set.Countable s
hsd : Dense s
t : ℕ → Set (α × α)
h_basis : HasAntitoneBasis (𝓤 α) t
ht_mem : ∀ (i : ℕ), t i ∈ (𝓤 α).sets
hto : ∀ (i : ℕ), IsOpen (t i)
hts : ∀ (i : ℕ), SymmetricRel (t i)
x : α
V : Set α
hxV : x ∈ V
hVo : IsOpen V
U : Set (α × α)
hU : U ∈ 𝓤 α
hUV : ball x U ⊆ V
U' : Set (α × α)
hU' : U' ∈ 𝓤 α
left✝ : ∀ {a b : α}, (a, b) ∈ U' → (b, a) ∈ U'
hUU' : U' ○ U' ⊆ U
k : ℕ
hk : t k ⊆ U'
⊢ ∃ v, (∃ i, i ∈ s ∧ ∃ y, ball i (t y) = v) ∧ x ∈ v ∧ v ⊆ V

tactic: refine' ⟨_, ⟨y, hys, k, rfl⟩, (hts k).subset hxy, fun z hz => _⟩
state_before: case intro.intro.intro.intro.refine'_2.intro.intro.intro.intro.intro.intro.intro.intro.intro
α : Type u
β : Type v
inst✝² : UniformSpace α
inst✝¹ : IsCountablyGenerated (𝓤 α)
inst✝ : SeparableSpace α
s : Set α
hsc : Set.Countable s
hsd : Dense s
t : ℕ → Set (α × α)
h_basis : HasAntitoneBasis (𝓤 α) t
ht_mem : ∀ (i : ℕ), t i ∈ (𝓤 α).sets
hto : ∀ (i : ℕ), IsOpen (t i)
hts : ∀ (i : ℕ), SymmetricRel (t i)
x : α
V : Set α
hxV : x ∈ V
hVo : IsOpen V
U : Set (α × α)
hU : U ∈ 𝓤 α
hUV : ball x U ⊆ V
U' : Set (α × α)
hU' : U' ∈ 𝓤 α
left✝ : ∀ {a b : α}, (a, b) ∈ U' → (b, a) ∈ U'
hUU' : U' ○ U' ⊆ U
k : ℕ
hk : t k ⊆ U'
y : α
hxy : y ∈ ball x (t k)
hys : y ∈ s
⊢ ∃ v, (∃ i, i ∈ s ∧ ∃ y, ball i (t y) = v) ∧ x ∈ v ∧ v ⊆ V

tactic: exact hUV (ball_subset_of_comp_subset (hk hxy) hUU' (hk hz))
state_before: case intro.intro.intro.intro.refine'_2.intro.intro.intro.intro.intro.intro.intro.intro.intro
α : Type u
β : Type v
inst✝² : UniformSpace α
inst✝¹ : IsCountablyGenerated (𝓤 α)
inst✝ : SeparableSpace α
s : Set α
hsc : Set.Countable s
hsd : Dense s
t : ℕ → Set (α × α)
h_basis : HasAntitoneBasis (𝓤 α) t
ht_mem : ∀ (i : ℕ), t i ∈ (𝓤 α).sets
hto : ∀ (i : ℕ), IsOpen (t i)
hts : ∀ (i : ℕ), SymmetricRel (t i)
x : α
V : Set α
hxV : x ∈ V
hVo : IsOpen V
U : Set (α × α)
hU : U ∈ 𝓤 α
hUV : ball x U ⊆ V
U' : Set (α × α)
hU' : U' ∈ 𝓤 α
left✝ : ∀ {a b : α}, (a, b) ∈ U' → (b, a) ∈ U'
hUU' : U' ○ U' ⊆ U
k : ℕ
hk : t k ⊆ U'
y : α
hxy : y ∈ ball x (t k)
hys : y ∈ s
z : α
hz : z ∈ ball y (t k)
⊢ z ∈ V