# Definability and decidability for rings of integers in totally imaginary
fields

Caleb Springer  Department of Mathematics, University College London, Gower
Street, London, UK
and The Heilbronn Institute for Mathematical Research, Bristol, UK
<EMAIL_ADDRESS>
###### Abstract.

We show that the ring of integers of ${{\mathbb{Q}^{\operatorname{tr}}}}$ is
existentially definable in the ring of integers of
${{\mathbb{Q}^{\operatorname{tr}}}}(i)$, where
${{\mathbb{Q}^{\operatorname{tr}}}}$ denotes the field of all totally real
numbers. This implies that the ring of integers of
${{\mathbb{Q}^{\operatorname{tr}}}}(i)$ is undecidable and first-order non-
definable in ${{\mathbb{Q}^{\operatorname{tr}}}}(i)$. More generally, when $L$
is a totally imaginary quadratic extension of a totally real field $K$, we use
the unit groups $R^{\times}$ of orders $R\subseteq{\mathcal{O}}_{L}$ to
produce existentially definable totally real subsets
$X\subseteq{\mathcal{O}}_{L}$. Under certain conditions on $K$, including the
so-called $\operatorname{JR}$-number of ${\mathcal{O}}_{K}$ being the minimal
value $\operatorname{JR}({\mathcal{O}}_{K})=4$, we deduce the undecidability
of ${\mathcal{O}}_{L}$. This extends previous work which proved an analogous
result in the opposite case $\operatorname{JR}({\mathcal{O}}_{K})=\infty$. In
particular, unlike prior work, we do not require that $L$ contains only
finitely many roots of unity.

##  1\. Introduction

###  1.1. A motivating example

This paper is motivated by the desire to prove the following theorem
concerning definability and decidability. For background and an overview of
decidability and definability for infinite algebraic extensions of
${\mathbb{Q}}$, we refer readers to the introduction of [Shl18]; see also the
prequel to our work here [Spr20]. Recall that
$\alpha\in{\overline{\mathbb{Q}}}$ is _totally real_ if the roots of its
minimal polynomial are all real numbers. We write
${{\mathbb{Q}^{\operatorname{tr}}}}$ for the field of all totally real
algebraic numbers and ${{\mathbb{Z}^{\operatorname{tr}}}}$ for its ring of
integers, and we set $i=\sqrt{-1}$.

######  Theorem 1.1.

The ring of integers ${{\mathbb{Z}^{\operatorname{tr}}}}$ of
${{\mathbb{Q}^{\operatorname{tr}}}}$ is existentially definable in the ring of
integers of ${{\mathbb{Q}^{\operatorname{tr}}}}(i)$. In particular, the first-
order theory of the ring of integers of
${{\mathbb{Q}^{\operatorname{tr}}}}(i)$ is undecidable.

######  Remark 1.2.

The paragraph below Corollary 3.19 in [Koe14] mistakenly declared the ring of
integers of ${\mathbb{Q}}^{\operatorname{tr}}(i)$ to be decidable.111We thank
Aharon Razon for pointing this out after reading an earlier draft of this
paper. The reference given for this claim is [Dar00, Theorem 10.7], which
actually proves the decidability of the overring
${\mathcal{O}}_{{\mathbb{Q}}^{tr}(i)}[\frac{1}{p}]$ where $p$ is any prime
number. As seen above, the ring of integers
${\mathcal{O}}_{{\mathbb{Q}}^{tr}(i)}$ itself is undecidable.

Theorem 1.1 is proven by extending and generalizing the methods which were
first used to prove the first-order undecidability of rings of integers in
fields such as ${\mathbb{Q}}^{(2)}$ [MRUV20] and
${\mathbb{Q}}^{(d)}_{\text{ab}}$ for $d\geq 2$ [Spr20]. Here, $F^{(d)}$
denotes the compositum of all extensions of degree at most $d$ of a field $F$,
and $F^{(d)}_{\text{ab}}\subseteq F^{(d)}$ is the maximal abelian subfield.
However, notice that the papers [MRUV20, Spr20] additionally proved that the
fields ${\mathbb{Q}}^{(d)}_{\text{ab}}$ themselves are undecidable by
appealing to results of Videla [Vid00a] and Shlapentokh [Shl18] which imply
that each ${\mathbb{Q}}^{(d)}_{\text{ab}}$ has a first-order definable ring of
integers.

The situation is entirely the opposite in the setting of Theorem 1.1. Indeed,
Fried, Haran, and Völklein proved that ${{\mathbb{Q}^{\operatorname{tr}}}}$ is
decidable [FHV94], which implies that ${{\mathbb{Q}^{\operatorname{tr}}}}(i)$
is also decidable. It has been previously observed that, because J. Robinson
proved that ${{\mathbb{Z}^{\operatorname{tr}}}}$ is undecidable [Rob62], the
field ${{\mathbb{Q}^{\operatorname{tr}}}}$ is thus an example of a subfield of
${\overline{\mathbb{Q}}}$ whose ring of integers
${{\mathbb{Z}^{\operatorname{tr}}}}$ does not admit any first-order definition
in ${{\mathbb{Q}^{\operatorname{tr}}}}$. In the framework of Shlapentokh
[Shl18, §2.1], this is intuitively understood as a result of the fact that the
field ${{\mathbb{Q}^{\operatorname{tr}}}}$ is too “close” to
${\overline{\mathbb{Q}}}$, so it does not have enough “expressive power” to
have a definable ring of integers. By Theorem 1.1, we immediately see that
${{\mathbb{Q}^{\operatorname{tr}}}}(i)$ also has a first-order non-definable
ring of integers, as expected.

We pause to note that ${{\mathbb{Q}^{\operatorname{tr}}}}(i)$ is known to be
an $\omega$-free PAC field; see [Jar11, Example 5.10.7]. Therefore, the non-
definability of the ring of integers of
${{\mathbb{Q}^{\operatorname{tr}}}}(i)$ can also be deduced from the following
result of Dittman and Fehm: If $R$ is a first-order definable subring of an
$\omega$-free PAC field $L$, then $R$ is a field [DF21, Proposition 3]. Their
method, which builds upon work of Chatzidakis [Cha19], is entirely different
from the techniques that we use below.

###  1.2. Main results

