set of function that are nondecreasing Let $X$ be a set of all functions from $\mathbb{R}$ to $\{0,1\}$ that are nondecreasing (increasing or staying the same). I need to find the cardinals of this set. I think that I need to find a function that is surjective and injective from $\mathbb{R}$ to $\{0,1\}$ but have some trouble to find one. I thinks that the final answer is $\aleph$.
 A: If you mean by "non-decreasing" that it never decreases, or in other words that if $x < y$ then $f(x) \le f(y)$....
then if $f$ is such a function then for all $x \in \mathbb R$ either $f(x) = 0$ or $f(x) = 1$.  Let $A = \{x| f(x) = 0\}$ and $B = \{x|f(x) = 1\}$.
If $b \in B$ then $b > a$ for all $a \in A$ so if $B$ is not empty then $A$ is bounded above.  And if $A$ is not empty then $B$ is bounded below.
Excercise for you:  If $A$ and $B$ are not empty prove $\sup A = \inf B$ and either $A = (-\infty, \sup A]; B = (\sup A, \infty)$ and $f(x) = 0$ if $x \le \sup A; f(x) = 1$ if $x > \sup A$.  Or $A = (-\infty, \sup A); B = [\sup A, \infty)$ and $f(x) = 0$ if $x < \sup A; f(x) = 1$ if $x \ge\sup A$.
So there are 4 cases:
1) $A$ is empty and $f(x) = 1$.
2) $B$ is empty and $f(x) = 0$.
3) there is an $m \in \mathbb R$ and $f(x) = 0$ if $x < m$ and $f(x) = 1$ if $x \ge m$
4) there is an $m \in \mathbb R$ and $f(x) = 0$ if $x \le m$ and $f(x) =1$ if $x \ge m$.
So there is a bijection form the set of such functions to $\mathbb R\times \{0,1\} \cup \{-\infty,\infty\}$
Where $(m,0) \leftarrow\rightarrow f(x) = 1 \iff x>0$ and $(m,1) \leftarrow\rightarrow f(x) = 1 \iff x\ge0$ and $-\infty \leftarrow\rightarrow f(x) =  0$ and $\infty \leftarrow\rightarrow f(x) = 1$.
So the cardinality is $|\mathbb R \times \{0,1\} \cup \{-\infty, \infty\}|$.
