1 Introduction

A rational (respectively, integral) distance set is a subset S of the plane \({\mathbb {R}}^2\) such that for any pair of points st in S, the distance between s and t is a rational number (respectively, is an integer). On any line L in \({\mathbb {R}}^2\), it is easy to give examples of dense rational distance sets. The same is true for any circle of radius a positive rational number. However, it is not known if there is a rational distance set with eight points in general position, that is, no three of them on a line and no four of them on a circle.

In 1945, Anning and Erdős [1] proved that any infinite integral set must be contained in a line. In the same year, Ulam conjectured that there is no everywhere dense rational distance set in the plane, see [15, Pbm. III.5]. Erdős also states that an infinite rational distance set has to be very restricted (see [7]).

Huff [9] considered rational distance sets S of the following form: given distinct \(a,b \in {\mathbb {Q}}^{*}\), S contains the four points \((0, \pm \,a)\) and \((0, \pm \,b)\) on the y-axis, plus points (x, 0) on the x-axis, for some \(x \in {\mathbb {Q}}^{*}\). Such a point (x, 0) must then satisfy the equations \(x^2 + a^2 = u^2\) and \(x^2+b^2 = v^2\) with \(u, v \in {\mathbb {Q}}\). The system of associated homogeneous equations \(x^2+a^2z^2 = u^2\) and \(x^2 + b^2z^2 = v^2\) defines a curve \(C(a^2, b^2)\) of genus 1 in \({\mathbb {P}}^3\). Huff [9] and Peeples [13] provided examples in which the elliptic curve \( C(a^2,b^2)\) has a positive Mordell–Weil rank over \({\mathbb {Q}}\), thus, exhibiting examples of infinite rational distance sets that are contained neither on a line nor in a circle. These examples remain to this day the “largest” known such examples, i.e., examples of rational distance sets with infinite number of points not all on a line.

Using Mordell conjecture, proved by Faltings, Solymosi and de Zeeuw [14] proved that lines and circles are the only irreducible algebraic curves that contain an infinite rational distance set. They also showed that if a rational distance set S contains infinitely many points on a line (respectively, on a circle), then all but four (respectively, three) points of S are on the line (respectively, circle). For a rational distance subset of the plane intersecting any line in finitely many points, it was conditionally shown in our previous paper [12] that there is a uniform bound on the number of these intersections. The main tool in [12] is a conditional uniform boundedness theorem on the number of rational points of algebraic curves of genus at least 2 on a fixed number field [6].

Assuming the Bombieri–Lang conjecture in arithmetic geometry, in this paper we prove the above mentioned conjecture of Erdős and Ulam. Our proof shows in addition that the examples of Huff and Peeples, described above, should be in fact the largest possible examples of rational distance sets not entirely contained in a line or in a circle, cf. Corollary 1.4. We are thus able to answer Problem D20 in [8] (see also Sect. 5.11 in the book of Brass et al. [3]).

Statement of the Main Theorems. Let \(A=\{(\alpha _1 , \beta _1) , \dots , (\alpha _m, \beta _m)\}\) be a subset of \({\mathbb {R}}^2\). Assume that all the points of A are not on a line. Furthermore, suppose \(m=2g+2\) is even with \(g \ge 2\). We associate an embedded surface \(S_A\) in \({\mathbb {P}}^3\) to A, with the property that the points in A play the role of rational points of \(S_A\) over an appropriate finite field extension of \({\mathbb {Q}}\).

Let [x : y : z : w] be the projective coordinates in \({\mathbb {P}}^3\).

Definition 1.1

The distance surface of A is the hypersurface \(S_A\) in \({\mathbb {P}}^3\) defined by the equation

$$\begin{aligned} z^2 = \prod _{i=1}^{m}\bigl \{(x-\alpha _i)^2 + (y-\beta _i)^2\bigr \}, \end{aligned}$$
(1.1)

in the affine chart \(w=1\).

Here is our main observation.

Theorem 1.2

Let \(m=2g+2\) be even with \(g \ge 2\). For any subset \(A=\{(\alpha _1 , \beta _1) , \ldots , (\alpha _m, \beta _m)\} \) in the plane whose points are not all on a line, the distance surface \(S_A\) is of general type.

The above result is our key tool to deduce the following theorem.

