The
language of real closed fields \mathcal{L}_\text{rcf} includes symbols for the operations of addition and multiplication, the constants 0 and 1, and the order relation (as well as equality, if this is not considered a logical symbol). In this language, the (first-order) theory of real closed fields, \mathcal{T}_\text{rcf}, consists of all sentences that follow from the following axioms: • the
axioms of
ordered fields; • the axiom asserting that every positive number has a square root; • for every odd number d, the axiom asserting that all polynomials of degree d have at least one root. All of these axioms can be expressed in
first-order logic (i.e.
quantification ranges only over elements of the field). Note that \mathcal{T}_\text{rcf} is just the set of all first-order sentences that are true about the field of real numbers.
Tarski showed that \mathcal{T}_\text{rcf} is
complete, meaning that any \mathcal{L}_\text{rcf}-sentence can be proven either true or false from the above axioms. Furthermore, \mathcal{T}_\text{rcf} is
decidable, meaning that there is an
algorithm to determine the truth or falsity of any such sentence. This was done by showing
quantifier elimination: there is an algorithm that, given any \mathcal{L}_\text{rcf}-
formula, which may contain
free variables, produces an equivalent quantifier-free formula in the same free variables, where
equivalent means that the two formulas are true for exactly the same values of the variables. Tarski's proof uses a generalization of
Sturm's theorem. Since the truth of quantifier-free formulas without free variables can be easily checked, this yields the desired decision procedure. These results were obtained and published in 1948. The
Tarski–Seidenberg theorem extends this result to the following
projection theorem. If is a real closed field, a formula with free variables defines a subset of , the set of the points that satisfy the formula. Such a subset is called a
semialgebraic set. Given a subset of variables, the
projection from to is the
function that maps every -tuple to the -tuple of the components corresponding to the subset of variables. The projection theorem asserts that a projection of a semialgebraic set is a semialgebraic set, and that there is an algorithm that, given a quantifier-free formula defining a semialgebraic set, produces a quantifier-free formula for its projection. In fact, the projection theorem is equivalent to quantifier elimination, as the projection of a semialgebraic set defined by the formula is defined by :(\exists x) P(x,y), where and represent respectively the set of eliminated variables, and the set of kept variables. The decidability of a first-order theory of the real numbers depends dramatically on the primitive operations and functions that are considered (here addition and multiplication). Adding other functions symbols, for example, the
sine or the
exponential function, can provide undecidable theories; see
Richardson's theorem and
Decidability of first-order theories of the real numbers. Furthermore, the completeness and decidability of the first-order theory of the real numbers (using addition and multiplication) contrasts sharply with
Gödel's and
Turing's results about the incompleteness and undecidability of the first-order theory of the natural numbers (using addition and multiplication). There is no contradiction, since the statement "
x is an integer" cannot be formulated as a first-order formula in the language \mathcal{L}_\text{rcf}.
Complexity of deciding 𝘛rcf Tarski's original algorithm for
quantifier elimination has
nonelementary computational complexity, meaning that no tower :2^{2^{\cdot^{\cdot^{\cdot^n}}}} can bound the execution time of the algorithm if is the size of the input formula. The
cylindrical algebraic decomposition, introduced by
George E. Collins, provides a much more practicable algorithm of complexity :d^{2^{O(n)}} where is the total number of variables (free and bound), is the product of the degrees of the polynomials occurring in the formula, and is
big O notation. Davenport and Heintz (1988) proved that this
worst-case complexity is nearly optimal for quantifier elimination by producing a family of formulas of length , with quantifiers, and involving polynomials of constant degree, such that any quantifier-free formula equivalent to must involve polynomials of degree 2^{2^{\Omega(n)}} and length 2^{2^{\Omega(n)}}, where \Omega(n) is
big Omega notation. This shows that both the time complexity and the space complexity of quantifier elimination are intrinsically
double exponential. For the decision problem, Ben-Or,
Kozen, and
Reif (1986) claimed to have proved that the theory of real closed fields is decidable in
exponential space, and therefore in double exponential time, but their argument (in the case of more than one variable) is generally held as flawed; see Renegar (1992) for a discussion. For purely existential formulas, that is for formulas of the form : where stands for either or , the complexity is lower. Basu and
Roy (1996) provided a well-behaved algorithm to decide the truth of such an existential formula with complexity of arithmetic operations and
polynomial space. == Order properties ==