This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

Some structural complexity results for \exists{\mathbb{R}}

Klaus Meer Computer Science Institute, BTU Cottbus-Senftenberg
Platz der Deutschen Einheit 1
D-03046 Cottbus, Germany
{meer,wurm}@b-tu.de
   Adrian Wurm Computer Science Institute, BTU Cottbus-Senftenberg
Platz der Deutschen Einheit 1
D-03046 Cottbus, Germany
{meer,wurm}@b-tu.de
Abstract

The complexity class {\exists{\mathbb{R}}}, standing for the complexity of deciding the existential first order theory of the reals as real closed field in the Turing model, has raised considerable interest in recent years. It is well known that NPPSPACE.{\rm NP}\subseteq{\exists{\mathbb{R}}}\subseteq{\rm PSPACE}. In their compendium [Schaefer2024], Schaefer, Cardinal, and Miltzow give a comprehensive presentation of results together with a rich collection of open problems. Here, we answer some of them dealing with structural issues of {\exists{\mathbb{R}}} as a complexity class. We show analogues of the classical results of Baker, Gill, and Solovay finding oracles which do and do not separate NP form {\exists{\mathbb{R}}}, of Ladner’s theorem showing the existence of problems in NP{\exists{\mathbb{R}}}\setminus{\rm NP} not being complete for {\exists{\mathbb{R}}} (in case the two classes are different), as well as a characterization of {\exists{\mathbb{R}}} by means of descriptive complexity.

1 Introduction

The existential theory of the reals collects all true sentences in existential first-order logic over ,{\mathbb{R}}, i.e., sentences of the form x1xnΦ(x1,,xn),\exists x_{1}\ldots\exists x_{n}\Phi(x_{1},\ldots,x_{n}), where Φ\Phi is a quantifier-free formula expressing a Boolean combination of polynomial equalities and inequalities. The complexity of deciding the truth of a given sentence plays a prominent role for several computational models and complexity classes. In the Blum-Shub-Smale model - henceforth BSS for short - over {\mathbb{R}} basic arithmetic operations can be executed with unit cost and the size of Φ\Phi is basically the algebraic size of a dense encoding of all polynomials occuring in it. The above decision problem then turns out to be NP{\rm NP}_{{\mathbb{R}}}-complete, where the latter class is the real number analogue of classical NP [BSS]. However, the decision problem also makes perfect sense in the Turing model of computation if we restrict all coefficients for the polynomials in Φ\Phi to be rational. Then, its size is the usual bit-size and the problem of deciding truth is easily seen to be NP-hard. In the Turing model, the exact complexity of the existential theory for the reals is (wide) open. Using deep results on quantifier elimination it has been shown that it can be decided within PSPACE, see [Canny] and also [Renegar]. The open placement of the problem somewhere between NP and PSPACE has led to the definition of an own complexity class denoted ,{\exists{\mathbb{R}}}, see a precise definition in the next subsection.

Beside many other things, in [Schaefer2024] the authors ask whether several structural results well known to hold for the classical class NP in the Turing model also can be settled for .{\exists{\mathbb{R}}}. The latter include an analogue of the Baker-Gill-Solovay result [BGS] on existence of oracles separating {\exists{\mathbb{R}}} from NP and the question whether {\exists{\mathbb{R}}} can be characterized by means of descriptive complexity as done in [Fagin] for NP. In this paper we give positive answers to these questions and also show that Ladner’s result [Ladner] can be transformed showing that if we assume NP{\exists{\mathbb{R}}}\neq{\rm NP} there exist problems in the set difference not being {\exists{\mathbb{R}}}-complete.

A few words on the proofs might be appropriate. All above mentioned results for NP turn out to hold in the corresponding variants as well for {\exists{\mathbb{R}}}. In some cases, though not completely straightforward, proofs follow from not too complicated modifications of known proofs of related results in the BSS model. One basic ingredient for the proofs to work is the characterization of {\exists{\mathbb{R}}} via the BSS class BP(NP0)({\rm NP}_{{\mathbb{R}}}^{0}) in Theorem 1.1 below together with the most important observation that the class of NP0{\rm NP}_{{\mathbb{R}}}^{0}-machines in the BSS model is countable. Therefore, we see the main value of the present paper in working out the necessary proof details of expected results in order to enlarge the body of structural results known to hold for .{\exists{\mathbb{R}}}.

1.1 Basic definitions: {\exists{\mathbb{R}}} and BSS-machines without constants

We now define precisely the class {\exists{\mathbb{R}}} together with BSS computations using only rational machine constants as well as related discrete complexity classes BP(P0)(\mbox{P}_{{\mathbb{R}}}^{0}) and BP(NP0).({\rm NP}_{{\mathbb{R}}}^{0}).

The class {\exists{\mathbb{R}}} was formally introduced in [Schaefer2009], but somehow was examined already earlier, see [Schaefer2024] for a historic account on questions related to this class being studied already in the 1990s. The class can most easily be defined starting from a complete problem and then building the downward closure under usual polynomial time many one reductions. In the meanwhile, several problems have been shown to be complete. For our purposes, the existence of real solutions of a polynomial system of degree-two equations is the most suitable one.

Definition 1

a)  The decision problem Quadratic Polynomial Systems QPS0{\rm QPS}^{0} is defined as follows: Given n,mn,m\in{\mathbb{N}} and polynomials fi[x1,,xm],1inf_{i}\in{\mathbb{Q}}[x_{1},\ldots,x_{m}],1\leq i\leq n of degree at most 22, is there an xnx^{*}\in{\mathbb{R}}^{n} such that fi(x)=0f_{i}(x^{*})=0 for all i?i? The problem is understood as a decision problem in the Turing model, i.e., instances are coded as binary strings over {0,1}\{0,1\}^{*}.111The superscript 0 in QPS0{\rm QPS}^{0} results from the close relation of the approach to Blum-Shub-Smale machines that are only using rational constants and is common in that context, see below. Here it indicates rational coefficients.

b)  The complexity class {\exists{\mathbb{R}}} consists of all decision problems L{0,1}L\subseteq\{0,1\}^{*} such that there exists a polynomial time many one reduction from LL to QPS0{\rm QPS}^{0}.