In general, this paper considers totally imaginary quadratic extensions of
totally real fields. We begin with a definability result. Say that a totally
real field $K\subseteq{\overline{\mathbb{Q}}}$ is _closed under square roots_
if $\alpha\in K$ whenever $\alpha$ is a totally real number such that
$\alpha^{2}\in K$.

######  Theorem 1.3 (Theorem 3.4).

If $K$ is a totally real field which is closed under square roots and $L$ is
any quadratic imaginary extension of $K$, then ${\mathcal{O}}_{K}$ is
existentially definable in ${\mathcal{O}}_{L}$.

This theorem implies Theorem 1.1 immediately, given J. Robinson’s proof that
${{\mathbb{Z}^{\operatorname{tr}}}}$ is undecidable [Rob62]. However, we can
actually prove first-order undecidability for rings of integers
${\mathcal{O}}_{L}$ in a more general context where ${\mathcal{O}}_{K}$ is not
known to be existentially definable in ${\mathcal{O}}_{L}$. For any $n\geq 1$,
let $\zeta_{n}$ denote a primitive $n$-th root of unity.

######  Theorem 1.4 (Theorem 4.5).

Let $S\subseteq{\mathbb{N}}$ be infinite. Define
$K_{0}={\mathbb{Q}}(\\{\zeta_{n}+\overline{\zeta}_{n}:n\in S\\})$ and let
$K_{1}$ be the maximal totally real subfield of $K_{0}^{(2)}$. If $K\supseteq
K_{1}$ is a totally real field and $L$ is any totally imaginary quadratic
extension of $K$, then ${\mathcal{O}}_{L}$ is undecidable.

In this theorem, the so-called $\operatorname{JR}$-number is
$\operatorname{JR}({\mathcal{O}}_{K})=4$, i.e., the minimal possible value,
while the totally real fields $K$ considered in [MRUV20, Spr20] have the
maximal possible value $\operatorname{JR}({\mathcal{O}}_{K})=\infty$; see
Section 4.1 for definitions and notation. We also provide a version of our
undecidability result, namely Theorem 4.4, which does not place a restriction
on the value of $\operatorname{JR}({\mathcal{O}}_{K})$.

###  1.3. Proof method: Leveraging unit groups

Within the body of literature concerning undecidability results for rings of
integers of algebraic extensions of ${\mathbb{Q}}$, the totally real subfields
of ${\overline{\mathbb{Q}}}$ and their totally imaginary quadratic extensions
have received special attention. There are multiple methods which can be used
in this context, but we focus on the work stemming from J. Robinson for now,
and delay the discussion of elliptic curves until the following section.

J. Robinson [Rob62] provided a general sufficient condition for proving the
undecidability of a ring of algebraic integers ${\mathcal{O}}$, and we follow
Videla [Vid00b] by using an improved version credited to Henson [VDD88]: If
there is a parametrized family ${\mathcal{F}}$ of definable subsets of
${\mathcal{O}}$ which contains finite sets of arbitrarily large cardinality,
then the first-order theory of ${\mathcal{O}}$ is undecidable. This sufficient
condition, along with a theorem of Siegel [Sie21], leads to a strategy that
can be applied to ${\mathcal{O}}_{K}$ when $K$ is a totally real field.
Indeed, we use the parametrized family of subsets
$\\{X_{t}\\}_{t\in{\mathbb{Q}}}$, where $X_{t}$ contains the elements
$\alpha\in{\mathcal{O}}_{K}$ whose conjugates all lie in the real interval
$(0,t)$. Determining whether $\\{X_{t}\\}_{t\in{\mathbb{Q}}}$ contains finite
sets of arbitrarily large size is related to the $\operatorname{JR}$-number of
${\mathcal{O}}_{K}$; see Section 4.1 for more details. This strategy enabled
J. Robinson to prove the undecidability of the rings of integers of both
${{\mathbb{Q}^{\operatorname{tr}}}}$ and
${\mathbb{Q}}^{(2)}_{\operatorname{tr}}={\mathbb{Q}}(\\{\sqrt{n}:n\in{\mathbb{N}}\\})$.

After using this method to prove ${\mathcal{O}}_{K}$ is undecidable for a
totally real field $K$, we wish to do the same for the rings of integers
${\mathcal{O}}_{L}$ for all totally imaginary quadratic extensions $L$ of $K$.
To extend the $\operatorname{JR}$-number argument to such a field, a key
ingredient is the fact that
$[{\mathcal{O}}_{L}^{\times}:\mu(L){\mathcal{O}}_{K}^{\times}]\leq 2$ where
$\mu(L)$ is the set of roots of unity in $L$. Therefore, if
$N=\\#\mu(L)<\infty$ is finite, then
$({\mathcal{O}}_{L}^{\times})^{2N}\subseteq K$ is an existentially definable
totally real subset of ${\mathcal{O}}_{L}$. By using sums and difference of
powers of units, we can produce a useful parametrized family of subsets of
${\mathcal{O}}_{L}$ analogous to the sets $X_{t}$ defined above.
Undecidability is thereby proved for ${\mathcal{O}}_{L}$ in many cases,
including $L={\mathbb{Q}}^{(2)}$ or more generally
$L={\mathbb{Q}}^{(d)}_{\operatorname{ab}}$ for $d\geq 2$; see [MRUV20, Spr20].

However, the assumption $\\#\mu(L)<\infty$ above implies that this method
cannot yet apply when $L={{\mathbb{Q}^{\operatorname{tr}}}}(i)$. To remedy
this, we choose to instead work with the unit group $R^{\times}$ of an
existentially definable non-maximal order $R\subseteq{\mathcal{O}}_{L}$ with
$\mu(R)=\\{\pm 1\\}$ trivial. In this case, we can show that
$(R^{\times})^{2}$ is totally real set. By choosing a suitable ring
$R\subseteq{\mathcal{O}}_{L}$, we obtain the foundation for developing a unit
group-based argument similar to the ones appearing in [MRUV20, Spr20] which
allows $L$ to contain infinitely many roots of unity.

###  1.4. A comparison with abelian varieties

We conclude this section by comparing our main theorems to similar results
which leverage elliptic curves instead of unit groups. There are many papers
which use of elliptic curves, or abelian varieties in general, to prove
various undecidability results, including [Den80, Vid00b, Poo02, MRS22]. We
refer to [Shl09] for additional background. As an example which is relevant to
the consideration of totally imaginary extensions of totally real fields,
consider the following theorem of Shlapentokh.

