Theorem: IsSeqCompact.totallyBounded
File: Mathlib/Topology/Sequences.lean

tactic: intro V V_in
state_before: X : Type u_1
Y : Type ?u.15129
inst✝ : UniformSpace X
s : Set X
h : IsSeqCompact s
⊢ TotallyBounded s

tactic: unfold IsSeqCompact at h
state_before: X : Type u_1
Y : Type ?u.15129
inst✝ : UniformSpace X
s : Set X
h : IsSeqCompact s
V : Set (X × X)
V_in : V ∈ 𝓤 X
⊢ ∃ t, Set.Finite t ∧ s ⊆ ⋃ (y : X) (_ : y ∈ t), {x | (x, y) ∈ V}

tactic: contrapose! h
state_before: X : Type u_1
Y : Type ?u.15129
inst✝ : UniformSpace X
s : Set X
h : ∀ ⦃x : ℕ → X⦄, (∀ (n : ℕ), x n ∈ s) → ∃ a, a ∈ s ∧ ∃ φ, StrictMono φ ∧ Tendsto (x ∘ φ) atTop (𝓝 a)
V : Set (X × X)
V_in : V ∈ 𝓤 X
⊢ ∃ t, Set.Finite t ∧ s ⊆ ⋃ (y : X) (_ : y ∈ t), {x | (x, y) ∈ V}

tactic: obtain ⟨u, u_in, hu⟩ : ∃ u : ℕ → X, (∀ n, u n ∈ s) ∧ ∀ n m, m < n → u m ∉ ball (u n) V := by
  simp only [not_subset, mem_iUnion₂, not_exists, exists_prop] at h
  simpa only [forall_and, ball_image_iff, not_and] using seq_of_forall_finite_exists h
state_before: X : Type u_1
Y : Type ?u.15129
inst✝ : UniformSpace X
s : Set X
V : Set (X × X)
V_in : V ∈ 𝓤 X
h : ∀ (t : Set X), Set.Finite t → ¬s ⊆ ⋃ (y : X) (_ : y ∈ t), {x | (x, y) ∈ V}
⊢ Exists fun ⦃x⦄ => (∀ (n : ℕ), x n ∈ s) ∧ ∀ (a : X), a ∈ s → ∀ (φ : ℕ → ℕ), StrictMono φ → ¬Tendsto (x ∘ φ) atTop (𝓝 a)

tactic: refine' ⟨u, u_in, fun x _ φ hφ huφ => _⟩
state_before: case intro.intro
X : Type u_1
Y : Type ?u.15129
inst✝ : UniformSpace X
s : Set X
V : Set (X × X)
V_in : V ∈ 𝓤 X
h : ∀ (t : Set X), Set.Finite t → ¬s ⊆ ⋃ (y : X) (_ : y ∈ t), {x | (x, y) ∈ V}
u : ℕ → X
u_in : ∀ (n : ℕ), u n ∈ s
hu : ∀ (n m : ℕ), m < n → ¬u m ∈ ball (u n) V
⊢ Exists fun ⦃x⦄ => (∀ (n : ℕ), x n ∈ s) ∧ ∀ (a : X), a ∈ s → ∀ (φ : ℕ → ℕ), StrictMono φ → ¬Tendsto (x ∘ φ) atTop (𝓝 a)

tactic: obtain ⟨N, hN⟩ : ∃ N, ∀ p q, p ≥ N → q ≥ N → (u (φ p), u (φ q)) ∈ V
state_before: case intro.intro
X : Type u_1
Y : Type ?u.15129
inst✝ : UniformSpace X
s : Set X
V : Set (X × X)
V_in : V ∈ 𝓤 X
h : ∀ (t : Set X), Set.Finite t → ¬s ⊆ ⋃ (y : X) (_ : y ∈ t), {x | (x, y) ∈ V}
u : ℕ → X
u_in : ∀ (n : ℕ), u n ∈ s
hu : ∀ (n m : ℕ), m < n → ¬u m ∈ ball (u n) V
x : X
x✝ : x ∈ s
φ : ℕ → ℕ
hφ : StrictMono φ
huφ : Tendsto (u ∘ φ) atTop (𝓝 x)
⊢ False

