1

The problem statement (verbatim):

Prove or disprove:

Let $A\subseteq \mathbb R$. If every continuous function $f:A\to\mathbb R$ is bounded then $A$ is a compact set.

I know the converse is true. If $A$ is compact then the image set of a continuous function over $A$ must be compact.

My attempt:

We have that every continuous function $f:A\to \mathbb R$ is bounded.

There could be a case where $A$ is a finite set of discrete points. Every function over $A$ shall be continuous because all its points are isolated. $A$ is compact as required because it is bounded and does not have any limit points.

Suppose if possible, $A$ is not bounded. WLOG, we may assume that there exists a point $c$ such that $(c,\infty)\subseteq A$. Consider the function $f(x)=x^2$, it is continuous everywhere and on $A$ as well. However, $f(A)$ is not bounded as $\lim_{x\to\infty} f(x)=\infty$. Thus, not all continuous functions are bounded. We have a contradiction.

Suppose if possible, $A$ is not closed. There exists a sequence $\{x_n\}$ in $A$ which converges to a point $b$ which is outside $A$.

WLOG, we may assume that $(b,c)\subseteq A$ but any $\delta$-neighborhood $(b-\delta,b+\delta)$ of $b$ is not fully contianed in $A$.

Consider $f(x)=\frac{1}{x-b}$ which is continuous everywhere on $\mathbb R\setminus \{b\}$. It is also continuous on $A$. However, $\lim_{x\to b^+}f(x)=\infty$ so $f(A)$ is not bounded. We have a contradiction again.

Thus, $A$ must be both closed and bounded, and hence, compact. $\blacksquare$

Is my proof correct? I also want to see alternative proofs.

Nothing special
  • 3,690
  • 1
  • 7
  • 27
  • Compare https://math.stackexchange.com/q/1006184/42969 – Martin R Nov 28 '23 at 11:50
  • 1
    This seems OK but can be shortened. If $b$ is a boundary point that's not in $A$, the function $\frac1{x-b}$ will be well-defined on $A$, continuous, and unbounded. QED. – Mikhail Katz Nov 28 '23 at 11:50
  • 1
    It's not true that if $A$ is not bounded than $(c, \infty) \subseteq A$ for some $c$. For example, consider $A$ to be set of natural numbers. In general, your ideas are good, just note that $A$ doesn't necessary contain any interval (and you don't need it). – mihaild Nov 28 '23 at 11:51
  • @mihaild Thank you, I didn't think of this. $A$ is unbounded so WLOG, we may assume that there is a sequence of real number ${x_n}$ in $A$ which converges to $\infty$. $f(x_n)$ is unbounded and so is $f$. – Nothing special Nov 28 '23 at 11:59
  • @MartinR I see, the question is almost identical, but it's more general, in $\mathbb R^n$. I haven't yet studied about metric spaces... – Nothing special Nov 28 '23 at 12:04

2 Answers2

2

Here's an alternative proof sketch (more constructive). If $A$ is not compact, then it is either unbounded or not closed. If $A$ is unbounded, then WLOG let it consist of arbitrarily large numbers in $\mathbb{R}_{> 0}$, and let one of those numbers be $a_0$. If we have $a_n$, then there exists some $a_{n + 1} \in A$ such that $a_{n + 1} \geq a_n + 1$. Proceeding like this we can construct some closed discrete subset $S = \{a_n\}_{n \in \mathbb{N}}$ of $A$. If $A$ is not closed, then suppose $a \in \overline{A} \setminus A$, where $\overline{A}$ is the closure of $A$. For some arbitrary selection of $a_0 \in A$, given $a_n \in A$, let $r_n = |a_n - a|$. Now, $a$ is in the closure of $A$, so there must exist some $a_{n + 1} \in \mathscr{B}(a, \frac{1}{2}r_n) \cap A$. Therefore it is possible to recursively construct some sequence $s = \{a_1, \ldots, a_n, \ldots\}$ of distinct points in $A$ to guarantee that $s$ eventually converges to $a$. Suppose that $S = \{a_n\}_{n \in \mathbb{N}}$, so that the only limit point of $S$ in $\mathbb{R}$ is $a$, which is not in $A$, so that $S$ is a closed discrete subset of $A$.


There are gaps in the proof above, but you can easily complete them yourself with some thinking (and maybe with the Tietze extension theorem if necessary).

1

This is almost correct. Unboundedness of $A$ is not the same thiing as "there exists $c$, $(c,\infty)\subseteq A$". Try that with $A=\Bbb Z$... but unboundedness of $A$ is enough to say $x\mapsto x^2$ is unbounded on $A$ too.

As for more proofs, well, there is a general result about metric spaces. A nonempty metric space $X$ is compact iff every continuous real function on $X$ attains extreme values (this is admittedly stronger than assuming boundedness).

Joe
  • 22,603
FShrike
  • 46,840
  • 3
  • 35
  • 94
  • 1
    I haven't yet studied metric spaces. Will do it sometime soon. Thank you! – Nothing special Nov 28 '23 at 12:01
  • I think you want $X$ to be nonempty. – Joe Nov 28 '23 at 18:36
  • @Joe Yes, I suppose so. – FShrike Nov 28 '23 at 19:08
  • 1
    @FShrike: I made a small edit; I hope you don't mind. The statement which applies to all metric spaces (and even topological spaces) is that the continuous image of a compact space $X$ is compact. If $X$ is nonempty, then its image is nonempty and compact, and so we can conclude that the extrema are attained. (I'm sure you know all this; I just think it is a slightly better way of phrasing the result.) – Joe Nov 28 '23 at 22:57
  • And if $X$ is a metric space, then we can argue in the other direction. (If $X$ is a topological space, the statement is no longer true in fact.) – Joe Nov 28 '23 at 22:57
  • How are you finding it at Oxford, @FShrike? That happens to be my home town (although I'm a student at Bath). – Joe Nov 29 '23 at 11:37
  • @Joe I’m enjoying myself, thanks. It’s a beautiful city that I was already familiar with. – FShrike Nov 29 '23 at 14:47