Do everywhere discontinuous functions like these one described exist?

56 Views Asked by At

These are the properties that such functions should (could?) have:

1) $f(\mathbb R)=\mathbb R$

2) $f$ is everywhere discontinuous

3) $\mathbb Q \subseteq f( \mathbb I)$

4) $f(\mathbb Q) \subset \mathbb I$

That is, such functions should (could?) have all these properties simultaneously: They map the whole $\mathbb R$ onto the whole $\mathbb R$, they are everywhere discontinuous, they map the set of all irrational numbers $\mathbb I$ into some set that contains all rationals, and they map the set of all rationals into some subset of the set of all irrationals.

Remark: This is not a homework, I am just eager into doing research of everywhere discontinuous functions.

2

There are 2 best solutions below

4
On BEST ANSWER

Let $g : \mathbb{I} \to \mathbb{R}$ be onto (such a function exists because $\mathbb{I}$ and $\mathbb{R}$ have the same cardinality), and partition $\mathbb{Q}$ into two disjoint dense sets $Q_1, Q_2$. Then let $$f(x) = \begin{cases} g(x), & x \in \mathbb{I} \\ -\sqrt{2}, & x \in Q_1 \\ \sqrt{2}, & x \in Q_2.\end{cases}$$

3
On

Sure.

$$f(x)=\begin{cases}x+\sqrt 2&\text{if }x=a+b\sqrt 2\text{ with }a\in\Bbb Q, b\in\Bbb Z\\x&\text{otherwise}\end{cases} $$