I'm looking to prove the following :
Let $(X,d)$ be a Metric Space
If every continuous real-valued function on $X$ is bounded then $X$ is Compact
I saw a proof earlier today
If instead $X$ is not compact, then we have some sequence $(x_n)$ in $X$ which has no convergent subsequence. Hence every convergent sequence with terms in the set $S=\{x_1,x_2,\ldots\}$ must be eventually constant, so has limit in $S$, hence $S$ is closed. Define the function $f:S\to \mathbb R$ by $f(x_n)=n$, which is continuous because $S$ is a discrete set. By the Tietze extension theorem, we can extend $f$ to a continuous unbounded function $g:X\to\mathbb R$.
Questions :
To show $S$ is closed it would suffice to show that any Limit Point belongs to $S$. However a limit point of $S$ would necesarily also have a subsequence of $S$ converging to it and hence lead to a contradiction right? Is this reasoning right to conclude S has no limit points and hence is closed since it equals it's Closure
Also,
I'm curious how he deduced that $f$ is a continuous function. I mean if $U$ is Open in $\mathbb{R}$ then it must be true that $f^{-1}(U) = S \cap Y$ for some open set $Y$ in $X$ right?
I'm familiar with the discrete metric but unsure how it comes into play here since the Metric on $X$ might not be discrete?
He’s actually omitted a key observation: since $\sigma=\langle x_n:n\in\Bbb N\rangle$ has no convergent subsequence, it also has no constant subsequence, and therefore the set $S=\{x_n:n\in\Bbb N\}$ must be an infinite set. Thus, we might as well assume that the terms of the sequence are all distinct, i.e., that $x_m\ne x_n$ whenever $m\ne n$.
Now we want to show that $S$ is a discrete set, meaning that for each $n\in\Bbb N$ there is an open set $U_n$ in $X$ such that $U_n\cap S=\{x_n\}$. Suppose that for some $n\in\Bbb N$ this were not the case. Then for each $k\in\Bbb N$ we could find an $n_k\in\Bbb N$ such that $d(x_{n_k},x_n)<2^{-k}$. Any strictly increasing subsequence of $\langle n_k:k\in\Bbb N\rangle$ would then give us a subsequence of $\sigma$ converging to $x_n$, contradicting the assumption that $\sigma$ has no convergent subsequence. Thus, $S$ really is a discrete subset of $X$. Thus, $\{x_n\}$ is a relatively open subset of $S$ for each $n\in\Bbb N$. Every non-empty subset of $S$ is a union of such singleton sets, so every subset of $S$ is relatively open in $S$.
Now let $f:S\to\Bbb R:x_n\mapsto n$. If $V$ is any open set in $\Bbb R$, then $f^{-1}[V]$ is open in $S$ simply because every subset of $S$ is open in $S$, and $f$ is therefore continuous. More generally, by the same reasoning we see that any function from a discrete space to any topological space is automatically continuous.
Your argument for why $S$ is closed isn’t quite right, because $S$ is not a sequence: it’s the set of points that are terms of the sequence $\sigma$. For example, the real sequence $\langle (-1)^n:n\in\Bbb N\rangle$ has infinitely many terms, one for each $n\in\Bbb N$, but the set $\{(-1)^n:n\in\Bbb N\}$ has only two points.
If $x$ is a limit point of the set $S$, then there must be a sequence in $S$ converging to $x$. This sequence must have the form $\langle x_{n_k}:k\in\Bbb N\rangle$ for some sequence $\langle n_k:k\in\Bbb N\rangle$ of natural numbers. If infinitely many of the numbers $n_k$ are distinct, the sequence $\langle n_k:k\in\Bbb N\rangle$ will have a strictly increasing subsequence $\langle n_{k_i}:i\in\Bbb N\rangle$. (You should try to see why this must be the case.)
But then $\langle x_{n_{k_i}}:i\in\Bbb N\rangle$ is a subsequence of $\sigma$ converging to $x$, which is impossible. Thus, $\{n_k:k\in\Bbb N\}$ must be finite, and the sequence $\langle x_{n_k}:k\in\Bbb N\rangle$ that converges to $x$ hits only finitely many distinct points. If it hits two of these points infinitely often, it cannot possibly converge: it has a subsequence that bounces back and forth between the two points. Thus, it must hit exactly one of the points infinitely often. This means that after some finite number of terms, every term of the sequence hits that one point. In other words, the sequence is eventually constant. But then its limit is that point at which it’s constant, and that point is one of the points of $S$. Thus, $S$ is closed.