Does every bijection of $\mathbb{Z}^2$ extend to a homeomorphism of $\mathbb{R}^2$? 
Given a bijection $f\colon \mathbb{Z}^2 \to \mathbb{Z}^2$, does there always exist a homeomorphism $h\colon\mathbb{R}^2\to\mathbb{R}^2$ that agrees with $f$ on $\mathbb{Z}^2$?

I don't see any immediate obstruction, but there are certain bijections that seem difficult to extend, such as
$$
f(a,b) \;=\; \begin{cases} (a,b) & \text{if }b\geq 0, \\[3pt] (-a,b) & \text{if }b<0.\end{cases}
$$
Note that it's possible to map any finite set of points $p_1,\ldots,p_n$ to any other finite set $q_1,\ldots,q_n$ by a homeomorphism of $\mathbb{R}^2$, so it's quite important here that $\mathbb{Z}^2$ is infinite.
Of course, one can more generally ask whether any bijection between discrete subsets of $\mathbb{R}^2$ extends to a homeomorphism.
 A: Here's an idea on how to construct a solution for the bijection you describe. It appears feasible by a diffeomorphism of the plane.
First we solve the following problem : extend the bijection
\begin{array}{RCL}
\phi:\Bbb Z\times\lbrace-1,0\rbrace & \longrightarrow & \Bbb Z\times\lbrace-1,0\rbrace\\
(n,\epsilon) & \longmapsto & \begin{cases} (n,\epsilon) & \text{if }\epsilon=0\\ (-n,\epsilon) & \text{if }\epsilon=-1\end{cases}
\end{array}
to a diffeomorphism of the plane using a vector field $X$ defined as follows: it is supported in the open set
$$\bigcup_{n\geq 1}~H_n+D_\frac13$$
where $H_n$ is the bottom half circle with diameter the segment $[(-n,-1),(+n,-1)]$, and $D_\frac13$ is the open disk centered at the origin with radius $1/3$. For every $n\geq 1$, the vector field inside $H_n+D_\frac13$ is chosen so that it switches $(-n,-1)$ with $(+n,-1)$ and vice versa after flowing for one second, and, importantly, is chosen so that it is zero on a neighborhood of every point $(n,k)$ with $k\leq -2$. Then $\Phi=\mathrm{Fl}^X_1$ extends $\phi$ to the whole plane.
Now consider the map $\ell:\Bbb R \to\Bbb R^2,(x,y)\mapsto(x,y+1)$. Then the infinite composition
$$\cdots\circ(\ell^{-n} \circ\Phi\circ\ell^n)\circ\cdots\circ(\ell^{-1}\circ\Phi\circ\ell)\circ\Phi$$

EDIT. To make this work one should instead consider the infinite composite in the opposite direction $$\Phi\circ(\ell^{-1}\circ\Phi\circ\ell)\circ\cdots\circ(\ell^{-n} \circ\Phi\circ\ell^n)\circ\cdots$$
  This will work and provide a (well-defined this time?!) continuous bijection of $\Bbb R^2$ onto itself, hence a homeomorphism by invariance of domain.

makes sense, and defines a smooth diffeomorphism of the plane that realizes the bijection you describe. The reason this makes sense is that for every $n\geq 1$ the region
$\lbrace(x,y)\in\Bbb R^2\mid y\geq-\frac12\rbrace\cup D((0,-1),n+\frac12)$ it stable, and there the infinite composition is actually a finite composite of diffeomorphisms, and is smooth.

I think something similar is possible for any bijection of $\Bbb Z^2$, to get a diffeomorphism that extends it defined as an infinite composition of time one flows of vector fields whose supports tend to infinity, i.e. lie outside of bigger and bigger balls, and hence, after a while, will not do anything on a fixed ball, I might come back to this tomorrow.
I think you could do it like so : first, write $V_\epsilon(A)$ for the $\epsilon$ neighborhood of a set $A\subset\Bbb R^2$. Now enumerate the elements of $\Bbb Z^2$ in a spiral fashion by a bijection $\varphi:\Bbb N\to\Bbb Z\times\Bbb Z$. Set $m_n=\min\lbrace|\phi(n)|,|f(\phi(n))|\rbrace$ and $M_n=\max\lbrace|\phi(n)|,|f(\phi(n))|\rbrace$. For every $n$, construct a compactly supported vector field $X_n$ so that


*

*$X_n$ is compactly supported with $$\mathrm{supp}(X_n)\subset\lbrace x\in\Bbb R^2\mid m_n-1\leq|x|\leq M_n+1\rbrace\setminus V_\frac14\left(\Bbb Z^2\setminus\lbrace\phi(n),f(\phi(n))\rbrace\right)$$

