5
$\begingroup$

Let $f$ be a continuous function $f:\Bbb Q\to \Bbb Q$. Does there exist a continuous function $g:\Bbb R\to \Bbb R$, such that restriction of $g$ to $\Bbb Q$ is $f$?

$\endgroup$
4
  • 2
    $\begingroup$ You don't need $g$ to be continuous? $\endgroup$
    – user160738
    Dec 12, 2016 at 11:36
  • 10
    $\begingroup$ If you want $g$ continuous, not always: take $f(q)=0$ if $q<\sqrt{2}$, $f(q)=1$ otherwise. The term Cauchy-continuous function should be of relevance. $\endgroup$
    – Wojowu
    Dec 12, 2016 at 11:36
  • $\begingroup$ It is sufficient that $f$ be uniformly continuous for instance. It doesn't work in all generality. $\endgroup$ Dec 12, 2016 at 11:37
  • $\begingroup$ @OlivierMoschetta Uniformly continuous on bounded intervals is weaker and suffices too. $\endgroup$
    – egreg
    Dec 12, 2016 at 12:00

1 Answer 1

14
$\begingroup$

In general no. Consider the function $f:\mathbb{Q}\rightarrow \mathbb{Q}$ defined by $f(x)=\lfloor\pi (x^2+1)\rfloor$. $f$ cannot be extended to a continuous function from $\mathbb{R}\rightarrow \mathbb{R}$.

The function $\lfloor x \rfloor:\mathbb{R}\rightarrow \mathbb{R}$ is only discontinuous at integers. For any rational number $x$, as $\pi$ is an irrational number, $\pi(x^2+1)$ is not an integer. Hence $f$ is continuous at all rationals.

The function $f$ cannot be extended to $\mathbb{R}$, as we can find two sequences of rationals $s_n$ and $t_n$ converging to $\sqrt{\frac{4}{\pi}-1}$ such that $\lim_{n\rightarrow \infty}f(s_n)=3$ and $\lim_{n\rightarrow \infty}f(t_n)=4$. Hence any extension of $f$ will be discontinuous at $\sqrt{\frac{4}{\pi}-1}$.

$\endgroup$
2
  • 1
    $\begingroup$ +1 but I think you should elaborate a bit more... $\endgroup$
    – user378947
    Dec 12, 2016 at 11:53
  • 1
    $\begingroup$ What is $s_n$ and $t_n$ in your case? $\endgroup$ Dec 5, 2018 at 15:15

Not the answer you're looking for? Browse other questions tagged .