Closure of a subspace of $\textsf{C}(J)$, where $J = [t_0-\beta,t_0+\beta]$ 
Question: Let $\textsf{C}(J)$ be the metric space of all real-valued continuous functions on the interval $J = [t_0-\beta,t_0+\beta]$ with the metric $d$ defined by
$$d(x,y)=\max_{t\in J}|x(t)-y(t)|.$$
Let $K$ be a subspace of $\textsf{C}(J)$ consisting of all those functions $x\in\textsf{C}(J)$ that satisfy
$$|x(t)-x_0|\leq c\beta$$
for a fixed $c$. Show that $K$ is closed in $\textsf{C}(J)$.

Here is my approach. Let $x\in\overline{K}$. Then there exists a sequence $(x_n)\subset K$ such that $x_n$ converges to $x$. Thus we have for any $\varepsilon>0$, there exists $N\in\mathbb{N}$ such that whenever $n>N$, we have $$|x(t)-x_n(t)|<\varepsilon$$
To show $K$ is closed, it suffices to show that $x\in K$. Thus,
$$\begin{align}
|x(t)-x_0| &= |x(t)-x_n(t)+x_n(t)-x_0| \\
&\leq |x(t)-x_n(t)|+|x_n(t)-x_0| \\
&< \varepsilon+c\beta
\end{align}$$
for which $\varepsilon\rightarrow 0$ as $n\rightarrow \infty.$ Thus, $|x(t)-x_0|<c\beta$, which implies that $x\in K$.
Am I correct with this proof?
 A: There are a few things to address:


*

*Your line



...for which $\varepsilon\rightarrow 0$ as $n\rightarrow \infty.$

is problematic. Presumably you meant to say that the quantity $|x(t)-x_n(t)|$ goes to $0$ as $n$ increases. We usually reserve $\epsilon$ for a small but fixed quantity that is given, and not a quantity that varies. 


*A more serious problem is your attempted proof in your first paragraph. You say 



...we have $$|x(t)-x_n(t)|<\varepsilon$$

It should be noted that convergence is defined with respect to the metric of ${C}(J)$, which is $d(x,y) = \max_{t \in J} {|x(t) - y(t)|}$, and not the standard metric on $\mathbf{R}$, as you asserted. The points of the metric space $C(J)$ are functions, and not real numbers. A sequence of functions $(x_n)$ in $C(J)$ is said to converge to a function $x$ if the sequence of real numbers $(d_n)_{n \in \mathbf{N}} = \max_{t \in J} {|x_n(t) - x(t)|}$ converges to $0$. The last thing to note is that the inequality $|x(t)-x_0|\leq c\beta$ holds for all $t \in J$, where $x_0$ refers to a fixed real number.
With those out of the way, we are finally ready for the proof:
Let $x_n$ be a sequence of functions in $K$ converging to the function $x$. We want to show $x \in K$. Note that by the triangle inequality, for each $n \geq 1$, we have the following estimate, which holds for all $t \in J$:
\begin{equation}
|x(t) - x_0| \leq |x(t) - x_n(t)| + |x_n(t) - x_0| \leq \max_{t \in J}|x(t) - x_n(t)| + c\beta.
\end{equation}
By assumption, we have $\max_{t \in J}|x(t) - x_n (t)| \to 0$ as $n \to \infty$, so $$|x(t) - x_0| \leq  \max_{t \in J}|x(t) - x_n(t)| + c\beta$$ implies
\begin{equation}
|x(t) - x_0| \leq  c\beta, \ \text{for all}  \ t \in J.
\end{equation}
This means $x \in K$, which concludes the proof. 