*The time one flow $\Phi_n=\mathrm{Fl}^{X_n}_1$ of $X_n$ sends $\phi(n)$ to $f(\phi(n))$


Then the infinite composition 
$$\cdots\circ\Phi_n\circ\cdots\circ\Phi_{1}\circ\Phi_{0}$$
makes sense and is smooth because on every compact disk it actually is a finite composite.
A: Here is another solution, somewhat in the same spirit as Olivier Bégassat's answer. In fact, we will prove a stronger result : any bijection $f : \mathbb{Z}^2 \to \mathbb{Z}^2$ comes from a smooth isotopy $h : \mathbb{R}^2 \times [0,1] \to \mathbb{R}^2$ such that $h(x,0) = x$ and $h(-,1) = f : \mathbb{Z}^2 \to \mathbb{Z}^2$.
As in Hagen von Eitzen's answer, let us consider first the point $O = (\sqrt{2}, \pi)$. It is not in the lattice $\mathbb{Z}^2$ as $\sqrt{2}$ and $\pi$ are irrational numbers. What is more is that any circle centred at $O$ and any straight line through $C$ contains at most one element of the lattice, since $\sqrt{2}$ is algebraic whereas $\pi$ is transcendental.
Fix some bijection $l : \mathbb{N} \to \mathbb{Z}^2$ ; This induces a bijection $g : \mathbb{N} \to \mathbb{N} : n \mapsto (l^{-1} \circ f \circ l)(n)$. Let $C_n$ denote the circle centred at $O$ passing through $l(n)$ ; Similarly, let $L_n$ be the straight line spanned by the segment $\overline{l(n)O}$. We define a continuous path $\beta_n : [0,1] \to \mathbb{R}^2$ as follow :
1) $\beta_n : [0, 1/2] \to C_n$ is a smooth path joining $l(n)$ to the point of intersection of $C_n$ with $L_{g(n)}$.
2) $\beta_n : [1/2, 1] \to L_{g(n)}$ is a smooth path joining the point of intersection of $C_n$ with $L_{g(n)}$ to the $f(l(n)) = l(g(n))$.
A smooth reparametrization of $\beta_n$ yields a smooth path $\gamma_n : ([0,1], \{0\}, \{1\}) \to (C_n \cup L_{g(n)}, l(n), f(l(n)))$.
By construction, at any given time $t$, none of the points $\gamma_n(t)$ coincide. Moreover, since each $\mathrm{Im}\, \gamma_n$ is compact, the set $\{ \gamma_n(t) \,| \, n \in \mathbb{N}   \}$ has only isolated points : since $\mathbb{R}^2$ is a normal space, we can find reccursively a sequence of positive reals $\epsilon_n$ such that at each time $t$, none of the balls $B(\gamma_n(t), \epsilon_n)$ intersect. Remark : We are implicitly using here properties of the $C_n$'s and of the $L_n$'s.
The $\gamma_n$'s define a vector field $V$ on the set $\{ (x,t) \in \mathbb{R}^2 \times [0,1] \, | \, \exists n \in \mathbb{N} \; \mbox{ s.t. } \;  x = \gamma_{n}(t) \}$. More explicitly, $V_{(\gamma_n(t),t)} = \dot{\gamma_n}(t) + \partial/\partial t$. This vector field can be smoothly extended to a vector field $X$ on $\mathbb{R}^2 \times [0,1]$ of the form $\pi^{\ast}Y + \partial/\partial t$ (where $\pi : \mathbb{R}^2 \times [0,1] \to \mathbb{R}^2$ is the canonical projection and $Y$ is a smooth non-autonomous vector field on $\mathbb{R}^2$) in such a way that it equals $\partial/\partial t$ outside the set $\{ (x,t) \in \mathbb{R}^2 \times [0,1] \, | \, \exists n \in \mathbb{N} \; \mbox{ s.t. } \;  d(x,\gamma_{n}(t)) \le \epsilon_{n} \}$. We define the isotopy $h$ as the flow of the vector field $Y$.
Remark : $\mathbb{R}^2$ admits a standard symplectic form $\omega = \mathrm{d}x \wedge \mathrm{d}y$. At each point $p \in \mathbb{R}^2$, this 2-form defines an isomorphism $\Omega_p : T_p\mathbb{R}^2 \to T^{\ast}_p \mathbb{R}^2 : v \mapsto \omega_p(v, -)$. One can extend such a linear 1-form in a constant way in an $\epsilon$-neighbordhood of $p$ in order to get a closed differential 1-form in this neighbordhood. Applying Poincaré's lemma, we get in a smaller neighbordhood of $p$ a smooth function whose exterior derivative equals the given 1-form. Using an appropriate bump function, we obtain a global smooth function $f_p$ such that $(\Omega^{-1} \mathrm{d}f_p)_p = v$ with support in $B(p, \epsilon)$. In fact, $p \mapsto f_p$ can be chosen in a smooth way. As such, at any time $t$, we can define a smooth function $F_t = \sum_{n=1}^{\infty} \, f_{\gamma_{l(n)}(t)}$ smoothly varying with $t$ such that $Y_t := \Omega^{-1} \mathrm{d}F_t$ is as above. The resulting isotopy $h_t$ is a Hamiltonian one ; We conclude that $h$ can be chosen area-preserving.
A: Yes.
We can consider a sequence of disks $D_1,D_2,\ldots$ around $(\sqrt 2,\pi)$ such that the $n$th disk has precisely $n$ lattice points in its interior (and none on its boundary). Let $z_n$ be the lattice point in $D_n\setminus D_{n-1}$.
Construct accordingly a sequence $C_1, C_2, \ldots$ of simply connected compact sets with smooth boundary such that $C_{n+1}\setminus C_n$ is an annulus: 
We let $C_1$ a a small closed disk around $f(z_1)$.
Given $C_n$, we can connect $f(z_{n+1})$ with $C_n$ via a straight line segment $\ell_n$ that does not pass through any other lattice point (and ends at its first intersection with $\partial C_n$. Then $C_n\cup \ell_n$ is simply connected, hence the complement is  (via some map $\phi_n$) biholomorphic to $\{\,z\in\mathbb C:|z|>1\,\}$. Since almost all lattice points are "close" to $f(\infty)=\infty$, the distance $r_n$ between $f(\mathbb Z^2\setminus C_n)$ and $S^1$ is strictly positive.
Let $C_{n+1}=C_n\cup \phi_n^{-1}(\{\,z\in\mathbb C:|z|\le 1+\tfrac {r_n}2\,\})$.
Now to construct the desired homeomorphism $h$:


*

*Since $C_1$ and $D_1$ are disks, we can readily define $h\colon D_1\stackrel \approx \to C_1$

*Assume we have defined $h\colon D_n\stackrel\approx \to C_n$. To extend this, we need only find a homeomorphism between the closed annuli $D_{n+1}\setminus D^\circ_n$ and $\phi_n(C_{n+1}\setminus C^\circ_n)=\{\,z\in\mathbb C:1\le |z|\le 1+\frac{r_n}2\,\}$ that agrees with what we already have as homeomorphis between the inner boundaries. Viewing both sets as $[0,1]\times S^1$, we use the identity on the first factor and the given homeomorphism between the inner boundaries on the second factor.


The resulting map on $\mathbb R^2=\bigcup D_n$ is the desired homeomorphism if we can ensure that $\mathbb R^2=\bigcup C_n$.
Right now I am not sure if the construction above warrants this auttomatically. I suppose that one should be more "greedy", that is not only add $\ell n$ to $C_n$ (and then dilate it) but add something more while still maintaining simple connectivity at that step ...

Based on Henning Makholm's and Jim Belk's excellent comments, here's a complete rewrite of the above:
Lemma. Let $Q\subset \mathbb R^2$ be countable, closed, and discrete. Let $q_1,q_2,\ldots$ be an enumeration of $Q$.
Then there exists a homeomorphism $h\colon\mathbb R^2\to \mathbb R^2$ with $f(q_n)=(n,0)$ for all $n\in\mathbb N$.
Proof. Pick a point $a$ that is on none of the countably many lines through two points of $Q$.
Then for each $n$, the line segment $\ell_n$ from $a$ to $q_n$ is a compact set disjoint from $Q\setminus\{q_n\}$.
For $n\in\mathbb N$, $r>0$ let $C(n,r)$ be the convex hull of $\overline{B(a;r)}\cup\overline{ B(q_n;r)}$; this is the union of two disks and a rectangle, its boundary consists of two arcs and two line segments, it is star shaped around $a$, and every ray originating at $a$ intersects its boundary in exactly one point.
For $m\in\mathbb N$ let
$$ r(n,m) = \min\{\,|q_k-y|:k\ge m,k\ne n, y\in \ell_n\,\},$$
which exists and is positive because $\ell_n$ is compact and $Q$ (minus a finte set) is closed.
For $0<r<r(n,m)$ we have $C(n,r)\cap Q\subseteq\{q_1,\ldots,q_{m-1}\}\cup\{q_n\}$.
Clearly $m'>m$ implies $r(n,m')\ge r(n,m)$.
Also $r(n,m)\to\infty$ as $m\to\infty$ because $r(n,m)>r$ for all $m$ implies that $C(n,r)$contans infinitely many elements of $Q$, contradicting discreteness.
This allows us to pick for each $n$ a sequence $\{\rho_{n,m}\}_{m=n}^\infty$ that is strictly increasing and diverges $\to\infty$ as $m\to\infty$ and such that $\rho_{n,m}<r(n,m)$ holds for all $m\ge n$.
Now let
$$ C_n=\bigcup_{k=1}^n C(k,\rho_{k,n}).$$
Then $C_n$ is starshaped around $a$, compact, has a useer-friendly boundary consisting of finitely many arcs and line segments, and each ray originating in $a$ intersects the boundary in exactly one point.
Moreover, $C_n\subset C_{n+1}^\circ$ and $\bigcup_{n=1}^\infty C_n=\mathbb R^2$. We also have $C_n\cap Q=\{q_1,\ldots, q_n\}$ and $\partial C_n\cap Q=\emptyset$.
By linear interpolation between the boundaries we obtain a homeomorphism $h_0\colon \mathbb R^2\to\mathbb R^2$ that maps $a\mapsto 0$ and $\partial C_n\to nS^1$. Note that $h_0(q_n)$ is between $(n-1)S^1$ and $nS^1$. It is a simple task to deform each such annulus (and the central disk) in such a way that the boundary remains untouched and $f(q_n)$ moves to $(n-\tfrac12,0)$. With a final translation by $\frac12$ to the right, we obtain our desired homoeomorphism. $_\square$
Now the original problem is solved by applying the lemma to an enumeration $q_1,q_2,\ldots $ of $\mathbb Z\times Z$ and also to the enumeration $f(q_1),f(q_2),\ldots$.
A: The answer is yes. There are also many generalisations that I will discuss below.
A classical reference from which this can be deduced is Richards' classification of non-compact surfaces.
To make the connection with Richards' setup, think of $\mathbb{R}^2 - \mathbb{Z}^2$ as a surface $S$. The end compactification (aka. Freudenthal compactification) of $S$ is homeomorphic with $\mathbb{S}^2$ (see e.g. Corollary 1.5. in Georgakopoulos - On planar Cayley graphs and Kleinian groups). The boundary of this compactification (the space of ends) can be identified with $\mathbb{Z}^2$ plus the point 'at infinity'. Richards proved that if $S_1,S_2$ are two planar surfaces, then any homeomorphism $h$ between their spaces of ends extends to a homeomorphism between $S_1$ and $S_2$. To answer our question, we let $S_1,S_2$ both coincide with $\mathbb{R}^2 - \mathbb{Z}^2$, and we let $h$ coincide with our bijection of $\mathbb{Z}^2$, extended to map the 'point at infinity' to itself.
Notice that there is nothing special about $\mathbb{Z}^2$ here; we can replace it by any infinite subset of $\mathbb{R}^2$ with no accumulation point in $\mathbb{R}^2$. For example, any bijection from $\mathbb{Z}^2$ to $\mathbb{Z}$ extends into a homeomorphism of $\mathbb{R}^2$. More generally, Richards' result implies that any homeomorphism between compact, 0-dimensional subspaces of $\mathbb{S}^2$ extends into a homeomorphism of $\mathbb{S}^2$.
Richards' result, in the latter formulation, does not extend to higher dimensions: wild Cantor sets such as Antoine's 1921 construction yield counterexamples. But it does extend if we restrict the set of punctures to be countable; the preprint
Georgakopoulos - Every countable compact subset of S^n is tame.
which was partly motivated by this post, provides a proof. In particular, any bijection of $\mathbb{Z}^n, n\geq 2$ extends into a homeomorphism $h$ of $\mathbb{R}^n$.
The aforementioned preprint also shows that we can choose $h$ to be orientation-reversing. You may find the following special case amusing: the identity on $\mathbb{Z}^2$ extends into an orientation-reversing homeomorphism  of $\mathbb{R}^2$. (Here is an alternative proof: Let $A$ be a homeomorph of $\mathbb{R}$ in $\mathbb{R}^2$ containing all of $\mathbb{Z}^2$.  Think of $\mathbb{S}^2$ as the 1-point compactification of $\mathbb{R}$, and notice that $A$ becomes a circle $C$ in $\mathbb{S}^2$. Use the Jordan-Schoenflies theorem to reflect the two sides of $C$ in $\mathbb{S}^2$. Restrict this reflection back to $\mathbb{R}^2$.)
I'm asking which subspaces of $\mathbb{R}^2$ apart from $\mathbb{Z}^2$ have this property.
