Axiomatic characterization of the rational numbers

We have the well-known Peano axioms for the natural numbers and the real numbers can be characterized by demanding them to be a Dedekind-complete, totally ordered field (or some variation of this).

But I never saw any axiomatic characterization of the rational numbers! Either they are constructed out of the natural numbers or are found as a subset of the reals.

I know that the rational numbers are unique in the sense that they are the smallest totally ordered field. But it is somewhat unsatisfactory for me to define them to be a totally ordered field which has an order-preserving embedding into any other totally ordered field. This would be like defining the real numbers to be an Archimedean totally ordered field such that every other Archimedean totally ordered field can be order-preservingly embedded into it - this is some ugly definition (for me) and I find the usual one much better.

So what is a nice axiomatic characterization of the rational numbers?


Preamble

I believe that the OP is seeking a characterization of $ \mathbb{Q} $ using only the first-order language of fields, $ \mathcal{L}_{\text{Field}} $. Restricting ourselves to this language, we can try to uncover new axioms, in addition to the usual field axioms (i.e., those that relate to the associativity and commutativity of addition and multiplication, the distributivity of multiplication over addition, the behavior of the zero and identity elements, and the existence of a multiplicative inverse for each non-zero element), that describe $ \mathbb{Q} $ uniquely.

Any attempt to describe the smallest field satisfying a given property must prescribe a method of comparing one field with another (namely using field homomorphisms, which are injective if not trivial), but such a method clearly cannot be formalized using $ \mathcal{L}_{\text{Field}} $.


1. There Exists No First-Order Characterization of $ \mathbb{Q} $

The answer is ‘no’, if one is seeking a first-order characterization of $ \mathbb{Q} $. This follows from the Upward Löwenheim-Skolem Theorem, which is a classical tool in logic and model theory.

Observe that $ \mathbb{Q} $ is an infinite $ \mathcal{L}_{\text{Field}} $-structure of cardinality $ \aleph_{0} $. The Upward Löwenheim-Skolem Theorem then says that there exists an $ \mathcal{L}_{\text{Field}} $-structure (i.e., a field) $ \mathbb{F} $ of cardinality $ \aleph_{1} $ that is an elementary extension of $ \mathbb{Q} $. By definition, this means that $ \mathbb{Q} $ and $ \mathbb{F} $ satisfy the same set of $ \mathcal{L}_{\text{Field}} $-sentences, so we cannot use first-order logic to distinguish $ \mathbb{Q} $ and $ \mathbb{F} $. In other words, as far as first-order logic can tell, these two fields are identical (an analogy may be found in point-set topology, where two distinct points of a non-$ T_{0} $ topological space can be topologically indistinguishable). However, $ \mathbb{Q} $ and $ \mathbb{F} $ have different cardinalities, so they are not isomorphic. This phenomenon is ultimately due to the fact that the notion of cardinality cannot be formalized using $ \mathcal{L}_{\text{Field}} $. Therefore, any difference between the two fields can only be seen externally, outside of first-order logic.


2. Finding a Second-Order Characterization of $ \mathbb{Q} $

This part is inspired by lhf's answer below, which I believe deserves more credit. We start by formalizing the notion of proper subfield using second-order logic.

Let $ P $ be a variable for unary predicates. Consider the following six formulas: \begin{align} \Phi^{P}_{1} &\stackrel{\text{def}}{\equiv} (\exists x) \neg P(x); \\ \Phi^{P}_{2} &\stackrel{\text{def}}{\equiv} P(0); \\ \Phi^{P}_{3} &\stackrel{\text{def}}{\equiv} P(1); \\ \Phi^{P}_{4} &\stackrel{\text{def}}{\equiv} (\forall x)(\forall y)((P(x) \land P(y)) \rightarrow P(x + y)); \\ \Phi^{P}_{5} &\stackrel{\text{def}}{\equiv} (\forall x)(\forall y)((P(x) \land P(y)) \rightarrow P(x \cdot y)); \\ \Phi^{P}_{6} &\stackrel{\text{def}}{\equiv} (\forall x)((P(x) \land \neg (x = 0)) \rightarrow (\exists y)(P(y) \land (x \cdot y = 1))). \end{align} What $ \Phi^{P}_{1},\ldots,\Phi^{P}_{6} $ are saying is that the set of all elements of the domain of discourse that satisfy the predicate $ P $ forms a proper subfield of the domain. The domain itself will be a field if we impose upon it the first-order field axioms. Hence, $$ \{ \text{First-order field axioms} \} \cup \{ \text{First-order axioms defining characteristic $ 0 $} \} \cup \{ \neg (\exists P)(\Phi^{P}_{1} ~ \land ~ \Phi^{P}_{2} ~ \land ~ \Phi^{P}_{3} ~ \land ~ \Phi^{P}_{4} ~ \land ~ \Phi^{P}_{5} ~ \land ~ \Phi^{P}_{6}) \} $$ is a set of first- and second-order axioms that characterizes $ \mathbb{Q} $ uniquely because of the following two reasons:

  1. Up to isomorphism, $ \mathbb{Q} $ is the only field with characteristic $ 0 $ that contains no proper subfield.

  2. If $ \mathbb{F} \ncong \mathbb{Q} $ is a field with characteristic $ 0 $, then $ \mathbb{F} $ does not model this set of axioms. Otherwise, interpreting “$ P(x) $” as “$ x \in \mathbb{Q}_{\mathbb{F}} $” yields a contradiction, where $ \mathbb{Q}_{\mathbb{F}} $ is the copy of $ \mathbb{Q} $ sitting inside $ \mathbb{F} $.


Among all fields the rationals can be characterized as follows. The field of rational numbers is, up to isomorphism, the smallest field of characteristic $0$.

As you say, the rationals can be built up from the integers via a construction which is a special case of the construction known as the field of fractions of an integral domain. In this way the rationals can be characterized, among all integral domains rings, as follows: The field of rational numbers is, up to isomorphism, the field of fractions of the ring of integers.

Whether or not these characterizations fit your expectations of being nice is a matter of taste. In any case, the second characterization is a special case of a the very common phenomenon of a universal property.