awhecmu/canonical-drafter-extract-mathlib huggingface dataset:
-- Module: Mathlib.Topology.MetricSpace.Closeds
Goal:
α : Type u_1
β : Type u_2
inst : EMetricSpace α
inst_1 : EMetricSpace β
s_1 : Set α
inst_2 : CompleteSpace α
B : ℕ → ℝ≥0∞ := fun (n : ℕ) ↦ HPow.hPow (α := ℝ≥0∞) 2⁻¹ n
B_pos : ∀ (n : ℕ), 0 < B n
B_ne_top : ∀ (n : ℕ), B n ≠ ∞
s : ℕ → Closeds α
hs : ∀ (N n m : ℕ), N ≤ n → N ≤ m → edist (s n) (s m) < B N
t0 : Set α :=
  ⋂ (n : ℕ), closure[PseudoEMetricSpace.toUniformSpace.toTopologicalSpace] (⋃ (m : ℕ), ⋃ (_ : m ≥ n), (↑(s m) : Set α))
t : Closeds α := { carrier := t0, isClosed' := ⋯ }
n : ℕ
x : α
hx : x ∈ s n
z : (l : ℕ) → ↥(s (n + l))
hz₀ : (↑(z 0) : α) = x
hz : ∀ (k : ℕ), edist (↑(z k) : α) (↑(z (k + 1)) : α) ≤ B n / HPow.hPow (α := ℝ≥0∞) 2 k
this : CauchySeq.{u_1, 0} (α := α) fun (k : ℕ) ↦ (↑(z k) : α)
y : α
y_lim : Tendsto (fun (k : ℕ) ↦ (↑(z k) : α)) atTop (𝓝 y)
k : ℕ
⊢ ∃ (a : ℕ), ∀ b ≥ a, ∃ i ≥ k, (↑(z b) : α) ∈ (↑(s i) : Set α)

Tactic:
exact ⟨k, fun m hm => ⟨n + m, by lia, (z m).2⟩⟩
-- Module: Mathlib.Topology.MetricSpace.Closeds
Goal:
α : Type u_1
β : Type u_2
inst : EMetricSpace α
inst_1 : EMetricSpace β
s_1 : Set α
inst_2 : CompleteSpace α
B : ℕ → ℝ≥0∞ := fun (n : ℕ) ↦ HPow.hPow (α := ℝ≥0∞) 2⁻¹ n
B_pos : ∀ (n : ℕ), 0 < B n
B_ne_top : ∀ (n : ℕ), B n ≠ ∞
s : ℕ → Closeds α
hs : ∀ (N n m : ℕ), N ≤ n → N ≤ m → edist (s n) (s m) < B N
t0 : Set α :=
  ⋂ (n : ℕ), closure[PseudoEMetricSpace.toUniformSpace.toTopologicalSpace] (⋃ (m : ℕ), ⋃ (_ : m ≥ n), (↑(s m) : Set α))
t : Closeds α := { carrier := t0, isClosed' := ⋯ }
n : ℕ
x : α
hx : x ∈ s n
z : (l : ℕ) → ↥(s (n + l))
hz₀ : (↑(z 0) : α) = x
hz : ∀ (k : ℕ), edist (↑(z k) : α) (↑(z (k + 1)) : α) ≤ B n / HPow.hPow (α := ℝ≥0∞) 2 k
this : CauchySeq.{u_1, 0} (α := α) fun (k : ℕ) ↦ (↑(z k) : α)
y : α
y_lim : Tendsto (fun (k : ℕ) ↦ (↑(z k) : α)) atTop (𝓝 y)
⊢ y ∈ t0

Tactic:
have : y ∈ t0 :=
      mem_iInter.2 fun k =>
        mem_closure_of_tendsto y_lim
          (by
            simp only [exists_prop, Set.mem_iUnion, Filter.eventually_atTop]
            exact ⟨k, fun m hm => ⟨n + m, by lia, (z m).2⟩⟩)
-- Module: Mathlib.Topology.MetricSpace.Closeds
Goal:
α : Type u_1
β : Type u_2
inst : EMetricSpace α
inst_1 : EMetricSpace β
s_1 : Set α
inst_2 : CompleteSpace α
B : ℕ → ℝ≥0∞ := fun (n : ℕ) ↦ HPow.hPow (α := ℝ≥0∞) 2⁻¹ n
B_pos : ∀ (n : ℕ), 0 < B n
B_ne_top : ∀ (n : ℕ), B n ≠ ∞
s : ℕ → Closeds α
hs : ∀ (N n m : ℕ), N ≤ n → N ≤ m → edist (s n) (s m) < B N
t0 : Set α :=
  ⋂ (n : ℕ), closure[PseudoEMetricSpace.toUniformSpace.toTopologicalSpace] (⋃ (m : ℕ), ⋃ (_ : m ≥ n), (↑(s m) : Set α))
t : Closeds α := { carrier := t0, isClosed' := ⋯ }
n : ℕ
x : α
hx : x ∈ s n
z : (l : ℕ) → ↥(s (n + l))
hz₀ : (↑(z 0) : α) = x
hz : ∀ (k : ℕ), edist (↑(z k) : α) (↑(z (k + 1)) : α) ≤ B n / HPow.hPow (α := ℝ≥0∞) 2 k
this_1 : CauchySeq.{u_1, 0} (α := α) fun (k : ℕ) ↦ (↑(z k) : α)
y : α
y_lim : Tendsto (fun (k : ℕ) ↦ (↑(z k) : α)) atTop (𝓝 y)
this : y ∈ t0
right : edist x y ≤ 2 * B n
⊢ y ∈ t0 ∧ edist x y ≤ 2 * B n

Tactic:
use this
-- Module: Mathlib.Topology.MetricSpace.Closeds
Goal:
α : Type u_1
β : Type u_2
inst : EMetricSpace α
inst_1 : EMetricSpace β
s_1 : Set α
inst_2 : CompleteSpace α
B : ℕ → ℝ≥0∞ := fun (n : ℕ) ↦ HPow.hPow (α := ℝ≥0∞) 2⁻¹ n
B_pos : ∀ (n : ℕ), 0 < B n
B_ne_top : ∀ (n : ℕ), B n ≠ ∞
s : ℕ → Closeds α
hs : ∀ (N n m : ℕ), N ≤ n → N ≤ m → edist (s n) (s m) < B N
t0 : Set α :=
  ⋂ (n : ℕ), closure[PseudoEMetricSpace.toUniformSpace.toTopologicalSpace] (⋃ (m : ℕ), ⋃ (_ : m ≥ n), (↑(s m) : Set α))
t : Closeds α := { carrier := t0, isClosed' := ⋯ }
n : ℕ
x : α
hx : x ∈ s n
z : (l : ℕ) → ↥(s (n + l))
hz₀ : (↑(z 0) : α) = x
hz : ∀ (k : ℕ), edist (↑(z k) : α) (↑(z (k + 1)) : α) ≤ B n / HPow.hPow (α := ℝ≥0∞) 2 k
this_1 : CauchySeq.{u_1, 0} (α := α) fun (k : ℕ) ↦ (↑(z k) : α)
y : α
y_lim : Tendsto (fun (k : ℕ) ↦ (↑(z k) : α)) atTop (𝓝 y)
this : y ∈ t0
right : edist (↑(z 0) : α) y ≤ 2 * B n
⊢ edist x y ≤ 2 * B n

Tactic:
rw [← hz₀]
-- Module: Mathlib.Topology.MetricSpace.Closeds
Goal:
α : Type u_1
β : Type u_2
inst : EMetricSpace α
inst_1 : EMetricSpace β
s_1 : Set α
inst_2 : CompleteSpace α
B : ℕ → ℝ≥0∞ := fun (n : ℕ) ↦ HPow.hPow (α := ℝ≥0∞) 2⁻¹ n
B_pos : ∀ (n : ℕ), 0 < B n
B_ne_top : ∀ (n : ℕ), B n ≠ ∞
s : ℕ → Closeds α
hs : ∀ (N n m : ℕ), N ≤ n → N ≤ m → edist (s n) (s m) < B N
t0 : Set α :=
  ⋂ (n : ℕ), closure[PseudoEMetricSpace.toUniformSpace.toTopologicalSpace] (⋃ (m : ℕ), ⋃ (_ : m ≥ n), (↑(s m) : Set α))
t : Closeds α := { carrier := t0, isClosed' := ⋯ }
n : ℕ
x : α
hx : x ∈ s n
z : (l : ℕ) → ↥(s (n + l))
hz₀ : (↑(z 0) : α) = x
hz : ∀ (k : ℕ), edist (↑(z k) : α) (↑(z (k + 1)) : α) ≤ B n / HPow.hPow (α := ℝ≥0∞) 2 k
this_1 : CauchySeq.{u_1, 0} (α := α) fun (k : ℕ) ↦ (↑(z k) : α)
y : α
y_lim : Tendsto (fun (k : ℕ) ↦ (↑(z k) : α)) atTop (𝓝 y)
this : y ∈ t0
⊢ edist (↑(z 0) : α) y ≤ 2 * B n

Tactic:
edist_le_of_edist_le_geometric_two_of_tendsto₀ (B n) hz y_lim

Premises used: edist_le_of_edist_le_geometric_two_of_tendsto₀
-- Module: Mathlib.Topology.MetricSpace.Closeds
Goal:
α : Type u_1
β : Type u_2
inst : EMetricSpace α
inst_1 : EMetricSpace β
s_1 : Set α
inst_2 : CompleteSpace α
B : ℕ → ℝ≥0∞ := fun (n : ℕ) ↦ HPow.hPow (α := ℝ≥0∞) 2⁻¹ n
B_pos : ∀ (n : ℕ), 0 < B n
B_ne_top : ∀ (n : ℕ), B n ≠ ∞
s : ℕ → Closeds α
hs : ∀ (N n m : ℕ), N ≤ n → N ≤ m → edist (s n) (s m) < B N
t0 : Set α :=
  ⋂ (n : ℕ), closure[PseudoEMetricSpace.toUniformSpace.toTopologicalSpace] (⋃ (m : ℕ), ⋃ (_ : m ≥ n), (↑(s m) : Set α))
t : Closeds α := { carrier := t0, isClosed' := ⋯ }
n : ℕ
x : α
hx : x ∈ s n
z : (l : ℕ) → ↥(s (n + l))
hz₀ : (↑(z 0) : α) = x
hz : ∀ (k : ℕ), edist (↑(z k) : α) (↑(z (k + 1)) : α) ≤ B n / HPow.hPow (α := ℝ≥0∞) 2 k
this_1 : CauchySeq.{u_1, 0} (α := α) fun (k : ℕ) ↦ (↑(z k) : α)
y : α
y_lim : Tendsto (fun (k : ℕ) ↦ (↑(z k) : α)) atTop (𝓝 y)
this : y ∈ t0
⊢ edist (↑(z 0) : α) y ≤ 2 * B n

Tactic:
exact edist_le_of_edist_le_geometric_two_of_tendsto₀ (B n) hz y_lim

Premises used: edist_le_of_edist_le_geometric_two_of_tendsto₀
-- Module: Mathlib.Topology.MetricSpace.Closeds
Goal:
α : Type u_1
β : Type u_2
inst : EMetricSpace α
inst_1 : EMetricSpace β
s_1 : Set α
inst_2 : CompleteSpace α
B : ℕ → ℝ≥0∞ := fun (n : ℕ) ↦ HPow.hPow (α := ℝ≥0∞) 2⁻¹ n
B_pos : ∀ (n : ℕ), 0 < B n
B_ne_top : ∀ (n : ℕ), B n ≠ ∞
s : ℕ → Closeds α
hs : ∀ (N n m : ℕ), N ≤ n → N ≤ m → edist (s n) (s m) < B N
t0 : Set α :=
  ⋂ (n : ℕ), closure[PseudoEMetricSpace.toUniformSpace.toTopologicalSpace] (⋃ (m : ℕ), ⋃ (_ : m ≥ n), (↑(s m) : Set α))
t : Closeds α := { carrier := t0, isClosed' := ⋯ }
⊢ ∀ (n : ℕ), ∀ x ∈ s n, ∃ y ∈ t0, edist x y ≤ 2 * B n

Tactic:
have I1 : ∀ n, ∀ x ∈ s n, ∃ y ∈ t0, edist x y ≤ 2 * B n := by
    /- This is the main difficulty of the proof. Starting from `x ∈ s n`, we want
           to find a point in `t0` which is close to `x`. Define inductively a sequence of
           points `z m` with `z n = x` and `z m ∈ s m` and `edist (z m) (z (m+1)) ≤ B m`. This is
           possible since the Hausdorff distance between `s m` and `s (m+1)` is at most `B m`.
           This sequence is a Cauchy sequence, therefore converging as the space is complete, to
           a limit which satisfies the required properties. -/
    intro n x hx
    obtain ⟨z, hz₀, hz⟩ :
      ∃ z : ∀ l, s (n + l), (z 0 : α) = x ∧ ∀ k, edist (z k : α) (z (k + 1) : α) ≤ B n / 2 ^ k := by
      -- We prove existence of the sequence by induction.
      have : ∀ (l) (z : s (n + l)), ∃ z' : s (n + l + 1), edist (z : α) z' ≤ B n / 2 ^ l := by
        intro l z
        obtain ⟨z', z'_mem, hz'⟩ : ∃ z' ∈ s (n + l + 1), edist (z : α) z' < B n / 2 ^ l := by
          refine exists_edist_lt_of_hausdorffEDist_lt (s := s (n + l)) z.2 ?_
          simp only [ENNReal.inv_pow, div_eq_mul_inv]
          rw [← pow_add]
          apply hs <;> simp
        exact ⟨⟨z', z'_mem⟩, le_of_lt hz'⟩
      use fun k => Nat.recOn k ⟨x, hx⟩ fun l z => (this l z).choose
      simp only [Nat.add_zero, Nat.rec_zero, true_and]
      exact fun k => (this k _).choose_spec
    -- it follows from the previous bound that `z` is a Cauchy sequence
    have : CauchySeq fun k => (z k : α) := cauchySeq_of_edist_le_geometric_two (B n) (B_ne_top n) hz
    -- therefore, it converges
    rcases cauchySeq_tendsto_of_complete this with ⟨y, y_lim⟩
    use y
    -- the limit point `y` will be the desired point, in `t0` and close to our initial point `x`.
    -- First, we check it belongs to `t0`.
    have : y ∈ t0 :=
      mem_iInter.2 fun k =>
        mem_closure_of_tendsto y_lim
          (by
            simp only [exists_prop, Set.mem_iUnion, Filter.eventually_atTop]
            exact ⟨k, fun m hm => ⟨n + m, by lia, (z m).2⟩⟩)
    use this
    -- Then, we check that `y` is close to `x = z n`. This follows from the fact that `y`
    -- is the limit of `z k`, and the distance between `z n` and `z k` has already been estimated.
    rw [← hz₀]
    exact edist_le_of_edist_le_geometric_two_of_tendsto₀ (B n) hz y_lim
-- Module: Mathlib.Topology.MetricSpace.Closeds
Goal:
α : Type u_1
β : Type u_2
inst : EMetricSpace α
inst_1 : EMetricSpace β
s_1 : Set α
inst_2 : CompleteSpace α
B : ℕ → ℝ≥0∞ := fun (n : ℕ) ↦ HPow.hPow (α := ℝ≥0∞) 2⁻¹ n
B_pos : ∀ (n : ℕ), 0 < B n
B_ne_top : ∀ (n : ℕ), B n ≠ ∞
s : ℕ → Closeds α
hs : ∀ (N n m : ℕ), N ≤ n → N ≤ m → edist (s n) (s m) < B N
t0 : Set α :=
  ⋂ (n : ℕ), closure[PseudoEMetricSpace.toUniformSpace.toTopologicalSpace] (⋃ (m : ℕ), ⋃ (_ : m ≥ n), (↑(s m) : Set α))
t : Closeds α := { carrier := t0, isClosed' := ⋯ }
I1 : ∀ (n : ℕ), ∀ x ∈ s n, ∃ y ∈ t0, edist x y ≤ 2 * B n
n : ℕ
x : α
xt0 : x ∈ t0
⊢ Membership.mem (γ := Set α)
    (closure[PseudoEMetricSpace.toUniformSpace.toTopologicalSpace] (⋃ (m : ℕ), ⋃ (_ : m ≥ n), (↑(s m) : Set α))) x

Tactic:
apply mem_iInter.1 xt0 n

Premises used: Set.mem_iInter, Iff.mp
-- Module: Mathlib.Topology.MetricSpace.Closeds
Goal:
α : Type u_1
β : Type u_2
inst : EMetricSpace α
inst_1 : EMetricSpace β
s_1 : Set α
inst_2 : CompleteSpace α
B : ℕ → ℝ≥0∞ := fun (n : ℕ) ↦ HPow.hPow (α := ℝ≥0∞) 2⁻¹ n
B_pos : ∀ (n : ℕ), 0 < B n
B_ne_top : ∀ (n : ℕ), B n ≠ ∞
s : ℕ → Closeds α
hs : ∀ (N n m : ℕ), N ≤ n → N ≤ m → edist (s n) (s m) < B N
t0 : Set α :=
  ⋂ (n : ℕ), closure[PseudoEMetricSpace.toUniformSpace.toTopologicalSpace] (⋃ (m : ℕ), ⋃ (_ : m ≥ n), (↑(s m) : Set α))
t : Closeds α := { carrier := t0, isClosed' := ⋯ }
I1 : ∀ (n : ℕ), ∀ x ∈ s n, ∃ y ∈ t0, edist x y ≤ 2 * B n
n : ℕ
x : α
xt0 : x ∈ t0
⊢ Membership.mem (γ := Set α)
    (closure[PseudoEMetricSpace.toUniformSpace.toTopologicalSpace] (⋃ (m : ℕ), ⋃ (_ : m ≥ n), (↑(s m) : Set α))) x

Tactic:
have : x ∈ closure (⋃ m ≥ n, s m : Set α) := by apply mem_iInter.1 xt0 n
-- Module: Mathlib.Topology.MetricSpace.Closeds
Goal:
α : Type u_1
β : Type u_2
inst : EMetricSpace α
inst_1 : EMetricSpace β
s_1 : Set α
inst_2 : CompleteSpace α
B : ℕ → ℝ≥0∞ := fun (n : ℕ) ↦ HPow.hPow (α := ℝ≥0∞) 2⁻¹ n
B_pos : ∀ (n : ℕ), 0 < B n
B_ne_top : ∀ (n : ℕ), B n ≠ ∞
s : ℕ → Closeds α
hs : ∀ (N n m : ℕ), N ≤ n → N ≤ m → edist (s n) (s m) < B N
t0 : Set α :=
  ⋂ (n : ℕ), closure[PseudoEMetricSpace.toUniformSpace.toTopologicalSpace] (⋃ (m : ℕ), ⋃ (_ : m ≥ n), (↑(s m) : Set α))
t : Closeds α := { carrier := t0, isClosed' := ⋯ }
I1 : ∀ (n : ℕ), ∀ x ∈ s n, ∃ y ∈ t0, edist x y ≤ 2 * B n
n : ℕ
x : α
xt0 : x ∈ t0
this :
  Membership.mem (γ := Set α)
    (closure[PseudoEMetricSpace.toUniformSpace.toTopologicalSpace] (⋃ (m : ℕ), ⋃ (_ : m ≥ n), (↑(s m) : Set α))) x
obtain :
  ∀ (z : α) (hz : Membership.mem (γ := Set α) (⋃ (m : ℕ), ⋃ (_ : m ≥ n), (↑(s m) : Set α)) z) (Dxz : edist x z < B n),
    ∃ y ∈ s n, edist x y ≤ 2 * B n
⊢ ∃ y ∈ s n, edist x y ≤ 2 * B n

Tactic:
obtain ⟨z : α, hz, Dxz : edist x z < B n⟩ := EMetric.mem_closure_iff.1 this (B n) (B_pos n)

Premises used: Iff.mp, EMetric.mem_closure_iff
-- Module: Mathlib.Topology.MetricSpace.Closeds
Goal:
α : Type u_1
β : Type u_2
inst : EMetricSpace α
inst_1 : EMetricSpace β
s_1 : Set α
inst_2 : CompleteSpace α
B : ℕ → ℝ≥0∞ := fun (n : ℕ) ↦ HPow.hPow (α := ℝ≥0∞) 2⁻¹ n
B_pos : ∀ (n : ℕ), 0 < B n
B_ne_top : ∀ (n : ℕ), B n ≠ ∞
s : ℕ → Closeds α
hs : ∀ (N n m : ℕ), N ≤ n → N ≤ m → edist (s n) (s m) < B N
t0 : Set α :=
  ⋂ (n : ℕ), closure[PseudoEMetricSpace.toUniformSpace.toTopologicalSpace] (⋃ (m : ℕ), ⋃ (_ : m ≥ n), (↑(s m) : Set α))
t : Closeds α := { carrier := t0, isClosed' := ⋯ }
I1 : ∀ (n : ℕ), ∀ x ∈ s n, ∃ y ∈ t0, edist x y ≤ 2 * B n
n : ℕ
x : α
xt0 : x ∈ t0
this :
  Membership.mem (γ := Set α)
    (closure[PseudoEMetricSpace.toUniformSpace.toTopologicalSpace] (⋃ (m : ℕ), ⋃ (_ : m ≥ n), (↑(s m) : Set α))) x
z : α
hz : Membership.mem (γ := Set α) (⋃ (m : ℕ), ⋃ (_ : m ≥ n), (↑(s m) : Set α)) z
Dxz : edist x z < B n
⊢ ∃ i ≥ n, z ∈ (↑(s i) : Set α)

Tactic:
simp only [exists_prop, Set.mem_iUnion] at hz

Premises used: Set.mem_iUnion, exists_prop
-- Module: Mathlib.Topology.MetricSpace.Closeds
Goal:
α : Type u_1
β : Type u_2
inst : EMetricSpace α
inst_1 : EMetricSpace β
s_1 : Set α
inst_2 : CompleteSpace α
B : ℕ → ℝ≥0∞ := fun (n : ℕ) ↦ HPow.hPow (α := ℝ≥0∞) 2⁻¹ n
B_pos : ∀ (n : ℕ), 0 < B n
B_ne_top : ∀ (n : ℕ), B n ≠ ∞
s : ℕ → Closeds α
hs : ∀ (N n m : ℕ), N ≤ n → N ≤ m → edist (s n) (s m) < B N
t0 : Set α :=
  ⋂ (n : ℕ), closure[PseudoEMetricSpace.toUniformSpace.toTopologicalSpace] (⋃ (m : ℕ), ⋃ (_ : m ≥ n), (↑(s m) : Set α))
t : Closeds α := { carrier := t0, isClosed' := ⋯ }
I1 : ∀ (n : ℕ), ∀ x ∈ s n, ∃ y ∈ t0, edist x y ≤ 2 * B n
n : ℕ
x : α
xt0 : x ∈ t0
this :
  Membership.mem (γ := Set α)
    (closure[PseudoEMetricSpace.toUniformSpace.toTopologicalSpace] (⋃ (m : ℕ), ⋃ (_ : m ≥ n), (↑(s m) : Set α))) x
z : α
Dxz : edist x z < B n
hz : ∃ i ≥ n, z ∈ (↑(s i) : Set α)
obtain : ∀ (m : ℕ) (m_ge_n : m ≥ n) (hm : z ∈ (↑(s m) : Set α)), ∃ y ∈ s n, edist x y ≤ 2 * B n
⊢ ∃ y ∈ s n, edist x y ≤ 2 * B n

Tactic:
obtain ⟨m : ℕ, m_ge_n : m ≥ n, hm : z ∈ (s m : Set α)⟩ := hz
-- Module: Mathlib.Topology.MetricSpace.Closeds
Goal:
α : Type u_1
β : Type u_2
inst : EMetricSpace α
inst_1 : EMetricSpace β
s_1 : Set α
inst_2 : CompleteSpace α
B : ℕ → ℝ≥0∞ := fun (n : ℕ) ↦ HPow.hPow (α := ℝ≥0∞) 2⁻¹ n
B_pos : ∀ (n : ℕ), 0 < B n
B_ne_top : ∀ (n : ℕ), B n ≠ ∞
s : ℕ → Closeds α
hs : ∀ (N n m : ℕ), N ≤ n → N ≤ m → edist (s n) (s m) < B N
t0 : Set α :=
  ⋂ (n : ℕ), closure[PseudoEMetricSpace.toUniformSpace.toTopologicalSpace] (⋃ (m : ℕ), ⋃ (_ : m ≥ n), (↑(s m) : Set α))
t : Closeds α := { carrier := t0, isClosed' := ⋯ }
I1 : ∀ (n : ℕ), ∀ x ∈ s n, ∃ y ∈ t0, edist x y ≤ 2 * B n
n : ℕ
x : α
xt0 : x ∈ t0
this :
  Membership.mem (γ := Set α)
    (closure[PseudoEMetricSpace.toUniformSpace.toTopologicalSpace] (⋃ (m : ℕ), ⋃ (_ : m ≥ n), (↑(s m) : Set α))) x
z : α
Dxz : edist x z < B n
m : ℕ
m_ge_n : m ≥ n
hm : z ∈ (↑(s m) : Set α)
⊢ hausdorffEDist (↑(s m) : Set α) (↑(s n) : Set α) < B n

Tactic:
have : hausdorffEDist (s m : Set α) (s n) < B n := hs n m n m_ge_n (le_refl n)
-- Module: Mathlib.Topology.MetricSpace.Closeds
Goal:
α : Type u_1
β : Type u_2
inst : EMetricSpace α
inst_1 : EMetricSpace β
s_1 : Set α
inst_2 : CompleteSpace α
B : ℕ → ℝ≥0∞ := fun (n : ℕ) ↦ HPow.hPow (α := ℝ≥0∞) 2⁻¹ n
B_pos : ∀ (n : ℕ), 0 < B n
B_ne_top : ∀ (n : ℕ), B n ≠ ∞
s : ℕ → Closeds α
hs : ∀ (N n m : ℕ), N ≤ n → N ≤ m → edist (s n) (s m) < B N
t0 : Set α :=
  ⋂ (n : ℕ), closure[PseudoEMetricSpace.toUniformSpace.toTopologicalSpace] (⋃ (m : ℕ), ⋃ (_ : m ≥ n), (↑(s m) : Set α))
t : Closeds α := { carrier := t0, isClosed' := ⋯ }
I1 : ∀ (n : ℕ), ∀ x ∈ s n, ∃ y ∈ t0, edist x y ≤ 2 * B n
n : ℕ
x : α
xt0 : x ∈ t0
this_1 :
  Membership.mem (γ := Set α)
    (closure[PseudoEMetricSpace.toUniformSpace.toTopologicalSpace] (⋃ (m : ℕ), ⋃ (_ : m ≥ n), (↑(s m) : Set α))) x
z : α
Dxz : edist x z < B n
m : ℕ
m_ge_n : m ≥ n
hm : z ∈ (↑(s m) : Set α)
this : hausdorffEDist (↑(s m) : Set α) (↑(s n) : Set α) < B n
obtain : ∀ (y : α) (hy : y ∈ (↑(s n) : Set α)) (Dzy : edist z y < B n), ∃ y ∈ s n, edist x y ≤ 2 * B n
⊢ ∃ y ∈ s n, edist x y ≤ 2 * B n

Tactic:
obtain ⟨y : α, hy : y ∈ (s n : Set α), Dzy : edist z y < B n⟩ :=
      exists_edist_lt_of_hausdorffEDist_lt hm this

Premises used: SetLike.coe, Metric.exists_edist_lt_of_hausdorffEDist_lt
-- Module: Mathlib.Topology.MetricSpace.Closeds
Goal:
α : Type u_1
β : Type u_2
inst : EMetricSpace α
inst_1 : EMetricSpace β
s_1 : Set α
inst_2 : CompleteSpace α
B : ℕ → ℝ≥0∞ := fun (n : ℕ) ↦ HPow.hPow (α := ℝ≥0∞) 2⁻¹ n
B_pos : ∀ (n : ℕ), 0 < B n
B_ne_top : ∀ (n : ℕ), B n ≠ ∞
s : ℕ → Closeds α
hs : ∀ (N n m : ℕ), N ≤ n → N ≤ m → edist (s n) (s m) < B N
t0 : Set α :=
  ⋂ (n : ℕ), closure[PseudoEMetricSpace.toUniformSpace.toTopologicalSpace] (⋃ (m : ℕ), ⋃ (_ : m ≥ n), (↑(s m) : Set α))
t : Closeds α := { carrier := t0, isClosed' := ⋯ }
I1 : ∀ (n : ℕ), ∀ x ∈ s n, ∃ y ∈ t0, edist x y ≤ 2 * B n
n : ℕ
x : α
xt0 : x ∈ t0
this_1 :
  Membership.mem (γ := Set α)
    (closure[PseudoEMetricSpace.toUniformSpace.toTopologicalSpace] (⋃ (m : ℕ), ⋃ (_ : m ≥ n), (↑(s m) : Set α))) x
z : α
Dxz : edist x z < B n
m : ℕ
m_ge_n : m ≥ n
hm : z ∈ (↑(s m) : Set α)
this : hausdorffEDist (↑(s m) : Set α) (↑(s n) : Set α) < B n
y : α
hy : y ∈ (↑(s n) : Set α)
Dzy : edist z y < B n
⊢ edist x z + edist z y ≤ B n + B n

Tactic:
gcongr
-- Module: Mathlib.Topology.MetricSpace.Closeds
Goal:
α : Type u_1
β : Type u_2
inst : EMetricSpace α
inst_1 : EMetricSpace β
s_1 : Set α
inst_2 : CompleteSpace α
B : ℕ → ℝ≥0∞ := fun (n : ℕ) ↦ HPow.hPow (α := ℝ≥0∞) 2⁻¹ n
B_pos : ∀ (n : ℕ), 0 < B n
B_ne_top : ∀ (n : ℕ), B n ≠ ∞
s : ℕ → Closeds α
hs : ∀ (N n m : ℕ), N ≤ n → N ≤ m → edist (s n) (s m) < B N
t0 : Set α :=
  ⋂ (n : ℕ), closure[PseudoEMetricSpace.toUniformSpace.toTopologicalSpace] (⋃ (m : ℕ), ⋃ (_ : m ≥ n), (↑(s m) : Set α))
t : Closeds α := { carrier := t0, isClosed' := ⋯ }
I1 : ∀ (n : ℕ), ∀ x ∈ s n, ∃ y ∈ t0, edist x y ≤ 2 * B n
n : ℕ
x : α
xt0 : x ∈ t0
this_1 :
  Membership.mem (γ := Set α)
    (closure[PseudoEMetricSpace.toUniformSpace.toTopologicalSpace] (⋃ (m : ℕ), ⋃ (_ : m ≥ n), (↑(s m) : Set α))) x
z : α
Dxz : edist x z < B n
m : ℕ
m_ge_n : m ≥ n
hm : z ∈ (↑(s m) : Set α)
this : hausdorffEDist (↑(s m) : Set α) (↑(s n) : Set α) < B n
y : α
hy : y ∈ (↑(s n) : Set α)
Dzy : edist z y < B n
⊢ ∃ y ∈ s n, edist x y ≤ 2 * B n

Tactic:
exact
      ⟨y, hy,
        calc
          edist x y ≤ edist x z + edist z y := edist_triangle _ _ _
          _ ≤ B n + B n := by gcongr
          _ = 2 * B n := (two_mul _).symm
          ⟩
-- Module: Mathlib.Topology.MetricSpace.Closeds
Goal:
α : Type u_1
β : Type u_2
inst : EMetricSpace α
inst_1 : EMetricSpace β
s_1 : Set α
inst_2 : CompleteSpace α
B : ℕ → ℝ≥0∞ := fun (n : ℕ) ↦ HPow.hPow (α := ℝ≥0∞) 2⁻¹ n
B_pos : ∀ (n : ℕ), 0 < B n
B_ne_top : ∀ (n : ℕ), B n ≠ ∞
s : ℕ → Closeds α
hs : ∀ (N n m : ℕ), N ≤ n → N ≤ m → edist (s n) (s m) < B N
t0 : Set α :=
  ⋂ (n : ℕ), closure[PseudoEMetricSpace.toUniformSpace.toTopologicalSpace] (⋃ (m : ℕ), ⋃ (_ : m ≥ n), (↑(s m) : Set α))
t : Closeds α := { carrier := t0, isClosed' := ⋯ }
I1 : ∀ (n : ℕ), ∀ x ∈ s n, ∃ y ∈ t0, edist x y ≤ 2 * B n
⊢ ∀ (n : ℕ), ∀ x ∈ t0, ∃ y ∈ s n, edist x y ≤ 2 * B n

Tactic:
have I2 : ∀ n, ∀ x ∈ t0, ∃ y ∈ s n, edist x y ≤ 2 * B n := by
    /- For the (much easier) reverse inequality, we start from a point `x ∈ t0` and we want
            to find a point `y ∈ s n` which is close to `x`.
            `x` belongs to `t0`, the intersection of the closures. In particular, it is well
            approximated by a point `z` in `⋃m≥n, s m`, say in `s m`. Since `s m` and
            `s n` are close, this point is itself well approximated by a point `y` in `s n`,
            as required. -/
    intro n x xt0
    have : x ∈ closure (⋃ m ≥ n, s m : Set α) := by apply mem_iInter.1 xt0 n
    obtain ⟨z : α, hz, Dxz : edist x z < B n⟩ := EMetric.mem_closure_iff.1 this (B n) (B_pos n)
    simp only [exists_prop, Set.mem_iUnion] at hz
    obtain ⟨m : ℕ, m_ge_n : m ≥ n, hm : z ∈ (s m : Set α)⟩ := hz
    have : hausdorffEDist (s m : Set α) (s n) < B n := hs n m n m_ge_n (le_refl n)
    obtain ⟨y : α, hy : y ∈ (s n : Set α), Dzy : edist z y < B n⟩ :=
      exists_edist_lt_of_hausdorffEDist_lt hm this
    exact
      ⟨y, hy,
        calc
          edist x y ≤ edist x z + edist z y := edist_triangle _ _ _
          _ ≤ B n + B n := by gcongr
          _ = 2 * B n := (two_mul _).symm
          ⟩
-- Module: Mathlib.Topology.MetricSpace.Closeds
Goal:
α : Type u_1
β : Type u_2
inst : EMetricSpace α
inst_1 : EMetricSpace β
s_1 : Set α
inst_2 : CompleteSpace α
B : ℕ → ℝ≥0∞ := fun (n : ℕ) ↦ HPow.hPow (α := ℝ≥0∞) 2⁻¹ n
B_pos : ∀ (n : ℕ), 0 < B n
B_ne_top : ∀ (n : ℕ), B n ≠ ∞
s : ℕ → Closeds α
hs : ∀ (N n m : ℕ), N ≤ n → N ≤ m → edist (s n) (s m) < B N
t0 : Set α :=
  ⋂ (n : ℕ), closure[PseudoEMetricSpace.toUniformSpace.toTopologicalSpace] (⋃ (m : ℕ), ⋃ (_ : m ≥ n), (↑(s m) : Set α))
t : Closeds α := { carrier := t0, isClosed' := ⋯ }
I1 : ∀ (n : ℕ), ∀ x ∈ s n, ∃ y ∈ t0, edist x y ≤ 2 * B n
I2 : ∀ (n : ℕ), ∀ x ∈ t0, ∃ y ∈ s n, edist x y ≤ 2 * B n
⊢ ∀ (n : ℕ), edist (s n) t ≤ 2 * B n

Tactic:
have main : ∀ n : ℕ, edist (s n) t ≤ 2 * B n := fun n =>
    hausdorffEDist_le_of_mem_edist (I1 n) (I2 n)
-- Module: Mathlib.Topology.MetricSpace.Closeds
Goal:
α : Type u_1
β : Type u_2
inst : EMetricSpace α
inst_1 : EMetricSpace β
s_1 : Set α
inst_2 : CompleteSpace α
B : ℕ → ℝ≥0∞ := fun (n : ℕ) ↦ HPow.hPow (α := ℝ≥0∞) 2⁻¹ n
B_pos : ∀ (n : ℕ), 0 < B n
B_ne_top : ∀ (n : ℕ), B n ≠ ∞
s : ℕ → Closeds α
hs : ∀ (N n m : ℕ), N ≤ n → N ≤ m → edist (s n) (s m) < B N
t0 : Set α :=
  ⋂ (n : ℕ), closure[PseudoEMetricSpace.toUniformSpace.toTopologicalSpace] (⋃ (m : ℕ), ⋃ (_ : m ≥ n), (↑(s m) : Set α))
t : Closeds α := { carrier := t0, isClosed' := ⋯ }
I1 : ∀ (n : ℕ), ∀ x ∈ s n, ∃ y ∈ t0, edist x y ≤ 2 * B n
I2 : ∀ (n : ℕ), ∀ x ∈ t0, ∃ y ∈ s n, edist x y ≤ 2 * B n
main : ∀ (n : ℕ), edist (s n) t ≤ 2 * B n
⊢ Tendsto s atTop (𝓝 t)

Tactic:
EMetric.tendsto_atTop.2 fun ε εpos => ?_

Premises used: Iff.mpr, EMetric.tendsto_atTop
-- Module: Mathlib.Topology.MetricSpace.Closeds
Goal:
α : Type u_1
β : Type u_2
inst : EMetricSpace α
inst_1 : EMetricSpace β
s_1 : Set α
inst_2 : CompleteSpace α
B : ℕ → ℝ≥0∞ := fun (n : ℕ) ↦ HPow.hPow (α := ℝ≥0∞) 2⁻¹ n
B_pos : ∀ (n : ℕ), 0 < B n
B_ne_top : ∀ (n : ℕ), B n ≠ ∞
s : ℕ → Closeds α
hs : ∀ (N n m : ℕ), N ≤ n → N ≤ m → edist (s n) (s m) < B N
t0 : Set α :=
  ⋂ (n : ℕ), closure[PseudoEMetricSpace.toUniformSpace.toTopologicalSpace] (⋃ (m : ℕ), ⋃ (_ : m ≥ n), (↑(s m) : Set α))
t : Closeds α := { carrier := t0, isClosed' := ⋯ }
I1 : ∀ (n : ℕ), ∀ x ∈ s n, ∃ y ∈ t0, edist x y ≤ 2 * B n
I2 : ∀ (n : ℕ), ∀ x ∈ t0, ∃ y ∈ s n, edist x y ≤ 2 * B n
main : ∀ (n : ℕ), edist (s n) t ≤ 2 * B n
h : ∀ (ε : ℝ≥0∞) (εpos : ε > 0), ∃ (N : ℕ), ∀ n ≥ N, edist (s n) t < ε
⊢ Tendsto s atTop (𝓝 t)

Tactic:
refine EMetric.tendsto_atTop.2 fun ε εpos => ?_

Premises used: Iff.mpr, EMetric.tendsto_atTop
-- Module: Mathlib.Topology.MetricSpace.Closeds
Goal:
α : Type u_1
β : Type u_2
inst : EMetricSpace α
inst_1 : EMetricSpace β
s_1 : Set α
inst_2 : CompleteSpace α
B : ℕ → ℝ≥0∞ := fun (n : ℕ) ↦ HPow.hPow (α := ℝ≥0∞) 2⁻¹ n
B_pos : ∀ (n : ℕ), 0 < B n
B_ne_top : ∀ (n : ℕ), B n ≠ ∞
s : ℕ → Closeds α
hs : ∀ (N n m : ℕ), N ≤ n → N ≤ m → edist (s n) (s m) < B N
t0 : Set α :=
  ⋂ (n : ℕ), closure[PseudoEMetricSpace.toUniformSpace.toTopologicalSpace] (⋃ (m : ℕ), ⋃ (_ : m ≥ n), (↑(s m) : Set α))
t : Closeds α := { carrier := t0, isClosed' := ⋯ }
I1 : ∀ (n : ℕ), ∀ x ∈ s n, ∃ y ∈ t0, edist x y ≤ 2 * B n
I2 : ∀ (n : ℕ), ∀ x ∈ t0, ∃ y ∈ s n, edist x y ≤ 2 * B n
main : ∀ (n : ℕ), edist (s n) t ≤ 2 * B n
ε : ℝ≥0∞
εpos : ε > 0
⊢ LT.lt (α := ℝ≥0∞) 2⁻¹ 1

Tactic:
simp
-- Module: Mathlib.Topology.MetricSpace.Closeds
Goal:
α : Type u_1
β : Type u_2
inst : EMetricSpace α
inst_1 : EMetricSpace β
s_1 : Set α
inst_2 : CompleteSpace α
B : ℕ → ℝ≥0∞ := fun (n : ℕ) ↦ HPow.hPow (α := ℝ≥0∞) 2⁻¹ n
B_pos : ∀ (n : ℕ), 0 < B n
B_ne_top : ∀ (n : ℕ), B n ≠ ∞
s : ℕ → Closeds α
hs : ∀ (N n m : ℕ), N ≤ n → N ≤ m → edist (s n) (s m) < B N
t0 : Set α :=
  ⋂ (n : ℕ), closure[PseudoEMetricSpace.toUniformSpace.toTopologicalSpace] (⋃ (m : ℕ), ⋃ (_ : m ≥ n), (↑(s m) : Set α))
t : Closeds α := { carrier := t0, isClosed' := ⋯ }
I1 : ∀ (n : ℕ), ∀ x ∈ s n, ∃ y ∈ t0, edist x y ≤ 2 * B n
I2 : ∀ (n : ℕ), ∀ x ∈ t0, ∃ y ∈ s n, edist x y ≤ 2 * B n
main : ∀ (n : ℕ), edist (s n) t ≤ 2 * B n
ε : ℝ≥0∞
εpos : ε > 0
⊢ Ne (α := ℝ≥0∞) 2 ∞

Tactic:
simp