Hilbert's 10th Problem for solutions in a subring of Q Agnieszka Peszek, Apoloniusz Tyszka Abstract Yuri Matiyasevich's theorem states that the set of all Diophantine equations which have a solution in non-negative integers is not recursive. Craig Smoryński's theorem states that the set of all Diophantine equations which have at most finitely many solutions in non-negative integers is not recursively enumerable. Let R be a subring of Q with or without 1. By H10(R), we denote the problem of whether there exists an algorithm which for any given Diophantine equation with integer coefficients, can decide whether or not the equation has a solution in R. We prove that a positive solution to H10(R) implies that the set of all Diophantine equations with a finite number of solutions in R is recursively enumerable. We show the converse implication for every infinite set R ⊆ Q such that there exist computable functions τ1, τ2 : N→ Z which satisfy (∀n ∈ N τ2(n) , 0) ∧ ({ τ1(n) τ2(n) : n ∈ N } = R ) . This implication for R = N guarantees that Smoryński's theorem follows from Matiyasevich's theorem. Harvey Friedman conjectures that the set of all polynomials of several variables with integer coefficients that have a rational solution is not recursive. Harvey Friedman conjectures that the set of all polynomials of several variables with integer coefficients that have only finitely many rational solutions is not recursively enumerable. These conjectures are equivalent by our results for R = Q. 2010 Mathematics Subject Classification: 03D25, 11U05. Key words and phrases: Craig Smoryński's theorem, Diophantine equation which has at most finitely many solutions, Hilbert's 10th Problem for solutions in a subring of Q, Martin Davis' theorem, recursive set, recursively enumerable set, Yuri Matiyasevich's theorem. 1 Introduction and basic lemmas Yuri Matiyasevich's theorem states that the set of all Diophantine equations which have a solution in non-negative integers is not recursive, see [3]. Martin Davis' theorem states that the set of all Diophantine equations which have at most finitely many solutions in positive integers is not recursive, see [1]. Craig Smoryński's theorem states that the set of all Diophantine equations which have at most finitely many solutions in non-negative integers is not recursively enumerable, see [4, p. 104, Corollary 1] and [5, p. 240]. Let P denote the set of prime numbers, and let P = {p1, q1, r1, p2, q2, r2, p3, q3, r3, . . .}, where p1 < q1 < r1 < p2 < q2 < r2 < p3 < q3 < r3 < . . . 1 Lemma 1. For a non-negative integer x, let ∞∏ i=1 pαii * qβii * rγii be the prime decomposition of x + 1. For every positive integer n, the mapping which sends x ∈ N to ( (−1)α1 * β1 γ1 + 1 , . . . , (−1)αn * βn γn + 1 ) ∈ Qn is a computable surjection from N onto Qn. Let sn : N→ Qn denote the surjection defined in Lemma 1. Lemma 2. For every infinite set R ⊆ Q, a Diophantine equation D(x1, . . . , xn) = 0 has no solutions in x1, . . . , xn ∈ R if and only if the equation D(x1, . . . , xn) + 0 * xn+1 = 0 has at most finitely many solutions in x1, . . . , xn+1 ∈ R. Let R be a subring of Q with or without 1. By H10(R), we denote the problem of whether there exists an algorithm which for any given Diophantine equation with integer coefficients, can decide whether or not the equation has a solution in R. 2 A positive solution to H10(R) implies that the set of all Diophantine equations with a finite number of solutions in R is recursively enumerable In the next three lemmas we assume that {0} ( R ⊆ Q and r * Z ⊆ R for every r ∈ R. Every non-zero subring R of Q (with or without 1) satisfies these conditions. Lemma 3. There exists a non-zero integer m ∈ R. Proof. There exist m, n ∈ Z \ {0} such that mn ∈ R. Hence, m = mn * n ∈ (Z \ {0}) ∩ R.  Lemma 4. Let m ∈ (Z \ {0}) ∩ R. We claim that for every b ∈ R, b , 0 if and only if the equation y * b − m2 − 4∑ i=1 y2i = 0 is solvable in y, y1, y2, y3, y4 ∈ R. Proof. If b = 0, then for every y, y1, y2, y3, y4 ∈ R, y * b − m2 − y21 − y22 − y23 − y24 = −m2 − y21 − y22 − y23 − y24 6 −m2 < 0 If b , 0, then b = pq , where p ∈ N \ {0} and q ∈ Z \ {0}. In this case, we define y as m2 * q and observe that m2 * q = (m * q) * m ∈ R as m * q ∈ R and m ∈ Z. Hence, y * b = (m2 * q) * p q = m2 * p ∈ m2 * (N \ {0}) By Lagrange's four-square theorem, there exist t1, t2, t3, t4 ∈ N such that y * b − m2 m2 = t21 + t 2 2 + t 2 3 + t 2 4 Therefore, y * b − m2 − (m * t1)2 − (m * t2)2 − (m * t3)2 − (m * t4)2 = 0, where m * t1, m * t2, m * t3, m * t4 ∈ R.  2 Lemma 5. We can uniquely express every rational number r as r / r, where r ∈ Z, r ∈ N \ {0}, and the integers r and r are relatively prime. If r ∈ R, then r ∈ R. Proof. For every r ∈ R, r = r * r ∈ r * Z ⊆ R.  Lemma 6. Let R be a non-zero subring of Q with or without 1. We claim that for every T0, . . . ,Tk ∈ Rn and for every x1, . . . , xn ∈ R, the following product ∏ (r1, . . . , rn) ∈ {T0, . . . ,Tk} n∑ i=1 ( xi * ri − ri )2 (1) differs from 0 if and only if (x1, . . . , xn) < {T0, . . . ,Tk}. Product (1) belongs to R. Proof. The last claim follows from Lemma 5.  Lemma 7. Let R be a non-zero subring of Q (with or without 1) such that there exists an algorithm which for every (a, b) ∈ Z × (Z \ {0}) decides whether or not ab ∈ R. Let ρn : Qn → Rn denote the function which equals the identity on Rn and equals (0, . . . , 0) outside Rn. We claim that for every positive integer n the function ρn ◦ sn : N→ Rn is surjective and computable. Theorem 1. Let R be a non-zero subring of Q (with or without 1) such that Hilbert's 10th Problem for solutions in R has a positive solution. We claim that the set of all Diophantine equations with a finite number of solutions in R is recursively enumerable. Proof. By Lemma 3, there exists a non-zero integer m ∈ R. For every (a, b) ∈ Z × (Z \ {0}), the solvability in R of the equation b * x − a = 0 is decidable. Hence, for every (a, b) ∈ Z × (Z \ {0}) we can decide whether or not ab ∈ R. By Lemmas 4 and 6, the answer to the question in Flowchart 1 is positive if and only if the equation D(x1, . . . , xn) = 0 is solvable in Rn \ {θ(0), . . . , θ(k)}. Hence, by Lemma 7, the algorithm in Flowchart 1 halts if and only if the equation D(x1, . . . , xn) = 0 has at most finitely many solutions in R. 3 Start Input a Diophantine equation D ( x1, . . . , xn ) = 0 θ := ρn ◦ sn k := 0 k := k + 1 Does the equation D2(x1, . . . , xn)+  y * ∏ ( r1, . . . , rn ) ∈ {θ(0), . . . , θ(k)} n∑ i = 1 ( xi * ri − ri )2  − m2 − 4∑ i = 1 y2i  2 = 0 is solvable in x1, . . . , xn, y, y1, y2, y3, y4 ∈ R ? Print "The equation D ( x1, . . . , xn ) = 0 has at most finitely many solutions in R" Stop Yes No Flowchart 1  Theorem 1 remains true when R = {0}. The flowchart algorithm depends on m ∈ (Z \ {0}) ∩ R. For a constructive proof of Theorem 1, we must compute an element of (Z \ {0}) ∩ R. By Lemma 7, the function ρn ◦ sn : N→ Rn is computable and surjective. We compute the smallest i ∈ N such that (ρn ◦ sn)(i) starts with a non-zero integer. This integer belongs to (Z \ {0}) ∩ R. 4 3 If the set of all Diophantine equations with a finite number of solutions in R is recursively enumerable, then H10(R) has a positive solution Starting from this moment up to the end of Theorem 2, we assume that R is an infinite subset of Q and there exist computable functions τ1, τ2 : N→ Z which satisfy (∀n ∈ N τ2(n) , 0) ∧ ({ τ1(n) τ2(n) : n ∈ N } = R ) In other words, the function N 3 n τ−→ τ1(n) τ2(n) ∈ R is surjective and computable. Hence, the function (τ, . . . , τ) : Nn → Rn is surjective and computable. Lemma 8. Let σn : Qn → Nn denote the function which equals the identity on Nn and equals (0, . . . , 0) outside Nn. We claim that for every positive integer n the function (τ, . . . , τ) ◦ σn ◦ sn : N→ Rn is surjective and computable. Theorem 2. If the set of all Diophantine equations which have at most finitely many solutions in R is recursively enumerable, then there exists an algorithm which decides whether or not a given Diophantine equation has a solution in R. Proof. Suppose that {Si = 0}∞i=0 is a computable sequence of all Diophantine equations which have at most finitely many solutions in R. By Lemma 2, the execution of Flowchart 2 decides whether or not a Diophantine equation D(x1, . . . , xn) = 0 has a solution in R. The flowchart algorithm uses a computable surjection φ : N→ Rn (which exists by Lemma 8). 5 Start Input a Diophantine equation D(x1, . . . , xn) = 0 W(x1, . . . , xn + 1) := D(x1, . . . , xn) + 0 * xn + 1 i := 0 i := i + 1 Is W(x1, . . . , xn + 1) = Si? Is D ( φ(i) ) = 0? Print "The equation D(x1, . . . , xn) = 0 is solvable in R" Print "The equation D(x1, . . . , xn) = 0 is not solvable in R" Stop No Yes Yes No Flowchart 2 The flowchart algorithm always terminates because there exists a non-negative integer i such that (D(x1, . . . , xn) + 0 * xn+1 = Si) ∨ (D(φ(i)) = 0) Indeed, for every Diophantine equation D(x1, . . . , xn) = 0, the flowchart algorithm finds a solution in R, or finds the equation D(x1, . . . , xn) + 0 * xn+1 = 0 on the infinite list [S0,S1,S2, . . .] if the equation D(x1, . . . , xn) = 0 is not solvable in R.  Corollary. Theorem 2 for R = N implies that Craig Smoryński's theorem follows from Yuri Matiyasevich's theorem. 6 Harvey Friedman conjectures that the set of all polynomials of several variables with integer coefficients that have a rational solution is not recursive, see [2]. Harvey Friedman conjectures that the set of all polynomials of several variables with integer coefficients that have only finitely many rational solutions is not recursively enumerable, see [2]. These conjectures are equivalent by Theorems 1 and 2 taking R = Q. Acknowledgement. Agnieszka Peszek prepared two flowcharts in TikZ. Apoloniusz Tyszka wrote the article. The article was presented at the Jubilee Congress for the 100th anniversary of the Polish Mathematical Society held in Kraków, Poland, September 3-7, 2019. An older and longer version of this article appeared in Scientific Annals of Computer Science 29 (2019), no. 1, 101–111, http://www.info.uaic.ro/en/sacs_articles/ on-the-relationship-between-matiyasevichs-and-smorynskis-theorems/. The article's DOI 10.7561/SACS.2019.1.101 does not link to the article. References [1] M. Davis, On the number of solutions of Diophantine equations, Proc. Amer. Math. Soc. 35 (1972), no. 2, 552–554, http://doi.org/10.1090/S0002-9939-1972-0304347-1. [2] H. Friedman, Complexity of statements, April 20, 1998, http://www.cs.nyu.edu/ pipermail/fom/1998-April/001843.html. [3] Yu. Matiyasevich, Hilbert's tenth problem, MIT Press, Cambridge, MA, 1993. [4] C. Smoryński, A note on the number of zeros of polynomials and exponential polynomials, J. Symbolic Logic 42 (1977), no. 1, 99–106, http://doi.org/10.2307/2272324. [5] C. Smoryński, Logical number theory, vol. I, Springer, Berlin, 1991. Agnieszka Peszek University of Agriculture Faculty of Production and Power Engineering Balicka 116B, 30-149 Kraków, Poland E-mail: Agnieszka.Peszek@urk.edu.pl Apoloniusz Tyszka University of Agriculture Faculty of Production and Power Engineering Balicka 116B, 30-149 Kraków, Poland E-mail: rttyszka@cyf-kr.edu.pl