Theorem 1.3

Assuming the Bombieri–Lang conjecture in arithmetic geometry (for the case of surfaces of general type), there is no rational distance set that is (topologically) dense in the plane.

As a corollary of the proof of the above theorem, and combined with the results of Solymosi and de Zeeuw [14] (see also Sect. 2), we will show that an infinite rational distance set in the plane should be very restricted in the following sense.

Corollary 1.4

Let S be a rational distance set with infinitely many points. Then

  • Either, all but at most four of the points of S are on a line,

  • Or, all but at most three points of S are on a circle.

We will recall the definition of varieties of general type and the statement of the Bombieri–Lang conjecture in Sect. 2. The results of this paper could be considered as a witness to the power of the Bombieri–Lang conjecture. The proofs of Theorems 1.2 and 1.3, and Corollary 1.4 are given in Sect. 3.

In the final step of preparation of this paper, I learned that Tao has given an independent conditional solution to the Erdős–Ulam problem (http://terrytao.wordpress.com/2014/12/20/the-erdos-ulam-problem-varieties-of-general-type-and-the-bombieri-lang-conjecture). His example for a surface of general type is a complete intersection of four hyper-surfaces in \({\mathbb {C}}^6\), and the proofs are slightly more technical.

2 Varieties of General Type and the Bombieri–Lang Conjecture

Let X be a variety over \({\mathbb {C}}\) of dimension n and let \(\Omega _X\) be the sheaf of regular (holomorphic) n-forms over X. The determinant of \(\Omega _X\) is called the canonical sheaf of X, and is denoted by \(K_X\). The canonical ring of X is defined by \(R(X):= \bigoplus _{m \ge 0} H^0(X, K_X^{\otimes m})\), where for a sheaf \({\mathcal {F}}\), \(H^0(X, {\mathcal {F}})\) denotes the set of global sections of \({\mathcal {F}}\). The Kodaira dimension of a variety X denoted by \(\kappa (X)\) is defined as the projective dimension of the canonical ring R(X), i.e., \(\kappa (X):= \mathrm{tr}(R(X)) -1\), where for a ring R, \(\mathrm{tr}(R)\) denotes the transcendental degree of R. Equivalently, the Kodaira dimension of the variety X is the minimal integer \(\kappa \ge -\,1\) for which the following limit

$$\begin{aligned} \lim _{m \rightarrow \infty } \frac{\dim H^0(X, mK_X)}{m^{\kappa }} \end{aligned}$$

exists. In another words, it is the rate of growth of the sequence of plurigenera \(P_m:= \dim H^0(X, mK_X)\). The Kodaira dimension is a birational invariant which is an important tool in the classification of algebraic varieties.

If all the pluricanonical sheaves \(K_X^{\otimes m}\) are not effective, i.e., if they do not have any global section, then the Kodaira dimension is defined by \(\kappa (X) := -1\) (note that some people use \(\kappa := -\,\infty \)). By definition, it is clear that the Kodaira dimension satisfies the inequality \(-\,1 \le \kappa (X) \le \dim X\), and it divides all varieties X of dimension n into \(n +\,1\) classes, those of Kodaira dimensions \(-\,1, 0, 1, \dots , n\).

In some sense it is true that the Kodaira dimension of most varieties takes on the maximal value \(\kappa (X)= \dim X\); this prompts the following definition.

Definition 2.1

A smooth variety X is of general type if \(\kappa (X) = \dim X\). More generally a singular variety X is of general type if a desingularization \(\widetilde{X}\) of X is a variety of general type.

Example 2.2

Let X be a curve of genus g.

  • If \(g=0\) then \(\dim H^0(X, mK_X) =0\) for all \(m\ge 1\) so \(\kappa (X) =-1\).

  • If \(g=1\) then \(\dim H^0(X, mK_X)=1\) for all \(m\ge 1\) so in this case we have \(\kappa (X) =0\).

  • If \(g \ge 2\) then \(\dim H^0(X,K_X)=g\) and by applying the Riemann–Roch theorem for \(m \ge 2\) we have \(\dim H^0(X, mK_X)=(2m-1)(g-1)\). Hence for \(g \ge 2\) we have \(\kappa (X)=1\).

Therefore as we can see from the above example for the case of curves, being general type is equivalent to the condition \(g\ge 2\). Thus varieties of general type are a natural generalization of the notion of hyperbolic curves, i.e., curves of genus \(g \ge 2\).

Example 2.3

A smooth hypersurface of degree \(d\ge n+2\) in a projective space \({\mathbb {P}}^n\) is of general type.

The Bombieri–Lang conjecture generalizes the Mordell conjecture to varieties of higher dimension.

Conjecture 2.4

(Bombieri–Lang) Let X be a projective variety of general type defined over a number field K. Then the set of rational points X(K) of X is not Zariski dense in X.

The fundamental Diophantine condition conjecturally satisfied by varieties of general type is the Bombieri–Lang conjecture stated in the introduction.

Bombieri posed the above conjecture for surfaces of general type, and Lang (independently) formulated the conjecture for higher dimensional varieties; in fact, he gave a more precise and refined form to describe the distribution of rational points on the varieties of general type.

One of the main interesting consequences of the Bombieri–Lang conjecture is the following.

Theorem 2.5

(Uniformity Conjecture [6]) The Bombieri–Lang conjecture implies that, for every number field K and for every \(g \ge 2\), there exists a number B(Kg) such that no curve of genus g defined over K has more than B(Kg) points defined over K.

We refer to [2, 11] for the main references on the conjecture, and to [4,5,6] for a discussion of its consequences for the distribution of rational points on curves.

3 Proofs of the Main Theorems

Before giving the proofs of the theorems stated in the introduction, we recall some known basic results.

First, we observe that rationality of distances in \({\mathbb {R}}^2\) is clearly preserved by translations, rotations, and uniform scaling (\((x, y) \mapsto (\lambda x , \lambda y)\) with \(\lambda \in {\mathbb {Q}}\)). We call a transformation \(T:{\mathbb {R}}^2 \rightarrow {\mathbb {R}}^2\) a similarity transformation if it can be written as the composition of translations, rotations and uniform scaling.

Note that rational distance sets are also preserved by certain central inversions: an inversion with respect to a point in the rational distance set and with a rational radius. More precisely, we quote the following lemma from [14].

Lemma 3.1

Let A be a rational distance set in \({\mathbb {R}}^2\). Let x be a point of A and consider any inversion \(\tau (x;r)\) in \({\mathbb {R}}^2\) with center x and with a rational radius \(r \in {\mathbb {Q}}_{+}\). Then the image of \(A \setminus \{x\}\) under \(\tau (x;r)\) is a rational distance set.

A priori, points in a rational distance set A might have arbitrary coordinates. However, after moving two of the points in A to two fixed rational points by a similarity transformation, the points become almost rational points. More precisely, we have the following basic lemma (see e.g. [10]).

Lemma 3.2

For any rational distance set A, there is a square free integer \(k\in \mathbb Z_+\) such that if a similarity transformation T transforms two distinct points of A into (0, 0) and (1, 0), then any point in T(A) is of the form \((r_1, r_2\sqrt{k}) \) for \(r_1, r_2 \in {\mathbb {Q}}\).

3.1 Proof of Theorem 1.2

Let \(A=\{(\alpha _1 , \beta _1) , \dots , (\alpha _m, \beta _m)\}\) be a subset of \({\mathbb {R}}^2\), not all on a line, and assume m is an even integer of the form \(m=2g+2\) with \(g \ge 2\). We prove that the distance surface \(S_A \subset {\mathbb {P}}^3\) associated to A, defined by the equation

$$\begin{aligned} z^2 = \prod _{i=1}^{m}\bigl \{(u-\alpha _i)^2 + (v-\beta _i)^2\bigr \}, \end{aligned}$$
(3.1)

is of general type.

First we analyse the singularities of \(S_A\). For each \(j=1, \dots , m \), define \(z_j = \alpha _j + \mathbf {i} \, \beta _j\), where \(\mathbf {i}=\sqrt{-1}\). Rewriting the equation of \(S_A\) in the form

$$\begin{aligned} z^2&=\prod _{j=1}^{m}\bigl \{(x-\alpha _j)+\mathbf {i}\,(y-\beta _j)\}\{(x-\alpha _j)-\mathbf {i}\,(y-\beta _j)\bigr \}\\&=\prod _{j=1}^{m} \bigl (x+\mathbf {i}\,y-(\alpha _j + \mathbf {i}\, \beta _j)\bigr )\bigl (x-\mathbf {i}\, y -(\alpha _j -\mathbf {i}\, \beta _j)\bigr ), \end{aligned}$$

and making a change of coordinates \(x+\mathbf {i}y \mapsto x\) and \(x-\mathbf {i}y \mapsto y\), we get the equation of \(S_A\) in the new coordinates in the following form:

$$\begin{aligned} z^2 = P(x) Q(y), \end{aligned}$$

where \(P(x)= (x- z_1) \cdots (x-z_m)\) , \(Q(x) = (x-\overline{z}_1) \cdots (x- \overline{z}_m)\).

Assume that the coordinates in \({\mathbb {P}}^3\) are [x : y : z : w], so that the above equation of \(S_A\) is given in the affine part \(w=1\).

At a singular point lying in the affine part \(w=1\), all the partial derivatives are vanishing, which yield to the following equations:

$$\begin{aligned} z=0 , ~~P'(x)Q(y)=0 ,~~ P(x)Q'(y)=0 . \end{aligned}$$

Using that the singular point (xyz) is on the surface, and since the polynomials PQ have no multiple roots, we further get

$$\begin{aligned} z=0 , ~~P(x)=0 , ~~Q(y)=0 . \end{aligned}$$

The part at infinity should be more elaborated. If we projectivize the equation of the distance surface \(S_A\)

$$\begin{aligned} z^2 = P(x) Q(y), \end{aligned}$$

we obtain the following projective surface:

$$\begin{aligned} z^2 w^{2m-2} = (x- z_1 w) \cdots (x-z_m w) (x-\overline{z}_1 w) \cdots (x- \overline{z}_m w) \end{aligned}$$

in \({\mathbb {P}}^3\). If we put \(w=0\) in the above equation we obtain the two lines \(L_1: = (x=w=0)\) and \(L_2:= (y=w=0)\) intersecting at the point \(p=(0, 0, 1, 0)\) on the distance surface. By computing the partial differentiation \(\partial _x, \partial _y, \partial _z, \partial _w\) one can easily see that all points on the two lines \(L_1\) and \(L_2\) are singular points and therefore the singular locus at infinity is the union of the two lines \(L_1\) and \(L_2\).

This gives

Proposition 3.3

The singular points of \(S_A\) on the affine part \((w=1)\) are the \(m^2\) points \((z_i ,\overline{ z}_j , 0)\) for \(i,j =1 , \ldots ,m\). In addition, each singular point \((z_i ,\overline{ z}_j , 0)\) is of type \(z^2 = x y\). Furthermore, the singular locus of the surface \(S_A\) at infinity is the union of the two lines \(L_1\) and \(L_2\).

In the next step we show that the singular surface \(S_A\) with equation \( z^2 = P(x) Q(y)\), for P and Q two polynomials of the same degree and without multiple roots, is a surface of general type.

The surface \(S_A\) gives a branched double cover of the surface \({\mathbb {P}}^1 \times {\mathbb {P}}^1\) by the morphism \(\pi :(x, y, z) \mapsto \bigl (\frac{x}{z}, \frac{y}{z}\bigr )\), which is obviously a rational morphism. This morphism is branched along the locus \(z=0\), i.e., along \(P(x) Q(y) =0\), which is a union of the \(2g+2\) fibers from each ruling of \({\mathbb {P}}^1 \times {\mathbb {P}}^1\).

The \(m^2 =(2g+2)^2\) singular points \((z_i,\overline{z}_j, 0)\) of \(S_A\) are lying over the double points of the branched divisor.

The ramification divisor R of \(\pi \) is the zero divisor of the function z and we have the equality

$$\begin{aligned} 2R =(z^2)= (P(x)) + (Q(y)). \end{aligned}$$

Applying the Riemann–Hurwitz formula to the cover \(\pi :S_A \rightarrow {\mathbb {P}}^1 \times {\mathbb {P}}^1\) on the smooth part of \(S_A\), we get

$$\begin{aligned} K_{S_A}&= \pi ^* (K_{{\mathbb {P}}^1 \times {\mathbb {P}}^1 }) \otimes {\mathcal {O}}_{S_A}(R) \\&= \pi ^* (K_{{\mathbb {P}}^1 \times {\mathbb {P}}^1 }) \otimes {\mathcal {O}}_{{\mathbb {P}}^1 \times {\mathbb {P}}^1}(g+1 , g+1) = \pi ^* ( {\mathcal {O}}_{{\mathbb {P}}^1 \times {\mathbb {P}}^1}(g-1 , g-1)) , \end{aligned}$$

which is ample.

The canonical differentials on \(S_A\) can be written down as follows. Setting

$$\begin{aligned} \omega : = \frac{dy \wedge dx}{z}, \end{aligned}$$

we see that all the products

$$\begin{aligned} \omega _{k, l}: = y^k x^l \omega , \end{aligned}$$

for \(0\le k, l \le g-1\), give regular canonical differentials on the smooth locus of the surface \(S_A\).

Now we need to deal with singular points of the surface \(S_A\). At the singular point \(( z_i ,\overline{ z}_j , 0)\) after replacing x and y by \(x- z_i\) and \(y - \overline{ z}_j \) respectively, the surface \(S_A\) will have the local equation \(z^2 = x y\). Hence by blowing up once, we obtain a smooth surface \(\widetilde{S_A}\). Moreover, in terms of local coordinates we have

$$\begin{aligned} z' = z , ~ ~ x' = \frac{x}{z} , ~~ y' = \frac{y}{z} \end{aligned}$$

on \(\widetilde{S_A}\). The pullback of the form \(\omega \) to the surface \(\widetilde{S_A}\) may be written as

$$\begin{aligned} \omega '&= \frac{d(y' z') \wedge d(x' z')}{z'}=z' ( dy' \wedge dx' ) +x' (dy' \wedge dz') + y' (dz' \wedge dx') , \end{aligned}$$

