# Mapping from $(0,1) \times (0,1) \to (0,1)$

I am trying to find an injection $$f: (0,1) \times (0,1) \to (0,1)$$. I don't think my current idea is rigorous enough.

Let $$(a,b) \in (0,1) \times (0,1)$$, so $$a,b \in (0,1)$$, and there are, therefore, decimal expansions: $$a = 0.x_1 x_2 x_3 \ldots \; b = 0.y_1 y_2 y_3 \ldots$$ Then we define $$f(a,b) = 0. x_1 y_1 x_2 y_2 x_3 y_3 \ldots$$ It's possible that $$a$$ and $$b$$ have non-unique decimal expansions, but we will assume, without loss of generality, that these decimal positions terminate before constructing the output of $$f$$.

Let $$(a,b), (c,d) \in (0,1) \times (0,1)$$, where \begin{align*} a& = 0.a_1 a_2 a_3 \ldots \\ b& = 0.b_1 b_2 b_3 \ldots \\ c& = 0.c_1 c_2 c_3 \ldots \\ d& = 0.d_1 d_2 d_3 \ldots \end{align*} we assume $$f(a,b) = f(c,d)$$. So $$0.a_1 b_1 a_2 b_2 \ldots = 0.c_1 d_1 c_2 d_2 \ldots$$ So $$a_1 = c_1$$, $$b_1 = d_1$$, etc. so $$a = b$$ and $$c = d$$, so $$(a,b) = (c,d)$$.

Have I missed anything that would make this argument rigorous?

• You need to expain exactly what to do with numbers like $0.19999999...$. Other than that it is fine. Sep 15, 2020 at 6:32
• If you assume these decimal representations terminate, how would you map for example, $(\frac{\pi}{4}, \frac{\pi}{6})$? Sep 15, 2020 at 6:34
• @JCAA: Is it enough to say that I would treat $0.199999999\ldots$ as if it were $0.2$ before setting up the mapping? Sep 15, 2020 at 6:42
• @travvytree: I should have been clearer. I don't want all expansions to terminate, but only non-unique ones, like the $0.19999\ldots$ example. Sep 15, 2020 at 6:43
• He only assumes that numbers which have multiple decimal expansions "terminate". These numbers are rational because they have finite decimal expansions. But the OP needs to explain better what to do with these numbers. These are worse than $\pi/4$. Sep 15, 2020 at 6:45

I think it is enough to say that you do not allow an infinite string of nines in the expansion of $$a$$ and $$b$$. In other words, you can say that if $$a$$ has two decimal expansions, you define $$x_i$$ to be the decimal values of the expansion which "terminates", i.e. it becomes $$0$$ from some point on.
This in turn also means that there are no infinite strings of nines in the construction of $$f(a,b)$$, which can easily be proven.
• How does this sound for a proof: if $f(a,b)$ ends in an infinite string of nines, then either $a$ doesn't terminate or $b$ doesn't terminate, a contradiction. Sep 15, 2020 at 6:51
• @Tanner55 That proof is technically wrong. You claim that if $f(a,b)$ does end in an infinite string of nines, then $a$ does not or $b$ does not. That's not a valid implication. In reality, the implication is that if $f(a,b)$ does, then $a$ must as well, and that is the contradiction. I.e., you start with the assumption that $f(a,b)$ ends with nines, and from that, conclude that $a$ must end with nines. But you also know that $a$ does not end with nines, therefore, you reach a contradiction.