######  Theorem 1.5 (Main Theorem B, [Shl09]).

Let $K$ be a totally real algebraic extension of ${\mathbb{Q}}$ which has a
totally real extension of degree $2$, and let $K^{\prime}$ be a finite
extension of $K$ such that there exists an elliptic curve $E$ defined over
$K^{\prime}$ with $E(K^{\prime})$ finitely generated and of positive rank. If
$L$ is a quadratic totally imaginary extension of $K$, then ${\mathbb{Z}}$ is
existentially definable in the ring of integers ${\mathcal{O}}_{K}$ and
Hilbert’s Tenth Problem is unsolvable over ${\mathcal{O}}_{K}$.

Although Theorems 1.4 and 1.5 are similar insofar as they both apply in the
context of totally imaginary quadratic extensions of totally real subfields of
${\overline{\mathbb{Q}}}$, it is instructive to also note the differences and
complementary strengths. Heuristically, it is easiest to apply the elliptic
curve-based methods to relatively “small” algebraic extensions of
${\mathbb{Q}}$ over which it is easy to find elliptic curves with a finitely
generated group of rational points. In contrast, the unit group-based methods
work best for “bigger” fields in which there is an abundance of units
available for manipulation. We can make this more precise with a couple of
examples.

The prototypical example of an infinite algebraic extension
$K\supseteq{\mathbb{Q}}$ which satisfies the hypotheses of Theorem 1.5 is a
${\mathbb{Z}}_{p}$-extension of ${\mathbb{Q}}$; see [Shl09, §10]. These
${\mathbb{Z}}_{p}$-extensions are difficult to handle with the unit group-
based methods because there is at most one subextension of $K$ of any given
degree, hence a paucity of units. We also note that Theorem 1.5 proves that
Hilbert’s Tenth Problem is unsolvable, rather than only showing that the
first-order theory is undecidable, and it also applies when
$[K:{\mathbb{Q}}]<\infty$.

On the other hand, when deploying elliptic curves, we emphasize that it is
necessary for the group of rational points to be a finitely generated group.
This is a core requirement of the proof method, and the restriction would
remain for any straightforward variant or generalization which uses abelian
varieties instead of elliptic curves, such as [MRS22, Theorem 1.1]. Therefore,
the following theorem of Fehm and Petersen shows that this general method is
not useable when the field $K$ is _large_ , in the sense of Pop [Pop96].

######  Theorem 1.6 (Theorem 1.2, [FP10]).

If $L\subseteq{\overline{\mathbb{Q}}}$ is a large field and $A/L$ is an
abelian variety, then $A(L)$ has infinite rank.

The first proof of this theorem in the case of elliptic curves is credited to
Tamagawa; see Kobayashi [Kob06, Proposition 1]. We refer to [FJ74, LR08, MR18,
Pet06] for some additional results on finitely and non-finitely generated
groups of rational points.

Because any algebraic extension of a large field is itself large, Theorem 1.6
shows that if $K\subseteq{\overline{\mathbb{Q}}}$ is a large totally real
field, then abelian variety-based methods such as Theorem 1.5 cannot handle
$K$ or its quadratic totally imaginary extensions. However, it is clear that
the unit group-based methods presented in this paper can work for large fields
because the field ${{\mathbb{Q}^{\operatorname{tr}}}}$ is large. It is also
conjectured that ${{\mathbb{Q}^{\operatorname{ab}}}}$ is a large field (see
[BSF13, §3] for background and an overview), and it is easy to construct
extensions $L\supseteq{{\mathbb{Q}^{\operatorname{ab}}}}$ which are covered by
Theorem 1.4. It would be interesting to determine whether or not the methods
of this paper can be refined to prove the undecidability of the ring of
integers of ${{\mathbb{Q}^{\operatorname{ab}}}}$ itself.

### Acknowledgments

The author thanks Arno Fehm for assistance with references, and Aharon Razon
for sharing Remark 1.2. Additional thanks to Kirsten Eisenträger, Jochen
Koenigsmann, Alexandra Shlapentokh, and Carlos Videla for their helpful
comments. This work was supported by the Additional Funding Programme for
Mathematical Sciences, delivered by EPSRC (EP/V521917/1) and the Heilbronn
Institute for Mathematical Research.

##  2\. Non-maximal orders and units

As indicated in Section 1.3, given a totally real field $K$ and a totally
imaginary quadratic extension $L$, we want a subring
$R\subseteq{\mathcal{O}}_{L}$ which does not contain any nontrivial roots of
unity. We start by defining the desired ring, then proceed to analyze its
group of units.

###  2.1. A useful non-maximal subring

######  Definition 2.1.

Given an integer $m\geq 1$ and a field $L\subseteq{\overline{\mathbb{Q}}}$,
let $R_{m,L}$ be the subset of ${\mathcal{O}}_{L}$ defined by the positive
existential formula $\varphi_{m}(x)$, given as follows:

$\exists a\ \ (x-ma)(x-1-ma)\dots(x-(m-1)-ma)=0$

The following properties of $R_{m,L}$ are immediate from the definition.

######  Lemma 2.2.

Let $L\subseteq{\overline{\mathbb{Q}}}$ be a field and let $m\geq 1$ be an
integer.

  1. (a)

If $K\subseteq L$ is a subfield, then $R_{m,L}\cap K=R_{m,K}$.

  2. (b)

$R_{m,L}$ is an existentially definable subring of ${\mathcal{O}}_{L}$ which
contains $m{\mathcal{O}}_{L}$.

  3. (c)

$R_{m,L}\subseteq{\mathcal{O}}_{L}$ is non-maximal if and only if $m\geq 2$
and $L\neq{\mathbb{Q}}$.

###### Proof.

By the definition of $R_{m,L}$ and the formula $\varphi_{m}(x)$ above, the
first claim is obvious. Moreover, $R_{m,L}$ is the preimage of
${\mathbb{Z}}/m{\mathbb{Z}}$ under the natural surjective map
${\mathcal{O}}_{L}\to{\mathcal{O}}_{L}/m{\mathcal{O}}_{L}$. Therefore,
$R_{m,L}$ is a subring of ${\mathcal{O}}_{L}$ and non-maximal precisely when
${\mathbb{Z}}/m{\mathbb{Z}}\neq{\mathcal{O}}_{L}/m{\mathcal{O}}_{L}$, i.e.,
when $m\geq 2$ and $L\neq{\mathbb{Q}}$. ∎