The completeness of QPS0{\rm QPS}^{0} for class {\exists{\mathbb{R}}}, i.e., for the existential theory of the reals easily follows from the proof in [BSS] that the corresponding problem for quadratic polynomial systems with arbitrary real coefficients is NP{\rm NP}_{{\mathbb{R}}}-complete in the BSS model over {\mathbb{R}}. In the corresponding proof, no real constants are introduced and starting from decision problems in {0,1}\{0,1\}^{*} the reduction runs in polynomial time also in the Turing model.

The class {\exists{\mathbb{R}}} can easily be characterized via a restriction of the class NP{\rm NP}_{{\mathbb{R}}} in the BSS model, see [BSS, BCSS97]. The full real number BSS model allows to compute with reals as entities, performing the basic arithmetic operations together with a test of the format ’is x0x\geq 0’ at unit cost. Algorithms are allowed to use a fixed finite set of real numbers as so-called machine constants. The latter always include 0 and 1.1. The (algebraic) size of an instance then is the number of reals necessary to specify it (in a reasonable encoding), and the class P{\rm P}_{{\mathbb{R}}} of problems decidable in deterministic polynomial time is defined literally the same as P, i.e., there exists a polynomial time algorithm (measured with respect to the algebraic size measure for instances and the unit cost measure for algorithms) deciding the problem correctly. Similarly, NP{\rm NP}_{{\mathbb{R}}} stands for problems verifiable in polynomial time when having access to a witness that is a real vector of polynomial (algebraic) size in the size of the given instance. If we want to handle discrete problems in this model, i.e., problems L{0,1}L\in\{0,1\}^{*}, it is appropriate to restrict inputs to binary strings and to disallow BSS algorithms to use non-rational machine constants. This leads to complexity classes highly important in connection with {\exists{\mathbb{R}}}.

Definition 2

The class BP(P0)({\rm P}_{{\mathbb{R}}}^{0}) consists of all L{0,1}L\subseteq\{0,1\}^{*} such that there exists a BSS algorithm running in (algebraic) polynomial time, using only rational machine constants and deciding LL on inputs from {0,1}\{0,1\}^{*}. Similarly, the class BP(NP0)({\rm NP}_{{\mathbb{R}}}^{0}) consists of all L{0,1}L\subseteq\{0,1\}^{*} such that there exists a BSS algorithm using only rational machine constants and verifying LL on inputs from {0,1}×\{0,1\}^{*}\times{\mathbb{R}}^{*}. Moreover, for inputs (y,z)(y,z) the (algebraic) running time is polynomially bounded in the size of y.y.

Above, BP stands for ’Boolean Part’ and {\mathbb{R}}^{*} denotes the real number analogue of {0,1}\{0,1\}^{*} , i.e., finite sequences of real numbers. Note that for discrete inputs y{0,1}y\in\{0,1\}^{*} the bit-size and the algebraic size coincide. However, the cost measure for algorithms working with discrete data is the algebraic one. It is also important to stress again that for verification algorithms the certificate zz\in{\mathbb{R}}^{*} is allowed to be a vector of reals. This is the reason for the tight relation of BP(NP0)({\rm NP}_{{\mathbb{R}}}^{0}) to .{\exists{\mathbb{R}}}. It follows immediately from the original completeness proof in [BSS]:

Theorem 1.1

BP(NP0)=.({\rm NP}_{{\mathbb{R}}}^{0})\ =\ {\exists{\mathbb{R}}}.

Below, a decisive aspect of this theorem is that {\exists{\mathbb{R}}} can be characterized through a complexity class defined by a machine model which has a countable number of machines only.

2 Relativization of NP versus {\exists{\mathbb{R}}}

The first question from the compendium [Schaefer2024] we want to deal with is whether there exist oracles which do and do not separate {\exists{\mathbb{R}}} from NP and PSPACE, respectively. Comparing P and NP in the Turing model, these questions were answered affirmatively long ago [BGS], in the BSS model an analogue result holds [Emerson], see also [Gassner]. Usually, the construction of an oracle separating the representative classes is done via a diagonalization argument. As consequence, the separating oracles in both settings are not very natural (with an exception in [Gassner], where a Knapsack problem is used to separate other classes). As we shall see, for NP and {\exists{\mathbb{R}}} a quite natural oracle work. The definition of oracle classes like PA and NPA naturally relies on a basic model for algorithms defining a complexity class, like deterministic or non-deterministic polynomial time Turing machines. Then, one equips them with the additional feature to use intermediate results as queries to an oracle. Following the same nearby ongoing for {\exists{\mathbb{R}}} we should work with the following definition.

Definition 3

Let A.A\subseteq{\mathbb{R}}^{*}. A problem L{0,1}L\subseteq\{0,1\}^{*} belongs to the oracle class A{\exists{\mathbb{R}}}^{A}, if there exists an NP0{\rm NP}_{{\mathbb{R}}}^{0}-algorithm MM which in addition has an oracle state. If MM enters this state, it can ask the oracle whether an element yy\in{\mathbb{R}}^{*} previously computed belongs to AA, receives the correct answer in one step, and continues its computation. Then, for xLx\in L there exists a computation of MM which accepts xx and for x{0,1}Lx\in\{0,1\}^{*}\setminus L no computation accepts.

Note that though this is the straightforward definition of oracle classes A{\exists{\mathbb{R}}}^{A}, some subtleties are hidden. Since the basic machine is an NP0{\rm NP}_{{\mathbb{R}}}^{0}-algorithm, it is allowed to produce real number oracle questions, something a Turing machine cannot. Vice versa, since a Turing machine only computes with discrete data, we know in advance that an NP-oracle machine will never produce arbitrary non-rational queries, an information which is undecidable for a BSS machine to know in general. Our results below establishing the integers as separating oracle implicitly make use of such effects. We further comment on this at the end of this section.

Theorem 2.1

Given the above definition of oracle classes based on {\exists{\mathbb{R}}}, the following hold:

a)  There exists an oracle AA such that PA=NPA=A=PSPACEA.{\rm P}^{A}={\rm NP}^{A}={\exists{\mathbb{R}}}^{A}={\rm PSPACE}^{A}.

