Prove $f(x)=1/q \forall x=p/q$ in lowest terms cannot be extended to be continuous on $\mathbb{R}$

407 Views Asked by At

Define $f:\mathbb{Q}\rightarrow \mathbb{R}$ such that $f(x)=\frac{1}{q}$ where $x = \frac{p}{q}$ in lowest terms.

Want to show there does not exist a function $F$ with domain $\mathbb{R}$ such that 1) $F$ is continuous and 2) $\forall x\in \mathbb{Q}:F(x)=f(x)$

My attempt: Suppose there does exist such a $F$. Then $\lim_{x\to 1}F(x)=F(1)=1$ since $F$ is continuous. Hence, $\forall \epsilon >0 \exists \delta>0 \forall x:|x-1|<\delta \implies |F(x)-1|<\epsilon$. Take $\epsilon = 1/2$. Then there exists a $\delta >0$ such that $\forall x:|x-1|<\delta \implies 1/2<F(x)<3/2$. But since the rationals are dense in the reals, there exists a rational number (call it $x_0$) such that $0<|x_0-1|<\delta$. Since $x_0 \neq 1$, then $F(x_0)\leq1/2$, which contradicts the fact that $1/2<F(x)<3/2$. Hence no such $F$ exists.

I'm not sure if my solution is fully satisfactory. Also I was wondering if there are other solutions. The solution manual stated that such a $F$ would require $F(a)=0 \forall a$ irrational, but I fail to see how this is true.

1

There are 1 best solutions below

0
On

For a more simple proof use the characterization of continuity by sequences. Suppose that exists a continuous extension $F$ of $f$, since $\dfrac{n}{n+1}\rightarrow 1$ with $\dfrac{n}{n+1}$ in the lower form for all $n\geq1$, then $\dfrac{1}{n+1}=f(\dfrac{n}{n+1})=F(\dfrac{n}{n+1})\rightarrow F(1)=f(\dfrac{1}{1})=1$ and this is absurd.