TITLE: Validation of sequential compactness and continuity proof
QUESTION [1 upvotes]: Suppose $f:D\xrightarrow[]{}R$ is continuous and $D$ is sequentially compact. Suppose that $\exists\{x_n\} $ such that $\lim_{n\xrightarrow[]{}\infty}f(x_n) = y_0$. Prove: $\exists x_0\in D$ such that $f(x_0) = y_0$.
Proof: Since $f$ is continuous, $\{x_n\}\xrightarrow[]{}x_0 $ such that $f(x_0) = y_0$. Since $D$ is sequentially compact, we know that $x_0 \in D$ since all $\{x_{n_j}\}$ converges to $x_0$.
Here I think I'm done with this proof. I'm just unsure if it's this easy to prove or if I'm missing/misusing some definitions.

REPLY [1 votes]: Your proof is badly worded. You don't start by telling us what your $x_0$ is.
Here is a proper proof: There exists a subsequence $(x_{n_j})$ converging to some point $x_0 \in D$. Since $f(x_n) \to y_0$ it follows that the subsequence $f(x_{n_j})$ also converges to $y_0$.  By continuity we get $f(x_0)=y_0$.
{"set_name": "stack_exchange", "score": 1, "question_id": 4267075}