TITLE: Does there always exist a strictly increasing function from $\mathbb{R}$ to $\mathbb{R}$ less a countably infinite set?
QUESTION [5 upvotes]: Given some countably infinite set $Z$, can one always construct a strictly increasing function whose domain is all of $\mathbb{R}$, and whose codomain is $\mathbb{R} \setminus Z$? Specifically, I mean that $f(x) \in \mathbb{R}\setminus Z$, not that $f$ is a surjection. If not, are there examples that work in special cases, such as $Z=\mathbb{Z}$ or $Z=\mathbb{Q}$?
I already know that there is no surjection $f : \mathbb{R} \to \mathbb{R}\setminus\mathbb{Q}$.

REPLY [4 votes]: Theorem. If $Z$ is countable, or more generally if $|Z|\lt|\mathbb R|,$ then $\mathbb R\setminus Z$ contains an uncountable closed set.
Proof. It will suffice to exhibit a family of continuum many disjoint uncountable closed subsets of $\mathbb R;$ the set $Z$ will not be able to meet all of them. To this end, let $t\mapsto(g(t),h(t))$ be a continuous surjection from $[0,1]$ to $[0,1]\times[0,1],$ and consider the sets $g^{-1}(x)$, $x\in[0,1].$ Alternatively, note that the Cantor set $C$ is homeomorphic to $C\times C$ and therefore contains continuum many disjoint Cantor sets.
Therefore it will suffice to prove the following:
Theorem. If $S$ is an uncountable closed subset of $\mathbb R,$ then there is a strictly increasing function $f:\mathbb R\to S.$
Proof. It will suffice to construct a strictly increasing function $\varphi:\mathbb Q\to S;$ then, since $S$ is closed, we can extend $\varphi$ to a strictly increasing function $f:\mathbb R\to S.$ by setting $f(x)=\sup\{\varphi(r):r\in\mathbb Q,\ r\lt x\}.$
To define a strictly increasing function $\varphi:\mathbb Q\to S,$ start by fixing an enumeration of the rationals as $\mathbb Q=\{r_1,r_2,r_3,\dots\}.$ Now define $\varphi(r_n)$ recursively, taking care that after each step the restriction of $\varphi$ to $\{r_1,r_2,\dots,r_n\}$ is strictly increasing and each of the $n+1$ intervals into which the $n$ points $f(r_1),f(r_2),\dots,f(r_n)$ divide the line contains uncountably many points
of $S.$