Theorem: _private.Mathlib.Topology.MetricSpace.Perfect.0.Perfect.small_diam_aux
File: Mathlib/Topology/MetricSpace/Perfect.lean

Proof steps:
state_before: α : Type u_1
inst✝ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
ε_pos : 0 < ε
x : α
xC : x ∈ C
⊢ let D := closure (EMetric.ball x (ε / 2) ∩ C);
  Perfect D ∧ D.Nonempty ∧ D ⊆ C ∧ EMetric.diam D ≤ ε
state_after: α : Type u_1
inst✝ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
ε_pos : 0 < ε
x : α
xC : x ∈ C
this : x ∈ EMetric.ball x (ε / 2)
⊢ let D := closure (EMetric.ball x (ε / 2) ∩ C);
  Perfect D ∧ D.Nonempty ∧ D ⊆ C ∧ EMetric.diam D ≤ ε
tactic: have : x ∈ EMetric.ball x (ε / 2) := by
    apply EMetric.mem_ball_self
    rw [ENNReal.div_pos_iff]
    exact ⟨ne_of_gt ε_pos, by norm_num⟩
state_before: α : Type u_1
inst✝ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
ε_pos : 0 < ε
x : α
xC : x ∈ C
this : x ∈ EMetric.ball x (ε / 2)
⊢ let D := closure (EMetric.ball x (ε / 2) ∩ C);
  Perfect D ∧ D.Nonempty ∧ D ⊆ C ∧ EMetric.diam D ≤ ε
state_after: α : Type u_1
inst✝ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
ε_pos : 0 < ε
x : α
xC : x ∈ C
this✝ : x ∈ EMetric.ball x (ε / 2)
this : Perfect (closure (EMetric.ball x (ε / 2) ∩ C)) ∧ (closure (EMetric.ball x (ε / 2) ∩ C)).Nonempty
⊢ let D := closure (EMetric.ball x (ε / 2) ∩ C);
  Perfect D ∧ D.Nonempty ∧ D ⊆ C ∧ EMetric.diam D ≤ ε
tactic: have := hC.closure_nhds_inter x xC this EMetric.isOpen_ball
state_before: α : Type u_1
inst✝ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
ε_pos : 0 < ε
x : α
xC : x ∈ C
this✝ : x ∈ EMetric.ball x (ε / 2)
this : Perfect (closure (EMetric.ball x (ε / 2) ∩ C)) ∧ (closure (EMetric.ball x (ε / 2) ∩ C)).Nonempty
⊢ let D := closure (EMetric.ball x (ε / 2) ∩ C);
  Perfect D ∧ D.Nonempty ∧ D ⊆ C ∧ EMetric.diam D ≤ ε
state_after: case refine_1
α : Type u_1
inst✝ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
ε_pos : 0 < ε
x : α
xC : x ∈ C
this✝ : x ∈ EMetric.ball x (ε / 2)
this : Perfect (closure (EMetric.ball x (ε / 2) ∩ C)) ∧ (closure (EMetric.ball x (ε / 2) ∩ C)).Nonempty
⊢ closure (EMetric.ball x (ε / 2) ∩ C) ⊆ C

case refine_2
α : Type u_1
inst✝ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
ε_pos : 0 < ε
x : α
xC : x ∈ C
this✝ : x ∈ EMetric.ball x (ε / 2)
this : Perfect (closure (EMetric.ball x (ε / 2) ∩ C)) ∧ (closure (EMetric.ball x (ε / 2) ∩ C)).Nonempty
⊢ EMetric.diam (closure (EMetric.ball x (ε / 2) ∩ C)) ≤ ε
tactic: refine ⟨this.1, this.2, ?_, ?_⟩
state_before: case refine_2
α : Type u_1
inst✝ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
ε_pos : 0 < ε
x : α
xC : x ∈ C
this✝ : x ∈ EMetric.ball x (ε / 2)
this : Perfect (closure (EMetric.ball x (ε / 2) ∩ C)) ∧ (closure (EMetric.ball x (ε / 2) ∩ C)).Nonempty
⊢ EMetric.diam (closure (EMetric.ball x (ε / 2) ∩ C)) ≤ ε
state_after: case refine_2
α : Type u_1
inst✝ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
ε_pos : 0 < ε
x : α
xC : x ∈ C
this✝ : x ∈ EMetric.ball x (ε / 2)
this : Perfect (closure (EMetric.ball x (ε / 2) ∩ C)) ∧ (closure (EMetric.ball x (ε / 2) ∩ C)).Nonempty
⊢ EMetric.diam (EMetric.ball x (ε / 2) ∩ C) ≤ ε
tactic: rw [EMetric.diam_closure]
state_before: case refine_2
α : Type u_1
inst✝ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
ε_pos : 0 < ε
x : α
xC : x ∈ C
this✝ : x ∈ EMetric.ball x (ε / 2)
this : Perfect (closure (EMetric.ball x (ε / 2) ∩ C)) ∧ (closure (EMetric.ball x (ε / 2) ∩ C)).Nonempty
⊢ EMetric.diam (EMetric.ball x (ε / 2) ∩ C) ≤ ε
state_after: case refine_2
α : Type u_1
inst✝ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
ε_pos : 0 < ε
x : α
xC : x ∈ C
this✝ : x ∈ EMetric.ball x (ε / 2)
this : Perfect (closure (EMetric.ball x (ε / 2) ∩ C)) ∧ (closure (EMetric.ball x (ε / 2) ∩ C)).Nonempty
⊢ EMetric.diam (EMetric.ball x (ε / 2)) ≤ ε
tactic: apply le_trans (EMetric.diam_mono inter_subset_left)
state_before: case refine_2
α : Type u_1
inst✝ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
ε_pos : 0 < ε
x : α
xC : x ∈ C
this✝ : x ∈ EMetric.ball x (ε / 2)
this : Perfect (closure (EMetric.ball x (ε / 2) ∩ C)) ∧ (closure (EMetric.ball x (ε / 2) ∩ C)).Nonempty
⊢ EMetric.diam (EMetric.ball x (ε / 2)) ≤ ε
state_after: case h.e'_4
α : Type u_1
inst✝ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
ε_pos : 0 < ε
x : α
xC : x ∈ C
this✝ : x ∈ EMetric.ball x (ε / 2)
this : Perfect (closure (EMetric.ball x (ε / 2) ∩ C)) ∧ (closure (EMetric.ball x (ε / 2) ∩ C)).Nonempty
⊢ ε = 2 * (ε / 2)
tactic: convert EMetric.diam_ball (x := x)
state_before: case h.e'_4
α : Type u_1
inst✝ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
ε_pos : 0 < ε
x : α
xC : x ∈ C
this✝ : x ∈ EMetric.ball x (ε / 2)
this : Perfect (closure (EMetric.ball x (ε / 2) ∩ C)) ∧ (closure (EMetric.ball x (ε / 2) ∩ C)).Nonempty
⊢ ε = 2 * (ε / 2)
state_after: no goals
tactic: rw [mul_comm, ENNReal.div_mul_cancel] <;> norm_num