Theorem: Perfect.small_diam_aux
File: Mathlib/Topology/Perfect.lean

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
⊢ let D := closure (EMetric.ball x (ε / 2) ∩ C);
  Perfect D ∧ Set.Nonempty D ∧ 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)
⊢ let D := closure (EMetric.ball x (ε / 2) ∩ C);
  Perfect D ∧ Set.Nonempty D ∧ D ⊆ C ∧ EMetric.diam D ≤ ε

tactic: refine' ⟨this.1, this.2, _, _⟩
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)) ∧ Set.Nonempty (closure (EMetric.ball x (ε / 2) ∩ C))
⊢ let D := closure (EMetric.ball x (ε / 2) ∩ C);
  Perfect D ∧ Set.Nonempty D ∧ D ⊆ C ∧ EMetric.diam D ≤ ε

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)) ∧ Set.Nonempty (closure (EMetric.ball x (ε / 2) ∩ C))
⊢ EMetric.diam (closure (EMetric.ball x (ε / 2) ∩ C)) ≤ ε

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)) ∧ Set.Nonempty (closure (EMetric.ball x (ε / 2) ∩ C))
⊢ EMetric.diam (EMetric.ball x (ε / 2) ∩ C) ≤ ε

tactic: convert EMetric.diam_ball (x := x)
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)) ∧ Set.Nonempty (closure (EMetric.ball x (ε / 2) ∩ C))
⊢ EMetric.diam (EMetric.ball x (ε / 2)) ≤ ε

tactic: rw [mul_comm, ENNReal.div_mul_cancel] <;> norm_num
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)) ∧ Set.Nonempty (closure (EMetric.ball x (ε / 2) ∩ C))
⊢ ε = 2 * (ε / 2)

tactic: apply EMetric.mem_ball_self
state_before: α : Type u_1
inst✝ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
ε_pos : 0 < ε
x : α
xC : x ∈ C
⊢ x ∈ EMetric.ball x (ε / 2)

tactic: rw [ENNReal.div_pos_iff]
state_before: case h
α : Type u_1
inst✝ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
ε_pos : 0 < ε
x : α
xC : x ∈ C
⊢ 0 < ε / 2

tactic: exact ⟨ne_of_gt ε_pos, by norm_num⟩
state_before: case h
α : Type u_1
inst✝ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
ε_pos : 0 < ε
x : α
xC : x ∈ C
⊢ ε ≠ 0 ∧ 2 ≠ ⊤

tactic: norm_num
state_before: α : Type u_1
inst✝ : MetricSpace α
C : Set α
hC : Perfect C
ε : ℝ≥0∞
ε_pos : 0 < ε
x : α
xC : x ∈ C
⊢ 2 ≠ ⊤

tactic: rw [IsClosed.closure_subset_iff hC.closed]
state_before: 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)) ∧ Set.Nonempty (closure (EMetric.ball x (ε / 2) ∩ C))
⊢ closure (EMetric.ball x (ε / 2) ∩ C) ⊆ C

tactic: apply inter_subset_right
state_before: 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)) ∧ Set.Nonempty (closure (EMetric.ball x (ε / 2) ∩ C))
⊢ EMetric.ball x (ε / 2) ∩ C ⊆ C