<<

arXiv:1706.03302v2 [math.NT] 22 Sep 2020 et rbe.I on o eas opee ro fteth the of proof a completed also he so, doing In Problem. Tenth ento n ipatn e namr eea setting. general 1.1. more a Definition in Diophantine a and oth definition In integer same. positive the every languag were for the integers that in proved of sets definable enumerable existentially computably (or Diophantine that impossibili the demonstrated Matiyasevich Yuri Robinson, rmteNtoa cec Foundation. sup Science Uni partially National City was the author The from second from by The grants Foundation, Program. several Award Simons Research by the and from Program, 581896 Enhancement # Grant by Foundation, hscs set a case this Z n n16,bidn nerirwr yMri ai,Hlr Put Hilary Davis, Martin by work earlier on building 1969, In h rtato a atal upre yGat#DS–13622 – DMS # Grant by supported partially was author first The a ipatn ento over definition Diophantine a had NEITNILDFNTOSO ..SBESO IG OF RINGS OF SUBSETS C.E. OF DEFINITIONS EXISTENTIAL ON hwtefollowing. the show A 5 Let (5) 4 Let (4) 1 vr ..sto neeshsasnl-odDiophantine single-fold a has integers of set c.e. Every (1) 3 l ..sbeso oyoilrnsoe ig ftotall of rings over rings polynomial of subsets c.e. Diophantine All single-fold a (3) has integers of set c.e. Every (2) BSTRACT ento over definition xsetal enbefr“lotal primes. all” “almost for definable existentially noafiieetninof extension finite a into nt o-mt e fispie.Te l ..sbesof subsets c.e. all Then primes. its of set non-empty finite functions.) n rm of prime any oilrn vritga domain integral over ring characteristi nomial of field function any of functions integral of nt-odDohniedfiiin.(hs r h rtexa first the property.) are this (These with rings definitions. Diophantine finite-fold ieover tine K K eetn eut fDnf aii eee n h eoda second the and Demeyer Zahidi, Denef, of results extend We . A eaoevral ucinfil vrafil fconstants of field a over field function one-variable a be eaoevral ucinfil vranme edadlet and field number a over field function one-variable a be Let ⊂ O USL ILR&AEADASHLAPENTOKH ALEXANDRA & MILLER RUSSELL K, R UCIN FCAATRSI 0 CHARACTERISTIC OF FUNCTIONS R K S n K If . (Here . eacmuaiern n let and ring commutative a be scle ipatn over Diophantine called is If . f k ( T sagbacover algebraic is k 1 T , . . . , sebdal noara ed hnvlainrnsare rings valuation then field, real a into embeddable is O K, Q .I 1. p S hntevlainrn of ring valuation the then , n X , stern of ring the is NTRODUCTION Z 1 n R edsrb h oin faDiophantine a of notions the describe We . X , . . . , vr optbyeueal ustof subset enumerable computably every , hrceitc0. characteristic Q n o oeodprime odd some for and m ) S ∈ itgr rarn fintegral of ring a or -integers R R [ , T ¯ otdb rn M 1161456 – DMS # Grant by ported ffrsome for if X ¯ n est fNwYr PSC-CUNY York New of versity ento vrtering the over definition ] h uesCleeResearch College Queens the eapstv nee.In integer. positive a be 6fo h ainlScience National the from 06 ento vrapoly- a over definition p elitgr have integers real y 0. c a Diophantine a has O yo ovn Hilbert’s solving of ty K, frns esand sets rings) of e pe finfinite of mples S k p n let and , r Diophan- are > m rwrs twas it words, er embeddable oe asserting eorem a n Julia and nam to to uthor S 0 ea be n some and p be C.E. Sets over Function Fields we have that for all (t ,...,t ) Rn it is the case that 1 n ∈ (t ,...,t ) A if and only if x ,...,x R such that f(t ,...,t , x ,...,x )=0. 1 n ∈ ∃ 1 m ∈ 1 n 1 m The polynomial f(T,¯ X¯) is called a Diophantine definition of A over R. If a set A is Diophantine over R and for every t¯ A we have that x¯ as above is unique, we say that f(T,¯ X¯) is a single-fold definition∈ of A. If for every t¯ A we have that there are only finitely many x¯ as above, we say that f(T,¯ X¯) is∈ a finite-fold definition of A. Question 1.2. Does every c.e. set of integers have a finite-fold Diophantine defi- nition over Z? The answer to this question, raised by almost immediately after his solution to Hilbert’s Tenth Problem, is unknown to this day. The issue of finite-fold representation is of more than just esoteric interest because of its connection to many other questions. For an extensive survey of these connec- tions we refer the reader to a paper of Matiyasevich ([9]). Here we would like to give just one example that can be considered a generalization of Hilbert’s Tenth Problem. Let N = 0, 1,..., 0 and let M be any nonempty proper subset of N. Let P(M) be the set{ of polynomialsℵ } P with integer coefficients such that the number of solutions to the equation P = 0 is in M. Martin Davis showed in [2] that P(M) is undecidable. If we ask whether P(M) is c.e, then the answer is currently un- known. At the same time, if we replace by exponential Diophantine equations, then we can answer the question. Craig Smorynsky´ in [17] proved that E (M) is c.e. if and only if M = α α β for some finite β. (Here E (M) is a collection of exponential Diophantine{ | polynomials≥ } with positive integer coeffi- cients such that if an exponential Diophantine polynomial E E (M), then the number of solutions to the equation E =0 is in M.) Smorynsky’s´ ∈ proof relied on a result obtained by Matiyasevich in [10] that every set has a single-fold exponential Diophantine definition. One would expect a similar result for (non-exponential) Diophantine equations if the finite-fold question is answered affirmatively. Matiyasevich also proved that to show that all c.e. sets of integers have single- fold (or finite-fold) Diophantine definitions it is enough to show that the set of 2 a pairs (a, b) Z>0 b = 2 has a single-fold (finite-fold) Diophantine definition. (This will{ not∈ be surprising| } to readers familiar with the history of Hilbert’s Tenth Problem.) Unfortunately, the finite-fold question over Z remains out of reach at the mo- ment, as with many other Diophantine questions. In Section 3 of this paper, we take some first timid steps in the investigation of this issue by considering it in a more hospitable environment over function fields of characteristic 0, as described in Section 2. We extend the results of the second author from [14] to show that over any ring of integral functions (otherwise known as a ring of S -integers) any c.e. set of rational integers has a single-fold Diophantine definition (see Theorem 3.8). We also show that over any polynomial ring over an integral domain Z of

2 C.E. Sets over Function Fields characteristic 0 it is possible to give a single-fold Diophantine definition for every c.e. set of integers (see Theorem 4.9). Using these results on single-fold definability of Z and c.e. sets of integers, following results of Jan Denef from [5] and Karim Zahidi from [20], we show in Section 5 that all computably enumerable subsets of a polynomial ring over a ring of integers of a totally real number field are finite-fold existentially definable. As far as we know, this is the first example of this kind. (See Theorem 5.2.) In Section 7 we generalize results of Jeroen Demeyer from [3] to show that all c.e. subsets of rings of integral functions over number fields are Diophantine (see Theorem 7.1). In order to do so, we needed to generalize the earlier treatments (given in the papers [11] of Laurent Moret-Bailly and [6] of Kirsten Eisentraeger) of definability of integrality at a degree one valuation over a function field of characteristic zero where the constant field is a number field. Both of those papers in turn extend results of H. K. Kim and Fred Roush from [7] where the two authors give a Diophantine definition of integrality at a valuation of degree 1 over a rational function field with a constant field embeddable into a p-adic field. (Such constant fields include all number fields.) The papers of Moret-Bailly and Eisentraeger are primarily concerned with extending results pertaining to Hilbert’s Tenth Problem and so they extend the results of Kim and Roush just enough for their arguments to go through, by showing the following for a function field K over a field of constants k as described above: if T is a non-constant element of K and the pole q of T splits completely into distinct primes in the extension K/k(T ), then there exists a Diophantine subset of K such that all rational functions in that subset are integral at q. In contrast, our proof required a Diophantine definition of the valuation ring of a single factor of q in K. In order to obtain such a definition we reworked the original construction of Kim and Roush. In this paper we show that the valuation ring of “almost” any prime of a function field K of characteristic 0 is existentially definable over a function field with a constant field algebraic over Q and embeddable into a finite extension of Qp for p = 2 or R. The "almost" part applies only to the case where we have to use the6 fact that the constant field under consideration is embeddable into R. If the constant field is embeddable into a finite extension of Qp, with p =2, then we can give an existential definition (with a parameter, of course) of any6 valuation ring. We also should note here that the class of constant fields described above contains an infinite subset of non-finitely generated fields. (See Section 6.)

2. NUMBER FIELDS, FUNCTION FIELDS AND RINGS Throughout this paper, by a function field K we will mean a finite extension of a rational function field k(T ), where T is transcendental over a field k of charac- teristic 0. By the constant field of K we will mean the algebraic closure of k in K. (In our case we will often have a situation where the algebraic closure of k in K is equal to k by construction.) By a prime p of K, we will mean the maximal ideal of the valuation ring Rv corresponding to one of the valuations v defined on K. (See [1] for more details

3 C.E. Sets over Function Fields on valuations of function fields.) Given f Rv, f = 0, we define ordpf to be the largest non-negative integer n such that f∈ pn. If6 f R , then 1 R , and we ∈ 6∈ v f ∈ v define ord f = ord 1 . We define the order of 0 to be infinity. p − p f For the field of constants we will most often select some algebraic extension of Q. When such an extension is finite, the field is called a number field. One can also consider all the possible embeddings of k into Q, the algebraic closure of Q inside C. If all the embeddings are contained in R, then the field is called totally real. If a field is algebraic over Q and has an embeddinge into R, then we will call it formally real.

3. SINGLE-FOLD DIOPHANTINE REPRESENTATIONS OF C.E. SETS OF INTEGERS OVER RINGS OF S -INTEGERS OF FUNCTION FIELDS OF CHARACTERISTIC 0 In this section we describe a finite-fold Diophantine definition of c.e. sets of integers over rings of integral functions. Before we do that, we have to recon- sider certain old methods of defining sets to make sure they produce single-fold definitions. We start with the issue of intersection of Diophantine sets. 3.1. Single-Fold and Finite-Fold Definition of “And”. As long as we consider rings whose fraction fields are not algebraically closed, we can continue to use the “old” method of combining several equations into a single one without intro- ducing extra solutions, as in Lemma 1.2.3 of [14]. More specifically we have the following proposition. Proposition 3.1. Let R be an integral domain such that its fraction field is not k k algebraically closed. Let k Z>0 and A,B,C R be Diophantine subsets of R such that the sets B and C have∈ single (finite) fold⊂ definitions, and A = B C. Then A has a single (finite) fold definition. ∩ n More specifically, if we let h(T )= a0 + a1T + ... + T be a polynomial without roots in the fraction field of R, let x¯ = (x1,...,xk), z¯ = (z1,...,zm), let f(¯x, z¯) be a single (finite) fold definition of B, and let g(¯x, z¯) be a single (finite) fold definition of C, then n n 1 n h(¯x, z¯)= a0f(¯x, z¯) + a1f(¯x, z¯) − g(¯x, z¯)+ ... + g(¯x, z¯) is a single (finite) fold definition of A. The proof of this proposition is the same as for Lemma 1.2.3 of [14]. 3.2. Pell Equations over Rings of Functions of Characteristic 0. Next we take a look at the old workhorse of Diophantine definitions: the Pell equation. It turns out that in the context of defining integers over rings of functions this equation produces “naturally” single-fold definitions. Lemma 3.2. (Essentially Lemma 2.1 of [4], or Lemma 2.2 of [15] ) Let Z be an integral domain of characteristic not equal to 2. Let f,g,v Z[x],v,x transcendental 2 ∈1/2 2 1/2 n over Z. Let (fn(v),gn(v)) Z[x] be such that fn(v) (v 1) gn(v)=(v (v 1) ) . (In [15] there is a typographical∈ error in this equation:− − the “square” is− misplaced− on the right-hand side.) In this case (1) deg(f )= n deg(v), deg(g )=(n 1) deg(v), n · n − · (2) ℓ dividing n is equivalent to gℓ dividing gn,

4 C.E. Sets over Function Fields (3) The pairs ( f , g ) are all the solutions to f 2 (v2 1)g2 =1 in Z[x] ± n ± n − − Below we use the following notation. Notation 3.3. Let K denote a function field of characteristic 0 over the constant field k. • Let S = p ,..., p be a finite non-empty set of primes of K. • { 1 s} Let O S = x K ( p S ) ord x 0 be the ring of S -integers of K. • K, { ∈ | ∀ 6∈ p ≥ } For d O S such that d is not a square in K, let • ∈ K, 1/2 2 2 H S = x d y x, y O S & x dy =1 . K,d, { − | ∈ K, − } The next proposition follows from Lemmas 2.3,2.4, 2.5, 3.1–3.3 of [16].

Proposition 3.4. There exists a O S satisfying the following conditions. ∈ K, ord a< 0, • p1 ordpi (a 1) > 0 and ordpi (a 1) is odd for i =2,...,s. • −2 − In K(√a 1), the prime p1 splits into the product q q. • − ∞ The element T = a √a2 1 of K(√a2 1) has a zero at q, a pole at q , and • no other zeros or poles.− − − ∞ 2 1/2 For d = a 1, we have that HK,d,S is a cyclic group generated by a d • − 2 − modulo 1 , and a 1 and a √a 1 b (for any b Z=0) are not units of {± } − − − − ∈ 6 O S [√a2 1]. K, − Let fn,gn be as in Lemma 3.2. Then g n = gn, f n = fn, and • − − − g n mod (a 1) n ≡ − in the ring Z[a]. (Note that f ,g Z[a].) n n ∈ Remark 3.5. Let u,w O S , let a be as in Proposition 3.4. Finally assume ∈ K, u2 (a2 1)w2 =1. Then what can we say about u √a2 1w? By Proposition 3.4, there− exists− n Z such that u = f ,w = g , where− − ∈ ± n ± n (a √a2 1)n = εn = f √a2 1g . − − n − − n Thus, we have four possibilities:

2 2 n u √a 1w = fn √a 1gn = ε , n Z 0, − − − − ∈ ≥ 2 2 n u √a 1w = fn + √a 1gn = ε , n Z 0, − − − ∈ ≤ 2 2 n u √a 1w = fn √a 1gn = ε , n Z 0, − − − − − − ∈ ≤ 2 2 n u √a 1w = fn + √a 1gn = ε , n Z 0. − − − − − ∈ ≥ Alternatively, u √a2 1w = εn, n Z. − − ± ∈ Lemma 3.6. (Essentially Lemma 3.4 of [16].) Let R be any subring of OK,S con- taining a local subring of Q. (In particular, R can be equal to OK,S .) Then there exists a subset C of R that contains only constants, includes Z, and is single-fold Diophantine over R.

5 C.E. Sets over Function Fields Proof. We remind the reader that the S contains s primes. Let π be the product of all non-invertible rational primes (or 1, if R contains Q), and let C R be the set defined by the following equations over R: ⊂ 2 j1(πx +1)=1, (3.1) ...  2  js+1(πx +(s + 1)π +1)=1 We claim that System (3.1) has solutions in R only if x is a constant, while conversely, if x Z, then these equations have solutions in R. Indeed, if x is not a constant, neither∈ are x2 + π +1,...,x2 +(s + 1)π +1. Therefore, since they are invertible in OK,S , they all must have zeros at valuations of S . However, these s +1 elements do not share any zeros, and there are s valuations in S and s +1 elements under consideration. This implies that two of them must share the same zero, which is impossible since their differences are constant. The converse is obvious: if x Z, then πx2 + πr +1 is invertible for each r Z. Please ∈ ∈ note that given x OK,S , if System (3.1) has solutions, then these solutions are unique. ∈  Notation 3.7. Let J(x) denote the system of equations (3.1). We will use this system to give a single-fold Diophantine definition of Z over OK,S .

Theorem 3.8. Z has a single-fold Diophantine definition over OK,S . Proof. There are several ways to state this proof. We choose the way that we will later use to produce a single-fold definition of exponentiation for Z. Let a OK,S be as in Proposition 3.4 and consider the following equations and conditions:∈ (3.2) u2 (a2 1)w2 = 1; − −

(3.3) c w mod (a 1) ≡ − in OK,S ; (3.4) J(c). Supposed now that Equations (3.2)–(3.4) are satisfied with variables ranging over O S . Then, by Proposition 3.4 and Lemma 3.2, w = w n mod (a 1) for some K, n ≡ − n Z. Thus, c n mod (a 1) in OK,S . Since a 1 is not a unit of OK,S , we have that∈ c n is a constant≡ with− a zero at some valuation− of K. Hence c = n. − Conversely, given c = n Z, set w = wn and observe that all the equations are satisfied. Note also, that this∈ is the only solution to the equations.  Notation 3.9. Let U(c,u,w) denote the system of equations (3.2)–(3.4). We now give a single-fold Diophantine definition of exponentiation.

Theorem 3.10. The following set has a single-fold definition over OK,S : d (b,c,d) b,c,d Z=0,d> 0,c = b . { | ∈ 6 } 6 C.E. Sets over Function Fields Proof. Consider the following system of equations: (3.5) b =0,c =0,d =0, 6 6 6

(3.6) U(c,uc,wc).

(3.7) U(b, ub,wb),

(3.8) U(d,ud,wd),

n n ε 1 (3.9) n Z,x,y O S [√a2 1] : ε c =(ε b)x d ± − = y(ε 1). ∃ ∈ ∈ K, − ± − − ∧ − ε 1 − −n We start with noting that (3.9) implies that (ε 1) divides ε 1 in O S . Note − ± − K, that by Proposition 3.2, we also have that ε 1 is not a unit of OK,S . If we choose the “minus” option, then we have that ε 1 divides− εn +1. Since ε 1 divides εn 1, − − − it follows that ε 1 divides 2, and thus is a unit of OK,S . Hence “minus” option cannot occur. Consequently,− (3.9) can be rewritten as: n n ε 1 (3.10) n Z,x,y O S [√a2 1]:(ε c =(ε b)x) (d − = y(ε 1)). ∃ ∈ ∈ K, − − − ∧ − ε 1 − n − From (3.10) we deduce that ε c 0 mod (ε b) in OK,S . At the same time n n − ≡ n − ε b mod (ε b) in OK,S . Therefore, c b mod (ε b). By Proposition 3.4 we conclude≡ that −(ε b) is not a unit, and therefore≡ bn c−has a zero at a valuation of K. Since b, c are− integers, we must infer that bn = c−, and n 0. At the same time, ≥ also from (3.10), we have that d n mod (ε 1) in OK,S . By the same argument as above we conclude that d = n>≡ 0. − Conversely, assuming b,c,d Z,bcd = 0,d > 0,c = bd, it is easy to see that (3.9) can be satisfied with only one∈ choice for6 the sign in front of εd. We now rewrite (3.9) over OK,S : (3.11) u2 (a2 1)w2 =1(in other words, εn = u √a2 1w) − − 2 2 ± − −2 u √a 1w c =(a √a 1 b)(x1 x2√a 1)  − − − − − − n − −  (in other words, ε c =(ε b)x)  2 2 2 − 2 − 2  d(a √a 1 1) (u √a 1w 1)=(y1 √a 1y2)(a √a 1 1) − − − − − (in− other− words, d(−ε 1) − ( εn −1) = y−(ε −1)2)  − − ± − −  Thus System (3.11), with all the variables ranging over OK,S , is equivalent to Conjunction (3.9).  Notation 3.11. For future reference we will denote the equations (3.5)–(3.8) to- gether with (3.11) by

G(a,b,c,d,u,w,x1, x2,y1,y2).

Corollary 3.12 (Single fold definition of positive integers over OK,S ). Let a be as in Proposition 3.4, and let

Plus = d O S c,u,w,x , x ,y ,y O S : G(a, 2,c,d,u,w,x , x ,y ,y ) . { ∈ K, |∃ 1 2 1 2 ∈ K, 1 2 1 2 } Then Plus= Z>0, and this Diophantine definition is single-fold.

7 C.E. Sets over Function Fields Proof. Given Theorem 3.10, the only point that needs a proof is the single-fold property of the definition. Given a d> 0, to satisfy the system, we must have that d c =2 ,u = fd,w = gd, √ 2 d 2 u a 1w 2 x1 x2√a 1= − − − , − − a √a2 1 2 − − − √ 2 √ 2 2 d(a a 1 1) (u a 1w 1) y1 √a 1y2 = − − − − − − − . − − (a √a2 1 1)2 − − − Thus the values of all variables are uniquely determined by d.  We also have another corollary to be used in Section 7.

Corollary 3.13. The set (s,u ,w ) s Z is single-fold Diophantine over O S . { s s | ∈ >0} K, Proof. Consider the set 3 (s,u,w) O S : c, x , x ,y ,y O S : G(a, 2,c,s,u,w,x , x ,y ,y ) . { ∈ K, ∃ 1 2 1 2 ∈ K, 1 2 1 2 } By the same argument as in the proof of Corollary 3.12, the set consists of all the triple in the required form, and given such a triple, the values of all the other variables are determined uniquely. 

Combining Theorem 3.8, Corollary 3.12 with a result of Matiyasevich from [10] we now have the following theorem. Theorem 3.14. Every c.e. set of integers has a single-fold Diophantine definition over OK,S .

4. SINGLE-FOLD DIOPHANTINE REPRESENTATIONS OF C.E. SETS OF RATIONAL INTEGERS OVER POLYNOMIAL RINGS OF CHARACTERISTIC 0. In this section we prove the analog of Theorem 3.14, but for polynomial rings over arbitrary commutative rings with unity of characteristic 0. If the ring of con- stants contains Q, then the proof of Theorem 3.14 can be used verbatim. So the only case that we need to consider is the situation where the ring of constants does not contain Q. If the constant ring does not contain Q, it can contain in- finitely many non-invertible primes, and therefore we cannot use the definition of a constant set containing all integers from Lemma 3.6. For exactly same rea- son, we cannot use multiplicative inverses to define the set of non-zero elements. Thus, we will have to modify some parts of the proof of Theorem 3.14.

First we need the following basic fact. Lemma 4.1. If a, b are non-zero relatively prime integers, then 1 Z[ a ]. b ∈ b Proof. Since (a, b)=1 we have that for some x1, x2 Z it is the case that ax1 +bx2 = 1 ax + bx a a ∈ 1. Thus = 1 2 = x + x Z[ ]. b b 1 b 2 b ∈ 

8 C.E. Sets over Function Fields Next we deal with the question of saying that an element is not 0. Lemma 4.2. Let R be a ring of characteristic 0 such that a rational prime p does not have an inverse in the ring. In this case, there exists a set A = Ap such that 0 A, pZ +1 A, and if px +1 A Z, then x Z. 6∈ ⊂ ∈ ∩ ∈ Proof. Let A = px+1 x R R. Then 0 A. Indeed, if 0 A then 1 R, and we { | ∈ } ⊂ 6∈ ∈ p ∈ have a contradiction. Suppose now that for some x R we have that px +1 Z. We claim that x Z. Observe that if px +1 Z then ∈px = z Z and z = x R∈. If ∈ ∈ ∈ p ∈ x Z, then (p, z)=1, and p has an inverse in R by Lemma 4.1, in contradiction of6∈ our assumptions. Finally, clearly pZ +1 A .  ∈ p Theorem 4.3. (Similar to Theorem 5.1 of [15]) If Z is an integral domain of char- acteristic 0 and x is transcendental over Z, then Z is single-fold Diophantine over R = Z[x]. Proof. As we explained above, without loss of generality, we can assume that Q R, and therefore, by Lemma 4.1, R contains at least one non-inverted prime. Consider6⊂ the following set of equations, (4.12) (f (a2x2 1)g )=(ax (a2x2 1))i, i =2, 3 i − − i − − p p (4.13) f 2 (a2x2 1)g2 =1, − − (4.14) f √a2x2 1g 1=(f √a2x2 1g 1)(z √a2x2 1z ) − − − 3 − 3 − 1 − − 2 (4.15) t g g , | 3 2 (4.16) t g mod g2, ≡ 3 (4.17) ax f, |

(4.18) a = t/g3, We show that these equations can be satisfied with some values of variables a =0,f,g,f ,g , f ,g , t, z , z Z[x] 6 2 2 3 3 1 2 ∈ only if we choose a to be an odd integer. First of all, we note that for any choice of a Z[x] 0, we have that a2x2 1 Z. Indeed, if a Z[x] and a =0, then deg(a) as a∈ polynomial\ in x is bigger or− equal6∈ to 0. Therefore,∈ the degree6 of a2x2 1 is − bigger or equal to 2. By Lemma 3.2 we have from (4.13) that f = fn,g = gn 2 ±2 ± for some n Z 0. Alternatively, g = gm, m Z. Let ε = ax √a x 1. Then ∈ ≥ ∈ − − f √a2x2 1g = εm for some m Z. (See Remark 3.5 for the discussion of signs.)− Next− by Proposition± 3.4, we∈ deduce that ε3 1 is not a unit. So, from − (4.14), as in the proof of Theorem 3.10, we conclude that f √a2x2 1g = εm, − − m = 3r, r Z=0. Further, from (4.17) we obtain that f1 fm, implying that m is ∈ 6 | odd. (From the binomial expansion, it is easy to see that f1 divides fm in the

9 C.E. Sets over Function Fields polynomial ring only if m is odd.) Hence, r is odd. From Lemma 3.2 we also have that r i 2 ( r i 1)/2 r i g = | | f ((ax) 1) | |− − g| |− , 3r ± i 3 − 3 r i odd   | |−X r 1 2 where “ ” corresponds to r < 0. Thus g3r rf3| |− g3 mod g3. Additionally, we have 2 − 2 ≡ 2 that f3 1 mod g3. Since r 1 is even, we now deduce g3r rg3 mod g3. Thus, we conclude≡ using (4.16) that| |t − rg mod g2 or equivalently ≡ ≡ 3 3 (4.19) g2 (t rg ). 3| − 3 2 From (4.15) we have t g3g2 so that deg(t) < 2deg(g3), and deg(t rg3) < deg(g3). Therefore (4.19) implies| that t rg =0, a = t/g = r, that is, a is an− odd integer. − 3 3 Conversely, suppose r is an odd integer and let a = r. Then t = ag3 = rg3. To satisfy (4.13) and (4.14) we need to set (f,g)=(fm(ax),gm(ax)), where m =0, m Z. Further, (4.14) requires that m 0 mod 3. To satisfy (4.16), we need to6 arrange∈ for t g mod g2, or in other words,≡ we need ag g 0 mod g2 to be satisfied. As ≡ 3 3 − m ≡ 3 before, (4.17) implies m is an odd number. So we have to set m =3r′, where r′ is 2 odd. Thus, again as above we have that g r′g mod g . Therefore, we have to m ≡ 3 3 choose r′ r mod g . But since both r′,r Z, and g Z, the only way to satisfy ≡ 3 ∈ 3 6∈ the equivalence is to set r′ = r. Now (4.12)–(4.14), (4.16) and (4.17) are satisfied.

Since g2(rx)=2rx, and we set t = rg3(rx), we can conclude that t g3(rx)g2(rx), and (4.15) and (4.18) are satisfied. Observe, that given an odd integer a, the

remaining variables have to take the values described above. We now show how to state the assumption that a = 0. Let p be a rational prime without a multiplicative inverse in R. We replace6 the condition a = 0 by a =2ps +1,s R. By Lemma 4.2, the added equation will imply that a =0.6 Now, if Equations∈ (4.12)–(4.18) together with the new equation a = 26 ps +1 are satisfied, by Lemma 4.2, we conclude that a = 2ps +1 is an odd integer, i. e. a =2u +1 for some u Z. Therefore 2ps +1=2u +1 or sp = u Z. Since ps Z, the only prime that can divide∈ the denominator of s is p. But by∈ Lemma 4.1, we∈ have that p cannot appear in a reduced denominator of an element in R. Therefore, we conclude that s Z. Hence, Equations (4.12)–(4.18) together with the new equation a =2ps +1 ∈are satisfiable over R if and only if s Z. ∈ 

Notation 4.4. We denote Equations (4.12) – (4.18), together with the equation a =2ps +1 by F (a, x, f, g, f2,g2, f3,g3,t,p,s). Thus, Z = s Z[x] F (a, x, f, g, f ,g , f ,g ,t,p,s) . { ∈ | 2 2 3 3 } In this formula p is a fixed parameter corresponding to a prime not inverted in R. In this section, as in the section concerning rings of S -integers, we will need n 2 2 n to know that for any a R, b Z=0 we have that ε b = (ax √a x 1) b is ∈ ∈ 6 − − − − not a unit of R[√a2x2 1]. There is a similar statement in Proposition 3.4. The − difference between that statement and the statement below is that over OK,S we fixed a, while here a ranges over R.

10 C.E. Sets over Function Fields Lemma 4.5. Let a Z[x], b, n Z, abn =0. Then we have that εn b is not a unit in ∈ ∈ 6 − R[x, √a2x2 1]. − 2 2 n n Proof. Let K be the fraction field of R. Let fn(ax) √a x 1gn(ax) = ε (ax) = ε . n − − n The monic irreducible polynomial of ε over Z[x] is of the form X 2fnX +1. N n n − Therefore, for any b Z, we have that K(√a2x2 1)/K (b ε )= b 2fnb +1. Here we ∈ − − n− note that the only units of Z[x] are some elements of Z. So, if b 2fnb+1 Z, then n − 6∈ we conclude that b 2fnb +1 is not a unit. Since fn Z, b =0, we conclude that n − 6∈ 6 2 2 b 2fnb+1 is not a unit in Z[x], and, therefore, ε b is not a unit in Z[x, √a x 1]. − − −  Now that we have a single fold Diophantine definition of integers, we can pro- duce a single-fold definition of non-zero integers, and then positive integers and exponentiation. Lemma 4.6. If Z is an integral domain of characteristic 0 and x is transcendental over Z, then Z=0 is single-fold Diophantine over R = Z[x]. 6 Proof. Let s R be given and consider the following sequence of equations: ∈ (4.20) F (a, x, f, g, f2,g2, f3,g3,t,p,s), (4.21) u2 (x2 1)w2 =1, − − √ 2 u w x 1 1 2 2 (4.22) s − − − =(z1 z2√x 1)(x √x 1). − x √x2 1 1 − − − − − − − From (4.20) via Notation 4.4, we conclude that s Z. If we set ε = ε(x) = ∈ (x √x2 1), then by Lemma 3.2 and Remark 3.5 we deduce from (4.22) that − − that u √x2 1v = εm, m Z. By Lemma 4.5 we also know that ε 1 is not a unit of−R. So,− as in the± proof∈ of Theorem 3.10 again, u √x2 1v = εm−, and m =0. Finally, we have that s m mod (ε 1) in R, implying s−= m =0− . 6 To see that this definition≡ is single-fold,− let s R. Then by6 Theorem 4.3, there ∈ is a uniques set of values that can be taken by variables a, x, f, g, f2,g2, f3,g3, t R. Finally, given s Z, Equation (4.21) forces u w√x2 1=(x √x2 1)s. Thus,∈ u,w are determined∈ uniquely. − − − − 

The next theorem will show existence of single-fold definitions for all c.e. sub- sets of rational integers in polynomial rings. The proofs will proceed via Diophan- tine definitions of exponentiation with arguments similar to the ones used in the proof of Theorem 3.10. Notation 4.7. Let Uˆ(s, . . .) denote Equations (4.20)-(4.22). So that over R

Z=0 = s ....Uˆ(s, . . .) , 6 { |∃ } and this definition is single-fold. Theorem 4.8. Let Z be an integral domain of characteristic 0, and assume x is transcendental over the fraction field of Z and Q R. Then every c.e. set of rational integers has a single-fold Diophantine definition6⊂ over R = Z[x].

11 C.E. Sets over Function Fields Proof. We can now proceed as in the case of the rings of integral functions. Con- sider the following system of equations: (4.23) Uˆ(c, . . .).

(4.24) Uˆ(b, . . .),

(4.25) Uˆ(d, . . .), εn 1 (4.26) n Z,x,y R :[√a2 1] : εn c =(ε b)x d ± − = y(ε 1). ∃ ∈ ∈ − ± − − ∧ − ε 1 − − By the same argument, as in the case of integral functions, this system gives a single-fold definition of the set ˆ 3 d G = (b,c,d) Z=0,d> 0,c = b . { ∈ 6 } ˆ 3 d Finally, if we set b = 2, we get the set G = (2,c,d) Z>0 c = 2 . Using Matiyase- vich’s result, we now conclude that the assertion{ of∈ the| theorem} holds.  Finally, putting the result above together with our observation about the case when Q R, we obtain the following result. ⊂ Theorem 4.9. Let Z be an integral domain of characteristic 0, and assume x is transcendental over the fraction field of Z. Then every c.e. set of rational integers has a single-fold Diophantine definition over R = Z[x].

5. FINITE-FOLD DIOPHANTINE DEFINITION OF C.E. SETS OF POLYNOMIAL RINGS OVER TOTALLY REAL FIELDS OF CONSTANTS So far we have produced single-fold definitions of certain c.e. subsets of a ring. We now construct our first examples of rings where all c.e. sets have finite- fold definitions. To do this we combine the arguments above with the proof of Zahidi from [20] showing that over a polynomial ring with coefficients in a ring of integers of a totally real number field, all c.e. sets were Diophantine. Zahidi’s result was in turn an extension of a result of Denef from [5] in which the coefficients of the polynomial ring came from Z. Any discussion of c.e. sets of a polynomial ring and a ring of integral functions to be discussed later, must of course involve some discussion of indexing of the ring. In other words we will need a bijection from a ring into the positive integers such that given a “usual” presentation of a polynomial (or an integral function in the future) we can effectively compute the image of this polynomial (or this integral function), and conversely, given a positive integer, we can determine what polynomial (or integral function) was mapped to it. For a discussion of an effective indexing map in the case of a rational function field we refer the reader to the paper of Zahidi. A discussion of indexing for function fields can be found in [14]. In this paper we will assume that such an indexing is given and, following Zahidi, will denote it by θ going from positive integers to polynomials. Below we describe the rest of our notation and assumptions. Notation and Assumptions 5.1.

12 C.E. Sets over Function Fields Let k be a totally real number field. • Let O be the ring of integers of k. • k Let α1,...,αr be an integral basis of Ok over Z. • Let θ : Z O [T ] be the effective bijection discussed above. • >0 −→ k Define Pn(X) := θ(n). • Let (U (X), W (X)) O [X] be such that • n n ∈ k U (X) (X2 1)1/2W (X)=(X (X2 1)1/2)n. n − − n − − As we indicated before, our intention is to follow the plan laid out by Zahidi and Denef, just making sure that all the definitions in that plan are finite-fold. This plan entails showing (a) that all c.e. subsets of Z are (finite-fold) Diophan- tine over the polynomial ring in question and (b) that the indexing is (finite-fold) Diophantine or, in other words, the set (n, P (X)) n Z { n | ∈ >0} is (finite-fold) Diophantine over Ok[X]. Zahidi provides a brief argument in his paper that we apply to our situation, given that we have a finite-fold way of combining equations, to see that (a) and (b) imply the following theorem. Theorem 5.2. Let Z be the ring of integers in a totally real number field k. Let θ be an effective indexing of Z[X]; then every θ-computably enumerable relation over Z[X] is a finite-fold Diophantine relation over Z[X]. Thus we concentrate on proving the following proposition. Proposition 5.3. The set (n, P (X)) n Z { n | ∈ >0} is finite-fold Diophantine over Ok[X]. The lemmas below constitute a proof of the proposition. Like the earlier au- thors, we will make use of a theorem of Y. Pourchet representing positive-definite polynomials as sums of five squares. We start with an auxiliary lemma. Lemma 5.4. Fix a positive integer n and n+1 algebraic integers a , a ,...,a O . { 0 1 n} ⊂ k Then there is exacly one polynomial G(t) Ok[t] of degree n such that G(i)= ai, i = 0,...,n. ∈

n Proof. Let G(t) = b0 + b1t + bnT and observe that our requirement on the values of G(t) implies that the coefficients of G must be the solutions of a linear system j t t A¯b =a ¯, where A = (ci,j),ci,j = i , i, j = 0, . . . , n, (¯b) = (b0,...,bn), (¯a) = (a0,...,an). (Here “t” denotes transposition.) Note that det(A) is a van der Monde determinant, and therfore not equal to 0. Thus, the system has a unique solution. 

Corollary 5.5. Let h be a fixed positive integer, let F (t) Ok[t], let Ω be the set of all embeddings σ of k into its algebraic closure, let ∈ B = (G(t) O [t]) (deg(G) deg(F )) ( σ Ω, i =0,..., deg(F ) 1 : σ(G(i)) h) . h { ∈ k ∧ ≤ ∧ ∀ ∈ ∀ − | | ≤ } Then Bh is finite.

13 C.E. Sets over Function Fields Proof. Let V be the set of elements v of Ok such that for any σ Ω we have that σ(v) < h. Let m = [k : Q], and let v V . Then any coefficient∈ of the monic irreducible| | polynomial of v over Q must∈ be an integer of absolute value less or equal to max(mh, mhm). Thus V is a finite set. Now let G(t) Bh. Then deg(G) deg(F ) = n. Next we note that G(i) V for i =0,...,n 1. Thus,∈ (G(0),...,G(n ≤ 1)) V n. So that the set of possible n∈-tuples of values (−G(0),...,G(n 1)) is finite.− By∈ Lemma 5.4, for each n-tuple (a ,...,a ), { − } 0 n there exists only one polynomial of degree less or equal to n such that G(i) = ai. Thus we now conclude that the number of polynomials G in Bh is finite. 

Definition 5.6. If F is a polynomial in Ok[t], then F is positive-definite on k (denoted by Pos• (F )) if and only if σ(F (t)) 0 for all t k and for all real embeddings σ of k into its algebraic closure.≥ ∈ If F is a polynomial in Ok[t], then F is strictly positive-definite on k if and • only if σ(F (t)) > 0 for all t k and for all real embeddings σ of k into its algebraic closure. ∈ 2 2 Let Pos2(g, F ) Z Ok[t], contain pairs (g, F ) such that g F = F1 + ... + F5 • for some F ,...,F⊂ × O [t]. 1 5 ∈ k Lemma 5.7. For any F O [t] we have that Pos(F ) if and only if there exists g Z ∈ k ∈ such that Pos2(g, F ). Proof. Suppose there exists g Z such that g2F = F 2 +...+F 2 for some F ,...,F ∈ 1 5 1 5 ∈ Ok[t]. Then, clearly Pos(F ) is true. Conversely, suppose Pos(F ) is true. Then 2 2 by a theorem of Pourchet (see [12]), we have that F = G1 + ... + G5, for some G1,...,G5 k[t]. Let g Z be such that for any coefficient a of G1,...,G5, we have that ga O∈ . Then Pos∈(g, F ).  ∈ k 2 Lemma 5.8. The relation Pos2 is finite-fold Diophantine over Ok[t].

Proof. By definition of Pos2 we have that Pos2(g, F ) if and only if there exist F ,...,F O [t] such that 1 5 ∈ k 2 2 2 (5.27) g F = F1 + ...F5 . We now show that the for a given g and F , there can be only finitely many solu- tions to (5.27). First of all, the degrees of F1,...,F5 are bounded by the degree of F . Secondly, observe that for i = 0,..., deg(F ) 1, j = 1,..., 5 we have that σ(F (i)) 2 g2 σ(F (i)) for all embeddings σ Ω. (See− Corollary 5.5 for definition | j | ≤ | | ∈ of Ω.) Let h = max g σ(F (i)) , where max is taken over i =0,..., deg(F ) 1 and all σ Ω. Then if{ (5.27)| holds,|} we have that F ,...,F B . By Corollary− 5.5, we ∈ p 1 5 ∈ h have that Bh is finite. 

Definition 5.9. The relation Par(n, b, c, d, v1,...,vr) on the rational integers is de- fined to be the conjunction of the following conditions:

(1) n Z 1, (θ(n)= Pn Ok[T ]); ∈ ≥ ∈ (2) b,c,d,g Z 0, v1,...,vr Z; ∈ ≥ ∈ (3) d = deg(Pn); 2 2 (4) c is the smallest possible non-negative integer such that that Wd+2+c Pn 1 is strictly positive; − −

14 C.E. Sets over Function Fields 2 2 (5) g is the smallest possible positive integer such that Pos2(g, Wd+2 +c Pn 1). (6) x Z : if 0 x d then W (x) b; − − ∀ ∈ ≤ ≤ d+2 ≤ (7) Pn(2b +2c + d)= v1α1 + ... + vrαr. Lemma 5.10. Par is a recursive relation on integers. Proof. Given our assumption that θ(n) is effective, that is we can effectively deter- mine the degree and coefficients of Pn, the first three conditions can be checked algorithmically over Z. So, we may start with describing an for com- puting c and g. We start by calculating c. For every σ : k R we will determine the smallest 2 →2 non-negative integer cσ such that σ(Wd+2 Pn 1) + cσ > 0 for all values of the variable. Then we will set c = max c . − − σ{ σ} We compute cid first. The degree of Pn is d, and the degree of Wd+2 is d +1 by 2 Lemma 3.2. (We can compute Wd+2 algorithmically, since (Ud+2 √X 1Wd+2)= 2 d+2 2 2 − − (X √X 1) ). Thus the polynomial Wd+2 Pn 1 is of degree 2(d + 1) with a leading− coefficient− equal to the square of an element− − of k R, and therefore has an absolute minimum. By Corollary 8.7, there is an algorithm⊂ to verify whether this minimum is positive. If the answer is “yes”, then we set cid = 0. If the 2 2 2 2 answer is “no”, then we consider Wd+2 Pn 1+1= Wd+2 Pn and check whether 2 2 − − − Wd+2 Pn is strictly positive for all values of the variable. If the answer is “yes”, − 2 2 we set cid =1. If the answer is “no”, we consider Wd+2 Pn +1, etc. If µ< 0 is the 2 2 − minimum value of Wd+2 Pn 1, then the process will terminate in at most [µ]+1 steps. − − We now calculate cσ for some σ = id. We note that since the leading coefficient 2 2 6 2 2 of Wd+2 Pn 1 is a square, the leading coefficient of σ(Wd+2 Pn 1) is positive. Thus, we− can− proceed as in the case of σ = id. − − We can now determine g. By a result of Pourchet cited above, we can write the polynomial Y 2 P 2 + c 1 = G2 + ... + G2, where G k[T ]. By examining d+2 − n − 1 5 i ∈ coefficients of these polynomials, we can determine an integer gmax such that g G O [T ]. The value g is an upper bound on the set of g’s we have to max i ∈ k max search to find gmin. Let g2 (W 2 P 2 + c 1) = F 2 + ... + F 2, min d+2 − n − 1 5 1 2 2 where Fi Ok[T ]. Then deg(Fs) 2 deg((Wd+2 Pn + c 1)), and for i =0,...,d +1 and all embeddings∈ σ of k into R≤, we have that− − σ(F (i)) g2 (W 2 (i) σ(P 2(i)) + c 1) g2 (W 2 (i) σ(P 2(i)) + c 1), | s | ≤ min d+2 − n − ≤ max d+2 − n − where s = 1,..., 5. Hence, by Corollary 5.5, there are only finitely many polyno- mials F satisfying these inequalities, and we can determine them all. Once we determine all the possible F1,...,F5, starting with g = 1 and continuing through gmax, we can check if any quintuple of possible polynomials works with any par- ticular g, and thus determine gmin. We now consider Condition (6). By checking all the values of Wd+2(x) for x Z, x [1,...,d], we can determine the maximum value of the set. Finally, to∈ ∈ determine v1,...,vr, we can start running through all linear combinations with integer coefficents of the basis vectors until we hit Pn(2b +2c + d).

15 C.E. Sets over Function Fields 

The final piece of proof comes from the lemma below, which is taken essentially verbatim from Zahidi’s paper. Lemma 5.11. F O [T ] F = P is equivalent to n,b,c,d,g,v ,...,v O [T ] : ∈ k ∧ n ∃ 1 r ∈ k (1) Par(n,b,c,d,g,v1,...,vr); (2) Pos (g, (W 2 + c F 2 1)); 2 d+2 − − (3) F (2b +2c + d)= v1α1 + ...vrαr.

Proof. Suppose F = Pn for some natural number n. Then one can easily find natural numbers b,c,d,g and rational integers v1,...,vr such that the relation (1) is satisfied. (2) can be satisfied because deg(Pn) < deg(Wd+2). Conversely suppose Conditions (1)-(3) are satisfied for some natural numbers c,d,n,b and integers v1,...,vr. In this case we have to prove that F = Pn. From conditions (1) and (3) it follows that (F P )(2b +2c + d)=0. − n Thus, if F = P , there is some S O [T ] =0 such that 6 n ∈ k 6 F P =(T 2b +2c + d)S(T ). − n − Now by Condition (2), it is the case that F has degree at most d +1, while Pn has degree d (by Condition (1)), and hence, S has degree at most d. So for some integer k with 0 k d, we have S(k) =0. Now for at least one real embedding σ we have ≤ ≤ 6 σ((F P )(k)) = (2b +2c + d k) σ(S(k)) 2b +2c, | − n | | − || | ≥ (since k d and the fact that given an algebraic integer a in a totally real number field, a =0≤ , there is at least one real embedding such that σ(a) 1). At the same time, again6 by Condition (2) of the lemma and by Part (6)| of the| ≥definition of the relation Par, for any real embedding σ we have, for all integers x with 0 x d : ≤ ≤ σ(F (x)) σ(F (x)2 + 1) W 2 (x)+ c < b + c, | |≤| | ≤ d+2 and σ(P (x)) σ(P 2(x)+1) W 2 (x)+ c < b + c, | n |≤| n | ≤ d+2 and hence σ((F P )(x)) < 2b +2c, | − n | leading to a contradiction.  The last lemma completes the proof of Proposition 5.3 and Theorem 5.2.

One reason for our emphasis on finite-fold Diophantine definitions is that they allow us to determine the difficulty of deciding whether a polynomial has in- finitely many solutions in a given ring S, an infinite version of Hilbert’s Tenth Problem: n HTP ∞(S)= f S[X ,...,X ] : ( ∞(x ,...,x ) S ) f(x ,...,x )=0 . { ∈ 1 n ∃ 1 n ∈ 1 n } n [ 16 C.E. Sets over Function Fields The following corollary is a good example of the connection between these topics: Theorem 5.2 actually proves that for the rings involved, HTP ∞ has the greatest complexity possible. Corollary 5.12. Let R be the ring of integers in a totally real number field k. As- 1 sume R[T ] has an effective indexing θ with domain N for which θ− (0) is decidable. Then, for some fixed n N, the set of polynomials in n variables over R[T ] with infinitely many solutions∈ there, n HTP ∞(R[T ]) = f R[T ][X ,...,X ]: ( ∞(x ,...,x ) (R[T ]) ) f(x ,...,x )=0 , n { ∈ 1 n ∃ 1 n ∈ 1 n } 0 is Π2-complete, and thus computably isomorphic to ′′, the complement of the Turing jump of the Halting Problem. ∅ 1 Proof. The assumption that θ− (0) is decidable allows us to build an effective injective index, so assume that θ itself is injective. By Theorem 5.2, there is a polynomial g(E,Y,Z ,...,Z ) over R[T ] such that, for all (e, y) N2, if ϕ (y) fails 1 m ∈ e to halt, then g(e, θ(y), Z~) has no solution in R[T ]; whereas if ϕe(y) does halt, then g(e, θ(y), Z~) has at least one solution in R[T ], but only finitely many. It follows that, for each fixed e, g(e, Y, Z~) has infinitely many solutions in R if dom(ϕe) is infinite, but only finitely many if dom(ϕe) is finite. It is well known that the set Inf of indices e for which ϕe has infinite domain is a Π2-complete set ([18], Theorem IV.3.2), computably isomorphic to , and we have just described a 1-reduction ∅′′ from Inf to HTP ∞(R[T ]), by e g(e, Y, Z~). On the other hand, HTP ∞(R[T ]) itself n 7→ n is Π2, hence 1-reducible to Inf, so by Myhill’s Theorem (see [18, I.5.4]), the two are computably isomorphic.  The computability-theoretic notation used here is standard; e.g. see [18]. Com- putable isomorphism is the strongest equivalence in general use in computabil- ity, so the corollary gives a very precise measurement of the complexity of HTPn∞(R[T ]). The value of n is simply one greater than the least number m of variables - quired for a polynomial g giving a finite-fold Diophantine definition of the Halting Problem in R[T ]. Notice that we not only have proven the Π2-completeness of HTP ∞(R[T ]), the general question of whether a polynomial has infinitely many solutions in R[T ], but in fact have established Π2-completeness for its restriction HTPn∞(R[T ]) to polynomials with at most n variables.

6. DEFINING VALUATION RINGS OVER FUNCTION FIELDS OF CHARACTERISTIC 0 In this section we give an existential definition of valuation rings for function fields of characteristic 0 over some classes of fields of constants including all number fields. More specifically, we will assume the constant field k to be a field algebraic over Q with an embedding into a finite extension M of Qp for some odd rational prime p or into R (making k formally real). Note that number fields satisfy these assumptions on k. The method we use below is extendible to a much larger class of fields of char- acteristic 0 and to higher transcendence degree fields of positive characteristic. We intend to describe these extensions in future papers.

17 C.E. Sets over Function Fields We now state the two main theorems of the section. Theorem 6.1. Let k be a field algebraic over Q, and such that k has an embedding into a field M, a finite extension of Qp for some odd prime p. Let K be a function field over k, and let u be a prime of K. Then the set f K : orduf 0 is Diophantine over K. { ∈ ≥ } Theorem 6.2. Let k be a field algebraic over Q, and such that k has an embedding into R. Let K be a function field over k, and let u be a prime of K such that its residue field is embeddable into R. (For example, u can be a prime of odd degree.) Then the set f K : ord f 0 is Diophantine over K. { ∈ u ≥ } In this section we We will need a sequence of lemmas and propositions below before completing the proof. The first lemma describes a general property of Diophantine defini- tions.

Lemma 6.3. Let F2/F1 be a finite field extension. Let A F2 and assume A is Diophantine over F . Then A F is Diophantine over F . ⊂ 2 ∩ 1 1 Proof. The proof follows from Lemma 2.1.17 of [14] and the fact that F2 Dioph F1. (See Definition 2.1.5 of [14]). ≤  Lemma 6.4. Let Kˆ be a finite extension of K, let qˆ be a prime of Kˆ above a prime q of K, and let A be the set of all elements of Kˆ with non-negative order at qˆ. Assume further that A is Diophantine over Kˆ . Then A K is Diophantine over K and consists of all elements of K with non-negative order∩ at q.

1 Proof. Let f K. Then ordˆqf = e ordqf, where e = e(qˆ/q). Therefore, ordˆqf 0 if and only if ord∈ f 0. ≥  q ≥ Remark 6.5. If k has an embedding into a finite extension of Qp, the same is true of any finite extension of k. In view of Lemma 6.4 and Remark 6.5, we can assume that if k has an embed- ding into a finite extension of Qp,p> 2, k has no real embeddings. (For example, we can adjoin i to the original field.) Proposition 6.6. Let k be any field of characteristic 0 such that the following form: (6.1) X2 aY 2 bZ2 + abW 2 − − is anisotropic over k for some values a, b k. If K is a function field over k, T is a prime (or a valuation) of K of degree 1 and∈ h K is such that ord h is odd, then ∈ T (6.2) X2 aY 2 bZ2 + abW 2 = h − − has no solution in K. Proof. Assume the opposite and observe that due to the fact that function field valuations are non-archimedean and ordTh is odd,

2 min(ordTX, ordTY, ordTZ, ordTW ) < ordTh.

18 C.E. Sets over Function Fields Next let U X,Y,Z,W be such that ordTU = min ordTX, ordTY, ordTX, ordTW and divide∈ every { variable} in (6.2) by U 2 { } X 2 Y 2 Z 2 W 2 h (6.3) a b + ab = . U − U − U U U 2         h X Y Z W Observe that has a zero at T, while at least one of , , , is equal U 2 { U U U U } to 1. Thus considering (6.3) mod T, taking into account that T is a degree one prime, we conclude that the form (6.1) is isotropic over k in contradiction of our assumption. 

Notation 6.7. Since k is embeddable into a finite extension M of Qp, we will sometimes identify k with a subfield of M. Let p lie above p in M. We identify p with the ideal of M containing all elements of positive order at p. Let Op be the set of elements of non-negative order at p. Let Rp be the residue field of p. Since M is complete under the valuation generated by p, we must have Q k M. p ⊆ p ⊆ Thus, we can assume, without loss of generality, that M = kp. Let H k be a number field. Then O H = O is a valuation ring of some prime p of⊂H. p ∩ pH H Lemma 6.8. There exist a number field H k containing algebraic integers a, b ⊆ such that a is not a square in M, ordpa =0, and ordpb is odd. Proof. First of all, we claim that there exists a number field G k such that the residue field R = R . Indeed, since [M : Q ] < , we have that⊂R is a finite field, pG ∼ p p ∞ p and for any G we have that [Rp : RpG ] is a finite extension. Let α generate Rp over

RpG . Since α Rp, there exists x M such that the residue class of x is α. If x k, since M = k ∈, we have that there∈ exists y k with x y p. Hence the residue6∈ p ∈ − ∈ class of y is also α. Therefore, in H = G(y), the residue field of pH is isomorphic to Rp.

Now let γ M and be such that ordp(γ)=0, and γ is not a square modulo p. Such an∈ element γ exists in M, because not all residue classes of a finite field Rp are squares of other residue classes. Then the number field H contains an element a such that a γ mod p. Further, any residue class of the prime pH contains algebraic integers.≡ Therefore, we can assume a O . The existence of ∈ H b OH such that ordpb is odd can be proved in a similar fashion. ∈ 

Lemma 6.9. If a is not a square in k, then the form (6.1) is isotropic over k if and only if there exists y k(√a) such that N (y)= b. ∈ k(√a)/k Proof. Suppose we have a non-trivial representation of 0 by the form (6.4) X2 aY 2 bZ2 + abW 2. − − Then without loss of generality, we can assume that Z and W are not simulta- neously 0. Otherwise, we are looking at the equation (6.5) X2 aY 2 =0, − 19 C.E. Sets over Function Fields while a is not a square in k. The only solution to (6.5) is X = Y = 0. So we get a trivial representation of 0. Assuming that Z and W are not simultaneously 0, we note that Z2 aW 2 = 0, and we can rewrite (6.1) as − 6 X2 aY 2 − = b Z2 aW 2 or − (6.6) y k(√a): b = N (y). ∃ ∈ k(√a)/k Conversely, suppose (6.6) is true. Then b = U 2 aV 2, where either U = 0, or V =0. Thus we have that U 2 aV 2 b =0. Let X =−U, Y = V,Z =1, W =0, and6 we have6 a non-trivial representation− of− 0 by the form (6.4) over k.  Lemma 6.10. Let H k be a number field. Let a, b O be such that ord a = 0, ⊂ ∈ H p a is not a square in M and ordpb is odd. (Such a number field H and elements a, b H exist by Lemma 6.8.) Then (6.1) is anisotropic over k and M. ∈ Proof. Suppose (6.4) is isotropic. Then by Lemma 6.9, we have that (6.6) is true. Since a is not a square in M, ordpa =0, p is not a dyadic prime, we have that the extension M(√a)/M is an unramified extension of degree 2 of p-adically complete fields. Since M is a complete field, there is only one prime above p in M(√a). If t is the prime of M(√a) above p, then the relative degree f(t/p) of t over p satisfies f(t/p)=2. Thus, ord N (y)= f(t/p)ord y 0 mod 2. p k(√a)/k t ≡ But ordpb is odd. So (6.6) cannot hold, and the form (6.4) is anisotropic.  Lemma 6.11. Let H be a number field. Let q be any prime of H. Let a, b H be units at q. Assume further that a 1 mod 4. Then in H the form (6.4) is isotropic.∈ ≡ q Proof. If q is not dyadic, and a is a unit at q, then q is unramified in the extensions H(√a)/H and Hq(√a)/Hq. If q is a dyadic prime, then given our assumption that a 1 mod 4, we also have that q is unramified in the extensions H(√a)/H and ≡ Hq(√a)/Hq. Further, since b is a unit at q also, it is a norm in the extension of Hq(√a)/Hq, by local class field theory. Hence (6.6) can be solved in Hq. 

Corollary 6.12. Let q, a, b, H be as above, but assume a is a unit at q while ordqb is even. Then in Hq the form (6.2) is isotropic.

Proof. Let π be a local uniformizing parameter with respect to q in H. If ordqb is even, then we can replace b in the quadratic form by ˆb = π2sb, where s Z and ord π2s = ord b, without changing the status of the form with respect∈ to being q − p isotropic or anisotropic. Observe that ˆb is a unit at q, and the Lemma follows from Lemma 6.11.  Lemma 6.13 (Essentially Eisenstein Irreducibility Criteria). Let H, q be as above. Let a0,...,an H, be such that ordqam =0, ordqai r> 1, for i =1,...,m 1, ordqa0 = r 1 with (m,∈ r 1)=1. Let ≥ − − − m m 1 f(T )= amT + am 1T − + ... + a0 H[T ] − ∈ 20 C.E. Sets over Function Fields In this case f(T ) is irreducible over Hq and adjoining a root of f(T ) produces a totally ramified extension of Hq.

Proof. Let α be a root of f(T ) in the algebraic closure of Hq. Let Q be a prime above q in H (α). If ord α 0, then, since ord a = ord a =0, we have that q Q ≥ q m Q m m m 1 ordQα = ordQ( am 1α − ... a1α a0). − − − − − Let e = e(Q/q), and note that ord (a αi) > e ord a er > e(r 1) = e ord a . Q i · q i ≥ − · q 0 Thus, m m 1 ordQα = ordQ( am 1α − ... a1α a0)= e ordqa0 = e(r 1) − − − − − · − Since (r 1, m)=1, we conclude that e = m, and the polynomial is irreducible. Suppose− now ord α< 0. Then for any i =1,...,m 1 we have Q − m i i ordQ(α ) < ordQ(α ) < ordQaiα . Therefore, m m 1 e(r 1) = ordQa0 = ordQ( α am 1α − ... a1α)= m ordQ(α), − − − − − − · so that once again we have that e = m, and f(T ) is irreducible.  We now establish existence of an element of K with a particular pole divisor. Lemma 6.14. For any valuation u of K, for all sufficiently large s> 0, there exists T K such that u is the only valuation where T has a pole, and ord T = 3s. ∈ u − Proof. One can use the same proof as in Lemma 3.5 of [16], except that one should replace 2 by 3.  For the convenience of the reader we state a proposition due to Y. Pourchet (see [12], Proposition 3) concerning representation of polynomials by quadratic forms over rational function fields. Proposition 6.15. Let k be a field of characteristic = 2. Let a, b k, f k[T ], where T is transcendental over k. Then there exist 6X,Y,W,Z k∈[T ] such∈ that f = X2 aY 2 bZ2 + abW 2 if and only if the following conditions are∈ satisfied − − For every prime factor p(T ) of f(T ) over k of odd multiplicity, we have that • the form is isotropic in the residue field of k(T ) modulo p(t). The form represents the leading coefficient of f(T ) over k. • Proposition 6.16. Let k be a field such that k has an embedding into a finite extension M of Qp for an odd rational prime p. Let L = Q˜ M, let OL be the ring of algebraic integers of L, and let a, b O be relatively prime.∩ Let p lie above a prime ∈ L p in M, assume that a is not a square at p and ordpb is odd. Assume further that a 1 mod 4. (These assumptions can be realized since k can be embedded into a ≡ finite extension of Qp for an odd p, and by the Strong Approximation Theorem.) Let u be a prime of K of degree 1, let T be transcendental over k, and let K be a finite extension of k(T ), so that k is relatively algebraically closed in K. Assume further that ord T = 3s, and T has no other poles. Let f K. u − ∈ 21 C.E. Sets over Function Fields (1) If ord f < 0 and ord f is odd, then for any ξ =0,µ k, the equation u u 6 ∈ (6.7) X2 aY 2 bZ2 + abW 2 = ξf + µ − − has no solution in K. (2) Let H k be a number field containing a, b. If f H[T ], and orduf is even (or in other⊂ words deg(f) is even), then there exist∈ξ = 0,µ H such that (6.7) has a solution in H(T ) K. 6 ∈ (3) For each f, there exists⊂ a finite set Q of primes of H and a positive constant N such that if ξ1,µ1 H and are such that ordq(ξ ξ1) > N, ordq(µ µ1) > N for all q, then ∈ − − (6.8) X2 aY 2 bZ2 + abW 2 = ξ f + µ − − 1 1 has a solution (X,Y,Z,W ) K4. ∈ Proof. Suppose f K and ord f is odd. In this case, for any ξ =0,µ k we know ∈ u 6 ∈ that ordu(ξf + µ) = orduf < 0 and it is odd. So, by Proposition 6.6 applied to h = ξf + µ we conclude that (6.7) has no solutions in K. If we consider the form X2 aY 2 bZ2 + abW 2 over H, then we note that any four dimensional form is universal− − locally at any non-archimedean prime q, i.e. it represents every element of the field. Without loss of generality, by Lemma 6.3 we can assume that k, and therefore H have no real embeddings. By the Hasse- Minkowski local-global principle, we can conclude that the form is universal over H. Thus, if f H, (and therefore ord f =0), the equation (6.7) can be satisfied. ∈ u Now assume that f H[T ] H, and orduf is even (or in other words deg(f) is even). We now show that∈ for\ some constants ξ = 0,µ H the quadratic form equation (6.7) has solutions in H(T ). 6 ∈ We start with examining the isotropic/anisotropic status of (6.4) over H. If the form is isotropic in H, then by Proposition 6.15, we are done, since the form can represent any constant in H. Suppose the form is anisotropic over H. Then, by the Hasse-Minkowski Theorem, for some prime q of H, the form is anisotropic over Hq. Further, since for all but finitely many primes q of H we have that a, b are units at q, we have that the form (6.4) is isotropic over Hq for all but finately many q, by Lemma 6.11. We now describe the set of conditions on ξ and µ making sure that (1) ξf + µ is irreducible over H(T ), and (2) if t is a prime of H(T ) corresponding to ξf + µ, then in the residue field of t, the norm (6.4) becomes isotropic.

Let q be a prime of H such that ordqb is odd, and a is not a square mod q (in other words, q is one of finitely many primes where the quadratic form (6.4) is anisotropic in Hq). Let πq OH be an element of order 1 at q. (Such an element exists by the Weak Approximation∈ Theorem.) Let a ,...,a H and assume 0 n ∈ r n r n 1 n πq T πq T − f(T )= anT + ... + a0 = an + an 1 + ... + a0 = πr − πr  q   q  n n 1 U U − an + an 1 + ... + a0, πr − πr  q   q  22 C.E. Sets over Function Fields r ai where r is a non-negative integer such that ordqπq > 2 for any coefficient ai, i = an nr r πq 0,...,n 1, and U = πq T . Now set ξq = and let g(U) = ξqf(T ). (Observe that − an ξ =0 as required.) Let q 6 n n 1 g(U)= U + cn 1U − + ... + c0. − Then nr r ai (πq) ai nr ri ai nr ri r πq ai ci = ξq ri = ri = πq − = πq − − πq an πq an an Thus, ord c > 2+(nr ri r) 2. q i − − ≥ for i =1,...,n 1, and ord c > (n 1)r +2. − q 0 − Next let ordqµq = 1 and observe that h(U) = g(U)+ µq is irreducible by Lemma 6.13, and adjoining a root α of h(U) to H will ramify q with even ramification degree. This will make the quadratic form in (6.2) isotropic at the factors above q in H(α) by Corollary 6.12. Let Q be the set of all primes q of H such that the form (6.4) is anisotropic πr over Hq. Let π OH be such that ordqπ = 1 for all q Q. Now let ξ = , where ∈ ∈ an r ai r is a non-negative integer such that for all q Q we have that ordqπ > 2 ∈ an for any coefficient ai, i = 0,...,n 1. Let µ H be such that ordqµ = 1 for all q Q. Such elements π,µ exist in−H by the Weak∈ Approximation Theorem, once again.∈ Now, by the argument above, we see that in H(α) the form (6.4) is isotropic locally at all primes of H(α), and therefore the form is isotropic over H(α), by the Hasse-Minkowski Theorem. As discussed above, we can assume that H has no real embeddings and there- fore a four-dimensional quadratic form is universal over H. So the leading coeffi- cient of h(U) is represented by the form. We now apply Proposition 6.15 to reach the desired conclusion.

n n 1 ai Now let ξ1,µ1 H, let gˆ(U) = ξ1f(T )=ˆcnU +ˆcn 1U − + ... +ˆc0. Then cˆi = ξ1 ri . − π Q ∈ ai Let q and note that ordq(ci cˆi) = ordq(ξ ξ1)+ ordq πri . Let M > 0 be large enough∈ so that − − ai ai M + min(ordq ) > ordq(ξ )= ordqci. i,q πri πri

Pick ξ1 such that ordq(ξ ξ1) > M for all q Q and observe that for all q Q, we now have that ord (ˆc c−) > ord c . Then for∈ all q Q, we get that ∈ q i − i q i ∈ ord cˆ = ord ((ˆc c )+ c )= ord c 2 q i q i − i i q i ≥ for i> 1, and ordqcˆn =0. Now let µ1 be such that for all q we have that ord (µ µ ) > 2. q − 1 Then ordqµ1 = ordqµ by the same argument as for ξ1. Thus, ordqµ1 = 1. We ˆ now can apply Lemma 6.13 to the polynomial h = ξ1f(T )+ µ1 to conclude that

23 C.E. Sets over Function Fields all primes in Q ramify in the residue field of extension generated by hˆ ramifi- cation degree divisible by 2 and the proceed in the same manner as we did for polynomial h.  We now consider the case of k with a real embedding. First we prove the following lemma. Lemma 6.17. Let H be a number field such that √2 H. Let t be a dyadic prime ∈ of H. Then 1 Ht, and therefore the extension H(i)/H is unramified at all primes of H. − ∈ Proof. Note that (1 + √2)2 =3+2√2 1 mod 2√2. So if we set g(x)= x2 +1, then ≡ − g(1 + √2) 0 mod 2√2, while g′(1 + √2) = 2+2√2 0 mod 2. Thus, by Hensel’s ≡ ≡ Lemma, g(x) has a root in Ht. Hence, in the extension H(i)/H the local degree at t is 1, and therefore t is not ramified in this extension. Since dyadic primes are the only primes possibly ramified in the extension H(i)/H, we see that no prime of H is ramified in the extension H(i)/H.  Without loss of generality, by Lemma 6.3, we can assume that k contains the square root of 2. (Adjoining the square root of 2 will not change the existence of a real embedding.) Let L = M Q˜ , as above. Let H L be a number field containing a square root of 2. We now∩ prove an analog of Proposition⊂ 6.16 for fields with a real embeddings. Proposition 6.18. Let k be a field with a real embedding and containing a square root of 2. Let T be transcendental over k and let K be a finite extension of k(T ) so that k is relatively algebraically closed in K. Let u be a prime of K of degree 1, and assume ord T = 3s, and T has no other poles. Let f K. u − ∈ (1) If ord f < 0 and is odd, then for any ξ =0,µ k, the equation u 6 ∈ (6.9) X2 + Y 2 + Z2 + W 2 = ξf + µ has no solution in K. (2) If for some number field H k containing √2, we have that f H[T ] and ⊆ ∈ orduf is even (or in other words deg(f) is even), then there exist ξ =0,µ k such that (6.9) has a solution. 6 ∈ (3) If ξ,µ k are as above, then there exists δ > 0 such that for all ξ1,µ1 with ξ ξ ∈< δ, µ µ < δ for all archimidean absolute values ... of k, then | − 1| | − 1| | | 2 2 2 2 (6.10) X + Y + Z + W = ξ1f + µ1 has solutions in K. Proof. We first note that the quadratic form in 6.9 is anisotropic over R, and therefore anisotropic over k. Thus, if orduf is odd, then the proposition holds by the same argument as in Proposition 6.16. The same is true if f H. (By the Weak Approximation Theorem, we can always pick ξ,µ H so that∈ the image of f under any real embedding is positive.) ∈ So, assume now that deg(f) is even and f is not a constant. It is enough to show that (6.9) can be satisfied in H(T ). We again start by examining anisotropic/isotropic

24 C.E. Sets over Function Fields status of the form in question over H. As in Lemma 6.3, it is easy to see that the quadratic form in (6.9) is isotropic if and only if 1 is a norm in the extension H(i)/H. By the Hasse-Minkowski Theorem, it is enough− to have that 1 is a norm − in all completions of H. Since, H contains √2, by Lemma 6.17, we have that the extension Hq(i)/Hq is unramified for all primes q of H, and therefore 1 is a norm by local class field theory at all primes q of H. Thus, the only completion,− where 1 is not a norm is the real one. − We choose ξ so that the leading coefficient of ξf is positive under all real em- beddings. Such a ξ exists by the Weak Approximation Theorem, once again. This step will also make sure that the leading coefficient of ξf + µ is representable by the form over H. We also choose µ> 0 large enough so that ξf + µ has no roots in R under all real embeddings. Let h(T )= ξf(T )+ µ, and let g(T ) be an irreducible factor of h(T ). Then g(T ) has no roots in R under any real embedding of H, and therefore must be of even degree. Further if we adjoin a root α of g(T ) to H, the extended field H(α) will have no real embeddings, and the left side of (6.9) will become isotropic. Thus we can apply Proposition 6.15 again to reach the desired conclusion. If ξ1 is sufficiently close to ξ under all archimedean absolute values of k, then the leading coefficient of ξ1f is also positive under all real embeddings. Similarly, if µ1 is sufficiently close to µ under all archimedean valuations of k, then h1(T )= ξ1f(T )+ µ1 has no real roots under all real embeddings of k.  We now address the issue of giving a Diophantine definition of a set of con- stants guaranteed to contain constants ξ1,µ1 we used in Propositions 6.16 and 6.18. Proposition 6.19. The following statements are true. (1) There exists a Diophantine over K set of constants A such that for any number field H k and any finite collection q1,..., qr of primes of H, the ⊆ r set (b,...,b), b A H A is dense in Hq1 ... Hqr under the product topology.{ ∈ ∩ } ⊂ × × (2) There exists a Diophantine over K set of constants A such that for any num- ber field H k and all real embeddings σ1,...,σr of H, the set (b,...,b), b A H Ar⊆is dense in σ (H) ... σ (H) under the product topology.{ ∈ ∩ } ⊂ 1 × × r Proof. For the p-adic case the proof follows from Theorem 5.5 of [6]. For the Archimedean case, we use Lemma 3.6 and Section 3.6 of [13] together with Proposition 5.1 of [6].  Before completing the proof of Theorems 6.1 and 6.2, we need the following lemmas. Lemma 6.20. Let q be a prime divisor of K of degree greater than 1. Then there exists a finite constant field extension kˆ of k such that in kKˆ the divisor q has at least one factor of degree 1.

Proof. Let Rq be the residue field of q. Then Rq is isomorphic to a finite extension of k, and we can identify R with this extension. Let s(T ) k[T ] be the monic q ∈ irreducible polynomial of a generator α of Rq over k. Let qi be a factor of q in K(α).

25 C.E. Sets over Function Fields Let Ri be the residue field of qi. Since the power basis of α is an integral basis with respect to q, we can determine the factorization of q in K(α) by considering the factorization of s(T ) over Rq (see [8], Chapter I, Section 8, Proposition 25). By assumption on s(t) we have that over Rq it has at least one factor of degree 1.  Lemma 6.21. Let h, g K be such that for some prime a of K, it is the case that s ∈3s+1 ordag = 3 , and orda(h + g) is either non-negative or even, Then, ordah< 0, and ord h −0 mod 2. a ≡ 3s+1 s Proof. First assume that ordah 0. Then orda(h + g) = ordag = 3 , contra- ≥ 3s+1 − dicting our assumptions. Thus ordah < 0, and ordah < ordag. Consequently, +1 +1 ord (h3s + g)= ord h3s 0 mod 2, and the conclusion of the lemma holds.  a a ≡ We now complete the proof of Theorem 6.1. 6.1. Proof of Theorem 6.1. 6.1.1. A special element T . Let k be algebraic over Q and embeddable into a fi- nite extension M of Qp. Without loss of generality we can assume that k does not embed into R, by adjoining, if necessary, a square root of 1 to k. A finite exten- − sion of k will continue to be embeddable into a finite extension of Qp. Further, by Lemma 6.3, we can translate Diophantine definitions obtained for the extended field into Diophantine definitions over the original field. Next let u be a prime of K. By Lemmas 6.3 and 6.20, using the same reasoning as above, we can assume that u is of degree 1. Let T K k. For all sufficiently ∈ \ large s Z>0, by Lemma 6.14, we can find a T K that has a pole at u of order 3s∈, and no other poles. Note that u is totally∈ ramified over k(T ) with the s s ramification degree 3 . Hence, for any h k(T ) we have that 3 deg(h) = orduh, and deg(h) 0 mod 2 if and only if ord h ∈ 0 mod 2. · − ≡ u ≡ 6.1.2. Defining a subset of K containing all polynomials in T of even degree, and no element of K with an odd degree pole at u. Let h k[T ]. Then by Proposition ∈ 6.16 and Proposition 6.19, Part 1, we have that orduh 0 mod 2 or equivalently deg(h) 0 mod 2 if and only if there exists ξ,µ,X,Y,Z,W ≡ K such that ≡ ∈ (6.11) X2 aY 2 bZ2 + abW 2 = ξh + µ, − − (6.12) ξ A 0 ,µ A. ∈ \{ } ∈ We remind the reader that A k is Diophantine over K. At the same time, if h K satisfies (6.11), then either⊂ h has no pole at u or this pole is of even order. ∈ 6.1.3. Defining a subset of K containing all rational functions in T of even degree and no element of K of odd order at u. Please note that for any h k(T ), we have ∈ h1 that orduh 0 mod 2 if and only if h = , where h1, h2 k[T ] k, h2(T ) = 0 and ≡ h2 ∈ \ 6 g1 deg(h1) deg(h2) 0 mod 2. Indeed, suppose h = , g2 = 0,g1,g2 k[T ] k. If ≡ ≡ g2 6 ∈ \ deg(h) is even, then deg(g ) deg(g ) is even. Suppose deg(g )=2r +1,r Z . 1 − 2 1 ∈ >0 Tg1 Then note that h = , where we can set h1 = Tg1, h2 = Tg2 to reach the desired Tg2 26 C.E. Sets over Function Fields 2 2 conclusion. If either g1 or g2 is a constant, then let h1 = T g1, h2 = T g2 to reach the desired conclusion once again. Therefore, h k(T ), deg(h) 0 mod 2 if and only if there exists ξr,µr,Xr,Yr,Zr, Wr K such that ∈ ≡ ∈ s+1 (6.13) X2 aY 2 bZ2 + abW 2 = ξ (h3 + T )+ µ , r − r − r r r r r (6.14) ξ A 0 ,µ A. r ∈ \{ } r ∈ h1 where r = 1, 2, h2 = 0 and h = . Indeed, by Proposition 6.6, we have that 6 h2 3s+1 deg(h1 + T ),r = 1, 2 is either even or non-positive. By Lemma 6.21, we then conclude that deg(hr) > 0 and is even. Consequently, deg(h) is even. Conversely, if deg(h) is even, we can write h as a ratio of two polynomials h1, h2 of positive 3s+1 even degrees. If deg(hr) is positive and even, then deg(hr + T ) is also positive and even, and therefore we can satisfy (6.13) over K by Proposition 6.16. Finally, Proposition 6.16 and Lemma 6.21 imply that for any h , h K, we have that 1 2 ∈ (6.13) implies that h1, h2 have an even order pole at u. 6.1.4. Defining a subset of K containing all rational functions of T integral at u (or of non-positive degree) and no functions of K with a pole at u. Let f k(T ) be such 2 3s+1 2 ∈ that deg(f · T + T ) 0 mod 2. We claim that in this case deg(f) 0. Suppose 2 3s+1 ≡ 2 ≤ not. Then deg(f · T ) > deg(T ), and 2 3s+1 2 2 3s+1 3s+1 deg(f · T + T )= deg(f · T )=2deg(f )+1 1 mod 2. ≡ 2 3s+1 2 At the same time, if deg(f) 0, then deg(f · T ) < deg(T ), and ≤ 2 3s+1 2 2 deg(f · T + T )= deg(T )=2 0 mod 2. ≡ Consider now the set of f K satisfying the following equations. ∈

2 3s+1 2 h1 (6.15) f · T + T = h2 s+1 (6.16) X2 aY 2 bZ2 + abW 2 = ξ (h3 + T )+ µ ,j,r =1, 2, j,r − j,r − j,r j,r j,r r j,r (6.17) ξ A 0 ,µ A. i,r ∈ \{ } i,r ∈ By Proposition 6.6 and Lemma 6.21, we have that ord h 0 mod 2. Therefore, u r ≡ 2 3s+1 2 ord (f · T + T ) 0 mod 2, u ≡ and thus ord f 0. At the same time, if f k(T ), and deg(f) is even, then we u ≥ ∈ can choose hr k[T ] to be of even positive degree, and by Proposition 6.16, we can satisfy (6.15)–(6.17).∈

s 6.1.5. Defining the valuation ring Vu of u in K. Let n := [K : k(T )] = 3 . We claim that V can be defined as follows: w V if and only if there exist u ∈ u ξ ,µ , a , h ,X ,Y ,Z , W K i,r i,r i i,r i,r i,r i,r i,r ∈ with r 1, 2 , i 0,...,n 1 such that ∈{ } ∈{ − } n n 1 (6.18) w + an 1w − + ... + a0 =0& − 27 C.E. Sets over Function Fields n 1 − 2 3s+1 2 hi,1 (6.19) ((T a · + T )= ) & i h i=0 i,2 ^ n 1 2 − s+1 (6.20) X2 aY 2 bZ2 + abW 2 = ξ (h3 + T )+ µ & i,r − i,r − i,r i,r i,r i,r i,r i=0 r=1 ^ ^ (6.21) i 0,...,n 1 ,r 1, 2 (ξ A 0 & µ A). ∀ ∈{ − } ∈{ } i,r ∈ \{ } i,r ∈ First suppose that Equations (6.18)–(6.21) are satisfied. Then, since A k, ⊂ and ξi,r = 0, by Proposition 6.2, for any degree 1 prime a of K, we have that 6 3s+1 3s+1 orda(ξi,r(hi,r + T )) is even. Therefore, orda(hi,r + T ) is either bigger or equal to 0, +1 +1 or is even. In particular, we have that ord (h3s +T ) 0 or ord (h3s +T ) 0 mod 2. u i,r ≥ u i,r ≡ Now by Lemma 6.21, we conclude that orduhi,r 0 mod 2 (and orduhi,r < 0). Thus, 2 3s+1 2 ≡ ord (T a · + T ) is even, and we now have that i 0, . . . .n 1 ord a 0. u i ∀ ∈{ − } u i ≥ Suppose now that orduw< 0. In this case, n n 1 ordu(w + an 1w − + ... + a0)= norduw< 0, − contradicting the fact that n n 1 ordu(w + an 1w − + ... + a0)= ordu0= . − ∞ Therefore, if for some w K we have that Equations (6.18)–(6.21) can be satisfied over K, then ord w 0. ∈ u ≥ Conversely, suppose w K, orduw 0. Then w is integral over the local subring R of k(T ) containing all∈ functions≥a k(T ) without a pole at the valuation that 1/T ∈ is the pole of T in k(T ). In other words, R1/T consists of all rational functions a K(T ) with deg(a) 0, or, equivalently ordua 0. Hence, w will be a root of a ∈ ≤ ≥ 2 3s+1 2 polynomial in (6.18), such that a R . If ord a 0, then ord (T a · + T ) is i ∈ 1/T u i ≥ u · i hi,1 a rational function in T of even degree. Consequently, we can write each ai = , hi,2 3s+1 where hi,r are polynomials in T of even degrees. Thus, hi,r + T is a polynomial in T of even degree, and we can find constants in A so that (6.20) can be satisfied over K. This concludes the proof of Theorem 6.1.

We now proceed to prove Theorem 6.2. 6.2. Proof of Theorem 6.2. In almost every way the proof of Theorem 6.2 is the same as the proof of Theorem 6.1. So we confine ourselves to discussing only those parts where there are differences. We will consider every part of the proof of Theorem 6.1 and indicate what changes, if any, are required. We start with examining Subsection 6.1.1. In this part of the proof we consider a prime u and determine whether we can assume that u is of degree 1. For Theorem 6.2, we consider only primes u with residue fields embeddable into R. If u is not of degree 1, then its residue field is isomorphic to a finite extension kˆ of k. By Lemma 6.20, in the extension kKˆ of K the prime u will have a factor of degree 1. As in Subsection 6.1.1, we can extend our field of constants k, but the extended field must still be embeddable into R. This condition will be satisfied

28 C.E. Sets over Function Fields for kˆ, given our assumptions on u. Thus, as in the proof of Theorem 6.1, we can assume that u is of degree 1. We can again produce an element T K such that s ∈ u is the only pole of T and orduT = 3 . From this point on, the proof of Theorem− 6.2 is exactly the same as the proof of Theorem 6.1 with (6.11) replacing (6.9), and the set A defined to satisfy the condi- tions of Proposition 6.18. The existence of such a set A follows from Proposition 6.19(2).

7. DIOPHANTINE DEFINITION OF C.E. SETS OVER RINGS OF INTEGRAL FUNCTIONS In this section we extend results of J. Demeyer to show that c.e. sets are defin- able over any ring of integral functions, assuming the constant field is a number field. Since Demeyer showed that such a result holds over polynomial rings over number fields, and since rings of integral functions are finitely generated mod- ules over polynomial rings, it is enough to show that we can give a Diophantine definition of polynomial rings over the rings of integral functions to achieve the desired result. Below we state the main theorem of the section. Theorem 7.1. Let K be a function field over a field of constants that is a finite extension of Q, and let S be a finite non-empty collection of its valuations. Then every c.e. subset of OK,S is Diophantine over OK,S . 7.1. Arbitrary powers of a ring element. In this section we again turn our attention to the rings of S -integers of function fields, discussed in Sections 2 and 3, and consider the case where the field is not necessarily rational. We recall the notation and assumptions we used in these sections and add new ones. Notation and Assumptions 7.2. Let K,k, S , a, q, q , T = a √a2 1, be as in Proposition 3.4. • ∞ − − Let R = OK,S , R′ = R[T ], R′′ = R[T ] OK(T ), q∞ . Since T satisfies a monic • polynomial of degree 2 over R, every∩ element{ } of R[T ] is of the form a + bT , where a, b R. ∈ Let S ′ be the set of primes of K(T ) lying above primes of S . • Let Q be the prime below q in Q(T ). In other words Q corresponds to • the infinite∞ valuation of Q(T )∞. Observe that q is the only∞ prime above Q in K(T ). ∞ ∞ Let d = [K(T ): Q(T )]. • Let L be the Galois closure of K(T ) over Q(T ). • Let m = [L : Q(T )]. • Let β R′′ generate K(T ) over Q(T ). Since β R′′, we have that β = a +b T . • ∈ ∈ β β Let t1,..., ts be all the factors of q and Q in L. • For each positive integer m let ξ ∞be a primitive∞ m-th root of unity. • m For each positive integer m let Φm be the monic irreducible polynomial of ξm • over Q. We refer to polynomials of this form as “cyclotomic” polynomials. 7.2. Outline of the proof. For the results below we need to construct a Dio- phantine definition of arbitrary powers of a non-constant element of the ring. It turns out that it is more convenient to construct this definition for an element T of a quadratic extension R′ of the ring R. We will proceed as follows.

29 C.E. Sets over Function Fields (1) Using Proposition 3.4 we show that the set 2 m P (T )= (a, b) R m Z 0 : a + bT = T { ∈ |∃ ∈ ≥ } is Diophantine over R. (2) Next we use the set P (T ) to show that the set Z(T )= (a, b) R2 a + bT Z[T ] { ∈ | ∈ } is Diophantine over R. This is the main technical result of the section. (3) At this point, using results of J. Denef, we deduce that for any c.e. set A Z(T )r, the set of the form ⊂ (a , b ,...,a , b ) a , b R, (a + b T,...,a + b T ) A { 1 1 r r | i i ∈ 1 1 r r ∈ } is Diophantine over R. (4) Let Y R,Y k. Now observe that the set of 2d-tuples ∈ 6∈ 2d AY =(c0(T ),u0(T ),...,cd 1(T ),ud 1(T )) Z[T ] − − ⊂ d 1 − ci(T ) i such that u0(T ) ...ud 1(T ) = 0 and β Z[Y ] is computable, and − 6 u (T ) ∈ i=0 i therefore c.e. Hence, the set X d a2i 2 + b2i 2T i 1 (a0, b0,...,a2d 2, b2d 2) ai, bi R, − − β − Z[Y ] { − − | ∈ a + b T ∈ } i=1 2i 1 2i 1 X − − i is Diophantine over Z[T ], and therefore over R. We can replace β by aβ,i + i bβ,iT with aβ,i, bβ,i R, since β R′′. Further, using the fact that the ∈ 1 ∈ 1 conjugate of T over K is T − , and T + T − =2a R, we can rewrite ∈ 1 a2i 2 + b2i 2T (a2i 2 + b2i 2T )(a2i 1 + b2i 1T − ) − − − − − − = 2 2 . a2i 1 + b2i 1T a2i 1 + b2i 1 +2aa2i 1b2i 1 − − − − − − aˆ2i 1 + ˆb2i 1T = − − , aˆ2i

where aˆ2i, ˆb2i 1, aˆ2i 1 are polynomials in a2i 2, b2i 2, a2i 1, b2i 1 with coefficients in R depending− on− K and a only. − − − − Then, multiplying out all the products, using the monic irreducible poly- nomial of T over K to replace all powers of T greater than 1, and since the sum has to be in K, at the end we will obtain that m m ˆ a2i 1 + b2i 1T i aˆ2i 1 + b2i 1T a˜ − − β = − − (a + b T )= , a,˜ ˜b R, a + b T aˆ β,i β,i ˜ ∈ i=1 2i 2i i=1 2i b X X ˜ where a˜ = Pa(a1,...,a4d, b1,...,b4d), b = Pb(a1,...,a4d, b1,...,b4d) are fixed poly- nomials with coefficients in R in a2i 2, b2i 2, a2i 1, b2i 1 with coefficients de- pending on K and a only. Finally, since− −a˜ = c− R,− we conclude that Z[Y ] ˜b ∈ consists of all elements c R such that for some ˜b R, we have that ∈ ∈ ˜bc = Pa(a1,...,a2d 1, b1,...,b2d 1), − − ˜ b = Pb(a0,...,a2d 1, b0,...,b2d 1), − − 30 C.E. Sets over Function Fields 4d and (a0, b0,...,a2d 1, b2d 1) range over a Diophantine subset of R . Hence Z[Y ] is Diophantine− over− R. Now using the result of Denef one more time, we can assert that all c.e. subsets of R are Diophantine.

To simplify the proof, we will have K(T )-variables range not over R′ = R[T ] but over a subring R′′ of R′, where only one valuation q is allowed as a pole of non- constant elements of the ring. The following lemma∞ shows that this restriction is a Diophantine condition relative to R. 2 Lemma 7.3. The set (a, b) R a + T b R′′ has a Diophantine definition over R. { ∈ | ∈ } Proof. Observe that once we fix an element a O S , the field K(T ) is fixed. The ∈ K, constant field of K is a number field. Therefore, by Theorem 6.1, for each t S ′ ∈ we have that the valuation ring Vt of t has a Diophantine definition over K(T ). ′ Hence, Vt R′ has a Diophantine definition over R′. Thus, R′′ = t S q∞ Vt is ∩ ∈ \{ } existentially definable over R . Consequently, there exists a polynomial P (a + ′ T bT, z ,...,z ) with coefficients in R′ such that for any a, b R the equation P (a + 1 m ∈ bT, z¯)=0 has solutions z1,...,zm R′ if and only if a + bT R′′. Using the fact that 1 and T are linearly independent∈ over K, and T 2 2a∈+1=0, we can − replace P (a + bT, z1,...,zm) by a polynomial Q(a, b, v1,...,vr) such that for any pair 2 (a, b) R the equation Q(a, b, v ,...,v )=0 has solutions v ,...,v O S if and ∈ 1 r 1 r ∈ K, only if a + bT R′′.  ∈ 7.3. Defining Polynomials over Z Using Root-of-Unity Polynomials. In this section review a set polynomials from [3] and show how to adapt these polyno- mials algebraic extensions of rational function fields. In his paper J. Demeyer defined a set C of root-of-unity polynomials to be the set of polynomials F Z[T ] satisfying one of the following three equivalent conditions: ∈ (1) F is a divisor of T u 1 for some u> 0. (2) F or F is a product− of distinct cyclotomic polynomials. (3) F (0) =− 1, F is squarefree, and all the zeros of F are roots of unity. ± Observe that the constant polynomials F (T )= 1 satisfy the conditions above. The following property of polynomials in C will± serve as a foundation for ap- plying the "weak vertical method" later on in this section. The description of the method can be found in [14].

Proposition 7.4. Let F Z[T ] with F (0) 1, 1 , and let ℓ Z>0. In this case there exists a polynomial∈M D such that∈F {−M }mod T ℓ in Z[∈T ]. ∈ ≡ Proof. Proposition 2.7 of [3].  We will now prove a technical lemma to be used in determining the value of polynomials for some values of variables.

Lemma 7.5. Let β R′′ and assume that β b mod (T c) in R′′ with b, c Z. Then ∈ d ≡ − ∈ N Q (β)= G(T ) Q[T ], and G(c)= b . K(T )/ (T ) ∈ ± Proof. First, R′′ is contained in the integral closure of Q[T ] in K(T ). Therefore, all coefficients of the monic irreducible polynomial of β over Q(T ) are polynomials in Q[T ]. Hence, G(T )= N Q (β) Q[T ]. K(T )/ (T ) ∈ 31 C.E. Sets over Function Fields Let RL be the integral closure of R′′ in L (the Galois closure of K(T ) over Q(T )). Next consider the congruence β b mod (T c) in RL. Let β1 = β,...,βm be all the conjugates of β over Q(T ). Since≡T,c,b Q(−T ), we have that β b mod (T c) in ∈ i ≡ − RL. Thus, m m N Q (β)= β b mod (T c) L/ (T ) i ≡ − i=1 Y in R Q(T )= Q[T ]. Further, L ∩ [L:K(T )] m/d NL/Q(T )(β)=(NK(T )/Q(T )(β)) = G(T ) . Therefore, G(T )m/d bm mod (T c), and G(c)m/d = bm. Consequently, G(c)= ξ bd, where where ξ is a≡ root of unity.− Since G(c) Q, we conclude that G(c)= bd. ·  ∈ ± In what follows we will need some well-known facts about roots of unity and function fields that the reader can find in the appendix.

Lemma 7.6. Suppose α R′′, and let m1,...,mr,p1,...,pr,c Z>0 be defined as in Lemma 8.2. Let n ,...,n ∈ Z be such that ord Φ (c)= n .∈ Let b Z be such that 1 r ∈ >0 pi mi i ∈ ordpi b = ni. Suppose now that Equations (1)–(4) below hold with variables ranging over R′′. ℓ (1) α (T 1) in R′′, (2) α| −1 mod T . r ≡ ± Pi=1 ni (3) ordq∞ α = ordq∞ T . (4) α b mod (T c) in R′′. ≡ − r d r In this case N Q (α)= Φ (T ) , and α Q(T ). Conversely, if α = Φ (T ), K(T )/ (T ) i=1 mi ∈ i=1 mi then (1) – (4) can be satisfied in the remaining variables over R′′. Q Q Proof. Let Q be the prime below q in Q[T ]. By Corollary 8.4, the prime q is the only prime∞ above Q in K(T ), and∞ the ramification degree e of q over Q∞ is ∞ ∞ ∞ equal to ordq∞ T . Therefore, by Proposition 8.3, we have that

f(q /Q )= d/ordq∞ T, ∞ ∞ − where f(q /Q ) is the relative degree of q over Q . Next observe that since α ∞ ∞ ∞ ∞ has a pole at q only, α is integral with respect to Q[T ], and therefore NK(T )/Q(T )(α) ∞ is a polynomial over Q in T . Further, using the assumption that ordq∞ α = r Pi=1 ni ordq∞ T and by Proposition 8.3 again, we have that

deg(NK(T )/Q(T )(α)) = ordQ∞ NK(T )/Q(T )(α)= f(q /Q ) ordq∞ (α) − − ∞ ∞ · d d r r = ordq∞ (α)= (ordq∞ T ) ni = d ni. ordq∞ T ordq∞ T i=1 i=1 ℓ X Xℓ d Second, since α (T 1) in R′′, we have that N Q (α) (T 1) in Q[T ]. The | − K(T )/ (T ) − polynomial T ℓ 1 does not have any multiple roots in Q¯ , the algebraic closure of − Q. Thus, the roots of NK/Q(T )(α) in Q¯ are of multiplicity at most d and are ℓ-th roots of unity. Let G(T ) := N Q (α) Q[T ]. Then K(T )/ (T ) ∈ aj G(T )= u Φj(T ) , j ℓ Y| 32 C.E. Sets over Function Fields where aj 0, 1,...,d and u Q. By Lemma 7.5 and Assumption (2), we have ∈ { } ∈ aj that G(0) = 1. By Lemma 8.1 we also have that j ℓ Φj(0) = 1. Thus, we ± | ± conclude that u = 1. We now note that ordpi G(c) = j ℓ aj ordpi Φj(ci) = aini by ± Q | · the assumption on c. From Assumption (4) and Lemma 7.5, we have thatPG(c)= bd. Consequently, for all i = 1,...,r, we have that ord G(c) = ord bd = d ord b± 0 mod n d. Thus, pi pi · pi ≡ i a > 0 and d a . But 0 a d. Hence, a = d and i ni ≤ ni ≤ ni

G(T )= Φ (T )d. ± ni Consequently, Y α N Q = 1, K(T )/ (T ) r Φ (T ) ±  i=1 ni  implying that Q α r i=1 Φni (T ) is a unit of R′′. But the only units of this ring are elements of the constant field r Q k. Hence α = µ i=1 Φni (T ) for some µ k. But by Assumption 2, we have that r ∈ α 1 mod T , and thus µ i=1 Φni (0) = 1, implying as before that µ = 1. ≡ ± Q r ± ± It is clear that α = Φn (T ) satisfies (1) – (4).  i=1 Q i Q We now show that all conditions in Lemma 7.6 are Diophantine over R, and therefore the set D has a Diophantine description over R. Lemma 7.7. (a, b) R a + bT D is Diophantine over R. { ∈ | ∈ } Proof. We need to convert our assumptions on ℓ,m,c,b and Conditions (1) – (4) of Lemma 7.6 into a Diophantine definition of the set D. First consider a recursive subset Z of Z3 satisfying the following condition. (ℓ,c,b,n) Z ∈ if and only if (1) there exist r, m ,...,m Z such that ℓ = m ...m , (m , m )=1, 1 r ∈ >1 1 r i j (2) there exist p1 ...pr, where for each i = 1,...,r we have that pi is a , and p 1 0 mod ℓ. i − ≡ (3) ni := ordpi Φmi > 0, (4) For all i = 1,...,r, for all j such that ℓ 0 mod j, it is the case that j = m ≡ 6 i implies ordpi Φj(c)=0. r (5) n = i=1 ni, (6) For all i =1,...,r, we have that ordp b = ni. P i By the MDRP theorem Z is Diophantine over Z and therefore over R. Further, 2 s as we noted above, the set (s,us,ws),s Z>0 , where us √a 1ws = T , is Diophantine over R by Corollary{ 3.13. Thus∈ Condition} (1) is− Diophantine.− Next we note that α R′′, and we can replace Condition (2) with ∈ α 1 α +1 − R′′ R′′. T ∈ ∨ T ∈ 33 C.E. Sets over Function Fields Further, Condition (3) can be replaced with α ord ∞ 0. q T n ≥ The order conditions are Diophantine over R as explained in Section 6. We re- α b  place Condition (4) with the following Diophantine condition: T−c R′′. − ∈ We will now use Proposition 7.4 to give an existential definition of all polyno- mials in T over Z. We use what elsewhere we called the “Weak Vertical Method” (see [14]). d 1 i Lemma 7.8. Let X R′′,X k, and let X = − c β ,c Q(T ). Then there exist ∈ 6∈ i=0 i i ∈ D = D(β) Q[T ],C = C(β) R>0 dependent on β only, such that Dci = ai Q[T ] and for all∈i =0,...,d 1 we∈ have that P ∈ − deg(a )

Proof of the claim: Since t1,..., ts are conjugates over K(T ) and Q(T ), the Galois group Gal(L/K(T )) acts transitively on the set T , and all elements of Gal(L/Q(T )) permute T . So, fix i 1,...,s and σ Gal(L/Q(T )). For some r 1,...,s , we have that σ(t ) = t . Let∈{ µ Gal} (L/K(T∈)) be such that µ(t ) = t . Then∈{ ord }X = r i ∈ 1 r t1 ordσµ(t1)σµ(X) = ordti σ(X). Similarly, ordt1 β = ordti σ(X) for all i = 1,...,s,σ Gal(L/Q(T )). ∈ Let σ1 = id,...,σd Gal(L/Q(T )) be such that the set σ1(β),...,σd(β) contains all distinct conjugates∈ of β over Q(T ). { } Now consider the following system of linear equations. Aa¯ = X,¯ where i A =(σj(β )), j =1,...,d,i =0,...,d 1, t − t a¯ =(c0,...,cd 1) , X¯ =(σ1(X),...,σd(X)) . − (Here “t” denotes transpose.) Since σj(β) = σr(β) for all j = r 1,...,d , we have that det(A) = 0 as a Vandermonde determinant.6 Using6 Kramer’s∈{ Rule,} we can 6 solve for c0,...,cd 1 in terms of det(A), σr(X) with r =1,...,d. We obtain that − det A c = j , j det A where Aj is the matrix obtained from A by replacing its j-th column by the col- t umn (σ1(X),...,σd(X)) . Since X, β R′′, all entries of Aj and A have poles at all factors of q in L, and no other poles.∈ (This is so because q and σ(q ) have the same factorization∞ ∞ ∞ 34 C.E. Sets over Function Fields in L. ) Therefore, if we set D = det2(A) Q[T ], then a = Dc = det A det A ∈ j j j ∈ Q(T ) OL, t1,...,ts = Q[T ]. Thus, we have that ordt1 aj < 0. Let Ai,j be the i, j-th ∩ { } minor of A. Then ordt1 det A < 0, ordt1 det Ai,j < 0 and these orders depend on β only. Let C1 = maxi,j( ordt1 det A , ordt1 det Ai,j ). We now make the| following observation| | we| will use in our calculations below. Let Y = Y L. Assume ord Y < 0, and for all r we have that ord Y < 0. Let r r ∈ t1 t1 r Y ∗ be such that ordt1 Y ∗ = minr ordt1 Yr . Then ordt1 Y ordt1 Y ∗, and ordt1 Y P { } ≥ − ≤ ordt1 Y ∗. Since ordt1 Y < 0, ordt1 Y ∗ < 0, it follows that ordt1 Y ordt1 Y ∗ . − | |≤|d 1 | Using co-factors along the j-th column, we see that det A = − σ (X) det A . j i=0 ± i+1 i,j Further, using the observation above and the fact ordt1 σj(X) = ordt1 X, we also conclude that P d 1 − ord det A = ord ( σ (X) det A ) ord X + C < 2C ord X . | t1 j| | t1 ± i+1 i,j |≤| t1 | 1 1| t1 | i=0 X Thus ord a = ord det A + ord det A

deg(a )= ord ∞ a < ord ∞ a

Proposition 7.9. The set (a, b) O S a + bT Z[T ] is Diophantine over R. { ∈ K, | ∈ } Proof. Let z = z(β) Z>0 be such that z(β) > C(β). We start with the following claim. ∈ Claim: Given Y R′′ k, the following system of equations and conditions can ∈ \ be satisfied over R′′ if only if Y Z[T ], and Y (0) = 1. ∈ ± (7.22) M D Q[T ], ∈ ⊂ T ℓ (7.23) ord ∞ < 0, q Y z

ℓ (7.24) Y M mod T in R′′. ≡ Proof of the claim: First we assume that the Equations (7.22)–(7.24) are satisfied. As in Lemma d 1 i 7.8, we write Y = − c β , where c Q(T ). Further, by Lemma 7.8, we know i=0 i i ∈ that Dci Q[T ], and deg(Dci)

Y M d 1 − = f0 + f1β + ... + fd 1β − , T ℓ − 35 C.E. Sets over Function Fields where Dfi Q[T ] by Lemma 7.8. Since Q[T ]-coordinates of elements of K(T ) with respect to∈ the power basis of β are unique, we conclude that for i = 1,...,d 1, f = ci , and Df = Dci Q[T ]. Thus, − i T ℓ i T ℓ ∈ ℓ (7.25) ord ∞ T < ord ∞ Dc deg(Y z) > deg(Y ). Thus from Equation (7.24) we conclude that all coefficients of Y are the same as the first deg(Y ) coefficients of M. However, M Z[T ], and M(0) = 1. Hence the same must be true of Y . ∈ ± T ℓ We now assume that Y Z[T ] and Y (0) = 1. Let ℓ > z deg(Y ). Then ordq∞ Y z < 0, and Inequality (7.23) will∈ be satisfied. By Proposition· 7.4, we can find M D to satisfy Equation (7.24). This completes the proof of the Claim. ∈ A few quick observations now complete the proof of the proposition. First, we note that if a polynomial R Z[T ], then there exists c Z such that Y = R + c has its constant term equal∈ to 1. Second, we remind∈ the reader that we have a Diophantine definition of elements of k from Lemma 3.6. We also have a definition of non-constant elements of R′′. The non-constant elements must have a negative order at q . Third, we remind the reader that by Lemma 7.3, the set ∞ a, b R a + bT R′′ is Diophantine over R. Finally, we remind the reader that { ∈ | ∈ } the set D is Diophantine over R′′ by Lemma 7.7.  From this point on, to complete the proof of Theorem 7.1, we proceed as in the proof outline starting with Part 3.

8. APPENDIX This section contains some facts about roots of unity, function fields and real roots of polynomial equations collected here for the convenience of the reader. 8.1. Roots of Unity. Below, for r Z , the polynomial Φ (X) Z[X] denotes the ∈ >0 r ∈ monic irreducible polynomial of a primitive r-th root of unity ξr. Lemma 8.1. For every positive integer t> 1, it is the case that Φ (0) = 1. t ± t 1 Proof. Observe that Φt(X) (1 + X + ... + X − ) in Z[X], and therefore for some t 1 U(X) Z[X] we have that Φ (X)U(X)=1+ X + ... + X − . Hence, Φ (0)U(0) = 1, ∈ t t where Φt(0), U(0) Z. So, Φ t(0) = 1.  ∈ ± Lemma 8.2. Let r Z . Let ℓ = m ...m , where m ,...,m are pairwise rela- ∈ >0 1 r 1 r tively prime positive integers. Then there exists a set p1,...,pr of distinct prime numbers satisfying the following conditions: { }

36 C.E. Sets over Function Fields (1) For all i =1,...,r we have that pi 1 mod ℓ. (2) For any i = j Z such that ℓ 0≡ mod j and ℓ 0 mod i, it is the case that 6 ∈ >0 ≡ ≡ (Φj(ξi),pi)=1 in the ring of algebraic integers of Q(ξj). Further, there exists c Z such that ord Φ (c) > 0, and for all j ℓ, j = m we ∈ >0 pi mi | 6 i have that ordpi Φj(c)=0.

Proof. First of all, we note that the arithmetic sequence (tℓ + 1)t Z>0 contains in- finitely many primes by the Dirichlet Density Theorem. Therefore,∈ we can pick N p1,...,pr so that none of these prime divides Q(ξi)/Q(Φj(ξi)) for all i, j, i = j dividing ℓ. 6

Since pi 1 0 mod ℓ, for all i 1,...,r , by Hensel’s Lemma, we have that a primitive− root≡ of unity ξ Q ∈- the { field} of p -adic numbers, for all positive s ∈ pi i integers s dividing ℓ. In other words, Φs(T ) splits completely in Qpi . Thus, there

is an embedding of Q(ξs) into Qpi that maps the ideal generated by a factor of pi in the ring of integers of Q(ξs) into the ideal generated by pi in the ring of integers of Q . If j = s for some positive integers j, s dividing ℓ, then by assumption Φ (ξ ) pi 6 j s is not contained in any ideal generated by a factor of pi in the ring of integers of

Q(ξs). Thus, in Qpi , we have that ordpi (Φj(ξs))=0.

For each i = 1,...,r we pick c Z such that ord (c ξ ) > 0. Observe that i ∈ >0 pi i − mi this choice of ci implies that ord Φ (c )= ord (Φ (c ) Φ (ξ )) ord (c ξ ) > 0. pi mi i pi mi i − mi mi ≥ pi i − mi At the same time, if j = m and is a positive integer dividing ℓ, then by assumption 6 i on pi we have that ord Φ (c ) = min(ord (Φ (c ) Φ (ξ )), ord Φ (ξ )) = ord Φ (ξ )=0. pi j i pi j i − j mi pi j mi pi j mi By the Weak Approximation Theorem, we can find c Z such that ∈ ord (c c ) > ord Φ (c ) > 0. pi − i pi mi i Then ord Φ (c) = min(ord Φ (c) Φ (c ), Φ (c )) = ord Φ (c ). Finally, if j = pi mi pi mi − mi i mi i pi mi i 6 mi, j divides ℓ, then we have ord (Φ (c)) = min(ord Φ (c) Φ (c ), Φ (c )) = ord Φ (c )=0. pi j pi j − j i j i pi j i 

8.2. Function Fields in One Variable. Proposition 8.3. Let K/R be a finite extension of function fields. Let p be a prime (valuation) of R, and let q1,..., qg be primes of K lying above p (or valuations of K extending p). Let ei = e(qi/p) be the ramification index of qi over p and let fi = f(qi/q) be the relative degree of qi over p. Then the following statements are true. g (1) i=1 eifi = [K : R]. (See Chapter 4, §1, Theorem 1 of [1].) N g (2) If y K, then ordp K/R(y)= f( i=1 ordqi y). (See Chapter 4, §5, Corollary 2 (ofP Theorem∈ 6) of [1]). P 37 C.E. Sets over Function Fields Corollary 8.4. Let M/k(T ) be a function field extension, where k(T ) is a rational function field in T over a constant field k. Suppose in M we have that T has a pole at one prime q only. Let Q be the infinite valuation of k(T ). Then q is the only ∞ ∞ ∞ prime of M lying above Q , and e(q /Q )= ordq∞ T . ∞ ∞ ∞

Proof. Suppose t = q is another prime of M lying above Q . Then ordtT < 0 in 6 ∞ ∞ M, contradicting assumptions on T . Further, ordq∞ T = e(q /Q )ordQ∞ T . ∞ ∞ 

Proposition 8.5. 8.3. Real Roots. Proposition 8.6. Let f(t) Q[t] be a polynomial of degree d irreducible over Q ∈ such that all of its roots are real. Let α1 <...<αd be all the roots of f(t) in R. Let Pr(t) Q(αr)[t]. Then there is an algorithm to determine wether Pr(t) has any real roots∈ for any r 1,...,d . ∈{ } deg(Pr(t)) 1 i Proof. We can write Pr(t) = i=0 − Ar,it , where Ar,i Q(αr). Since Ar,i = d 1 j ∈ − a α , where a Q, we can now rewrite i=0 r,i,j r r,i,j ∈ P deg(Pr(t)) 1 d 1 P − − P (t)= a αjti = Q (t, α ) Q[t, α ]. r r,i,j r r r ∈ r i=0 j=0 ! X X Fix r 1,...,d and consider the following system ∈{ } f(x1)=0, ...   f(xd)=0,  2 2 2 2  x1 x2 = u1,2 + v1,2 + w1,2 + z1,2, (8.26)  − 2 2 2 2  x2 x3 = u2,3 + v2,3 + w2,3 + z2,3,  − ... 2 2 2 2 xd 1 xd = ud 1,d + vd 1,d + wd 1,d + zd 1,d,  − − − − − −  Qr(t, xr)=0.   We claim that System 8.26 has a solution (β ,...,β ,µ) Rd+1 if and only if P (t)  1 d ∈ r has a root in R. Indeed, suppose the system has solutions in R. Then xi = αi, i = 1,...,d, and Qr(t, xr) = Pr(t) has a real root. Conversely, suppose Pr(t) has a real root βr. Then we can set xi = αi, and t = βr to obtain a solution for the system. By a result of A. Tarski ([19]) there is an algorithm to decide whether System (8.26) has real solutions.  Corollary 8.7. Let f(t) Q(t),α ,...,α be as in Proposition 8.6. Let P (t) Q(α ). ∈ 1 d r ∈ r Assume further that deg(Pr(t)) is even and the leading coefficient is positive. Then there is an algorithm to determine whether there exists γ R such that P (γ ) 0. r ∈ r r ≤ Proof. Since limt Pr(t) = , if there exists γr R such that Pr(γr) 0, then →±∞ ∞ ∈ ≤ Pr(t) has real roots. Conversely, if Pr(t) has real roots, then for some γr R we have that P (γ ) 0. ∈  r r ≤ 38 C.E. Sets over Function Fields REFERENCES [1] Chevalley, C., Introduction to the theory of algebraic functions of one variable, Mathematical Surveys, AMS, Providence, RI, 1951, vol. 6, 2, 1, 2 [2] Davis, M., On the number of solutions of Diophantine equations, Proc. Amer. Math. Soc. 35, 1972, 562-564 1 [3] Demeyer, J., “Diophantine sets of polynomials over number fields”, Proc. Amer. Math. Soc. 138 (2010), no. 8, 2715-2728. 1, 7.3, 7.3 [4] Denef, J., “The diophantine problem for polynomial rings of positive characteristic”, 1979, Logic colloquium 78, Boffa, M., van Dalen, D., MacAloon, K. editors, North Holland, 131 –145. 3.2 [5] Denef, J., Diophantine sets over Z[T ], Proc. Amer. Math. Soc., 69(1), 1978, 148-150 1, 5 [6] Eisenträger, K., “Hilbert’s Tenth Problem for function fields of varieties over number fields and p-adic fields”, 2007, Journal of Algebra, 2007, volume 310, 775–792. 1, 6 [7] Kim, H., Roush, F. W., “Diophantine unsolvability over p-adic function fields”, 1995, Journal of Algebra, 176, 83–110. 1 [8] Lang, S., Algebraic , Addison Wesley, Reading, MA, 1970. 6 [9] Matiyasevich, Y., “Towards finite-fold Diophantine representations”, 2010, Zap. Nauchn. Sem. S.-Peterburg. Otdel. Mat. Inst. Steklov. (POMI), 377, Issledovaniya po Teorii Chisel. 10, 78–90. 1 [10] Matiyasevich, Y., “Existence of non-effectivizable estimates in the theory of exponential dio- phantine equations”, 1977, Journal of Soviet , 8(3), 299–311, 1, 3.2 [11] Moret-Bailly, L., “Elliptic curves and Hilbert’s Tenth Problem for algebraic function fields over real and p-adic fields”, 2006, Journal für Reine und Angewandte Mathematic, 587, 77–143, 1 [12] Pourchet, Y., “Sur la représentation en somme de carrés des polynômes à une indéterminée sur un corps de nombres algébriques”, 1971, Acta Arith., 9, 89–104 5, 6 [13] Poonen, B. and Shlapentokh, A., “Diophantine definability of infinite discrete non- archimedean sets and diophantine models for large subrings of number fields”, 2005, Jour- nal für die Reine und Angewandte Mathematik, 588, 27–48. 6 [14] Shlapentokh, A., Hilbert’s tenth problem: Diophantine classes and extensions to global fields, Cambridge University Press, 2006. 1, 3.1, 3.1, 5, 6, 7.3, 7.3, 7.3 [15] Shlapentokh, A., “Diophantine definitions for some polynomial rings”, 1990, Comm. Pure Appl. Math., 43(8), 1055–1066. 3.2, 4.3 [16] Shlapentokh, A., “Hilbert’s tenth problem for rings of algebraic functions in one variable over fields of constants of positive characteristic”, Trans. Amer. Math. Soc. 333 (1992), no. 1, 275-298. 3.2, 3.6, 6 [17] Smorynski,´ C., A note on the number of zeros of polynomials and exponential polynomials, J. Symbolic Logic, 42(1), 1977, 99-106. 1 [18] Soare, R. I., Recursively enumerable sets and degrees, Perspectives in Mathematical Logic, A study of computable functions and computably generated sets, Springer-Verlag, Berlin,1987 5 [19] Tarski, A., A decision method for elementary algebra and geometry. Quantifier elimina- tion and cylindrical algebraic decomposition (Linz, 1993), Texts Monogr. Symbol. Comput., Springer, Vienna, 1998, 24-84. 8.3 [20] Zahidi, K., On Diophantine sets over polynomial rings, Proc. Amer. Math. Soc. 128(3), 2000, 877-884. 1, 5

39 C.E. Sets over Function Fields DEPARTMENT OF MATHEMATICS QUEENS COLLEGE – C.U.N.Y. 65-30 KISSENA BLVD. QUEENS, NEW YORK 11367 U.S.A. PH.D. PROGRAMS IN MATHEMATICS & COMPUTER SCIENCE C.U.N.Y. GRADUATE CENTER 365 FIFTH AVENUE NEW YORK, NEW YORK 10016 U.S.A. E-mail: [email protected] Web page: qcpages.qc.cuny.edu/ rmiller

e

DEPARTMENT OF MATHEMATICS EAST CAROLINA UNIVERSITY GREENVILLE, NC 27858 U.S.A. E-mail: [email protected] Web page: myweb.ecu.edu/shlapentokha

40