I'm reading a set of lecture notes that gives a proof that $|\mathbb{R}^{\mathbb{N}}| = |\mathbb{R}|$. I don't think I fully follow it, though it makes sense to me that this would give a bijection.
It first notes that $|\mathbb{R}| = |(0,1)|$, so it suffices to defines a bijection $(0,1) \to (0,1)^{\mathbb{N}}$. We do so as follows. Given $x \in (0,1)$ with decimal expansion $x = 0.r_1 r_2 r_3 \ldots$, define \begin{align*} x_1 & = 0. r_1 r_3 r_5 r_7 \\ x_2 & = 0.r_2 r_6 r_{10} r_{14} \\ x_3 & = 0.r_4 r_{12} r_{20} r_{28} \\ & \vdots \\ \end{align*} so I believe the general formula (but I'm not fully sure) comes out to $$ x_n = \sum\limits_{i=1}^\infty r_{2n - i} \cdot 10^{-i}. $$
I don't fully understand why this is a bijection, though it seems I really only need it to be a surjection. I can certainly inject $(0,1)$ into $(0,1)^{\mathbb{N}}$ by taking $x \in (0,1)$ and sending it to a constant sequence, so if I can surject $(0,1)$ onto $(0,1)^{\mathbb{N}}$, I can inject $(0,1)^{\mathbb{N}}$ into $(0,1)$ and conclude there exists a bijection by the Schroeder-Bernstein theorem.
The proof, for the sake of well-definedness, surely requires that I make clear which decimal expansion of $x$ I'm using, so I think I need to say, "if $x$ has two decimal expansions, pick the one that doesn't terminate in $9$'s." If I fix a decimal expansion (or a "class" of decimal expansions), I can claim this map is well-defined. This doesn't guarantee that the resulting expansion of each $x_n$ doesn't terminate in $9$'s, so that may be the reason this is only a surjection. If I pick a sequence in $(0,1)$, I can expand each $x_n$ in a decimal expansion. That gives me a construction of the above form, and then I should be able to reconstruct $x$ by the above pattern. I'm not completely certain about injectivity, but I think it likely will fail because of issues with infinite $9$'s in the decimal expansions.
I would appreciate any help with making sense of this.