[Math] Extending a continuous function defined on the rationals

general-topologyreal-analysis

Is there an elementary way of proving that for any continuous function $f:\mathbb{Q}\to[0,1]$ there is such an $x\in\mathbb{R}\setminus\mathbb{Q}$ that $f$ can be extended to a continuous function $\mathbb{Q}\cup\{x\}\to[0,1]$, without resorting to the fact that $\mathbb{Q}$ is not a $G_\delta$-set in $\mathbb{R}$ and the

Theorem (4.3.20. in General Topology by Engelking): If $Y$ is a completely metrizable space, then every continuous mapping $f:A\to Y$ from a dense subset of a topological space $X$ to the space $Y$ is extendable to a continuous mapping $F:B\to Y$ defined on a $G_\delta$-set $B\subset X$ containing $A$.

which seem an overkill to me in this case?

Best Answer

Here's an explicit construction without using the Baire Category Theorem (on the other hand, one could say that this is the same sort of construction that is used in proving the Baire Category Theorem):

Let $\{r_n: n \in {\mathbb N}\}$ be an enumeration of the rationals. Construct sequences of rationals $x_n$ and positive numbers $\delta_n$ as follows, with $x_0 = 0$ and $\delta_0 = 1$, with the following properties:

1) $|x_n - x_m| < \delta_n$ for all $m > n$

2) $|r_n - x_m| > \delta_n$ for all $m \ge n$

3) $\delta_n \to 0$ as $n \to \infty$

4) $|f(y) - f(x_n)| < 1/n$ for all rationals $y$ with $|y - x_n| < \delta_n$

We can do this inductively: given $x_n$ and $\delta_n$, take $x_{n+1}$ be any rational other than $r_{n+1}$ in $(x_n - \delta_n, x_n + \delta_n)$. Then take $\delta_{n+1} > 0$ small enough that $x_n - \delta_n < x_{n+1} - \delta_{n+1} < x_{n+1} + \delta_{n+1} < x_n + \delta_n$, $|r_{n+1} - x_{n+1}| > 2 \delta_{n+1}$, $\delta_{n+1} < 1/(n+1)$, and $|f(y) - f(x_{n+1})| < 1/(n+1)$ for all rationals $y$ with $|y - x_{n+1}| < \delta_{n+1}$.

It is easy to check that properties (1) to (4) are satisfied. Then $x_\infty = \lim_{n} x_n$ exists, can't be any $r_n$ (so must be irrational), $|x_\infty - x_n| < \delta_n$ for all $n$, and $f$ extends continuously to $x_\infty$ with $f(x_\infty) = \lim_n f(x_n)$.