Before we analyze the unit group $R_{m,L}^{\times}$, we recall some general
elementary facts. In essence, this theorem clarifies that any ring containing
an algebraic unit $u$ also contains $u^{-1}$, and computes the rank of the
unit groups of any ring of algebraic integers. Given a set
$S\subseteq{\overline{\mathbb{Q}}}$, let $\mu(S)$ denote the set of roots of
unity contained in $S$.

######  Theorem 2.3.

Let $L\subseteq{\overline{\mathbb{Q}}}$ be a number field with $r$ real and
$2s$ imaginary embeddings.

  1. (a)

If $u\in{\mathcal{O}}_{L}^{\times}$, then $u^{-1}\in{\mathbb{Z}}[u]$.

  2. (b)

If $R\subseteq{\mathcal{O}}_{L}$ is any subring, then
$R^{\times}={\mathcal{O}}_{L}^{\times}\cap R$.

  3. (c)

If ${\mathcal{O}}\subseteq{\mathcal{O}}_{L}$ is any suborder, then
${\mathcal{O}}^{\times}\cong\mu({\mathcal{O}})\times{\mathbb{Z}}^{r+s-1}$.

###### Proof.

An algebraic unit $u$ has minimal polynomial
$m(x)=x^{n}+c_{n-1}x^{n-1}\dots+c_{1}x\pm 1$ with integer coefficients.
Evaluating this polynomial at $u$, along with rearranging terms, shows that
$u(u^{n-1}+c_{n-1}u^{n-2}+\dots+c_{1})=\pm 1$, which proves the first claim.
The second claim follows immediately from the first.

By Dirichlet’s unit theorem,
${\mathcal{O}}_{L}^{\times}\cong\mu(L)\times{\mathbb{Z}}^{r+s-1}$. Thus, we
only need to check the rank of ${\mathcal{O}}^{\times}$. Because
${\mathcal{O}}\subseteq{\mathcal{O}}_{L}$ is a suborder, the index
$N=[{\mathcal{O}}_{L}:{\mathcal{O}}]$ is finite and
$N{\mathcal{O}}_{L}\subseteq{\mathcal{O}}$. If
$u\in{\mathcal{O}}_{L}^{\times}$ then $u$ reduces modulo $N$ to an element of
$({\mathcal{O}}_{L}/N{\mathcal{O}}_{L})^{\times}$, and $u^{t}\equiv 1\bmod
N{\mathcal{O}}_{L}$ for some $1\leq
t\leq\\#({\mathcal{O}}_{L}/N{\mathcal{O}}_{L})^{\times}<N^{[L:{\mathbb{Q}}]}$.
We conclude $u^{t}\in{\mathcal{O}}^{\times}$. Therefore,
${\mathcal{O}}^{\times}$ has the same rank as ${\mathcal{O}}_{L}^{\times}$ and
we are done. ∎

As an application, this shows the structure of the unit group of the ring
$R_{m,L}$.

######  Proposition 2.4.

Let $m\geq 2$ be an integer. If $L$ is a number field with $r$ real embeddings
and $2s$ imaginary embeddings, then

$R_{m,L}^{\times}\cong\\{\pm 1\\}\times{\mathbb{Z}}^{r+s-1}.$

In particular, the only roots of unity contained in $R_{m,L}$ are trivial.

###### Proof.

By Theorem 2.3, we only need to show that $R_{m,L}$ has no roots of unity
other than $\pm 1$. If $\zeta\in R_{m,L}^{\times}$ is a nontrivial root of
unity, then $L$ contains the nontrivial cyclotomic subfield
$L_{0}={\mathbb{Q}}(\zeta)\supsetneq{\mathbb{Q}}$, and thus
$R_{m,L_{0}}=R_{m,L}\cap L_{0}\supseteq{\mathbb{Z}}[\zeta]$ by Lemma 2.2. But
${\mathbb{Z}}[\zeta]$ is the maximal order of $L_{0}$, while $R_{m,L_{0}}$ is
a non-maximal order, which is a contradiction. ∎

###  2.2. Totally imaginary extensions of totally real fields

We now restrict our attention to the main focus of this paper: totally
imaginary quadratic extensions of totally real fields. The following is a
generalization of [Was97, Theorem 4.12] to the case of non-maximal orders.
Given a field $L$ and a subring ${\mathcal{O}}\subseteq L$, we write
$\mu({\mathcal{O}})$ for the set of roots of unity in ${\mathcal{O}}$.

######  Theorem 2.5.

Let $K$ be a totally real field, let $L$ be a totally imaginary quadratic
extension, and let ${\mathcal{O}}\subseteq L$ be an order which is stable
under complex conjugation. If $u\in{\mathcal{O}}^{\times}$, then its complex
conjugate is $\overline{u}=\zeta u$ where $\zeta\in\mu({\mathcal{O}})$. In
particular, writing ${\mathcal{O}}_{\operatorname{tr}}={\mathcal{O}}\cap K$,

$[{\mathcal{O}}^{\times}:\mu({\mathcal{O}})\cdot{\mathcal{O}}_{\operatorname{tr}}^{\times}]\leq
2.$

###### Proof.

Notice that every conjugate of $u/\overline{u}$ has absolute value 1 because
$\sigma(\overline{u})=\overline{\sigma}(u)$ for every embedding
$\sigma:L\hookrightarrow{\mathbb{C}}$; see [Was97, p.39]. Therefore,
$\frac{u}{\overline{u}}$ is a root of unity [Was97, Lemma 1.6]. In other
words, $\frac{u}{\overline{u}}\in\mu(L)\cap{\mathcal{O}}=\mu({\mathcal{O}})$.