b)  The oracle {\mathbb{Z}}, seen as subset of {\mathbb{R}}, both satisfies NP=NP{\rm NP}={\rm NP}^{{\mathbb{Z}}}\subsetneq{\exists{\mathbb{R}}}^{{\mathbb{Z}}} and PSPACE.{\exists{\mathbb{R}}}^{{\mathbb{Z}}}\neq{\rm PSPACE}^{{\mathbb{Z}}}.

c)  In the full BSS model, PNP.{\rm P}_{{\mathbb{R}}}^{{\mathbb{Z}}}\subsetneq{\rm NP}_{{\mathbb{R}}}^{{\mathbb{Z}}}.

Proof

For a) we can choose AA as the PSPACE-complete problem Quantified Boolean Formulas QBF. Since PSPACE = NPSPACE = co-NPSPACE it is well known that PQBF=NPQBF=PSPACEQBF=PSPACE.{\rm P}^{\rm QBF}={\rm NP}^{\rm QBF}={\rm PSPACE}^{\rm QBF}={\rm PSPACE}. Arguing about QBF{\exists{\mathbb{R}}}^{\rm QBF} needs some care since the underlying machine model in the definition changes. Suppose MM to be a basic NP0{\rm NP}_{{\mathbb{R}}}^{0}-oracle machine using oracle QBF. Let p(n)p(n) be the polynomial time running bound of MM for inputs in {0,1}n.\{0,1\}^{n}. W.l.o.g. suppose MM for such inputs asks mp(n)m\leq p(n) oracle queries, all being of polynomial size at most p(n).p(n). A PSPACE-algorithm deciding MQBFM^{\rm QBF} on input x{0,1}nx\in\{0,1\}^{n} works as follows: First, consider a computable enumeration of bit-vectors b{0,1}mb\in\{0,1\}^{m} and of mm strings (q1,,qm)(q_{1},\ldots,q_{m}), all qiq_{i} strings over alphabet {0,1,}\{0,1,*\} and of size at most p(n).p(n). Below, we interpret the qiq_{i} as oracle queries MM poses during its computation and bib_{i} as the answers. A component * in a query indicates that it does not belong to {0,1}.\{0,1\}. In case that MM computes such a query, the answer from the QBF-oracle is 0 since the query does not code a correct QBF-instance. Now, given a fixed tuple (b1,,bm,q1,,qm)(b_{1},\ldots,b_{m},q_{1},\ldots,q_{m}) in the enumeration, consider an existential first-order sentence over {\mathbb{R}} without non-rational constants claiming that there exists a computation of MM on xx which produces the queries qiq_{i} under the assumption that b1,,bi1b_{1},\ldots,b_{i-1} are the correct answers to the previous queries, and then finally accepts. Since the qiq_{i} are vectors over {0,1,},\{0,1,*\}, the requirement that a query computed by MM equals qiq_{i} is easily expressible with such a first-order sentence. This holds for queries being bit-vectors as well as for a query containing a component *, in which case the corresponding part of the first-order sentence has to express that the component does not belong to {0,1}\{0,1\}. This is easily doable. The resulting entire sentence is an instance of {\exists{\mathbb{R}}} and thus can be decided in PSPACE by [Canny]. It remains to guarantee in addition that the bib_{i} are the correct answers to QBF-queries qiq_{i}. This of course can be done in PSPACE. Note that if a qiq_{i} contains a non-binary component, the corresponding bib_{i} must be 0. Now the algorithm does the above for all elements in the enumeration by re-using its space and accepts, if for at least one tuple (b1,,bm,q1,,qm)(b_{1},\ldots,b_{m},q_{1},\ldots,q_{m}) all conditions are satisfied. It follows QBF=PSPACE{\exists{\mathbb{R}}}^{\rm QBF}={\rm PSPACE} as well.

For part b) note that both NP{\rm NP}^{{\mathbb{Z}}} and PSPACE{\rm PSPACE}^{{\mathbb{Z}}} only contain problems being decidable in the Turing model. Moreover, if we consider a Turing machine over {0,1}\{0,1\}^{*} coding computations over {\mathbb{Q}} in any usual way, then it is easy to decide for an intermediate result whether it encodes an integer or not. Since for an NP-machine the size of a query is polynomial in the input, we can also check in polynomial time whether a query is integral, thus NP = NP.{}^{{\mathbb{Z}}}. But {\exists{\mathbb{R}}}^{{\mathbb{Z}}} contains problems being undecidable in the Turing model such as Hilbert’s 10th problem: Given a polynomial f[x1,,xn]f\in{\mathbb{Z}}[x_{1},\ldots,x_{n}] in nn variables with integer coefficients, an NP0,{\rm NP}_{{\mathbb{R}}}^{0,{\mathbb{Z}}}-algorithm can guess in a non-deterministic computation nn real numbers x1,,xnx_{1}^{*},\ldots,x_{n}^{*} and then ask the oracle whether all xix_{i}^{*} are integers. If the answer is positive the algorithm evaluates f(x1,,xn)f(x_{1}^{*},\ldots,x_{n}^{*}) in polynomial time in the algebraic model. It accepts iff the result is 0. Thus, the problem to decide whether there is an integer zero of ff belongs to ,{\exists{\mathbb{R}}}^{{\mathbb{Z}}}, but is well known to be undecidable [Matiyasevich].

For c) we can simplify Emerson’s construction by using a result from [Meer93]. Consider the set A:={t[0,2π]|ks.t.kt2π}.A:=\{t\in[0,2\pi]|\exists k\in{\mathbb{N}}\ \mbox{s.t.}\ \frac{k\cdot t}{2\pi}\in{\mathbb{N}}\}. It is easy to see that the decision problem: Given xx\in{\mathbb{R}}, is xA?x\in A? belongs to NP:{\rm NP}_{{\mathbb{R}}}^{{\mathbb{Z}}}: For input xx guess a kk\in{\mathbb{R}} and check whether k0k\geq 0 and kk\in{\mathbb{Z}} by asking the oracle. Then compute kx2π\frac{kx}{2\pi} and ask the oracle again whether it belongs to {\mathbb{Z}}. All this can be done in constantly many algebraic steps. Note that in the BSS model xx\in{\mathbb{R}} has input size 11. However, in order to belong to P{\rm P}_{{\mathbb{R}}}^{{\mathbb{Z}}} the question should be decided in constant time using the oracle. In [Meer93] it is shown by using a ’typical path argument’ that this problem can not be decided by a polynomial time BSS machine which is allowed in addition to evaluate the sine-function in one step. Since in this ’sine-model’ one can decide in constant time whether a number is integral, it follows can P{\rm P}_{{\mathbb{R}}}^{{\mathbb{Z}}} can be decided by a sine-machine, but AA can not. We conclude that AP.A\not\in{\rm P}_{{\mathbb{R}}}^{{\mathbb{Z}}}. \Box

