-- Mathlib/Topology/MetricSpace/CantorScheme.lean
theorem VanishingDiam.dist_lt (hA : VanishingDiam A) (ε : ℝ) (ε_pos : 0 < ε) (x : ℕ → β) :
    ∃ n : ℕ, ∀ (y) (_ : y ∈ A (res x n)) (z) (_ : z ∈ A (res x n)), dist y z < ε

Proof state:
β : Type u_1
α : Type u_2
A : List β → Set α
inst✝ : PseudoMetricSpace α
ε : ℝ
ε_pos : 0 < ε
x : ℕ → β
hA : Tendsto (fun n => EMetric.diam (A (res x n))) atTop (𝓝 0)
⊢ ∃ n, ∀ y ∈ A (res x n), ∀ z ∈ A (res x n), dist y z < ε

Tactic:
rw [ENNReal.tendsto_atTop_zero] at hA

Result:
β : Type u_1
α : Type u_2
A : List β → Set α
inst✝ : PseudoMetricSpace α
ε : ℝ
ε_pos : 0 < ε
x : ℕ → β
hA : ∀ ε > 0, ∃ N, ∀ n ≥ N, EMetric.diam (A (res x n)) ≤ ε
⊢ ∃ n, ∀ y ∈ A (res x n), ∀ z ∈ A (res x n), dist y z < ε

Proof state:
case h
β : Type u_1
α : Type u_2
A : List β → Set α
inst✝ : PseudoMetricSpace α
ε : ℝ
ε_pos : 0 < ε
x : ℕ → β
hA : ∀ ε > 0, ∃ N, ∀ n ≥ N, EMetric.diam (A (res x n)) ≤ ε
n : ℕ
hn : ∀ n_1 ≥ n, EMetric.diam (A (res x n_1)) ≤ ENNReal.ofReal (ε / 2)
⊢ ∀ y ∈ A (res x n), ∀ z ∈ A (res x n), dist y z < ε

Tactic:
intro y hy z hz

Result:
case h
β : Type u_1
α : Type u_2
A : List β → Set α
inst✝ : PseudoMetricSpace α
ε : ℝ
ε_pos : 0 < ε
x : ℕ → β
hA : ∀ ε > 0, ∃ N, ∀ n ≥ N, EMetric.diam (A (res x n)) ≤ ε
n : ℕ
hn : ∀ n_1 ≥ n, EMetric.diam (A (res x n_1)) ≤ ENNReal.ofReal (ε / 2)
y : α
hy : y ∈ A (res x n)
z : α
hz : z ∈ A (res x n)
⊢ dist y z < ε

Proof state:
case h
β : Type u_1
α : Type u_2
A : List β → Set α
inst✝ : PseudoMetricSpace α
ε : ℝ
ε_pos : 0 < ε
x : ℕ → β
hA : ∀ ε > 0, ∃ N, ∀ n ≥ N, EMetric.diam (A (res x n)) ≤ ε
n : ℕ
hn : ∀ n_1 ≥ n, EMetric.diam (A (res x n_1)) ≤ ENNReal.ofReal (ε / 2)
y : α
hy : y ∈ A (res x n)
z : α
hz : z ∈ A (res x n)
⊢ edist y z < ENNReal.ofReal ε

Tactic:
apply lt_of_le_of_lt (EMetric.edist_le_diam_of_mem hy hz)

Result:
case h
β : Type u_1
α : Type u_2
A : List β → Set α
inst✝ : PseudoMetricSpace α
ε : ℝ
ε_pos : 0 < ε
x : ℕ → β
hA : ∀ ε > 0, ∃ N, ∀ n ≥ N, EMetric.diam (A (res x n)) ≤ ε
n : ℕ
hn : ∀ n_1 ≥ n, EMetric.diam (A (res x n_1)) ≤ ENNReal.ofReal (ε / 2)
y : α
hy : y ∈ A (res x n)
z : α
hz : z ∈ A (res x n)
⊢ EMetric.diam (A (res x n)) < ENNReal.ofReal ε

Proof state:
β : Type u_1
α : Type u_2
A : List β → Set α
inst✝ : PseudoMetricSpace α
ε : ℝ
ε_pos : 0 < ε
x : ℕ → β
hA : ∀ ε > 0, ∃ N, ∀ n ≥ N, EMetric.diam (A (res x n)) ≤ ε
⊢ ENNReal.ofReal (ε / 2) > 0

Tactic:
simp only [gt_iff_lt, ENNReal.ofReal_pos]

