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?
I like that you included your attempt at a proof. I wanted to give you some feedback. Plenty of correct ideas.
I'm guessing this is a typo and you meant to say $y \in Z$, but I'm going to mention it just in case. Remember that you are using the compactness of $Z$ here. Since $Z$ is compact, it has a subsequence that converges in $Z$. But you also assumed the sequence converges, and convergent sequences in a metric space have only one subsequential limit. Also note that the compactness of $Y$ isn't needed for this direction of the proof. What you have then shown is that compact subsets of a metric space are closed.
The convergent subsequence has to converge to a point in $Z$. Note that any sequence in $Z$ has a convergent subsequence in $Y$ since $Z \subset Y$ and $Y$ is compact. This is a nontrivial part of the definition. What this definition is saying is that compact subsets of a metric space are characterized by the property that every sequence, maybe after first passing to a subsequence, has to eventually cluster around some point in the set
I would add the following