which is regular on all of \(\widetilde{S_A}\). Thus, all the forms \(\omega _{k, l}\) above pull back to regular forms on \(\widetilde{S_A}\).

Analysis of the Singular Locus at Infinity. We observed that the singular locus at infinity of the projective surface \(S_A\) is the union of the two lines \(L_1: = (x=w=0)\) and \(L_2:= (y=w=0)\) intersecting at the point \(p=(0, 0, 1, 0)\). Now we should prove that the pullback of the differential form \(\omega : = \frac{dx \wedge dy}{z}\) to the blow-up surface along the singular locus at infinity will be regular (similar to the singular points analysis in the affine part).

To analyze the regularity of the differential form

$$\begin{aligned} \omega : = \frac{dx \wedge dy}{z} \end{aligned}$$

over the singular locus at infinity first we have to represent the differential 2-form \(\omega \) in a neighborhood of infinity. We replace xyz by \(\frac{x}{w}, \frac{y}{w}, \frac{z}{w}\) to homogenize the differential form \(\omega \). We obtain

$$\begin{aligned} \omega =\frac{d(\frac{x}{w})\wedge d(\frac{y}{w})}{\frac{z}{w}}= \frac{w dx \wedge dy -y dx \wedge dw +x dy \wedge dw }{zw^2}. \end{aligned}$$

