The motivation for this post is the question of whether or not there exists a class of functions which are bijections between vector spaces of differing dimensions. Although it is simple enough to show that, over the reals at least, there are no such continuous functions, it seems that removing the constraint of continuity makes such functions possible. For instance, consider the function $f: \mathbb{R}^2 \to \mathbb{R}$, where if $x=\sum_{z \in \mathbb{Z}} x_z 2^z$ and $y=\sum_{z \in \mathbb{Z}} y_z 2^z$ then $$f(x,y)=\sum_{z \in \mathbb{Z}} x_z 2^{2z} +\sum_{z \in \mathbb{Z}} y_z 2^{2z+1}.$$ I.e., if the binary expansion of the real number $x$ is $$x=\ldots 0\, 0\, 0\, x_n\, x_{n-1}\, x_{n-2}\, \ldots,$$ where $n$ is the largest integer such that $x_n \neq 0$ and the binary expansion of the real number $y$ is $$y= \ldots 0 \, 0 \, 0 \, y_{k} \, y_{k-1} \, y_{k-2} \ldots, $$ where $k$ is the largest integer such that $y_k \neq 0$ (assume WLOG that $k>n$), then $$f(x,y)=\ldots 0 \, 0 \, 0 \, y_n \, 0 \, y_{n-1} \, 0 \, \ldots \, y_{n} \, x_{n} \, y_{n-1} \, x_{n-1} \, y_{n-2} \, x_{n-2} \, \ldots.$$ The question is: is this function a bijection? In theory, there could (should?) exist a bijection $g: \mathbb{R}^2 \to \mathbb{R}$ as the cardinality of $\mathbb{R}^2$ and $\mathbb{R}$ are the same (correct me if I'm wrong). A possible counterargument I've formulated to the injectivity of this function would be the pair of points $(x,y)=(.\overline{111} \, ,.0\overline{111})=(1,.1)$ and $(x,y)=(1,0)$. Is this function even well defined? Obviously, this function is incorrigibly discontinuous (and possesses a number of bizarre characteristics but that's talk for another post).
If this counter example convinces you that this function is not well defined, can you think of a way to define an equivalence class on the elements of the domain (e.g., if the binary expansion of two given elements in the domain converge to the same thing then we define the images of the two points to be the same) so that the function still constitutes a bijection? Additionally, can anyone else see any other flaws in the reasoning here or produce another 'flavor' of such functions? Thanks in advance!