Theorem: TopologicalSpace.IsSeparable.exists_countable_dense_subset
File: Mathlib/Topology/EMetricSpace/Basic.lean

tactic: have : ∀ ε > 0, ∃ t : Set α, t.Countable ∧ s ⊆ ⋃ x ∈ t, closedBall x ε := fun ε ε0 => by
  rcases hs with ⟨t, htc, hst⟩
  refine ⟨t, htc, hst.trans fun x hx => ?_⟩
  rcases mem_closure_iff.1 hx ε ε0 with ⟨y, hyt, hxy⟩
  exact mem_iUnion₂.2 ⟨y, hyt, mem_closedBall.2 hxy.le⟩
state_before: α : Type u
β : Type v
X : Type u_1
inst✝ : PseudoEMetricSpace α
x y z : α
ε ε₁ ε₂ : ℝ≥0∞
s✝ t s : Set α
hs : IsSeparable s
⊢ ∃ t ⊆ s, t.Countable ∧ s ⊆ closure t
state_after: α : Type u
β : Type v
X : Type u_1
inst✝ : PseudoEMetricSpace α
x y z : α
ε ε₁ ε₂ : ℝ≥0∞
s✝ t s : Set α
hs : IsSeparable s
this : ∀ ε > 0, ∃ t, t.Countable ∧ s ⊆ ⋃ x ∈ t, closedBall x ε
⊢ ∃ t ⊆ s, t.Countable ∧ s ⊆ closure t

tactic: exact subset_countable_closure_of_almost_dense_set _ this
state_before: α : Type u
β : Type v
X : Type u_1
inst✝ : PseudoEMetricSpace α
x y z : α
ε ε₁ ε₂ : ℝ≥0∞
s✝ t s : Set α
hs : IsSeparable s
this : ∀ ε > 0, ∃ t, t.Countable ∧ s ⊆ ⋃ x ∈ t, closedBall x ε
⊢ ∃ t ⊆ s, t.Countable ∧ s ⊆ closure t
state_after: no goals

tactic: rcases hs with ⟨t, htc, hst⟩
state_before: α : Type u
β : Type v
X : Type u_1
inst✝ : PseudoEMetricSpace α
x y z : α
ε✝ ε₁ ε₂ : ℝ≥0∞
s✝ t s : Set α
hs : IsSeparable s
ε : ℝ≥0∞
ε0 : ε > 0
⊢ ∃ t, t.Countable ∧ s ⊆ ⋃ x ∈ t, closedBall x ε
state_after: case intro.intro
α : Type u
β : Type v
X : Type u_1
inst✝ : PseudoEMetricSpace α
x y z : α
ε✝ ε₁ ε₂ : ℝ≥0∞
s✝ t✝ s : Set α
ε : ℝ≥0∞
ε0 : ε > 0
t : Set α
htc : t.Countable
hst : s ⊆ closure t
⊢ ∃ t, t.Countable ∧ s ⊆ ⋃ x ∈ t, closedBall x ε

tactic: refine ⟨t, htc, hst.trans fun x hx => ?_⟩
state_before: case intro.intro
α : Type u
β : Type v
X : Type u_1
inst✝ : PseudoEMetricSpace α
x y z : α
ε✝ ε₁ ε₂ : ℝ≥0∞
s✝ t✝ s : Set α
ε : ℝ≥0∞
ε0 : ε > 0
t : Set α
htc : t.Countable
hst : s ⊆ closure t
⊢ ∃ t, t.Countable ∧ s ⊆ ⋃ x ∈ t, closedBall x ε
state_after: case intro.intro
α : Type u
β : Type v
X : Type u_1
inst✝ : PseudoEMetricSpace α
x✝ y z : α
ε✝ ε₁ ε₂ : ℝ≥0∞
s✝ t✝ s : Set α
ε : ℝ≥0∞
ε0 : ε > 0
t : Set α
htc : t.Countable
hst : s ⊆ closure t
x : α
hx : x ∈ closure t
⊢ x ∈ ⋃ x ∈ t, closedBall x ε

tactic: rcases mem_closure_iff.1 hx ε ε0 with ⟨y, hyt, hxy⟩
state_before: case intro.intro
α : Type u
β : Type v
X : Type u_1
inst✝ : PseudoEMetricSpace α
x✝ y z : α
ε✝ ε₁ ε₂ : ℝ≥0∞
s✝ t✝ s : Set α
ε : ℝ≥0∞
ε0 : ε > 0
t : Set α
htc : t.Countable
hst : s ⊆ closure t
x : α
hx : x ∈ closure t
⊢ x ∈ ⋃ x ∈ t, closedBall x ε
state_after: case intro.intro.intro.intro
α : Type u
β : Type v
X : Type u_1
inst✝ : PseudoEMetricSpace α
x✝ y✝ z : α
ε✝ ε₁ ε₂ : ℝ≥0∞
s✝ t✝ s : Set α
ε : ℝ≥0∞
ε0 : ε > 0
t : Set α
htc : t.Countable
hst : s ⊆ closure t
x : α
hx : x ∈ closure t
y : α
hyt : y ∈ t
hxy : edist x y < ε
⊢ x ∈ ⋃ x ∈ t, closedBall x ε

tactic: exact mem_iUnion₂.2 ⟨y, hyt, mem_closedBall.2 hxy.le⟩
state_before: case intro.intro.intro.intro
α : Type u
β : Type v
X : Type u_1
inst✝ : PseudoEMetricSpace α
x✝ y✝ z : α
ε✝ ε₁ ε₂ : ℝ≥0∞
s✝ t✝ s : Set α
ε : ℝ≥0∞
ε0 : ε > 0
t : Set α
htc : t.Countable
hst : s ⊆ closure t
x : α
hx : x ∈ closure t
y : α
hyt : y ∈ t
hxy : edist x y < ε
⊢ x ∈ ⋃ x ∈ t, closedBall x ε
state_after: no goals