Let $(X,d)$ be a metric space.
If $Y$ is a compact subset of $X$, and $Z\subset Y$, then $Z$ is compact if and only if $Z$ is closed.
$(\rightarrow)$
Assume that $Z$ is compact
WTS that $Z$ is closed
Def 1: $Z$ is closed whenever $(x_n)_{n=1}^\infty$ in $Z$ converges to some $x\in Y,$ then we must also have that $x\in Z$
Using our definition we need to show that $x\in Z$
We know that since $(x_n)_{n=1}^\infty \subset Z \subset Y $ then there must exist a subsequence $(x_{n_l})_{n=1}^\infty$ which converges to a value $y$ as $l$ converges to $\infty$. This $y\in Y.$
But we know that $(x_{n_l})_{n=1}^\infty$ converges to $x $ as $l$ converges to $\infty$.
And this means that they value of $y$ is equal to the value of $x$
And since our value of $y$ must be in $Z$ then it means that $x$ is also in $Z$.
Therefore $Z$ is closed
($\leftarrow$)
Assume that $Z$ is closed
WTS that $Z$ is compact
Def 2: $Z$ is compact iff every sequence in $Z$ has at least one convergent subsequence.
Let's take an arbitrary sequence in $Z$ e.g. $(x_n)_{n=1}^\infty \subset Z$
Using our assumption and the Def 1, since $Z$ is closed we know that $x \in Z$
Therefore Z is compact
Can I please get some input on the following proof?