If every continuous function on a set can be extended to a continuous function on $\mathbb{R}$ then the set is closed.

continuityreal-analysis

Suppose $F\subseteq \mathbb{R}$ is a set such that every continuous function $f: F\rightarrow\mathbb{R}$ can be extended to a continuous function $g_f:\mathbb{R}\rightarrow\mathbb{R}$. I want to prove that $F$ must be a closed set.

I have thought of taking an arbitrary sequence of values in $F$ which converge to a point, say $\{x_n\}\rightarrow x$. But I see no way of making use of this. I know that for such a sequence in $F$, if $f$ is continuous then $\lim_{n\rightarrow \infty}f(x_n) = f(x)$. But to show $F$ is closed we need to know that $x\in F$. I don't see how to use the idea that there is a continuous extension.

I thought about trying to show that the complement is open. I figured that might be nice since the inverse image of open sets is open. So if we take a point $x\in \mathbb{R}\smallsetminus F$ and a neighborhood of $g_f(x)$ we could examine the inverse image of the neighborhood. We know it's open but we'd like a neighborhood chosen small enough that it fits inside $\mathbb{R}\smallsetminus F$. I guess if there were no such neighborhood then we could construct an infinite sequence inside $F$ and a continuous function on the sequence, but demonstrate that there is no continuous extension … I'm not sure that's possible.

I thought of trying to pick a particular continuous function on $F$ like the identity function, but didn't see a way to make use of that either.

Best Answer

If $F$ is not closed, then $\overline F\ne F$. Take $x_0\in\overline F\setminus F$ and consider the function$$\begin{array}{rccc}f\colon&F&\longrightarrow&\Bbb R\\&x&\mapsto&\dfrac1{x-x_0}.\end{array}$$Then $f$ is continuous, but you cannot extend it to a continuous function from $\Bbb R$ into $\Bbb R$.

Related Question