Thus, we define a group homomorphism
$\varphi:{\mathcal{O}}^{\times}\to\mu({\mathcal{O}})/\mu({\mathcal{O}})^{2}$
induced by $u\mapsto u/\overline{u}$ and compute its kernel. First, we check
that if $u=\zeta u_{1}$ for $\zeta\in\mu({\mathcal{O}})$ and
$u_{1}\in{\mathcal{O}}^{\times}\cap K$, then $\varphi(u)=u/\overline{u}=\zeta
u_{1}/\overline{\zeta u_{1}}=\zeta^{2}$. Conversely, if
$u\in{\mathcal{O}}^{\times}$ and $\varphi(u)=u/\overline{u}=\zeta^{2}$, then
we rearrange to see
$\overline{\zeta}u=\zeta\overline{u}\in{\mathcal{O}}_{\operatorname{tr}}$ is
totally real. Thus,
$\ker\varphi=\mu({\mathcal{O}})\cdot{\mathcal{O}}_{\operatorname{tr}}^{\times}$.
Since we know the index $[\mu({\mathcal{O}}):\mu({\mathcal{O}})^{2}]\leq 2$,
the proof is done. ∎

We now wish to apply this theorem to the non-maximal subrings defined in the
previous section. In our context, this theorem is helpful because we define
subrings with no nontrivial roots of unity. Before we move on, we note that
the application of Theorem 2.5 in the case when
${\mathcal{O}}={\mathcal{O}}_{L}$ is a central ingredient in [MRUV20, Spr20].
The following corollary was also inspired by an analogous fact for maximal
orders [Was97, Proof of Proposition 1.5].

######  Remark 2.6.

It is easy to show, e.g., using Magma [BCP97], that it is possible to have
$R_{2,L}^{\times}\not\subseteq K$ in Corollary 2.7. Indeed, this occurs for
the cyclotomic field $L={\mathbb{Q}}(\zeta_{15})$. Thus, squaring the group of
units is necessary in the statement of the corollary when $m=2$.

######  Corollary 2.7.

Let $K$ be a totally real field with totally imaginary quadratic extension
$L$.

  1. (a)

$(R_{2,L}^{\times})^{2}\subseteq R_{2,K}^{\times}$

  2. (b)

If $m\geq 3$, then $R_{m,L}^{\times}=R_{m,K}^{\times}$.

###### Proof.

Let $u\in R_{m,L}^{\times}$. Clearly $R_{m,L}$ is stable under complex
conjugation by definition. Combining Proposition 2.4 and Theorem 2.5, either
$\overline{u}=u$ or $\overline{u}=-u$. To finish the proof, assume $m\geq 3$
and suppose that $\overline{u}=-u$. Writing $u=mb+j$ for
$b\in{\mathcal{O}}_{L}$ and $j\in{\mathbb{Z}}$ we have
$\overline{u}=m\overline{b}+j$. Therefore,

$2u=u-\overline{u}=mb-m\overline{b}\in m{\mathcal{O}}_{L}.$

However, this implies that $m$ divides $2$ because $u$ is a unit, and this is
impossible because $m\geq 3$. We conclude that $\overline{u}=u$ is totally
real. ∎

##  3\. Defining the totally real subring.

We now show how to deploy the unit groups described in the previous section.
To do this, we explicitly write certain totally real algebraic integers as the
sum of units.

######  Lemma 3.1.

Let $K_{0}\subseteq K_{1}$ be totally real fields. If $a=2(2d+1)$ for some
$d\in{\mathcal{O}}_{K_{0}}$ such that $\sqrt{d^{2}+d}\in K_{1}$, then there is
a unit $u\in R_{2,K_{1}}^{\times}$ such that $a=u+1/u.$ In particular,

$a^{2}=u^{2}+1/u^{2}+2.$

###### Proof.

Define $u_{j}=2b_{j}+1\in R_{2,K_{1}}$ where $b_{1}=d+\sqrt{d^{2}+d}$ and
$b_{2}=d-\sqrt{d^{2}+d}$. It is easy to compute directly that $u_{1}$ and
$u_{2}$ are inverses of each other, and hence units from $R_{2,K_{1}}$:

$\displaystyle u_{1}u_{2}=(2b_{1}+1)(2b_{2}+1)$
$\displaystyle=(2d+1+2\sqrt{d^{2}+d})(2d+1-2\sqrt{d^{2}+d})$
$\displaystyle=(2d+1)^{2}-4(d^{2}+d)=1.$

Moreover, $u_{1}+u_{2}=2(b_{1}+b_{2}+1)=2(2d+1)=a.$ We take $u=u_{1}$, in
which case $1/u=u_{2}$. It follows immediately that
$a^{2}=(u+1/u)^{2}=u^{2}+1/u^{2}+2.$ ∎

######  Lemma 3.2.

Let $K_{0}$ be a totally real field. If $d\in{\mathcal{O}}_{K_{0}}$ and all
conjugates of $d$ are outside the open interval $(-2,0)\subseteq{\mathbb{R}}$,
then

$32d=u^{2}+1/u^{2}-v^{2}-1/v^{2}$

for units $u,v\in R_{2,{K_{1}}}^{\times}$ where
$K_{1}=K_{0}(\sqrt{d^{2}+d},\sqrt{(d-1)^{2}+(d-1)})$ is totally real.

###### Proof.

It is easy to see that the values of the function $f(x)=x^{2}+x$ are negative
precisely when $x\in(-1,0)$. Therefore, because all conjugates of $d$ are
outside $(-2,0)$, the elements $d^{2}+d$ and $(d-1)^{2}+(d-1)$ are both
totally nonnegative, hence their square roots are totally real. Thus, applying
Lemma 3.1 twice,

$32d=4(2d+1)^{2}-4(2(d-1)+1)^{2}=u^{2}+1/u^{2}-v^{2}-1/v^{2}.$

for some $u,v\in R_{2,K_{1}}^{\times}$. ∎

Now we are ready to define the desired totally real subsets $X$ within the
totally imaginary fields. This can be seen as a generalization of [MRUV20,
Lemma 7] and [Spr20, Lemma 2.7].

######  Theorem 3.3.

Let $K_{0}$ be a totally real field and let $K_{1}$ be the maximal totally
real subfield of $K_{0}^{(2)}$. If $K\supseteq K_{1}$ is a totally real field,
then for every totally imaginary quadratic extension $L$ of $K$, there is an
existentially definable subset $X\subseteq{\mathcal{O}}_{L}$ satisfying

${\mathcal{O}}_{K_{0}}\subseteq X\subseteq{\mathcal{O}}_{K}.$

###### Proof.

We write