Note that part c) alternatively to the proof in [Emerson] gives a more natural problem yielding the separation. As also for part b), this seems to be an effect observable at least for some results in the BSS setting, compare a similar statement for a real number version of Post’s problem [MeerZiegler2005]. A strange effect why the separation for NP and {\exists{\mathbb{R}}} works is the fact that even though the former is a subset of the latter, this does not any longer hold for arbitrary relativized versions. Clearly, the reason for this is the use of different machine models to define the corresponding oracle classes. Such an effect concerning relativized classes is also known from classical complexity theory for less prominent classes and studied in [Vereshchagin]. It might be interesting to both find other oracles yielding the separation and to study the above effect in more detail in our framework.

3 Descriptive complexity for {\exists{\mathbb{R}}}

The next question from the compendium [Schaefer2024] is whether {\exists{\mathbb{R}}} can be characterized by purely logical means in the sense of descriptive complexity theory. Corresponding results were given in the early years of finite model theory for classical NP [Fagin] and later on for the real number version NP{\rm NP}_{{\mathbb{R}}} in the BSS model [GraedelMeer], based on the development of meta-finite model theory in [GraedelGurevich]; see [Graedeletal] for a more intensive introduction into such results. One special feature, given the above mentioned characterization of {\exists{\mathbb{R}}} as BP(NP0)({\rm NP}_{{\mathbb{R}}}^{0}), is the mixture of discrete inputs coded as in classical complexity theory over {0,1}\{0,1\}^{*}, and an algebraic cost measure for the arithmetic computations performed by the underlying machine. It turns out that this split can be modelled by a restriction of so-called {\mathbb{R}}-structures used in [GraedelMeer] to characterize (full) NP{\rm NP}_{{\mathbb{R}}} and respective logics on them. Thus, the focus below will be on defining the corresponding restriction which we call discrete {\mathbb{R}}-structures, and the suitable logics on them used to capture both {\exists{\mathbb{R}}} and BP(P0)({\rm P}_{{\mathbb{R}}}^{0}). Corresponding proofs then are quite similar to those given in [GraedelMeer] and are only sketched in the Appendix. Though below we work with restricted {\mathbb{R}}-structures, we have to recall their definition in full generality, except for disallowing arbitrary real constants in the so-called secondary part due to the fact that the BSS algorithms studied here do not use such constants.

Definition 4

Let Ls,LfL_{s},L_{f} be finite vocabularies, where LsL_{s} may contain relation and function symbols, and LfL_{f} contains function symbols only. An {\mathbb{R}}-structure of signature σ=(Ls,Lf)\sigma=(L_{s},L_{f}) is a triple 𝔇=(𝒜,,){\mathfrak{D}}=({\cal A},{\cal{R}},\cal F) consisting of

(i)

a finite structure 𝒜{\cal A} of vocabulary LsL_{s}, called the primary part or skeleton of 𝔇{\mathfrak{D}}; its universe AA is also said to be the universe of 𝔇{\mathfrak{D}};

ii)

the infinite structure =(,0,1,+,,,/,sign,<){\cal{R}}=({\mathbb{R}},0,1,+,-,\cdot,/,{\rm sign}\,,<) called the secondary part. Here, sign:{0,1}{\rm sign}\,:{\mathbb{R}}\mapsto\{0,1\} denotes the sign-function being 0 for negative values and 11 otherwise;

(iii)

a finite set \cal F of functions X:AkX:A^{k}\to{\mathbb{R}} interpreting the function symbols in LfL_{f}, where kk depends on the respective symbol only.

We denote the set of all {\mathbb{R}}-structures of signature σ\sigma by Struct(σ){\rm Struct}_{{\mathbb{R}}}(\sigma).

For 𝔇Struct(σ){\mathfrak{D}}\in{\rm Struct}_{{\mathbb{R}}}(\sigma) the size of 𝔇{\mathfrak{D}} is |𝔇|:=|A|.|{\mathfrak{D}}|:=|A|.