Notice that checking the regularity property of a differential form and also the blow-up procedure are both local properties and so it is enough to work in the affine neighborhood \(U = {\mathbb {A}}^3 =\{(x, y, 1, w)\,|\,x, y, w \in {\mathbb {C}} \}\) of the intersection point p. We see that the coordinate of the point p in this affine coordinate is (0, 0, 0). On the affine coordinate U the above 2-form \(\omega \) becomes

$$\begin{aligned} \omega '= \frac{w dx \wedge dy -y dx \wedge dw +x dy \wedge dw }{w^2}, \end{aligned}$$

and the equation of the surface \(S_{A}\) in this affine neighborhood becomes

$$\begin{aligned} w^{2m-2} = (x- z_1 w) \cdots (x-z_m w) (x-\overline{z}_1 w) \cdots (x- \overline{z}_m w). \end{aligned}$$

If we try to blow up either of the singular lines \(L_1\) and \(L_2\) we would see that it is not a suitable way to analyze the blow-up surface. However we start by blowing up the surface at intersection point \(p = (0, 0, 0)\in {\mathbb {A}}^3=\{(x, y, w)\,|\,x, y, w\in {\mathbb {C}}\}\) of the two lines \(L_1\) and \(L_2\). For doing this we compute in the w-chart by putting the coordinates \(w=w_1\), \(x=x_1 w_1\) and \(y=y_1w_1\). After applying this transformation (i.e. blow-up procedure) to the equation of the surface \(S_A\) we obtain the following equation for the blow-up surface \(\widetilde{S_0}\):

