Theorem: PiNat.completeSpace
File: Mathlib/Topology/MetricSpace/PiNat.lean

Proof steps:
state_before: E : ℕ → Type u_1
inst✝¹ : (n : ℕ) → TopologicalSpace (E n)
inst✝ : ∀ (n : ℕ), DiscreteTopology (E n)
⊢ CompleteSpace ((n : ℕ) → E n)
state_after: E : ℕ → Type u_1
inst✝¹ : (n : ℕ) → TopologicalSpace (E n)
inst✝ : ∀ (n : ℕ), DiscreteTopology (E n)
⊢ ∀ (u : ℕ → (n : ℕ) → E n),
    (∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun n => (1 / 2) ^ n) N) → ∃ x, Tendsto u atTop (𝓝 x)
tactic: refine Metric.complete_of_convergent_controlled_sequences (fun n => (1 / 2) ^ n) (by simp) ?_
state_before: E : ℕ → Type u_1
inst✝¹ : (n : ℕ) → TopologicalSpace (E n)
inst✝ : ∀ (n : ℕ), DiscreteTopology (E n)
⊢ ∀ (u : ℕ → (n : ℕ) → E n),
    (∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun n => (1 / 2) ^ n) N) → ∃ x, Tendsto u atTop (𝓝 x)
state_after: E : ℕ → Type u_1
inst✝¹ : (n : ℕ) → TopologicalSpace (E n)
inst✝ : ∀ (n : ℕ), DiscreteTopology (E n)
u : ℕ → (n : ℕ) → E n
hu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun n => (1 / 2) ^ n) N
⊢ ∃ x, Tendsto u atTop (𝓝 x)
tactic: intro u hu
state_before: E : ℕ → Type u_1
inst✝¹ : (n : ℕ) → TopologicalSpace (E n)
inst✝ : ∀ (n : ℕ), DiscreteTopology (E n)
u : ℕ → (n : ℕ) → E n
hu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun n => (1 / 2) ^ n) N
⊢ ∃ x, Tendsto u atTop (𝓝 x)
state_after: E : ℕ → Type u_1
inst✝¹ : (n : ℕ) → TopologicalSpace (E n)
inst✝ : ∀ (n : ℕ), DiscreteTopology (E n)
u : ℕ → (n : ℕ) → E n
hu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun n => (1 / 2) ^ n) N
i : ℕ
⊢ Tendsto (fun i_1 => u i_1 i) atTop (𝓝 (u i i))
tactic: refine ⟨fun n => u n n, tendsto_pi_nhds.2 fun i => ?_⟩
state_before: E : ℕ → Type u_1
inst✝¹ : (n : ℕ) → TopologicalSpace (E n)
inst✝ : ∀ (n : ℕ), DiscreteTopology (E n)
u : ℕ → (n : ℕ) → E n
hu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun n => (1 / 2) ^ n) N
i : ℕ
⊢ Tendsto (fun i_1 => u i_1 i) atTop (𝓝 (u i i))
state_after: E : ℕ → Type u_1
inst✝¹ : (n : ℕ) → TopologicalSpace (E n)
inst✝ : ∀ (n : ℕ), DiscreteTopology (E n)
u : ℕ → (n : ℕ) → E n
hu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun n => (1 / 2) ^ n) N
i : ℕ
⊢ (fun x => u i i) =ᶠ[atTop] fun i_1 => u i_1 i
tactic: refine tendsto_const_nhds.congr' ?_
state_before: E : ℕ → Type u_1
inst✝¹ : (n : ℕ) → TopologicalSpace (E n)
inst✝ : ∀ (n : ℕ), DiscreteTopology (E n)
u : ℕ → (n : ℕ) → E n
hu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun n => (1 / 2) ^ n) N
i : ℕ
⊢ (fun x => u i i) =ᶠ[atTop] fun i_1 => u i_1 i
state_after: case h
E : ℕ → Type u_1
inst✝¹ : (n : ℕ) → TopologicalSpace (E n)
inst✝ : ∀ (n : ℕ), DiscreteTopology (E n)
u : ℕ → (n : ℕ) → E n
hu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun n => (1 / 2) ^ n) N
i n : ℕ
hn : n ∈ Ici i
⊢ u i i = u n i
tactic: filter_upwards [Filter.Ici_mem_atTop i] with n hn
state_before: case h
E : ℕ → Type u_1
inst✝¹ : (n : ℕ) → TopologicalSpace (E n)
inst✝ : ∀ (n : ℕ), DiscreteTopology (E n)
u : ℕ → (n : ℕ) → E n
hu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun n => (1 / 2) ^ n) N
i n : ℕ
hn : n ∈ Ici i
⊢ u i i = u n i
state_after: no goals
tactic: exact apply_eq_of_dist_lt (hu i i n le_rfl hn) le_rfl