the space of continuous functions is complete Let $(X, d_X)$ be a metric space, and let $(Y, d_Y)$ be a complete metric space. The space $(C(X \to Y), d_{\infty})$ is a complete subspace of $(B(X \to Y), d_\infty)$. In other words, every Cauchy sequence of functions in $C(X \to Y)$ converges to a function in $C(X \to Y)$. ($C(X \to Y)$ is the space of continuous functions; $B(X \to Y)$ is the space of bounded functions; $d_\infty$ is a supnorm metric) 
We have a complete metric space $(Y, d_Y)$. For each $x \in X$, let $(f_n(x))_{n=1}^\infty$ be any Cauchy sequence in $C(X \to Y)$, and it converges to $f(x)$ (i.e., for every $\epsilon >0$, there exists $N$ s.t. for $n \ge N$, $d_Y(f_n(x), f(x)) < \epsilon$). 
I have the result that $C(X \to Y)$ is closed in $B(X \to Y)$. Thus, if I show that $f_n$ converges to $f$ with respect to $d_\infty$-metric, $f$ becomes automatically in $C(X \to Y)$. 
The book suggests to use triangular inequality but I am not sure how to use this. I appreciate if you give me some help. 
 A: I will use the notation $C$ for $(C(X\to Y), d_{\infty})$. Let $\{f_n\}$ be a Cauchy sequence in $C$.
Then for each $\epsilon \gt 0$, there is $N\in \mathbb Z^+$ s.t. for all $m,n\gt N$, $||f_n-f_m||_{\infty} \lt \epsilon$.
Thus for all $x\in X$, $\{f_n(x)\}$ is a Cauchy sequence in $Y$. Since $Y$ is complete define $f:X\to Y$ as
$f(x)=\lim\limits_{n\to\infty}f_n(x)$. Then clearly $f_n$ converges to $f$.
The only thing we have to show is the continuity of $f$.
Let $t\in X$ and let $\epsilon\gt0$.
Since $f(t)=\lim\limits_{n\to\infty}f_n(t)$ there is $N\in \mathbb Z^+$ s.t for all $n\gt N$, $||f_n-f||_{\infty}\lt\frac{\epsilon}{3} \qquad (*)$
Choose $n_0\gt N$. Then since $f_{n_0}$ is continious there exist $\delta\gt0$ s.t for all $x\in X$ $|x-t|\lt \delta\implies |f_{n_0}(x)-f_{n_0}(t)|\lt \frac{\epsilon}{3} \qquad (**)$
then by $(*),(**)$
for all $x\in X$, if $|x-t|\lt \delta$ then
$\begin{split}|f(x)-f(t)|&
=|f(x)-f_{n_0}(x)+f_{n_0}(x)-f_{n_0}(t)+f_{n_0}(t)-f(t)|\\ 
 &\lt |f(x)-f_{n_0}(x)|+|f_{n_0}(x)-f_{n_0}(t)|+|f_{n_0}(t)-f(t)|\\
&\lt  \frac{\epsilon}{3}+\frac{\epsilon}{3}+\frac{\epsilon}{3} =\epsilon\\ \end{split}$. 
Thus $f$ is continuous.
A: Since convergence in the sup norm metric is equivalent to uniform convergence, and uniform convergence preserves continuity and boundedness, it remains to show that every Cauchy sequence in $C(X\to Y)$ converges in the sup norm metric.
Let $\{f_n\}$ be a Cauchy sequence in $C(X\to Y)$, then for all $\epsilon >0$ there is an $M$ such that
$m,n\geq M$ implies $d_Y(f_m(x),f_n(x))\leq d_{\infty}(f_m,f_n)\leq\epsilon$ for all $x\in X$, which shows $\{f_n(x)\}_{n\in\mathbb{N}}$ is a Cauchy sequence in $Y$. By the completeness of $Y$, $\{f_n(x)\}_{n\in\mathbb{N}}$ converges to some $f(x)\in Y$ for all $x\in X$.
Since $\{f_n\}$ is a Cauchy sequence, for every $\epsilon >0$ there is an $N\in\mathbb{N}$ such that $m,n\geq N$ implies $d_{\infty}(f_m,f_n)\leq\epsilon$. Let $x\in X$ be arbitrary. Since $\{f_n\}$ converges pointwise to $f$, there is a $K\in\mathbb{N}$ such that $n\geq K$ implies $d_Y(f_n(x),f(x))\leq\epsilon$. Take $m=\max \{N,K\}$, then for all $n\geq N$ we have\begin{align}d_Y(f_n(x),f(x))\leq d_Y(f_n(x),f_m(x))+d_Y(f_m(x),f(x))\leq d_{\infty}(f_m,f_n)+\epsilon\leq2\epsilon,
\end{align}
which means $d_{\infty}(f_n,f)\leq 2\epsilon$ for all $n\geq N$ since $x\in X$ is arbitrary. This yields the claim.