tactic: exact huφ.cauchySeq.mem_entourage V_in
state_before: X : Type u_1
Y : Type ?u.15129
inst✝ : UniformSpace X
s : Set X
V : Set (X × X)
V_in : V ∈ 𝓤 X
h : ∀ (t : Set X), Set.Finite t → ¬s ⊆ ⋃ (y : X) (_ : y ∈ t), {x | (x, y) ∈ V}
u : ℕ → X
u_in : ∀ (n : ℕ), u n ∈ s
hu : ∀ (n m : ℕ), m < n → ¬u m ∈ ball (u n) V
x : X
x✝ : x ∈ s
φ : ℕ → ℕ
hφ : StrictMono φ
huφ : Tendsto (u ∘ φ) atTop (𝓝 x)
⊢ ∃ N, ∀ (p q : ℕ), p ≥ N → q ≥ N → (u (φ p), u (φ q)) ∈ V

case intro.intro.intro
X : Type u_1
Y : Type ?u.15129
inst✝ : UniformSpace X
s : Set X
V : Set (X × X)
V_in : V ∈ 𝓤 X
h : ∀ (t : Set X), Set.Finite t → ¬s ⊆ ⋃ (y : X) (_ : y ∈ t), {x | (x, y) ∈ V}
u : ℕ → X
u_in : ∀ (n : ℕ), u n ∈ s
hu : ∀ (n m : ℕ), m < n → ¬u m ∈ ball (u n) V
x : X
x✝ : x ∈ s
φ : ℕ → ℕ
hφ : StrictMono φ
huφ : Tendsto (u ∘ φ) atTop (𝓝 x)
N : ℕ
hN : ∀ (p q : ℕ), p ≥ N → q ≥ N → (u (φ p), u (φ q)) ∈ V
⊢ False

tactic: exact hu (φ <| N + 1) (φ N) (hφ <| lt_add_one N) (hN (N + 1) N N.le_succ le_rfl)
state_before: case intro.intro.intro
X : Type u_1
Y : Type ?u.15129
inst✝ : UniformSpace X
s : Set X
V : Set (X × X)
V_in : V ∈ 𝓤 X
h : ∀ (t : Set X), Set.Finite t → ¬s ⊆ ⋃ (y : X) (_ : y ∈ t), {x | (x, y) ∈ V}
u : ℕ → X
u_in : ∀ (n : ℕ), u n ∈ s
hu : ∀ (n m : ℕ), m < n → ¬u m ∈ ball (u n) V
x : X
x✝ : x ∈ s
φ : ℕ → ℕ
hφ : StrictMono φ
huφ : Tendsto (u ∘ φ) atTop (𝓝 x)
N : ℕ
hN : ∀ (p q : ℕ), p ≥ N → q ≥ N → (u (φ p), u (φ q)) ∈ V
⊢ False

tactic: simp only [not_subset, mem_iUnion₂, not_exists, exists_prop] at h
state_before: X : Type u_1
Y : Type ?u.15129
inst✝ : UniformSpace X
s : Set X
V : Set (X × X)
V_in : V ∈ 𝓤 X
h : ∀ (t : Set X), Set.Finite t → ¬s ⊆ ⋃ (y : X) (_ : y ∈ t), {x | (x, y) ∈ V}
⊢ ∃ u, (∀ (n : ℕ), u n ∈ s) ∧ ∀ (n m : ℕ), m < n → ¬u m ∈ ball (u n) V

tactic: simpa only [forall_and, ball_image_iff, not_and] using seq_of_forall_finite_exists h
state_before: X : Type u_1
Y : Type ?u.15129
inst✝ : UniformSpace X
s : Set X
V : Set (X × X)
V_in : V ∈ 𝓤 X
h : ∀ (t : Set X), Set.Finite t → ∃ a, a ∈ s ∧ ∀ (x : X), ¬(x ∈ t ∧ a ∈ {x_1 | (x_1, x) ∈ V})
⊢ ∃ u, (∀ (n : ℕ), u n ∈ s) ∧ ∀ (n m : ℕ), m < n → ¬u m ∈ ball (u n) V