$X_{0}=\\{u_{1}^{2}+u_{2}^{2}-u_{3}^{2}-u_{4}^{2}:u_{1},\dots,u_{4}\in
R_{2,L}^{\times}\\}.$

We have $X_{0}\subseteq{\mathcal{O}}_{K}$ by Corollary 2.7, and the set

$X_{1}=\\{d\in{\mathcal{O}}_{L}:32d\in X_{0}\\}.$

contains all elements $d\in{\mathcal{O}}_{K_{0}}$ whose conjugates are all
outside $(-2,0)$ by Lemma 3.2. We repeat the same trick from before to finish
the proof: If $d\in{\mathcal{O}}_{K_{0}}$, then $(d-1)^{2}$ and $(d+1)^{2}$
are totally nonnegative. Thus $(d-1)^{2},(d+1)^{2}\in X_{1}$, and
$4d=(d+1)^{2}-(d-1)^{2}.$

In summary, ${\mathcal{O}}_{K_{0}}\subseteq X\subseteq{\mathcal{O}}_{K},$
where

$X=\\{\alpha\in{\mathcal{O}}_{L}:\exists x_{1},x_{2}\in X_{1},\
4\alpha=x_{1}-x_{2}\\}.$

Because the ring $R_{2,L}$ is existentially definable in ${\mathcal{O}}_{L}$,
this completes the proof. ∎

By applying the previous theorem in the case where $K_{0}=K$, we find that the
ring of integers ${\mathcal{O}}_{K}$ itself is existentially definable in
${\mathcal{O}}_{L}$, as written in the following theorem. Recall that $K$ is
_closed under square roots_ if $\alpha\in K$ whenever
$\alpha\in{\overline{\mathbb{Q}}}$ is totally real and $\alpha^{2}\in K$.

######  Theorem 3.4.

If $K$ is a totally real field which is closed under square roots and $L$ is
any quadratic imaginary extension of $K$, then ${\mathcal{O}}_{K}$ is
existentially definable in ${\mathcal{O}}_{L}$.

Since ${{\mathbb{Q}^{\operatorname{tr}}}}$ is closed under square roots, we
obtain the definability portion of Theorem 1.1.

######  Corollary 3.5.

${{\mathbb{Z}^{\operatorname{tr}}}}$ is existentially definable in the ring of
integers of ${{\mathbb{Q}^{\operatorname{tr}}}}(i)$.

Throughout this section, we have exploited the fact that, within the fields
$K$ that we consider, many algebraic integers can be written as the sum of a
bounded number of units. For contrast, note that Frey and Jarden showed the
following when $F$ is a number field: There is no integer $n\geq 1$ such that
every element of ${\mathcal{O}}_{F}$ is the sum of at most $n$ units in
${\mathcal{O}}_{F}^{\times}$ [JN07, Theorem 1]. In the same paper, they
construct many infinite algebraic extensions of ${\mathbb{Q}}$ in which every
element of the ring of integers is the sum of at most 2 units; see [JN07,
Theorem 8]. Although the fields they consider are not used in this paper,
their complementary results illustrate how we are exploiting a phenomenon that
exists only for (some) infinite algebraic extensions of ${\mathbb{Q}}$, and
not for number fields.

##  4\. Undecidability

The definability results in the preceding section have immediate consequences
for decidability. Namely, in the context of Theorem 3.4, if the existential or
first-order theory of ${\mathcal{O}}_{K}$ is undecidable then the same is true
for ${\mathcal{O}}_{L}$. However, this is not the end of the story because the
implications for decidability go beyond the hypotheses of the theorem. Indeed,
we can deduce a much more general undecidability result with a further
development of the ideas used in previous unit group-based methods [MRUV20,
Spr20]. Specifically, we only need to define “enough” of the maximal totally
real subring to realize the $\operatorname{JR}$-number.

To start, we recall the following lemma, which is C.W. Henson’s extension
[VDD88, §3.3] of a result of J. Robinson [Rob62, Theorem 2]; see also the
presentation in [MRUV20, Lemma 2.2]. This will be the basis for all of our
undecidability results.

######  Lemma 4.1.

Let ${\mathcal{O}}$ be a ring of algebraic integers. If there is a family
$\mathcal{F}$ of subsets of ${\mathcal{O}}$, parametrized by an
$\mathcal{L}_{ring}$-formula, which contains finite sets of arbitrarily large
cardinality, then ${\mathcal{O}}$ has undecidable first-order theory.

###  4.1. Undecidability for totally real ${\mathcal{O}}_{K}$.

Before considering totally imaginary fields, we briefly sketch the
$\operatorname{JR}$-number method for proving the undecidability of the ring
of integers of a totally real field; see [Rob62, VV15a, VV15b] for more
details.

######  Definition 4.2.

Given a totally real number $\alpha\in{\overline{\mathbb{Q}}}$ and
$t\in{\mathbb{R}}$, we write $0\ll\alpha\ll t$ if every conjugate of $\alpha$
lies in the interval $(0,t)$. For a totally real subset
$X\subseteq{\overline{\mathbb{Q}}}$, write $X_{t}=\\{\alpha\in X:0\ll\alpha\ll
t\\}$. The $\operatorname{JR}$-number of $X$ is