We now restrict {\mathbb{R}}-structures to so-called discrete {\mathbb{R}}-structures suitable for modelling computations in P0\mbox{P}_{{\mathbb{R}}}^{0} and NP0{\rm NP}_{{\mathbb{R}}}^{0} on Boolean languages. In order to model bit-strings as structures the universe always will have the form A={0,1,,n1}A=\{0,1,\ldots,n-1\} and LsL_{s} contains a unary relation XAX\subseteq A interpreted as a bit-vector in {0,1}n\{0,1\}^{n} via X(i)=1iX,X(i)=0iX.X(i)=1\leftrightarrow i\in X,X(i)=0\leftrightarrow i\not\in X. In addition, for well known reasons we include a linear order <Ls<\in L_{s} in order to capture polynomial time computations below. Finally, as the only element in LfL_{f} we need a function real:Areal:A\mapsto{\mathbb{R}} which is able to change the type of an element in AA to become a real (like the cost operator in a programming language like C++):C_{++}): We define real(i):={1fori0,iA0fori=0Areal(i):=\left\{\begin{array}[]{ll}1\in{\mathbb{R}}&\mbox{for}\ i\neq 0,i\in A\\ 0\in{\mathbb{R}}&\mbox{for}\ i=0\in A\end{array}\right.

Definition 5

A discrete {\mathbb{R}}-structure 𝔇{\mathfrak{D}} is an {\mathbb{R}}-structure over vocabulary σ=(Ls,Lf),\sigma=(L_{s},L_{f}), where A={0,1,,n1}A=\{0,1,\ldots,n-1\} for some n,Lsn\in{\mathbb{N}},L_{s} contains at least a unary relation XX and a binary relation << interpreted as bit-string and linear order, respectively, and Lf={real},L_{f}=\{real\}, where real:Areal:A\mapsto{\mathbb{R}} is interpreted as above.

We denote by Struct0(σ){\rm Struct}_{{\mathbb{R}}}^{0}(\sigma) all discrete {\mathbb{R}}-structures with vocabulary σ.\sigma.

Note that below when we use existential second-order (so) logic, both << and realreal can be avoided by claiming their existence as functions from AA to {\mathbb{R}} using an existential quantifier together with a fo-formula.

Discrete {\mathbb{R}}-structures and logics on them provide the right framework to model BSS-computations on Boolean languages that do not use constants other than rational ones. Inputs being discrete and measured by their usual bit size, the used logics will transfer those inputs into the real number part of a discrete {\mathbb{R}}-structure so that computations are modelled therein, including the use of the algebraic unit cost measure. Let V={v0,v1,}V=\{v_{0},v_{1},\ldots\} denote a countable set of variables. The viv_{i} are supposed to be fo-variables ranging over the discrete universe of a discrete {\mathbb{R}}-structure.

Definition 6

Fix =(,0,1,+,,,/,sign,<).{\cal{R}}=({\mathbb{R}},0,1,+,-,\cdot,/,{\rm sign}\,,<). The language FO0{\rm FO}_{{\mathbb{R}}}^{0} contains, for each signature σ=(Ls,Lf),\sigma=(L_{s},L_{f}), a set of formulas and terms. Each term tt takes, when interpreted in some discrete {\mathbb{R}}-structure, values in either the skeleton, in which case we call it an index term, or in {\mathbb{R}}, in which case we call it a number term. Terms are defined inductively as follows

(i)

The set of index terms is the closure of the set VV of variables under applications of function symbols of LsL_{s}.

(ii)

Any rational number is a number term.

(iii)

If h1,,hkh_{1},\ldots,h_{k} are index terms and XX is a kk-ary function symbol of Lf,L_{f}, then X(h1,,hk)X(h_{1},\ldots,h_{k}) is a number term. In particular, for hh an index term, real(h)real(h) is a number term with value in {0,1}.\{0,1\}\subset{\mathbb{R}}.

(iv)

If t,tt,t^{\prime} are number terms, then so are t+tt+t^{\prime}, ttt-t^{\prime}, ttt\cdot t^{\prime}, and sign(t){\rm sign}\,(t). Here, the sign function is defined as sign(t):={1ift00ift<0.{\rm sign}\,(t):=\left\{\begin{array}[]{ll}1&\ \mbox{if}\ t\geq 0\\ 0&\ \mbox{if}\ t<0\end{array}\ .\right.

Atomic formulas are equalities h1=h2h_{1}=h_{2} of index terms, equalities t1=t2t_{1}=t_{2} and inequalities t1<t2,t1t2t_{1}<t_{2},t_{1}\leq t_{2} of number terms, and expressions P(h1,,hk),P(h_{1},\ldots,h_{k}), where PP is a kk-ary predicate symbol in LsL_{s} and h1,,hkh_{1},\ldots,h_{k} are index terms.

The set of formulas of FO0{\rm FO}_{{\mathbb{R}}}^{0} is the smallest set containing all atomic formulas and which is closed under Boolean connectives and quantification (v)ψ(\exists v)\psi and (v)ψ(\forall v)\psi.

Remark 1

Having a linear order available on AA it is folklore in finite model theory to define the first and the last element (denoted by 0 and n1n-1, respectively) of AA with respect to the order, as well as a linear order on every Ak,kA^{k},k\in{\mathbb{N}} by means of fo-formulas. This is tacitly used below.

In order to capture complexity class =BP(NP0){\exists{\mathbb{R}}}={\rm BP}({\rm NP}_{{\mathbb{R}}}^{0}) as well as BP(P0)(\mbox{P}_{{\mathbb{R}}}^{0}) we have to extend fo-logic to existential second-order logic and first order logic, respectively. This is done similarly as in [GraedelMeer] and the proofs showing that the resulting logics capture the intended classes is a nearby variation of the corresponding ones in the full BSS model. The only technical aspect to respect is that for discrete {\mathbb{R}}-structures and the logics used we cannot introduce arbitrary real constants. This is rather a restriction for fixed point logic than for existential so-logic since for the latter we can existentially quantify such real objects and then express their desired properties via a fo-formula. Since fixed point logic also needs to work with so-objects, we first define existential so logic.

Definition 7

Second-order logic SO0{\rm SO}_{{\mathbb{R}}}^{0} on discrete {\mathbb{R}}-structures is obtained starting from FO0{\rm FO}_{{\mathbb{R}}}^{0} logic by adding the possibility to quantify over function symbols. More precisely, given a vocabulary σ=(Ls,Lf),\sigma=(L_{s},L_{f}), where LfL_{f} contains a function symbol YY interpreted as a function from some AkA^{k}\to{\mathbb{R}}, together with a first-order formula ϕ\phi over σ\sigma, both Yϕ(Y)\exists Y\phi(Y) and Yϕ(Y)\forall Y\phi(Y) are second-order formulas. If all quantified function symbols are existentially quantified we get existential second-order logic SO0.\exists{\rm SO}_{{\mathbb{R}}}^{0}.

Example 1

We express the core problem of {\exists{\mathbb{R}}}, namely real solvability of an instance of QPS0 (Definition 1), as an existential so-property on suitable discrete {\mathbb{R}}-structures. Some (easy) technical aspects are only sketched. Consider as input instance a system of mm\in{\mathbb{N}} polynomials p1,,pm[x1,,xn]p_{1},\ldots,p_{m}\in{\mathbb{Z}}[x_{1},\ldots,x_{n}] in some nn\in{\mathbb{N}} real variables having integer coefficients. All pip_{i} are supposed to have degree at most 22 and the question is to decide whether there exists a common real zero. Recall that this is an {\exists{\mathbb{R}}}-complete problem. Rational coefficients for sake of easiness in the further description can be removed by multiplying all pip_{i} by the least common multiple of the denominators of their respective coefficients. We represent the system as follows as a discrete {\mathbb{R}}-structure 𝔇=(𝒜,,{real}),{\mathfrak{D}}=({\cal A},{\cal{R}},\{real\}), where 𝒜{\cal A} has the discrete set A={1,,n}×{1,,m}×{0,,L}A=\{1,\ldots,n\}\times\{1,\ldots,m\}\times\{0,\ldots,L\} as universe. Here, LL\in{\mathbb{N}} is an upper bound for the bit-size of the coefficients of all pI.p_{I}. The vocabulary LsL_{s} contains a linear ordering and a coefficient function C:A4{0,1}AC:A^{4}\mapsto\{0,1\}\subset A, where for i,j{1,,n},k{1,,m}i,j\in\{1,\ldots,n\},k\in\{1,\ldots,m\} and r{0,,L}r\in\{0,\ldots,L\} we interpret C(i,j,k,0)C(i,j,k,0) as sign of the coefficient of monomial xixjx_{i}x_{j} of pk;p_{k}; here C(i,j,k,0)=0AC(i,j,k,0)=0\in A codes sign 1-1 and C(i,j,k,0)=1AC(i,j,k,0)=1\in A codes sign 1.1. Furthermore, C(i,j,k,r)C(i,j,k,r) is the bit (as element in AA) of 2r12^{r-1} in the binary representation of the coefficient of xixjx_{i}x_{j} in pkp_{k}. Some technical comments are necessary. Formally, the above discrete part looks different from the definition of a discrete {\mathbb{R}}-structure. However, it is an easy task to change the above structure to one with a universe A~={0,1,,K1}\tilde{A}=\{0,1,\ldots,K-1\} for some KK\in{\mathbb{N}} and an X~A~\tilde{X}\subset\tilde{A} interpreted as bit-string coding the instance. Towards this aim, one has to use an additional relation coding the values n,mn,m and LL in A~.\tilde{A}. Using the linear order on A~\tilde{A} it is easy to express via fo-logic components representing variables, polynomials, and coefficients, respectively. Similarly, for a function C~:A~4{0,1}A~\tilde{C}:\tilde{A}^{4}\mapsto\{0,1\}\subset\tilde{A} it is easy to describe the correct arguments and their meaning using fo-logic to define C~\tilde{C} arbitrarily on arguments having no interpretation. The interested reader might try to elaborate this coding; for sake of readability we prefer to use the above coding instead.

In the existential second order part we now ask for the existence of three functions mapping some AkA^{k} to .{\mathbb{R}}. First, C:A4C_{{\mathbb{R}}}:A^{4}\mapsto{\mathbb{R}} should represent the coefficients as real numbers in order to use them in number terms for expressing the evaluation of the pkp_{k} in real arguments. This can be done using the following fo-formulas. Note that properties like i,j{1,,n},k{1,,m},r{0,,L}i,j\in\{1,\ldots,n\},k\in\{1,\ldots,m\},r\in\{0,\ldots,L\} can be expressed using the linear ordering; similarly, expressions like r+1r+1 can be defined to have the natural meaning.

First, the correct sign of a coefficient is expressed as

i,j{1,,n},k{1,,m}C(i,j,k,0)=0C(i,j,k,0)=1(as real number term)C(i,j,k,0)=1C(i,j,k,0)=1\begin{array}[]{rcl}\forall i,j\in\{1,\ldots,n\},k\in\{1,\ldots,m\}\ C(i,j,k,0)=0&\Leftrightarrow&C_{{\mathbb{R}}}(i,j,k,0)=-1\in{\mathbb{R}}\\ &&\hfill{(\mbox{as real number term})}\\ \wedge\ C(i,j,k,0)=1&\Leftrightarrow&C_{{\mathbb{R}}}(i,j,k,0)=1\in{\mathbb{R}}\end{array}

Next, i,j{1,,n},k{1,,m},r{1,,L1}\forall i,j\in\{1,\ldots,n\},k\in\{1,\ldots,m\},r\in\{1,\ldots,L-1\} fixing the highest bit as real and describing the real represented by bit vector C(i,j,k,)C(i,j,k,*) is done via

C(i,j,k,L)=real(C(i,j,k,L))andC(i,j,k,r)=C(i,j,k,r+1)2+real(C(i,j,k,r)),\begin{array}[]{l}C_{{\mathbb{R}}}(i,j,k,L)=real(C(i,j,k,L))\ \mbox{and}\\ C_{{\mathbb{R}}}(i,j,k,r)=C_{{\mathbb{R}}}(i,j,k,r+1)\cdot 2+real(C(i,j,k,r)),\end{array}

where of course 22 is a real number term for 1+11+1. This way C(i,j,k,1)C_{{\mathbb{R}}}(i,j,k,1) represents (as real) the absolute value of the coefficient of monomial xixjx_{i}\cdot x_{j} in pkp_{k}. Finally, we require for all i,j,k:C(i,j,k,L+1)=C(i,j,k,0)C(i,j,k,1)i,j,k:C_{{\mathbb{R}}}(i,j,k,L+1)=C_{{\mathbb{R}}}(i,j,k,0)\cdot C_{{\mathbb{R}}}(i,j,k,1) to get the correct sign.

Next, use Y:A\exists Y:A\mapsto{\mathbb{R}} in order to existentially quantify a potential common real zero (Y(1),,Y(n))(Y(1),\ldots,Y(n)) of all pk.p_{k}. Finally, we have to express the evaluation of all pkp_{k} in YY. However, this is easy and can be done similarly to the foregoing construction. Existentially quantify a function Z:A3Z:A^{3}\mapsto{\mathbb{R}} which represents the partial sums when evaluating all polynomials in YY. One component in the arguments of ZZ again addresses the respective polynomial to evaluate, the two others code xixj.x_{i}\cdot x_{j}. Since all pkp_{k} have degree at most 22, we need for every k{1,,m}k\in\{1,\ldots,m\} to cycle through {1,,n}2\{1,\ldots,n\}^{2}, and this can be expressed similarly to the computation of a coefficient from a binary representation above. The proceeding is the same as that in [GraedelMeer] for evaluating a single degree-4 polynomial.

A logical characterization of {\exists{\mathbb{R}}} now is possible in almost the same way as for NP{\rm NP}_{{\mathbb{R}}} in [GraedelMeer].

Theorem 3.1

Let (F,F+)(F,F^{+}) be a decision problem of discrete {\mathbb{R}}-structures, i.e., FF is a set of such structures, where instance structures are coded as strings in {0,1}\{0,1\}^{*} as explained above, and F+F.F^{+}\subset F. Then (F,F+)(F,F^{+})\in{\exists{\mathbb{R}}} if and only if there is an existential second-order sentence ψ\psi such that F+={𝔇F|𝔇ψ}.F^{+}=\{{\mathfrak{D}}\in F|{\mathfrak{D}}\models\psi\}.

Dealing with a logical characterization of BP(P0)({\rm P}_{{\mathbb{R}}}^{0}) this is not possible, the reason why at some places a bit more care for technical details is necessary. Nevertheless, this is at most tedious. The extension of FO0{}_{{\mathbb{R}}}^{0} to fixed point logic necessary in order to capture polynomial time in our setting once again was basically introduced already in [GraedelMeer], here we outline the technical differences due to the lack of arbitrary real constants. The only new technical demand in order to describe P0{\rm P}_{{\mathbb{R}}}^{0}-computations using a logic on discrete {\mathbb{R}}-structures is to change at certain places discrete data (i.e., objects formalized in the discrete part of an {\mathbb{R}}-structure) to real numbers. Suppose, for example, we use the given order on some AkA^{k} and express by FOR logic that t¯Ak\underline{t}\in A^{k} is the successor of s¯\underline{s} in this order, i.e., we have a formula saying t¯=s¯+1.\underline{t}=\underline{s}+1. We then often want to use the characteristic value χ[t¯=s¯+1]\chi[\underline{t}=\underline{s}+1] as real number. Formally, this can be expressed in our logics as follows: t¯=s¯+1\underline{t}=\underline{s}+1 is an abbreviation of a formula on the discrete part of an {\mathbb{R}}-structure. We can introduce a new discrete variable σ\sigma together with the fo-formula σt¯=s¯+1.\sigma\Leftrightarrow\underline{t}=\underline{s}+1. Now, real(σ)real(\sigma) is a number term expressing the truth value of t¯=s¯+1\underline{t}=\underline{s}+1 as real (!) number 0 or 11. We express this by writing real([χ[t¯=s¯+1]).real([\chi[\underline{t}=\underline{s}+1]). Similar constructions are used below and should be clear from the context.

We need the following definitions, compare [GraedelMeer]. In order to deal with partially defined functions from some AkA^{k}\to{\mathbb{R}}, enlarge {\mathbb{R}} by an element undefundef and extend the arithmetic operations via r+undef:=rundef:=undef,rundef:=r/undef:={0r=0undefr0r+undef:=r-undef:=undef,\\ r\cdot undef:=r/undef:=\left\{\begin{array}[]{cc}0&r=0\\ undef&r\neq 0\end{array}\right. and sgn(undef):=undef.sgn(undef):=undef. For a number term F(s¯,t¯)F(\underline{s},\underline{t}) with free first order variables s¯,t¯\underline{s},\underline{t}, the max\max operator maxs¯F(s¯,t¯)\max\limits_{\underline{s}}F(\underline{s},\underline{t}) is a number term with free variables t¯\underline{t} and obvious semantics. Below, we use max\max in order to cycle through some Ak.A^{k}. Typically, we want s¯\underline{s} to be the direct predecessor of t¯,\underline{t}, then express the characteristic value χ[t¯=s¯+1]\chi[\underline{t}=\underline{s}+1] via FO0{}^{0}_{{\mathbb{R}}}-logic, take the corresponding number term real(χ[t¯=s¯+1])real(\chi[\underline{t}=\underline{s}+1]) as explained above, and then identify s¯\underline{s} via maxs¯real(χ[t¯=s¯+1]).\max\limits_{\underline{s}}real(\chi[\underline{t}=\underline{s}+1]). That way, when a computation is in step s¯\underline{s} we can formalize the next step t¯.\underline{t}. In order to define fixed point logic on discrete {\mathbb{R}}-structures 𝔇=(Ls,,{real}){\mathfrak{D}}=(L_{s},{\cal R},\{real\}) let ZZ be a function symbol of arity rr interpreted on 𝔇{\mathfrak{D}} as function from ArA^{r}\to{\mathbb{R}} and let F(Z,x¯)F(Z,\underline{x}) be a number term in FO+0max{}^{0}_{{\mathbb{R}}}+\max logic on signature (Ls,{real,Z})(L_{s},\{real,Z\}) (i.e., the closure of FO0{}^{0}_{{\mathbb{R}}} logic under use of the max\max operator) with free first order variables x¯=(x1,,xr)Vr.\underline{x}=(x_{1},\ldots,x_{r})\in V^{r}.

Definition 8

The fixed point ZZ^{\infty} with respect to F(Z,x¯)F(Z,\underline{x}) is a function symbol of arity r.r. Its interpretation on a discrete {\mathbb{R}}-structure 𝔇{\mathfrak{D}} is defined iteratively as follows: Set Z(0)(x¯):=undefx¯ArZ^{(0)}(\underline{x}):=undef\ \forall\underline{x}\in A^{r} and for i:Z(i)(x¯):={Z(i1)(x¯)if it is defined alreadyF(Z(i1),x¯)ifZ(i1)(x¯)=undef.i\in{\mathbb{N}}:\\ Z^{(i)}(\underline{x}):=\left\{\begin{array}[]{rl}Z^{(i-1)}(\underline{x})&\mbox{if it is defined already}\\ F(Z^{(i-1)},\underline{x})&\mbox{if}\ Z^{(i-1)}(\underline{x})=undef\end{array}.\right.

After at most j|A|rj\leq|A|^{r} iterations this process becomes saturated, i.e., Z(j)=Z(j+1).Z^{(j)}=Z^{(j+1)}. This fixed point then is Z.Z^{\infty}.

Definition 9

Functional fixed-point logic FFP0{\rm FFP}_{{\mathbb{R}}}^{0} is obtained as closure of the set of first-order number terms under the maximization rule and the fixed-point rule. FP0{\rm FP}_{{\mathbb{R}}}^{0} denotes the class of characteristic functions definable in functional fixed-point logic.

Theorem 3.2

On ranked discrete {\mathbb{R}}-structures the functions in FFP0{\rm FFP}_{{\mathbb{R}}}^{0} are exactly those computable in polynomial time in the constant-free BSS model. In particular, the characteristic functions in FFP0{\rm FFP}_{{\mathbb{R}}}^{0} are those of polynomial time solvable decision problems in {0,1},\{0,1\}^{*}, i.e. FP0=BP(P0).{\rm FP}_{{\mathbb{R}}}^{0}={\rm BP}({\rm P}_{{\mathbb{R}}}^{0}).

We finally note that another approach to characterize a certain fragment of {\exists{\mathbb{R}}} by means of a so-called probabilistic independence logic was given in [Hannula].

4 A Ladner like theorem for NP and {\exists{\mathbb{R}}}

The next classical result which can be transformed relatively straightforwardly to {\exists{\mathbb{R}}} is Ladner’s theorem [Ladner] guaranteeing the existence of intermediate problems between P and the NP-complete ones. The range of the classical proof technique has been analyzed in [Schoening]. In relation with the BSS model of computation over uncountable structures the theorem has been shown in [MalajovichMeer] to hold as well over the complex numbers. Over {\mathbb{R}} it is open, but [BMM, ChapuisKoiran, Meer2012] give partial results. Especially, [BMM] addresses the importance of quantifier elimination QE algorithms when constructing intermediate problems. In the case of separating the class of {\exists{\mathbb{R}}}-complete problems from NP under the assumption NP{\exists{\mathbb{R}}}\neq{\rm NP} a combination of the arguments from [BMM, MalajovichMeer] works as well.

Theorem 4.1

Suppose NP.{\exists{\mathbb{R}}}\neq{\rm NP}. Then, there exists a problem in NP{\exists{\mathbb{R}}}\setminus{\rm NP} which is not {\exists{\mathbb{R}}}-complete.

For the rest of this section we outline the proof idea of how to construct such a problem. Technical details then easily can be filled following the presentations in [BMM, MalajovichMeer]. Our construction starts from the {\exists{\mathbb{R}}}-complete problem QPS0{\rm QPS}^{0} of Definition 1. As mentioned before, the NP{\rm NP}_{{\mathbb{R}}}-completeness proof of the corresponding problem for the class NP{\rm NP}_{{\mathbb{R}}} in [BSS] shows as well completeness of QPS0{\rm QPS}^{0} in {\exists{\mathbb{R}}} since given an NP0{\rm NP}_{{\mathbb{R}}}^{0}-machine the reduction to the full QPS\rm QPS problem, i.e., where polynomials are allowed to have real coefficients as well, does not introduce real constants and runs in polynomial time also in the Turing model; intermediate results can be subsumed under real existential quantification.222Note that guessing a real solution might lead to real intermediate results; they can be existentially quantified in {\exists{\mathbb{R}}} in the reduction proof.

The main reasons why a proof of Theorem 4.1 can be done similarly to showing related results are the decidability of {\exists{\mathbb{R}}} within a computable time bound in the Turing model due to real quantifier elimination, and effective countability of NP-machines together with polynomial time bounds. Starting from QPS0{\rm QPS}^{0} we build certain restricted languages L(a)L(a) depending on strictly increasing sequences (a):=(ai)i(a):=(a_{i})_{i\in{\mathbb{N}}} of natural numbers. For input dimensions n{a2i1,,a2i1}n\in\{a_{2i-1},\ldots,a_{2i}-1\} we let L(a)L(a) be the QPS0{\rm QPS}^{0} problem, for the remaining input dimensions L(a)L(a) equals the empty set. The strategy now is to define two such sequences (a),(b)(a),(b)\in{\mathbb{N}}^{{\mathbb{N}}} so that both have the desired properties. We need two sequences in order to guarantee non-completeness.

Definition 10 (cf. [MalajovichMeer])

Let (a),(b)(a),(b)\in{\mathbb{N}}^{{\mathbb{N}}} be two sequences of natural numbers.

a)  The sequences have an exponential gap iff both are strictly increasing and for all ii\in{\mathbb{N}} satisfy a2i+12b2ia_{2i+1}\geq 2^{b_{2i}} as well as b2i+12a2i+2,b_{2i+1}\geq 2^{a_{2i+2}},i.e., a1<a2<2a2b1<b2<2b2a3.a_{1}<a_{2}<2^{a_{2}}\leq b_{1}<b_{2}<2^{b_{2}}\leq a_{3}\ldots.

b) The decision problem L(a)L(a) (and L(b)L(b) similarly) is defined dimension-wise for inputs of size nn as follows:

L(a){0,1}n:={QPS0{0,1}nifis.t.a2i1n<a2iotherwise,L(a)\cap\{0,1\}^{n}:=\left\{\begin{array}[]{cl}{\rm QPS}^{0}\cap\{0,1\}^{n}&\mbox{if}\ \exists i\in{\mathbb{N}}\ \mbox{s.t.}\ a_{2i-1}\leq n<a_{2i}\\ \emptyset&\mbox{otherwise}\end{array},\right.

Since {\exists{\mathbb{R}}}-completeness is defined downward from QPS0{\rm QPS}^{0} by usual polynomial time reductions, it is easy to see that assuming NP{\exists{\mathbb{R}}}\neq{\rm NP} neither L(a)L(a) nor L(b)L(b) can be {\exists{\mathbb{R}}}-complete if (a)(a) and (b)(b) have an exponential gap.

Lemma 1

Suppose NP{\exists{\mathbb{R}}}\neq{\rm NP} and let sequences (a),(b)(a),(b) have an exponential gap. Suppose furthermore that L(a),L(b)L(a),L(b) belong to NP.{\exists{\mathbb{R}}}\setminus{\rm NP}. Then both are not {\exists{\mathbb{R}}}-complete.