$$\begin{aligned} w_1^{2m-2} = (x_1w_1- z_1 w_1) \cdots (x_1w_1-z_m w_1) (x_1w_1-\overline{z}_1 w_1) \cdots (x_1w_1- \overline{z}_m w_1), \end{aligned}$$

after simplification we obtain

$$\begin{aligned} \frac{1}{w_1^2}= (x_1- z_1 ) \cdots (x_1-z_m ) (y_1-\overline{z}_1 ) \cdots (y_1- \overline{z}_m ). \end{aligned}$$

It can be easily seen that by applying the birational morphism \((x_1, y_1, w_1) \mapsto \bigl (x_1, y_1, \frac{1}{w_1}\bigr )\) the above surface is isomorphic to the following surface:

$$\begin{aligned} w_1^2= (x_1- z_1 ) \cdots (x_1-z_m ) (y_1-\overline{z}_1 ) \cdots (y_1- \overline{z}_m ). \end{aligned}$$

We see that by blowing up the surface \(S_A\) at the intersection point p we arrive at a simpler surface with some mild isolated singularities (of type \(w_1^2=x_1y_1\)) which we have already observed in the affine case. Now we should prove that the pullback of the 2-form \(\omega '\) is regular over the blow-up surface \(\widetilde{S_0}\). By replacing the coordinates xyw by \(x_1, y_1, w_1\) we have

$$\begin{aligned} dx=x_1 dw_1 +w_1dx_1 , ~~ dy=y_1 dw_1 +w_1dy_1 , ~~ dw=dw_1 \end{aligned}$$

and therefore for the quantities \(dx\wedge dy, dx \wedge dw\) and \(dy \wedge dw\) in the numerator of the formula for the 2-form \(\omega '\) we obtain

$$\begin{aligned} dx \wedge dy&= x_1w_1dw_1 \wedge dy_1 +w_1y_1 dx_1 \wedge dw_1 + w_1^2 dx_1 \wedge dy_1, \\ dx \wedge dw&= w_1dx_1 \wedge dw_1, \\ dy \wedge dw&= w_1 dy_1 \wedge dw_1. \end{aligned}$$

Plugging these quantities in the formula of the differential form \(\omega '\) we obtain

$$\begin{aligned} \omega '&=\frac{x_1w_1^2 dw_1 \wedge dy_1 + w_1^2 y_1 dx_1 \wedge dw_1 + w_1^3 dx_1 \wedge dy_1 - y_1w_1^2 dx_1 \wedge dw_1 +x_1w_1^2 dy_1 \wedge dw_1}{w_1^2}&\\&=\frac{w_1^3 dx_1 \wedge dy_1}{w_1^2}=w_1 dx_1 \wedge dy_1 \end{aligned}$$

which is clearly regular on the blow-up surface \(\widetilde{S_0}\). Thus, again all the forms \(\omega _{k, l}\) (similar to the affine case) pull back to regular forms on \(\widetilde{S_0}\) and therefore the analysis of the singular locus of the distance surface at infinity is complete.

This shows that the Kodaira dimension of the distance surface \(S_A\) is equal to two, which completes the proof of Theorem 1.2. \(\square \)

It is plausible to pose the following question in \({\mathbb {R}}^n\).

Question 3.4

Let \(n\ge 3\) be an integer, and let \(A= \{A_1 , \ldots , A_m\} \) be a finite subset of points in \({\mathbb {R}}^n\) not all on a hyperplane. Define the distance hypersurface \(S_A\) in \({\mathbb {P}}^{n+1}\) by

$$\begin{aligned} x_{n+1}^2=\prod _{i=1}^m \bigl ( (x_1 - a_{i1})^2 + (x_2 - a_{i2})^2 + \dots + (x_n - a_{in})^2 \bigr ). \end{aligned}$$
(3.2)

Is it true that \(S_A\) is of general type?

3.2 Proof of Theorem 1.3

Assume for the sake of a contradiction that \(A \subset {\mathbb {R}}^2\) is a dense rational distance subset of \({\mathbb {R}}^2\), and assume without loss of generality (after possibly applying a similarity transformation) that \((0,0), (1,0)\in S\). By Lemma 3.1, there exists a square free integer k for which all the points in A are of the form \((a,b\sqrt{k})\), where \(a, b \in {\mathbb {Q}}\). Since A is dense, we can choose six points \(B=\{(a_1,b_1\sqrt{k}), \dots , (a_6, b_6 \sqrt{k})\}\) in A which are not all on a line. Let \(S_B\) be the distance surface associated to the subset \(B \subset A\), given by the equation

$$\begin{aligned} z^2 = \prod _{i=1}^{6}\bigl \{(u - a_i)^2 + (v - b_i\sqrt{k})^2\bigr \}. \end{aligned}$$
(3.3)

The surface \(S_B\) is clearly defined over the number field \(K= {\mathbb {Q}}(\sqrt{k})\). By Theorem 1.2, \(S_B\) is a surface of general type. Assuming the Bombieri–Lang conjecture, the set of K-rational points of \(S_B\) is not Zariski dense. On the other hand, since A is a rational distance set, any point in A gives a K-rational point of \(S_B\). By our assumption, A is dense in \({\mathbb {R}}^2\), which implies that it is Zariski dense in \({\mathbb {C}}^2\), and consequently, A is dense in \({\mathbb {P}}^1 \times {\mathbb {P}}^1\). The surface \(S_B\) is birationally a trivial double cover of \({\mathbb {P}}^1 \times {\mathbb {P}}^1\) outside the discriminant locus, so the Zariski dense subset A of \({\mathbb {P}}^1 \times {\mathbb {P}}^1\) generates a Zariski dense subset of K-rational points in \(S_B\). This final contradiction proves the theorem. \(\square \)

3.3 Proof of Corollary 1.4

As stated in the introduction, we need the following two theorems from [14]:

Theorem 3.5

([14]) Every rational distance subset A of \({\mathbb {R}}^2\) has only finitely many points in common with an algebraic curve defined over \({\mathbb {R}}\), unless the curve has a line or circle as a component.

Theorem 3.6

([14]) If a rational distance set A has infinitely many points on a line (respectively, circle), then all but four (respectively, three) points of A are on the line (respectively, on the circle).

Proof of Corollary 1.4

By Theorem 1.3, the set A is not Zariski dense in \({\mathbb {R}}^2\). Hence A should be contained in a union of finitely many irreducible algebraic curves \(C_1, \ldots , C_n\) in the plane. According to Theorem 3.5, lines and circles are the only irreducible algebraic curves that contain an infinite rational distance set, so one of the irreducible curves \(C_i\) should be a line or a circle with infinitely many points of rational distance set A. Theorem 3.6 then gives the result. \(\square \)

Remark 3.7

We believe that if the points in the subset \(B=\{ (\alpha _1, \beta _1), \dots , (\alpha _n, \beta _n)\}\) of A are chosen generically, then any rational curve in the corresponding distance surface \(S_B\) is contained in the subvariety \(D=\{z=0\} \subset S_B\). To observe such a property for the surface \(S_B\) one way is to study the solutions of the functional equation \(h^2 = P(f) Q(g)\) for meromorphic functions fg and h. By applying Nevanlinna theory to the meromorphic functions fg and h one can show that under a certain generic condition on the roots of the polynomials P and Q the above functional equation has no solution except for constant functions. This problem is interesting enough to be dealt with in future research.

The above remark on rational curves on the surface \(S_B\) leads us to pose the following conjecture about the rational points on the surface \(z^2=P(x)Q(y)\).

Conjecture 3.8

Assume P and Q are two generic polynomials of the same degree \(d \ge 6\) defined over a number field K. Then there are only finitely many K-rational points on the surface \(z^2=P(x)Q(y)\) with \(z\ne 0\).

The above conjecture might also be true for the surface of type \(z^k = P(x, y)\) for a generic polynomial P with sufficiently large degree.