$\operatorname{JR}(X)=\inf\\{t\in{\mathbb{R}}:\\#X_{t}=\infty\\}.$

In particular, when $K$ is totally real, J. Robinson [Rob62] observed that if
$\operatorname{JR}({\mathcal{O}}_{K})$ is either $\infty$ or a minimum, then
Lemma 4.1 implies that ${\mathcal{O}}_{K}$ is undecidable. Indeed,
$\\{X_{t}\\}_{t\in{\mathbb{Q}}}$ can be realized as a parametrized family of
existentially definable sets when $X={\mathcal{O}}_{K}$ and
$t\in{\mathbb{Q}}$, as written below. This follows from Siegel’s proof that
the totally nonnegative elements of $K$ are precisely the elements which are
sums of four squares [Sie21]. Consequently, J. Robinson deduced that the ring
of totally real algebraic integers ${{\mathbb{Z}^{\operatorname{tr}}}}$ is
undecidable.

######  Theorem 4.3.

Let $K$ be a totally real field. If $X={\mathcal{O}}_{K}$ and
$t=\frac{a}{b}\in{\mathbb{Q}}$, then $X_{t}$ is defined in ${\mathcal{O}}_{K}$
by the formula:

$\exists y_{0},\dots,y_{8}\in{\mathcal{O}}_{K}[bxy_{0}^{2}\neq 0\wedge
bxy_{0}^{2}\neq a\wedge
xy_{0}^{2}=y_{1}^{2}+\dots+y_{4}^{2}\wedge(a-bxy_{0}^{2})=y_{5}^{2}+\dots+y_{8}^{2}]$

Note that, in general, algebraic integers might be written as the sum of
squares of algebraic non-integers, so $y_{0}$ plays the role of a common
denominator.

###  4.2. Undecidability for totally imaginary ${\mathcal{O}}_{L}$.

We are now ready to deploy a modified version of the
$\operatorname{JR}$-method for totally imaginary fields; compare with [MRUV20,
Spr20].

######  Theorem 4.4.

Let $K_{0}$ be a totally real field for which
$\operatorname{JR}({\mathcal{O}}_{K_{0}})$ is either an attained minimum or
$\infty$, and let $K_{1}$ be the maximal totally real subfield of
$K_{0}^{(2)}$. If $K\supseteq K_{1}$ is any totally real field with
$\operatorname{JR}({\mathcal{O}}_{K})=\operatorname{JR}({\mathcal{O}}_{K_{0}})$,
and $L$ is any totally imaginary quadratic extension of $K$, then the first
order theory of ${\mathcal{O}}_{L}$ is undecidable.

###### Proof.

By Theorem 3.3, there is an existentially definable subset
$X\subseteq{\mathcal{O}}_{L}$ satisfying

${\mathcal{O}}_{K_{0}}\subseteq X\subseteq{\mathcal{O}}_{K}.$

Therefore, the parametrized formula $\phi_{X}(x;a,b)$ defined by

$\exists y_{0},\dots,y_{8}\in X[bxy_{0}^{2}\neq 0\wedge bxy_{0}^{2}\neq
a\wedge
xy_{0}^{2}=y_{1}^{2}+\dots+y_{4}^{2}\wedge(a-bxy_{0}^{2})=y_{5}^{2}+\dots+y_{8}^{2}]$

defines sets which satisfy the containments

$\left\\{x\in{\mathcal{O}}_{K_{0}}:0\ll
x\ll\frac{a}{b}\right\\}\subseteq\\{x\in{\mathcal{O}}_{L}:\phi_{X}(x;a,b)\\}\subseteq\left\\{x\in{\mathcal{O}}_{K}:0\ll
x\ll\frac{a}{b}\right\\}.$

The containments follow from Theorem 4.3. Because
$\operatorname{JR}({\mathcal{O}}_{K})=\operatorname{JR}({\mathcal{O}}_{K_{0}})$
is either infinite or an attained minimum, the sets on the lefthand and
righthand sides above are finite sets of arbitrarily large size as
$\frac{a}{b}$ ranges over positive rational numbers approaching
$\operatorname{JR}({\mathcal{O}}_{K})$ from the left. Therefore, by Lemma 4.1,
we have proved first-order undecidability. ∎

There are two extremes for the JR-number of a ring of totally real algebraic
integers, namely 4 and $\infty$. For example, the fields $K_{0}={\mathbb{Q}}$
and $K_{1}={\mathbb{Q}}(\\{\sqrt{n}:n\geq 1\\})$ have
$\operatorname{JR}({\mathcal{O}}_{K_{0}})=\operatorname{JR}({\mathcal{O}}_{K_{1}})=\infty$.
Applying Theorem 4.4 in this case leads to a recovery of some of the results
that appeared in [MRUV20, Spr20]. At the other extreme, we write the
following.

######  Theorem 4.5.

Let $S$ be any infinite set of positive integers, let
$K_{0}={\mathbb{Q}}(\\{\zeta_{n}+\overline{\zeta}_{n}:n\in S\\})$, and let
$K_{1}$ be the maximal totally real subfield of $K_{0}^{(2)}$. If $K$ is any
totally real extension of $K_{1}$ and $L$ is any totally imaginary quadratic
extension of $K$, then the first order theory of ${\mathcal{O}}_{L}$ is
undecidable.

###### Proof.

Under the given hypotheses, $\operatorname{JR}({\mathcal{O}}_{K_{0}})=4$ is
the smallest possible $\operatorname{JR}$-number and is realized as a minimum.
Indeed, we have $0\ll\zeta_{n}+\overline{\zeta}_{n}+2\ll 4$ for all $n\in S$,
and these are the only totally real elements of ${\overline{\mathbb{Q}}}$ with
this property; see Kronecker [Kro57] and also [Rob64]. Therefore,
$\operatorname{JR}({\mathcal{O}}_{K_{0}})=\operatorname{JR}({\mathcal{O}}_{K})$
is clear and Theorem 4.4 applies. ∎

In recent years, examples of totally real fields $K$ have been discovered for
which $\operatorname{JR}({\mathcal{O}}_{K})$ is neither $4$ nor $\infty$,
i.e., $\operatorname{JR}({\mathcal{O}}_{K})$ is non-extremal; see [Cas18,
CVV20, GR17, VV15a]. A better understanding of the behavior of
$\operatorname{JR}$-numbers under field extension would be required before
applying Theorem 4.4 to fields $K_{0}$ for which
$\operatorname{JR}({\mathcal{O}}_{K_{0}})\in(4,\infty)$ is non-extremal.

## References

  * [BCP97] Wieb Bosma, John Cannon, and Catherine Playoust.  The Magma algebra system. I. The user language.  J. Symbolic Comput., 24(3-4):235–265, 1997.  Computational algebra and number theory (London, 1993).
  * [BSF13] Lior Bary-Soroker and Arno Fehm.  Open problems in the theory of ample fields.  In Geometric and differential Galois theories, volume 27 of Sémin. Congr., pages 1–11. Soc. Math. France, Paris, 2013.
  * [Cas18] Marianela Castillo Fernández.  On the Julia Robinson number of rings of totally real algebraic integers in some towers of Nested Square Roots.  PhD thesis, Universidad de Concepción, 2018.  URL: http://repositorio.udec.cl/handle/11594/3003.
  * [Cha19] Zoé Chatzidakis.  Amalgamation of types in pseudo-algebraically closed fields and applications.  J. Math. Log., 19(2):1950006, 28, 2019.
  * [CVV20] Marianela Castillo Fernández, Xavier Vidaux, and Carlos R. Videla.  Julia Robinson numbers and arithmetical dynamic of quadratic polynomials.  Indiana Univ. Math. J., 69(3):873–885, 2020.
  * [Dar00] L. Darnière.  Decidability and local-global principles.  In Hilbert’s tenth problem: relations with arithmetic and algebraic geometry (Ghent, 1999), volume 270 of Contemp. Math., pages 145–167. Amer. Math. Soc., Providence, RI, 2000.
  * [Den80] J. Denef.  Diophantine sets over algebraic integer rings. II.  Trans. Amer. Math. Soc., 257(1):227–236, 1980.
  * [DF21] Philip Dittmann and Arno Fehm.  Nondefinability of rings of integers in most algebraic fields.  Notre Dame J. Form. Log., 62(3):589–592, 2021.
  * [FHV94] Michael D. Fried, Dan Haran, and Helmut Völklein.  Real Hilbertianity and the field of totally real numbers.  In Arithmetic geometry (Tempe, AZ, 1993), volume 174 of Contemp. Math., pages 1–34. Amer. Math. Soc., Providence, RI, 1994.
  * [FJ74] Gerhard Frey and Moshe Jarden.  Approximation theory and the rank of abelian varieties over large algebraic fields.  Proc. London Math. Soc. (3), 28:112–128, 1974.
  * [FP10] Arno Fehm and Sebastian Petersen.  On the rank of abelian varieties over ample fields.  Int. J. Number Theory, 6(3):579–586, 2010.
  * [GR17] Pierre Gillibert and Gabriele Ranieri.  Julia robinson’s numbers.  arXiv e-prints, Oct 2017.
  * [Jar11] Moshe Jarden.  Algebraic patching.  Springer Monographs in Mathematics. Springer, Heidelberg, 2011.
  * [JN07] Moshe Jarden and Władysł aw Narkiewicz.  On sums of units.  Monatsh. Math., 150(4):327–332, 2007.
  * [Kob06] Emi Kobayashi.  A remark on the Mordell-Weil rank of elliptic curves over the maximal abelian extension of the rational number field.  Tokyo J. Math., 29(2):295–300, 2006.
  * [Koe14] Jochen Koenigsmann.  Undecidability in number theory.  In Model theory in algebra, analysis and arithmetic, volume 2111 of Lecture Notes in Math., pages 159–195. Springer, Heidelberg, 2014\.
  * [Kro57] L. Kronecker.  Zwei Sätze über Gleichungen mit ganzzahligen Coefficienten.  J. Reine Angew. Math., 53:173–175, 1857.
  * [LR08] Álvaro Lozano-Robledo.  Ranks of abelian varieties over infinite extensions of the rationals.  Manuscripta Math., 126(3):393–407, 2008.
  * [MR18] Barry Mazur and Karl Rubin.  Diophantine stability.  Amer. J. Math., 140(3):571–616, 2018.  With an appendix by Michael Larsen.
  * [MRS22] Barry Mazur, Karl Rubin, and Alexandra Shlapentokh.  Existential definability and diophantine stability.  arXiv e-prints, page arXiv:2208.09963, August 2022.
  * [MRUV20] Carlos Martínez-Ranero, Javier Utreras, and Carlos R. Videla.  Undecidability of $\mathbb{Q}^{(2)}$.  Proc. Amer. Math. Soc., 148(3):961–964, 2020.
  * [Pet06] Sebastian Petersen.  On a question of Frey and Jarden about the rank of abelian varieties.  J. Number Theory, 120(2):287–302, 2006.
  * [Poo02] Bjorn Poonen.  Using elliptic curves of rank one towards the undecidability of Hilbert’s tenth problem over rings of algebraic integers.  In Algorithmic number theory (Sydney, 2002), volume 2369 of Lecture Notes in Comput. Sci., pages 33–42. Springer, Berlin, 2002.
  * [Pop96] Florian Pop.  Embedding problems over large fields.  Ann. of Math. (2), 144(1):1–34, 1996.
  * [Rob62] Julia Robinson.  On the decision problem for algebraic rings.  In Studies in mathematical analysis and related topics, pages 297–304. Stanford Univ. Press, Stanford, Calif, 1962.
  * [Rob64] Raphael M. Robinson.  Intervals containing infinitely many sets of conjugate algebraic units.  Ann. of Math. (2), 80:411–428, 1964.
  * [Shl09] Alexandra Shlapentokh.  Rings of algebraic numbers in infinite extensions of $\mathbb{Q}$ and elliptic curves retaining their rank.  Arch. Math. Logic, 48(1):77–114, 2009.
  * [Shl18] Alexandra Shlapentokh.  First-order decidability and definability of integers in infinite algebraic extensions of the rational numbers.  Israel Journal of Mathematics, 226(2):579–633, 2018.
  * [Sie21] Carl Siegel.  Darstellung total positiver Zahlen durch Quadrate.  Math. Z., 11(3-4):246–275, 1921.
  * [Spr20] Caleb Springer.  Undecidability, unit groups, and some totally imaginary infinite extensions of $\mathbb{Q}$.  Proc. Amer. Math. Soc., 148(11):4705–4715, 2020.
  * [VDD88] Lou Van Den Dries.  Elimination theory for the ring of algebraic integers.  Journal fur die Reine und Angewandte Mathematik, 1988(388):189–205, 1988.
  * [Vid00a] Carlos R. Videla.  Definability of the ring of integers in pro-p galois extensions of number fields.  Israel Journal of Mathematics, 118(1):1–14, Dec 2000.
  * [Vid00b] Carlos R. Videla.  The undecidability of cyclotomic towers.  Proc. Amer. Math. Soc., 128(12):3671–3674, 2000.
  * [VV15a] Xavier Vidaux and Carlos R. Videla.  Definability of the natural numbers in totally real towers of nested square roots.  Proceedings of the American Mathematical Society, 143(10):4463–4477, 2015.
  * [VV15b] Xavier Vidaux and Carlos R. Videla.  A note on the northcott property and undecidability.  Bulletin of the London Mathematical Society, 48(1):58–62, 2015\.
  * [Was97] Lawrence C. Washington.  Introduction to cyclotomic fields, volume 83.  Springer, New York, 2nd edition, 1997.