Result:
β : Type u_1
α : Type u_2
A : List β → Set α
inst✝ : PseudoMetricSpace α
ε : ℝ
ε_pos : 0 < ε
x : ℕ → β
hA : ∀ ε > 0, ∃ N, ∀ n ≥ N, EMetric.diam (A (res x n)) ≤ ε
⊢ 0 < ε / 2

Proof state:
β : Type u_1
α : Type u_2
A : List β → Set α
inst✝ : PseudoMetricSpace α
ε : ℝ
ε_pos : 0 < ε
x : ℕ → β
hA : ∀ ε > 0, ∃ N, ∀ n ≥ N, EMetric.diam (A (res x n)) ≤ ε
⊢ ∃ n, ∀ y ∈ A (res x n), ∀ z ∈ A (res x n), dist y z < ε

Tactic:
obtain ⟨n, hn⟩ := hA (ENNReal.ofReal (ε / 2)) (by
  simp only [gt_iff_lt, ENNReal.ofReal_pos]; linarith)

Result:
case intro
β : Type u_1
α : Type u_2
A : List β → Set α
inst✝ : PseudoMetricSpace α
ε : ℝ
ε_pos : 0 < ε
x : ℕ → β
hA : ∀ ε > 0, ∃ N, ∀ n ≥ N, EMetric.diam (A (res x n)) ≤ ε
n : ℕ
hn : ∀ n_1 ≥ n, EMetric.diam (A (res x n_1)) ≤ ENNReal.ofReal (ε / 2)
⊢ ∃ n, ∀ y ∈ A (res x n), ∀ z ∈ A (res x n), dist y z < ε

Proof state:
case intro
β : Type u_1
α : Type u_2
A : List β → Set α
inst✝ : PseudoMetricSpace α
ε : ℝ
ε_pos : 0 < ε
x : ℕ → β
hA : ∀ ε > 0, ∃ N, ∀ n ≥ N, EMetric.diam (A (res x n)) ≤ ε
n : ℕ
hn : ∀ n_1 ≥ n, EMetric.diam (A (res x n_1)) ≤ ENNReal.ofReal (ε / 2)
⊢ ∃ n, ∀ y ∈ A (res x n), ∀ z ∈ A (res x n), dist y z < ε

Tactic:
use n

Result:
case h
β : Type u_1
α : Type u_2
A : List β → Set α
inst✝ : PseudoMetricSpace α
ε : ℝ
ε_pos : 0 < ε
x : ℕ → β
hA : ∀ ε > 0, ∃ N, ∀ n ≥ N, EMetric.diam (A (res x n)) ≤ ε
n : ℕ
hn : ∀ n_1 ≥ n, EMetric.diam (A (res x n_1)) ≤ ENNReal.ofReal (ε / 2)
⊢ ∀ y ∈ A (res x n), ∀ z ∈ A (res x n), dist y z < ε

Proof state:
case h
β : Type u_1
α : Type u_2
A : List β → Set α
inst✝ : PseudoMetricSpace α
ε : ℝ
ε_pos : 0 < ε
x : ℕ → β
hA : ∀ ε > 0, ∃ N, ∀ n ≥ N, EMetric.diam (A (res x n)) ≤ ε
n : ℕ
hn : ∀ n_1 ≥ n, EMetric.diam (A (res x n_1)) ≤ ENNReal.ofReal (ε / 2)
y : α
hy : y ∈ A (res x n)
z : α
hz : z ∈ A (res x n)
⊢ EMetric.diam (A (res x n)) < ENNReal.ofReal ε

Tactic:
apply lt_of_le_of_lt (hn _ (le_refl _))

Result:
case h
β : Type u_1
α : Type u_2
A : List β → Set α
inst✝ : PseudoMetricSpace α
ε : ℝ
ε_pos : 0 < ε
x : ℕ → β
hA : ∀ ε > 0, ∃ N, ∀ n ≥ N, EMetric.diam (A (res x n)) ≤ ε
n : ℕ
hn : ∀ n_1 ≥ n, EMetric.diam (A (res x n_1)) ≤ ENNReal.ofReal (ε / 2)
y : α
hy : y ∈ A (res x n)
z : α
hz : z ∈ A (res x n)
⊢ ENNReal.ofReal (ε / 2) < ENNReal.ofReal ε

