Take any nondecreasing continuous function from the reals to the reals that is constant in neighborhoods of rationals, and restrict it to irrationals. This can be constructed as a uniform limit by starting with f(0)(x) = x, enumerating the rationals as r(i) and for each i, setting f(i+1)(x) to be a sum of f(i)(x) and some piecewise linear function supported in a neighborhood of radius 2^(-i) around r(i).
You can do a sort of reflected version of the above, using increasing functions that jump at rationals and have rational slope elsewhere. Start with f(0)(x) = x, enumerate the rationals as r(i) with i ranging over positive integers. For each i, let f(i) be given by adding to f(i-1) a function that is supported in the interval of radius 2^(-i) around r(i), continuous with slope -2^(-i) in this interval away from r(i), and setting f(i)(r_i) to be some irrational between the left and right limits of the jump (the right limit at r(i) is greater than the left limit by 2^(-2i+1)). As long as the rationals r(i) are chosen in a reasonably intelligent way, any real number is covered by at most finitely many of these intervals, so the function is both increasing and irrational-valued.
S. Carnahan
- 45.7k
- 6
- 114
- 220