Theorem: TopologicalSpace.IsSeparable.separableSpace
File: Mathlib/Topology/MetricSpace/EMetricSpace.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.278821
inst✝ : PseudoEMetricSpace α
x y z : α
ε ε₁ ε₂ : ℝ≥0∞
s✝ t s : Set α
hs : IsSeparable s
⊢ SeparableSpace ↑s

tactic: rcases subset_countable_closure_of_almost_dense_set _ this with ⟨t, hts, htc, hst⟩
state_before: α : Type u
β : Type v
X : Type ?u.278821
inst✝ : PseudoEMetricSpace α
x y z : α
ε ε₁ ε₂ : ℝ≥0∞
s✝ t s : Set α
hs : IsSeparable s
this : ∀ (ε : ℝ≥0∞), ε > 0 → ∃ t, Set.Countable t ∧ s ⊆ ⋃ (x : α) (_ : x ∈ t), closedBall x ε
⊢ SeparableSpace ↑s

tactic: lift t to Set s using hts
state_before: case intro.intro.intro
α : Type u
β : Type v
X : Type ?u.278821
inst✝ : PseudoEMetricSpace α
x y z : α
ε ε₁ ε₂ : ℝ≥0∞
s✝ t✝ s : Set α
hs : IsSeparable s
this : ∀ (ε : ℝ≥0∞), ε > 0 → ∃ t, Set.Countable t ∧ s ⊆ ⋃ (x : α) (_ : x ∈ t), closedBall x ε
t : Set α
hts : t ⊆ s
htc : Set.Countable t
hst : s ⊆ closure t
⊢ SeparableSpace ↑s

tactic: refine ⟨⟨t, countable_of_injective_of_countable_image (Subtype.coe_injective.injOn _) htc, ?_⟩⟩
state_before: case intro.intro.intro.intro
α : Type u
β : Type v
X : Type ?u.278821
inst✝ : PseudoEMetricSpace α
x y z : α
ε ε₁ ε₂ : ℝ≥0∞
s✝ t✝ s : Set α
hs : IsSeparable s
this : ∀ (ε : ℝ≥0∞), ε > 0 → ∃ t, Set.Countable t ∧ s ⊆ ⋃ (x : α) (_ : x ∈ t), closedBall x ε
t : Set ↑s
htc : Set.Countable ((fun x x_1 => x '' x_1) Subtype.val t)
hst : s ⊆ closure ((fun x x_1 => x '' x_1) Subtype.val t)
⊢ SeparableSpace ↑s

tactic: rwa [inducing_subtype_val.dense_iff, Subtype.forall]
state_before: case intro.intro.intro.intro
α : Type u
β : Type v
X : Type ?u.278821
inst✝ : PseudoEMetricSpace α
x y z : α
ε ε₁ ε₂ : ℝ≥0∞
s✝ t✝ s : Set α
hs : IsSeparable s
this : ∀ (ε : ℝ≥0∞), ε > 0 → ∃ t, Set.Countable t ∧ s ⊆ ⋃ (x : α) (_ : x ∈ t), closedBall x ε
t : Set ↑s
htc : Set.Countable ((fun x x_1 => x '' x_1) Subtype.val t)
hst : s ⊆ closure ((fun x x_1 => x '' x_1) Subtype.val t)
⊢ Dense t

tactic: rcases hs with ⟨t, htc, hst⟩
state_before: α : Type u
β : Type v
X : Type ?u.278821
inst✝ : PseudoEMetricSpace α
x y z : α
ε✝ ε₁ ε₂ : ℝ≥0∞
s✝ t s : Set α
hs : IsSeparable s
ε : ℝ≥0∞
ε0 : ε > 0
⊢ ∃ t, Set.Countable t ∧ s ⊆ ⋃ (x : α) (_ : 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.278821
inst✝ : PseudoEMetricSpace α
x y z : α
ε✝ ε₁ ε₂ : ℝ≥0∞
s✝ t✝ s : Set α
ε : ℝ≥0∞
ε0 : ε > 0
t : Set α
htc : Set.Countable t
hst : s ⊆ closure t
⊢ ∃ t, Set.Countable t ∧ s ⊆ ⋃ (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.278821
inst✝ : PseudoEMetricSpace α
x✝ y z : α
ε✝ ε₁ ε₂ : ℝ≥0∞
s✝ t✝ s : Set α
ε : ℝ≥0∞
ε0 : ε > 0
t : Set α
htc : Set.Countable t
hst : s ⊆ closure t
x : α
hx : x ∈ closure t
⊢ x ∈ ⋃ (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.278821
inst✝ : PseudoEMetricSpace α
x✝ y✝ z : α
ε✝ ε₁ ε₂ : ℝ≥0∞
s✝ t✝ s : Set α
ε : ℝ≥0∞
ε0 : ε > 0
t : Set α
htc : Set.Countable t
hst : s ⊆ closure t
x : α
hx : x ∈ closure t
y : α
hyt : y ∈ t
hxy : edist x y < ε
⊢ x ∈ ⋃ (x : α) (_ : x ∈ t), closedBall x ε