Proof state:
case h
β : Type u_1
α : Type u_2
A : List β → Set α
inst✝ : PseudoMetricSpace α
ε : ℝ
ε_pos : 0 < ε
x : ℕ → β
hA : ∀ ε > 0, ∃ N, ∀ n ≥ N, EMetric.diam (A (res x n)) ≤ ε
n : ℕ
hn : ∀ n_1 ≥ n, EMetric.diam (A (res x n_1)) ≤ ENNReal.ofReal (ε / 2)
y : α
hy : y ∈ A (res x n)
z : α
hz : z ∈ A (res x n)
⊢ dist y z < ε

Tactic:
rw [← ENNReal.ofReal_lt_ofReal_iff ε_pos, ← edist_dist]

Result:
case h
β : Type u_1
α : Type u_2
A : List β → Set α
inst✝ : PseudoMetricSpace α
ε : ℝ
ε_pos : 0 < ε
x : ℕ → β
hA : ∀ ε > 0, ∃ N, ∀ n ≥ N, EMetric.diam (A (res x n)) ≤ ε
n : ℕ
hn : ∀ n_1 ≥ n, EMetric.diam (A (res x n_1)) ≤ ENNReal.ofReal (ε / 2)
y : α
hy : y ∈ A (res x n)
z : α
hz : z ∈ A (res x n)
⊢ edist y z < ENNReal.ofReal ε

Proof state:
β : Type u_1
α : Type u_2
A : List β → Set α
inst✝ : PseudoMetricSpace α
hA : VanishingDiam A
ε : ℝ
ε_pos : 0 < ε
x : ℕ → β
⊢ ∃ n, ∀ y ∈ A (res x n), ∀ z ∈ A (res x n), dist y z < ε

Tactic:
specialize hA x

Result:
β : Type u_1
α : Type u_2
A : List β → Set α
inst✝ : PseudoMetricSpace α
ε : ℝ
ε_pos : 0 < ε
x : ℕ → β
hA : Tendsto (fun n => EMetric.diam (A (res x n))) atTop (𝓝 0)
⊢ ∃ n, ∀ y ∈ A (res x n), ∀ z ∈ A (res x n), dist y z < ε

Proof state:
β : Type u_1
α : Type u_2
A : List β → Set α
inst✝ : PseudoMetricSpace α
ε : ℝ
ε_pos : 0 < ε
x : ℕ → β
hA : ∀ ε > 0, ∃ N, ∀ n ≥ N, EMetric.diam (A (res x n)) ≤ ε
⊢ 0 < ε / 2

Tactic:
linarith

Result:
no goals

Proof state:
case h
β : Type u_1
α : Type u_2
A : List β → Set α
inst✝ : PseudoMetricSpace α
ε : ℝ
ε_pos : 0 < ε
x : ℕ → β
hA : ∀ ε > 0, ∃ N, ∀ n ≥ N, EMetric.diam (A (res x n)) ≤ ε
n : ℕ
hn : ∀ n_1 ≥ n, EMetric.diam (A (res x n_1)) ≤ ENNReal.ofReal (ε / 2)
y : α
hy : y ∈ A (res x n)
z : α
hz : z ∈ A (res x n)
⊢ ENNReal.ofReal (ε / 2) < ENNReal.ofReal ε

Tactic:
rw [ENNReal.ofReal_lt_ofReal_iff ε_pos]

Result:
case h
β : Type u_1
α : Type u_2
A : List β → Set α
inst✝ : PseudoMetricSpace α
ε : ℝ
ε_pos : 0 < ε
x : ℕ → β
hA : ∀ ε > 0, ∃ N, ∀ n ≥ N, EMetric.diam (A (res x n)) ≤ ε
n : ℕ
hn : ∀ n_1 ≥ n, EMetric.diam (A (res x n_1)) ≤ ENNReal.ofReal (ε / 2)
y : α
hy : y ∈ A (res x n)
z : α
hz : z ∈ A (res x n)
⊢ ε / 2 < ε

Proof state:
case h
β : Type u_1
α : Type u_2
A : List β → Set α
inst✝ : PseudoMetricSpace α
ε : ℝ
ε_pos : 0 < ε
x : ℕ → β
hA : ∀ ε > 0, ∃ N, ∀ n ≥ N, EMetric.diam (A (res x n)) ≤ ε
n : ℕ
hn : ∀ n_1 ≥ n, EMetric.diam (A (res x n_1)) ≤ ENNReal.ofReal (ε / 2)
y : α
hy : y ∈ A (res x n)
z : α
hz : z ∈ A (res x n)
⊢ ε / 2 < ε

Tactic:
linarith

Result:
no goals