[Math] The set of functions that are zero almost everywhere is enumerable

elementary-set-theoryfunctionsproof-verification

I have become somewhat overwhelmed with a problem I am working on I had a friend tell me that my proof was wrong. I would be grateful if someone could explain why I am wrong, and possibly offer a alternate solution.

Problem: A function $f\colon \mathbb{N} \to \mathbb{N}$ is zero almost everywhere iff $f(n)=0$ for all except a finite number of arguments. It can be shown that the set of functions that are zero almost everywhere is enumerable.

Attempt: Let $E=\{f\colon \mathbb{N} \to \mathbb{N}\mid f \text{ is zero almost everywhere}\}$. Let $Q\colon \mathbb{N}\to E$ such that $Q(n)=f_n$ where we define $f_n(x)=0$ for all but $n\in\mathbb{N}$ values.

Fix $f\in E$, then we need show that there exists some integer $n\in N $ such that $f=f_n$, but by defnition $f$ is zero almost everywhere, so $f(x)=0$ for all but a finite $r\in\mathbb{N}$ values. Choose $n=r$.

I realize that this is a incorrect proof, but I'm not really sure where. I also never used a hint I was given which says to use the fact that a countable union of countable sets is countable.

Thank you.

Best Answer

We will find an explicit bijection from $E$ to $\mathbb{N}\setminus\{0\}$. Getting an explicit bijection from $E$ to $\mathbb{N}$ (or in the other direction) is then easy.

Let $p_0,p_1,p_2,\dots$ be the primes in their natural order. If $f$ is a function which is $0$ almost everywhere, map $f$ to $$p_0^{f(0)}p_1^{f(1)}p_2^{f(2)}p_3^{f(3)}\cdots.\tag{1}$$ The product in (1) is a finite product. By the Fundamental Theorem of Arithmetic, the mapping we have just defined is a bijection from $E$ to $\mathbb{N}\setminus\{0\}$.

Related Question