Solution (source code)

= Solution

A metric space is complete when every Cauchy <sequence> in it converges to a point of the space. Let $(y_n)$ be Cauchy in a closed subspace $Y$ of a complete metric space $X$. It is also Cauchy in $X$, so $y_n\to x$ for some $x\in X$. Since $Y$ is closed and every $y_n$ lies in $Y$, one has $x\in Y$. Thus the <closed-subspace completeness theorem> proves that $Y$ is complete.