Alternative Bijection from $\mathbb{N}$ to its finite subsets

74 Views Asked by At

There are different proofs for the fact that there's a bijection from $\mathbb{N}$ to the set of all its finite subsets, but I would like to know if this explicit bijection does work, too.

$f:\mathbb{N} \to P_{inf}(\mathbb{N})$, $f(0)=\{\}$ $f(n)= \left\{ \begin{array}{ll} \{k\} & \mbox{if } n = 2^k \\ \{k\} \bigcup f(n-2^k) & \mbox{else.} \end{array} \right.$ , where $k:=2^k\leq n\leq 2^{k+1}$

The inverse is just built up the other way around.

My proof for this is rather unpleasant and long, but could this work in general or is this one similar to another proof?

Let me know if important information is missing.

Thanks in advance.