Proving $(C_b(X,Y),d_{\infty})$ is complete if $(Y,d_y)$ is complete Let $(X,d_X)$ and $(Y,d_Y)$ be metric spaces. We say a function $f: X
\rightarrow Y$ is bounded if $f(X)$ is a bounded set of $Y$. Consider
  $$C_b(X,Y) = \left\{f: X \rightarrow Y \mid f \ \text{is continuous
and bounded} \right\} $$ with the metric $d_{\infty}(f,g) =
 \sup\left\{d_y(f(x),g(x)) \mid x \in X \right\}. $ Prove that
  $(C_b(X,Y),d_{\infty})$ is complete if $(Y,d_Y)$ is complete.


Attempt: In my course, we already proved that if $(X,d_X)$ is a metric space, then $$C_b(X, \mathbb{R}) = \left\{f: X \rightarrow \mathbb{R} \mid f \ \text{is continuous
and bounded} \right\}$$ is a complete space for the $d_{\infty}(f,g)= \sup\left\{|f(x) - g(x)| \mid x \in X \right\}$ metric. I want to use this result now. I know that if $Y$ is a complete metric space, and $X$ is a bounded subspace of $Y$, then $X$ is also complete. 

So in this case I said $C_b(X,Y)$ is a subspace of the complete space $(C_b(X,\mathbb{R}),d_{\infty})$. So I need to prove that $C_b(X,Y)$ is closed in $C_b(X, \mathbb{R})$ ? Then let $f_n \in C_b(X,Y)$ be a convergent sequence. Denote the limit by $f \in C_b(X,\mathbb{R})$. I need to prove that $f \in C_b(X,Y)$. 

I'm not sure how to prove the continuity of $f$. Also, I haven't used the fact yet that $(Y,d_Y)$ is complete so I'm not sure if this is the right direction. Any help is appreciated.
To use the result shown in your class, take $y\in Y$ and consider $f_n^y(x)=d(y,f_n(x))$. It is a family of functions of $C_b(X,R)$ which is continuous and converges towards $f^y(x)=d(y,f(x))$ where $f(x)=lim_nf_n(x)$. You conclude that $f^y$ is bounded, this implies that $f$ is bounded. 

To show that $f$ is continuous at $x$, take $y=f(x)$ and consider $f^{f(x)}(z)=d(f(x),z)$ it is continuous at $x$ i.e for every $c&gt;0$, there exists $d&gt;0$ such that $d(z,x)&lt;d$ implies that $|f^{f(x)}(z)-f^{f(x)}(x)|=d(f(z),f(x))&lt;c$. This equivalent to say that $f$ is continuous at $x$.
To use the result shown in your class, take $y\in Y$ and consider $f_n^y(x)=d(y,f_n(x))$. It is a family of functions of $C_b(X,R)$ which is continuous and converges towards $f^y(x)=d(y,f(x))$ where $f(x)=lim_nf_n(x)$. You conclude that $f^y$ is bounded, this implies that $f$ is bounded. 

To show that $f$ is continuous at $x$, take $y=f(x)$ and consider $f^{f(x)}(z)=d(f(x),z)$ it is continuous at $x$ i.e for every $c&gt;0$, there exists $d&gt;0$ such that $d(z,x)&lt;d$ implies that $|f^{f(x)}(z)-f^{f(x)}(x)|=d(f(z),f(x))&lt;c$. This equivalent to say that $f$ is continuous at $x$.