[Math] Prob. 5, Chap. 4 in Baby Rudin: Continuous extension of a function defined on a closed set

analysiscalculuscontinuitymetric-spacesreal-analysis

Here is Prob. 5, Chap. 4 in the book Principles of Mathematical Analysis by Walter Rudin, 3rd edition:

If $f$ is a real continuous function defined on a closed set $E \subset \mathbb{R}^1$, prove that there exist real continuous functions $g$ on $\mathbb{R}^1$ such that $g(x) = f(x)$ for all $x \in E$. (Such functions $g$ are called continuous extensions of $f$ from $E$ to $\mathbb{R}^1$.) Show that the result becomes false if the word "closed" is omitted. Extend the result to vector-valued functions. Hint: Let the graph of $g$ be a straight line on each of the segments which constitute the complement of $E$ (compare Exercise 29, Chap. 2). The result remains true if $\mathbb{R}^1$ is replaced by any metric space, but the proof is not so simple.

First of all, we show that the word "closed" is essential. Let $E = (-\infty, 0) \cup (0, +\infty)$, and let $f \colon E \to \mathbb{R}^1$ be defined as $$ f(x) = \frac{1}{x} \ \mbox{ for all } x \in E.$$ Then the set $E$ is not closed in $\mathbb{R}^1$, but there is no continuous function $g \colon \mathbb{R}^1 \to \mathbb{R}^1$ such that $g(x) = f(x)$ for all $x \in E$, although $f$ is certainly continuous. Am I right?

Now we show the main result:

First of all, here is Exercise 29, Chap. 2 in Baby Rudin, 3rd edition:

Prove that every open set in $\mathbb{R}^1$ is the union of an at most countable collection of disjoint segments. …

Since $\mathbb{R}^1 – E$ is open in $\mathbb{R}^1$, it is the union of an at most countable collection of disjoint segments $\left\{ \left(a_n, b_n \right) \right\}_{n \in K}$, where $K$ is either the set $J = \left\{ 1, 2, 3, \ldots \right\}$ or $K$ is some $J_N = \left\{ 1, \ldots, N \right\}$ for some $N \in \mathbb{N}$; moreover, $\left( a_m, b_m \right) \cap \left( a_n, b_n \right) = \emptyset$ for any two distinct $m, n \in K$; finally some $\left( a_n, b_n \right)$ can possibly be infinite.

Now since $$\mathbb{R}^1 – E = \cup_{n \in K} \left( a_n, b_n \right),$$ each of the (finite) endpoints of these segments is an element of set $E$.

Now if some segment $\left( a_n, b_n \right)$ has $-\infty$ as its left endpoint, then we put $g(x) = f \left( b_n \right)$ for all $x \in \left( a_n, b_n \right)$.

If some segment $\left(a_m, b_m \right)$ has $+\infty$ as its right endpoint, then we put $g(x) = f\left( a_m \right)$ for all $x \in \left( a_m, b_m \right)$.

And, for any segment $\left( a_n, b_n \right)$, where $-\infty < a_n < b_n < +\infty$, we put $$ g(x) = f\left( a_n \right) + \left[ \frac{ f\left( b_n \right) – f\left( a_n \right)}{b_n – a_n} \right] \left( x – a_n \right) $$ for all $x \in \left( a_n, b_n \right)$.

I hope I've used the hint given by Rudin correctly. If so, then how to rigorously show that the resulting real function $g$ defined on $\mathbb{R}^1$ is continuous on all of $\mathbb{R}^1$? This is intuitively clear though, but how does the countability of these segments become significant? Up to this point, Rudin hasn't stated any result about the continuity of a function defined using several continuous functions as pieces, like our function $g$ is defined here.

Moreover, are there any other possibilities for $g$ besides the one we have defined above?

Now we state the generalization of the above result for vector-valued functions.

Let $E$ be a closed set in $\mathbb{R}^1$, and let $\mathbf{f}$ be a continuous function defined on $E$ with values in some $\mathbb{R}^k$. Then there are continuous functions $\mathbf{g}$ defined on $\mathbb{R}^1$ with values in the same $\mathbb{R}^k$ such that $\mathbf{g}(x) = \mathbb{f}(x)$ for all $x \in E$.

In order to prove this generalized result, let's put $\mathbb{f}(x) = \left( f_1(x), \ldots, f_k(x) \right)$ for all $x \in E$, where $f_1, \ldots, f_k$ are real continuous functions defined on $E$, and each of these functions we can continuously extend to all of $\mathbb{R}^1$, thereby getting a continuous extension $\mathbf{g}$ of $\mathbf{f}$ from $E$ to all of $\mathbb{R}^1$. Is this reasoning correct?

Last but not the least, I have the following query.

Let $\left( X, d_X \right)$ and $\left( Y, d_Y \right)$ be metric spaces, let $E \subset X$ such that $E$ is closed in $\left( X, d_X \right)$, and let $f$ be a continuous mapping of the induced metric space $E$ into the metric space $Y$. Then can we find—or prove the existence of—a continuous mapping $g$ of $X$ into $Y$ such that $g(x) = f(x)$ for all $x \in E$?

If so, then how to find such a map or prove it exists? If not, then what is the general result that Rudin is referring to and how to come up with the not-so-simple proof that he has alluded to?

Best Answer

I haven't the time to check your proof right now. But to address your other questions:

  • Extension to the case where the codomain is $\mathbb{R}^d$ is immediate, as you say.

  • The theorem is not true for two general metric spaces. Take $X = [0,1]$ with its usual metric and let $E = \{0,1\}$. Let $Y = \{0,1\}$ with its discrete metric. Define $f : E \to Y$ by $f(0)=0$, $f(1)=1$. No continuous extension $g$ can exist because it would map the connected space $[0,1]$ onto the disconnected space $\{0,1\}$.

  • The general result which Rudin alludes to is the Tietze extension theorem and you can find its proof in most topology textbooks.

Related Question