-- Mathlib/Topology/MetricSpace/Bounded.lean
theorem _root_.IsComplete.nonempty_iInter_of_nonempty_biInter {s : ℕ → Set α}
    (h0 : IsComplete (s 0)) (hs : ∀ n, IsClosed (s n)) (h's : ∀ n, IsBounded (s n))
    (h : ∀ N, (⋂ n ≤ N, s n).Nonempty) (h' : Tendsto (fun n => diam (s n)) atTop (𝓝 0)) :
    (⋂ n, s n).Nonempty

Proof state:
α : Type u
inst✝ : PseudoMetricSpace α
s : ℕ → Set α
h0 : IsComplete (s 0)
hs : ∀ (n : ℕ), IsClosed (s n)
h's : ∀ (n : ℕ), Bornology.IsBounded (s n)
h : ∀ (N : ℕ), (⋂ n, ⋂ (_ : n ≤ N), s n).Nonempty
h' : Tendsto (fun n => diam (s n)) atTop (𝓝 0)
u : ℕ → α := fun N => ⋯.some
I : ∀ (n N : ℕ), n ≤ N → u N ∈ s n
⊢ ∀ (n m N : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) ≤ diam (s N)

Tactic:
intro m n N hm hn

Result:
α : Type u
inst✝ : PseudoMetricSpace α
s : ℕ → Set α
h0 : IsComplete (s 0)
hs : ∀ (n : ℕ), IsClosed (s n)
h's : ∀ (n : ℕ), Bornology.IsBounded (s n)
h : ∀ (N : ℕ), (⋂ n, ⋂ (_ : n ≤ N), s n).Nonempty
h' : Tendsto (fun n => diam (s n)) atTop (𝓝 0)
u : ℕ → α := fun N => ⋯.some
I : ∀ (n N : ℕ), n ≤ N → u N ∈ s n
m n N : ℕ
hm : N ≤ m
hn : N ≤ n
⊢ dist (u m) (u n) ≤ diam (s N)

Proof state:
case intro.intro
α : Type u
inst✝ : PseudoMetricSpace α
s : ℕ → Set α
h0 : IsComplete (s 0)
hs : ∀ (n : ℕ), IsClosed (s n)
h's : ∀ (n : ℕ), Bornology.IsBounded (s n)
h : ∀ (N : ℕ), (⋂ n, ⋂ (_ : n ≤ N), s n).Nonempty
h' : Tendsto (fun n => diam (s n)) atTop (𝓝 0)
u : ℕ → α := fun N => ⋯.some
I : ∀ (n N : ℕ), n ≤ N → u N ∈ s n
this : CauchySeq u
x : α
xlim : Tendsto (fun n => u n) atTop (𝓝 x)
n : ℕ
⊢ x ∈ s n

Tactic:
apply (hs n).mem_of_tendsto xlim

Result:
case intro.intro
α : Type u
inst✝ : PseudoMetricSpace α
s : ℕ → Set α
h0 : IsComplete (s 0)
hs : ∀ (n : ℕ), IsClosed (s n)
h's : ∀ (n : ℕ), Bornology.IsBounded (s n)
h : ∀ (N : ℕ), (⋂ n, ⋂ (_ : n ≤ N), s n).Nonempty
h' : Tendsto (fun n => diam (s n)) atTop (𝓝 0)
u : ℕ → α := fun N => ⋯.some
I : ∀ (n N : ℕ), n ≤ N → u N ∈ s n
this : CauchySeq u
x : α
xlim : Tendsto (fun n => u n) atTop (𝓝 x)
n : ℕ
⊢ ∀ᶠ (x : ℕ) in atTop, u x ∈ s n

Proof state:
case h
α : Type u
inst✝ : PseudoMetricSpace α
s : ℕ → Set α
h0 : IsComplete (s 0)
hs : ∀ (n : ℕ), IsClosed (s n)
h's : ∀ (n : ℕ), Bornology.IsBounded (s n)
h : ∀ (N : ℕ), (⋂ n, ⋂ (_ : n ≤ N), s n).Nonempty
h' : Tendsto (fun n => diam (s n)) atTop (𝓝 0)
u : ℕ → α := fun N => ⋯.some
I : ∀ (n N : ℕ), n ≤ N → u N ∈ s n
this : CauchySeq u
x : α
xlim : Tendsto (fun n => u n) atTop (𝓝 x)
n p : ℕ
hp : p ∈ Ici n
⊢ u p ∈ s n

Tactic:
exact I n p hp

Result:
no goals

Proof state:
α : Type u
inst✝ : PseudoMetricSpace α
s : ℕ → Set α
h0 : IsComplete (s 0)
hs : ∀ (n : ℕ), IsClosed (s n)
h's : ∀ (n : ℕ), Bornology.IsBounded (s n)
h : ∀ (N : ℕ), (⋂ n, ⋂ (_ : n ≤ N), s n).Nonempty
h' : Tendsto (fun n => diam (s n)) atTop (𝓝 0)
u : ℕ → α := fun N => ⋯.some
I : ∀ (n N : ℕ), n ≤ N → u N ∈ s n
this : CauchySeq u
⊢ (⋂ n, s n).Nonempty

Tactic:
obtain ⟨x, -, xlim⟩ : ∃ x ∈ s 0, Tendsto (fun n : ℕ => u n) atTop (𝓝 x) :=
  cauchySeq_tendsto_of_isComplete h0 (fun n => I 0 n (zero_le _)) this

Result:
case intro.intro
α : Type u
inst✝ : PseudoMetricSpace α
s : ℕ → Set α
h0 : IsComplete (s 0)
hs : ∀ (n : ℕ), IsClosed (s n)
h's : ∀ (n : ℕ), Bornology.IsBounded (s n)
h : ∀ (N : ℕ), (⋂ n, ⋂ (_ : n ≤ N), s n).Nonempty
h' : Tendsto (fun n => diam (s n)) atTop (𝓝 0)
u : ℕ → α := fun N => ⋯.some
I : ∀ (n N : ℕ), n ≤ N → u N ∈ s n
this : CauchySeq u
x : α
xlim : Tendsto (fun n => u n) atTop (𝓝 x)
⊢ (⋂ n, s n).Nonempty

Proof state:
α : Type u
inst✝ : PseudoMetricSpace α
s : ℕ → Set α
h0 : IsComplete (s 0)
hs : ∀ (n : ℕ), IsClosed (s n)
h's : ∀ (n : ℕ), Bornology.IsBounded (s n)
h : ∀ (N : ℕ), (⋂ n, ⋂ (_ : n ≤ N), s n).Nonempty
h' : Tendsto (fun n => diam (s n)) atTop (𝓝 0)
u : ℕ → α := fun N => ⋯.some
I : ∀ (n N : ℕ), n ≤ N → u N ∈ s n
⊢ CauchySeq u

Tactic:
apply cauchySeq_of_le_tendsto_0 _ _ h'

Result:
α : Type u
inst✝ : PseudoMetricSpace α
s : ℕ → Set α
h0 : IsComplete (s 0)
hs : ∀ (n : ℕ), IsClosed (s n)
h's : ∀ (n : ℕ), Bornology.IsBounded (s n)
h : ∀ (N : ℕ), (⋂ n, ⋂ (_ : n ≤ N), s n).Nonempty
h' : Tendsto (fun n => diam (s n)) atTop (𝓝 0)
u : ℕ → α := fun N => ⋯.some
I : ∀ (n N : ℕ), n ≤ N → u N ∈ s n
⊢ ∀ (n m N : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) ≤ diam (s N)

Proof state:
α : Type u
inst✝ : PseudoMetricSpace α
s : ℕ → Set α
h0 : IsComplete (s 0)
hs : ∀ (n : ℕ), IsClosed (s n)
h's : ∀ (n : ℕ), Bornology.IsBounded (s n)
h : ∀ (N : ℕ), (⋂ n, ⋂ (_ : n ≤ N), s n).Nonempty
h' : Tendsto (fun n => diam (s n)) atTop (𝓝 0)
u : ℕ → α := fun N => ⋯.some
⊢ ∀ (n N : ℕ), n ≤ N → u N ∈ s n

Tactic:
intro n N hn

Result:
α : Type u
inst✝ : PseudoMetricSpace α
s : ℕ → Set α
h0 : IsComplete (s 0)
hs : ∀ (n : ℕ), IsClosed (s n)
h's : ∀ (n : ℕ), Bornology.IsBounded (s n)
h : ∀ (N : ℕ), (⋂ n, ⋂ (_ : n ≤ N), s n).Nonempty
h' : Tendsto (fun n => diam (s n)) atTop (𝓝 0)
u : ℕ → α := fun N => ⋯.some
n N : ℕ
hn : n ≤ N
⊢ u N ∈ s n

Proof state:
α : Type u
inst✝ : PseudoMetricSpace α
s : ℕ → Set α
h0 : IsComplete (s 0)
hs : ∀ (n : ℕ), IsClosed (s n)
h's : ∀ (n : ℕ), Bornology.IsBounded (s n)
h : ∀ (N : ℕ), (⋂ n, ⋂ (_ : n ≤ N), s n).Nonempty
h' : Tendsto (fun n => diam (s n)) atTop (𝓝 0)
u : ℕ → α := fun N => ⋯.some
⊢ (⋂ n, s n).Nonempty

Tactic:
have I : ∀ n N, n ≤ N → u N ∈ s n := by
  intro n N hn
  apply mem_of_subset_of_mem _ (h N).choose_spec
  intro x hx
  simp only [mem_iInter] at hx
  exact hx n hn

Result:
α : Type u
inst✝ : PseudoMetricSpace α
s : ℕ → Set α
h0 : IsComplete (s 0)
hs : ∀ (n : ℕ), IsClosed (s n)
h's : ∀ (n : ℕ), Bornology.IsBounded (s n)
h : ∀ (N : ℕ), (⋂ n, ⋂ (_ : n ≤ N), s n).Nonempty
h' : Tendsto (fun n => diam (s n)) atTop (𝓝 0)
u : ℕ → α := fun N => ⋯.some
I : ∀ (n N : ℕ), n ≤ N → u N ∈ s n
⊢ (⋂ n, s n).Nonempty

Proof state:
α : Type u
inst✝ : PseudoMetricSpace α
s : ℕ → Set α
h0 : IsComplete (s 0)
hs : ∀ (n : ℕ), IsClosed (s n)
h's : ∀ (n : ℕ), Bornology.IsBounded (s n)
h : ∀ (N : ℕ), (⋂ n, ⋂ (_ : n ≤ N), s n).Nonempty
h' : Tendsto (fun n => diam (s n)) atTop (𝓝 0)
u : ℕ → α := fun N => ⋯.some
I : ∀ (n N : ℕ), n ≤ N → u N ∈ s n
m n N : ℕ
hm : N ≤ m
hn : N ≤ n
⊢ dist (u m) (u n) ≤ diam (s N)

Tactic:
exact dist_le_diam_of_mem (h's N) (I _ _ hm) (I _ _ hn)

Result:
no goals

Proof state:
case intro.intro
α : Type u
inst✝ : PseudoMetricSpace α
s : ℕ → Set α
h0 : IsComplete (s 0)
hs : ∀ (n : ℕ), IsClosed (s n)
h's : ∀ (n : ℕ), Bornology.IsBounded (s n)
h : ∀ (N : ℕ), (⋂ n, ⋂ (_ : n ≤ N), s n).Nonempty
h' : Tendsto (fun n => diam (s n)) atTop (𝓝 0)
u : ℕ → α := fun N => ⋯.some
I : ∀ (n N : ℕ), n ≤ N → u N ∈ s n
this : CauchySeq u
x : α
xlim : Tendsto (fun n => u n) atTop (𝓝 x)
n : ℕ
⊢ ∀ᶠ (x : ℕ) in atTop, u x ∈ s n

Tactic:
filter_upwards [Ici_mem_atTop n] with p hp

Result:
case h
α : Type u
inst✝ : PseudoMetricSpace α
s : ℕ → Set α
h0 : IsComplete (s 0)
hs : ∀ (n : ℕ), IsClosed (s n)
h's : ∀ (n : ℕ), Bornology.IsBounded (s n)
h : ∀ (N : ℕ), (⋂ n, ⋂ (_ : n ≤ N), s n).Nonempty
h' : Tendsto (fun n => diam (s n)) atTop (𝓝 0)
u : ℕ → α := fun N => ⋯.some
I : ∀ (n N : ℕ), n ≤ N → u N ∈ s n
this : CauchySeq u
x : α
xlim : Tendsto (fun n => u n) atTop (𝓝 x)
n p : ℕ
hp : p ∈ Ici n
⊢ u p ∈ s n

Proof state:
α : Type u
inst✝ : PseudoMetricSpace α
s : ℕ → Set α
h0 : IsComplete (s 0)
hs : ∀ (n : ℕ), IsClosed (s n)
h's : ∀ (n : ℕ), Bornology.IsBounded (s n)
h : ∀ (N : ℕ), (⋂ n, ⋂ (_ : n ≤ N), s n).Nonempty
h' : Tendsto (fun n => diam (s n)) atTop (𝓝 0)
u : ℕ → α := fun N => ⋯.some
n N : ℕ
hn : n ≤ N
x : α
hx : ∀ i ≤ N, x ∈ s i
⊢ x ∈ s n

Tactic:
exact hx n hn

Result:
no goals