Related to Hilbert's Tenth problem.

Is there polynomial with integer coefficients $P(a,x_1,...,x_n)$ such that $P(A,X_i)=0$ has rational solutions $X_i$ iff $A$ is not the square of integer (or as another question not the square of rational)?

We think if $P$ is homogeneous and ask about integer solutions, scaling the solution might cause problems: $A^2,A X_1, A X_2, ...$

Over the integers solution is trivial via Pell equation:

$$ (2+x_1^2+x_2^2+x_3^2+x_4^2)^2- a x_5^2=1 $$

  • 1
    $\begingroup$ I guess the intended meaning is "Is there $n$ and $P\in\mathbf{Z}[a,x_1,\dots,x_n]$ such that for every $A\in\mathbf{Q}$, there exists $X\in\mathbf{Q}^n$ such that $P(A,X)=0$ iff $A$ is the square of an integer"? $\endgroup$
    – YCor
    Oct 15, 2019 at 11:54
  • $\begingroup$ @YCor No, I don't ask about this. The part after "iff" is A is NOT the square of integer. The rest of the comment is correct. $\endgroup$
    – joro
    Oct 15, 2019 at 12:05
  • $\begingroup$ OK thanks (and sorry, actually I focussed on the first quantifiers). $\endgroup$
    – YCor
    Oct 15, 2019 at 12:11
  • $\begingroup$ How about some easier sets? Like "$A>5$? $\endgroup$
    – user6976
    Oct 15, 2019 at 21:07
  • $\begingroup$ $A>5$ is too easy: $P = Q^2 + R^2$ where $$ Q = (A-5) (x_1^2 + x_2^2 + x_3^2 + x_4^2) - (x_5^2 + x_6^2 + x_7^2 + x_8^2) $$ and $R = (A-5) x_9 - 1$. $\endgroup$ Oct 15, 2019 at 21:40

1 Answer 1


The set $A$ of non-squares (of rationals) is Diophantine in $\mathbb{Q}$ by [1]. The set $B:=\mathbb{Q}\smallsetminus\mathbb{Z}$ is also Diophantine by [2]. The set of non-squares of integers is equal to $A\cup B$, hence Diophantine.

For a generalization of [1], see also [3].

[EDIT] The paper [1] treats arbitrary (non-)$n$-th powers, but the case of (non-)squares was proved earlier by Poonen [4].

[1] Colliot-Thélène, Jean-Louis; van Geel, Jan, Le complémentaire des puissances $n$-ièmes dans un corps de nombres est un ensemble diophantien, Compos. Math. 151, No. 10, 1965-1980 (2015). ZBL1346.14066..

[2] Koenigsmann, Jochen, Defining $\mathbb Z$ in $\mathbb Q$, Ann. Math. (2) 183, No. 1, 73-93 (2016). ZBL1390.03032..

[3] Dittmann, Philip, Irreducibility of polynomials over global fields is diophantine, Compos. Math. 154, 761-772 (2018). ZBL06861881.

[4] Poonen, Bjorn, The set of nonsquares in a number field is diophantine, Math. Res. Lett. 16, No. 1, 165-170 (2009). ZBL1183.14031.

  • $\begingroup$ Thank you. This appears to solve an open problem: mathoverflow.net/questions/199191/… $\endgroup$
    – joro
    Oct 16, 2019 at 13:50
  • $\begingroup$ @joro Yes, very good point! $\endgroup$ Oct 16, 2019 at 13:54
  • $\begingroup$ A comment in the other question doubts correctness about the other question, is it valid? $\endgroup$
    – joro
    Oct 16, 2019 at 15:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.