# Looking for another special kind of injective function

Relating to this Looking for a special kind of injective function Does there exist an injective function $f:\mathbb R→\mathbb R$ such that for every $c∈\mathbb R$ , there is a real sequence $(x_n)$ such that $\lim(f(x_n))=c$ but $f$ is not continuous and $\mathbb R$ \ $f(\mathbb R)$ is uncountable that is $f$ does not attain uncountably many real values ? If $f$ does not attain countably-infinitely many values then I can make such a function namely $f(x)=x ,$ if $x \notin \mathbb Z^+$ ; $f(x)=2x$ if $x \in \mathbb Z^+$ ; but for the uncountable case , I am stuck , please help .

• $f$ is injective $\mathbb R$ is uncountable ,so how is $\mathbb R\setminus f(\mathbb R)$ uncountable – Learnmore Dec 23 '14 at 14:17
• @learnmore: What if $f(\mathbb R) = (0,\infty)$? – MPW Dec 23 '14 at 14:22
• $f$ is injective@MPW – Learnmore Dec 23 '14 at 14:31
• However, if $f$ is injective, then $f$ will attain uncountably many real values... – user133281 Dec 23 '14 at 15:03

For $n\in\Bbb Z$ let

$$D_n=\begin{cases} [n,n+1)\cap\Bbb Q,&\text{if }n\text{ is even}\\ [n,n+1)\setminus\Bbb Q,&\text{if }n\text{ is odd}\;, \end{cases}$$

and let $D=\bigcup_{n\in\Bbb Z}D_n$; then $D$ and $\Bbb R\setminus D$ are both dense in $\Bbb R$, and $|D|=|\Bbb R\setminus D|=|\Bbb R|$. Define $f:\Bbb R\to D$ as follows.

• If $n$ is even, and $x\in D_n$, then $f(x)=2n+(x-n)=n+x\in D_{2n}$.
• If $n$ is even, and $x\in[n,n-1)\setminus D_n$, then $f(x)=2n+1+(x-n)=n+1+x\in D_{2n+1}$.
• If $n$ is odd, and $x\in D_n$, then $f(x)=2n+1+(x-n)=n+1+x\in D_{2n+1}$.
• If $n$ is odd, and $x\in[n,n+1)\setminus D_n$, then $f(x)=2n+(x-n)=n+x\in D_{2n}$.

Then $f$ maps $[n,n+1)$ injectively onto $D_{2n}\cup D_{2n+1}\subseteq[2n,2n+2)$, and $f$ maps $\Bbb R$ injectively onto $D$.

Let $c\in\Bbb R$; $D$ is dense in $\Bbb R$, so there is a sequence $\langle y_n:n\in\Bbb N\rangle$ in $D$ converging to $c$. For $n\in\Bbb N$ let $x_n=f^{-1}(y_n)$; then $\langle f(x_n):n\in\Bbb N\rangle\to c$.

However, $f$ is discontinuous at each point of $\Bbb R$. To see this, let $c\in\Bbb R$. There is a unique $n\in\Bbb Z$ such that $c\in[n,n+1)$. If $c\in D_n$, let $\langle x_n:n\in\Bbb N\rangle$ be a sequence in $[n,n+1)\setminus D_n$ converging to $c$; otherwise, let $\langle x_n:n\in\Bbb N\rangle$ be a sequence in $D_n$ converging to $c$. In either case

$$\left|f(c)-\lim_n f(x_n)\right|=1\;,$$

and $f$ is not continuous at $c$.