The lemma says that if $A \in \mathbb{R}^{n}$ is compact and $f:A \to \mathbb{R}$ is continuous in $A$, then there's a real $M$ such that $\forall X \in A,f(X) \leq M$.
My textbook's proof goes this way: if $f(X)$ didn't have such an upper bound, then there would be a sequence $\{X_k\}_{k \in \mathbb{N}} \subseteq A$ such that $\forall k \in \mathbb{N},f(X_k) \geq k$. But since $A$ is compact, there's a convergent subsequence $\{X_{k_j}\}$ such that $X_{k_j} \to P \in A$. Therefore $f(X_{k_j}) \geq k_j$. But this is impossible since $f$ is continuous in $A$.
Does this last step amount to showing that $f(P)$, if defined, would have to be greater than every natural number (which contradicts the Archimedean property)?
I also don't understand how to justify that last step. A previous lemma stated that convergent sequences of $A$ whose images under $f$ were bounded implied that the image of the limit of those sequences was also bounded. But in this case we're "pushing forward" the bound every time. How's this justified?
By assumption $f(P)$ is a real number. Hence $k_j >f(P)+1$ for $j$ sufficiently large. But $f(X_{k_j}) \to f(P)$ and $f(X_{k_j})\geq k_j>f(P)+1$ for $j$ sufficiently large. This is a contradiction, right?