Definability of the ring of integer in algebraic extensions of $\mathbb Q$ J. Robinson has proved that exists a formula $\psi(x)$ in the language of rings which,applied to the rational numbers, defines the the ring integers (making the theory of $\mathbb{Q}$ undecidable, due to Godel's theorem). However, due to Tarski's results, the theory of the real field is complete and therefore the ring of integers $\mathbb{Z}$ is not definable in $\mathbb{R}$.
Let $K/\mathbb{Q}$ be an algebraic extension of the rational numbers.
I will ask two related questions:


*

*Without any further assumptions on the extension, is $\mathbb{Z}$ necessarily a definable subset in $\langle K,+,\times,0,1\rangle$?

*What purely algebraic properties of the extension might yield a more conclusive answer to the above questions? Specifically: separability, dimension, normality, finiteness, simplicity (maybe even Galois group structure). Moreover, is there a deeper side to this? Do there exist two extensions $K_{1}/\mathbb{Q},K_{2}/\mathbb{Q}$ that satisfy exactly the same algebraic properties denoted above, yet in one of them $\mathbb Z$ is a definable subset, and in the other it is not? 


These are not questions on which I have pondered for long, but I am curious whether there exist any interesting examples or logical tools needed in order to tackle these questions.
 A: I hope this is not seen as self-promoting, but I just stumbled upon this question when browsing things related to that recent question.
As Tom Scanlon said, it is very difficult if not impossible to get a complete picture of the algebraic extensions of $\mathbb{Q}$ in which $\mathbb{Z}$ is definable. However, one can say that in a certain sense, $\mathbb{Z}$ is not definable in $K$ for most algebraic extensions $K/\mathbb{Q}$: The set of fields $K\subseteq\overline{\mathbb{Q}}$ in which $\mathbb{Z}$ is definable is meager in the set of all such $K$, in the topology induced from $2^{\overline{\mathbb{Q}}}$. This is part of what is shown in this very short note of Philip Dittmann and myself.
The reason for the non-definability used there is a purely algebraic one, as asked for in the question: Namely $\mathbb{Z}$ is not definable in any so-called pseudo-algebraically closed field $K$ (meaning every geometrically integral $K$-variety has a $K$-rational point), and the set of $K\subseteq\overline{\mathbb{Q}}$ that are pseudo-algebraically closed is non-meager.
A: If $K$ is a finite extension of $\mathbb{Q}$, then, yes, $\mathbb{Z}$ is definable in $\langle K, +, \times, 0, 1 \rangle$.  See R. Rumely, Undecidability and definability for the theory of global fields, Trans. AMS, 262 (1980), no.1, 195 - 217 http://www.ams.org/journals/tran/1980-262-01/S0002-9947-1980-0583852-6/home.html
As YCor notes, the situation for infinite algebraic extensions is more complicated.  There are some such extensions which are known to have decidable theories.  For example, the algebraic numbers themselves, $\mathbb{Q}^{\text{alg}}$, form an algebraically closed field and have a decidable theory.  Likewise, the field of real algebraic numbers is a real closed field and is decidable by Tarski's theorem.  On the other hand, there are natural infinite algebraic extensions in which $\mathbb{Z}$ is definable and others which might not be so natural whose theories are strictly more complicated than that of $\mathbb{Z}$. 
There are some interesting cases for which it is not known (at least to me) whether the theory is decidable.  For example, we do not know whether the theory of $\mathbb{Q}^{\text{ab}} = \mathbb{Q}( \{ \zeta ~:~ \zeta^n = 1 \text{ for some } n \in \mathbb{Z}_+ \})$ is decidable. 
