[Math] The set of all functions from $(0,1) \to \mathbb N$ is countable or uncountable

elementary-set-theory

How can I prove that the set of all functions from $(0,1) \to \mathbb N$ is countable or uncountable?

Here the domain is all real numbers between 0 and 1 while the range is set of natural numbers.

Edited :- This answer came to mind. Is it correct?

For every element of domain their is $\mathbb N$ number of functions. So the set of functions for one element of domain is countable. By this logic we can say total number of functions is $ \mathbb N * \mathbb N *\mathbb N \ldots$.

And we all know that countable collection of countable sets is countable and uncountable collection of countable sets is uncountable. We all know that to get collection we need to use sum + operator. My intuition(only for this particular case) is If for sum operator it is uncountable then also for the multiplication operator it should be uncountable.

By this can we say that set of all functions from $(0,1) \to \mathbb N$ is uncountable.

But I doubt about the correctness of this logic "uncountable collection of countable sets is uncountable" but intuitively this logic seems correct.

Best Answer

Let $A=\lbrace f\colon \lbrace 0,1\rbrace\to\mathbb{N}\rbrace$.

Each $f\in A$ has two values; it's just $f(0)$ and $f(1)$ and each of them is in $\mathbb{N}$. Consequently the set $A$ has the same cardinality as $\mathbb{N}\times\mathbb{N}$, but this is countable, since $\mathbb{N}$ is countable.

Edit:

Now let $B=\lbrace f\colon (0,1)\to\mathbb{N}\rbrace$.

Since $x\mapsto \tan(\pi(x-\frac{1}{2}))$ is a bijection of $(0,1)$ and $\mathbb{R}$, we know $(0,1)$ is uncountable. Now there are uncountable many $z\in (0,1)$. Consider now $$\chi_{\lbrace z\rbrace}(x)=\begin{cases} 1& x=z\\ 0 & x\neq z\end{cases}$$ This is indeed a function into $\mathbb{N}_0$, which isn't a problem here since $|\mathbb{N}_0|=|\mathbb{N}|$. Otherwise define $\chi_{\lbrace z\rbrace}(x)=2$ for $x\neq z$. But now there are uncountable many $z\in (0,1)$, so we have "at least" uncountable many functions in $B$.