betaFeedback

WorksMathematics

Existential–universal real sentences in the counting hierarchy

Abstract

We prove that the existential theory of the reals lies in the counting hierarchy. More generally, we show that the truth of existential–universal sentences over the reals can be decided in a fixed level of the counting hierarchy, even when the integer polynomials are given by arithmetic circuits.

Introduction

A sentence with one existential and one universal real block asks whether there is a real tuple for which every real tuple in a second block satisfies specified polynomial conditions. We study the discrete language ∃∀Rcirc\exists\forall\mathbb{R}_{\mathrm{circ}} of true sentences

∃x∈Rr ∀y∈Rs:Φ(x,y).(1)\exists x \in\mathbb{R}^{r}\ \forall y \in\mathbb{R}^{s} : \Phi(x,y). \tag*{(1)}

Here r,s≥0r,s \ge0 are represented by explicit lists of variables, and Φ\Phi is an explicitly encoded Boolean formula using AND, OR, and NOT over atoms p=0p=0 and p>0p>0. Each pp is given by an explicitly listed acyclic arithmetic circuit with signed binary integer constants and gates ++, −-, ×\times. Predecessor indices specify the gates; sharing is allowed, and there are no division or exponentiation gates. All operations and comparisons in (1) are interpreted exactly. The input length NN is the total binary encoding length, and malformed encodings are rejected.

All computational bounds below are uniform bit-time bounds. Let PP denote polynomial-time probabilistic computation with fair random bits, accepting exactly the yes-instances with probability greater than 1/21/2. The counting hierarchy, introduced by Wagner [16], is defined by

C0P=P,Cj+1P=⋃A∈CjPPPA,CH=⋃j≥0CjP.\mathrm{C}_{0}\mathrm{P}=\mathrm{P}, \qquad\mathrm{C}_{j+1}\mathrm{P}=\bigcup_{A\in\mathrm{C}_{j}\mathrm{P}}\mathrm{PP}^{A}, \qquad\mathrm{CH}=\bigcup_{j\ge0}\mathrm{C}_{j}\mathrm{P}.

Membership uses a fixed oracle language and a fixed uniform machine.

Theorem 1.1. There is an absolute integer jj such that

∃∀Rcirc∈CjP.\exists\forall\mathbb{R}_{\mathrm{circ}} \in\mathrm{C}_{j}\mathrm{P}.

The level jj is independent of the input length, the numbers of variables, the degrees of the circuit polynomials, and their coefficient magnitudes.

The existential theory of the reals, denoted ETR, is the same decision problem with only the existential block. Write ∃R\exists\mathbb{R} for the class of languages polynomial-time many-one reducible to ETR. Finer accounting for this fragment gives ETR∈C26P\mathrm{ETR} \in\mathrm{C}_{26}\mathrm{P} and hence ∃R⊆C26P\exists\mathbb{R} \subseteq\mathrm{C}_{26}\mathrm{P}; Theorem A.1 proves this explicit bound. The main result allows a universal block of unrestricted dimension as well.

History and significance

Tarski proved decidability of the first-order theory of real closed fields [15]. Collins’s cylindrical algebraic decomposition gave a geometric method for eliminating quantifiers [8], and Canny established the polynomial-space upper bound for the existential fragment [6]. For each fixed number of real quantifier blocks, Renegar’s decision bounds yield a polynomial-space algorithm [10]. This applies to the circuit encoding above: the quartic reduction in Lemma 6.1 preserves the two quantifier blocks. Our theorem places this two-block language in a fixed level of the counting hierarchy. Real quantifier hierarchies distinguish the number and order of blocks; Schaefer and Štefankovič develop their finite-encoding formulation [11]. The existential class already captures many geometric realization and continuous feasibility problems; Schaefer, Cardinal, and Miltzow survey these connections [12].

The counting hierarchy gives a way to decide some exact algebraic questions without constructing their enormous intermediate integers. Allender, Bürgisser, Kjeldgaard-Pedersen, and Miltersen proved that PosSLP—positivity of the integer output of a division-free straight-line program—belongs to CH [1]. Their modular-product and approximate Chinese-remainder techniques are the counting tools behind our treatment of implicit polynomial families. Every fixed counting level lies in PSPACE: a depth-first simulation enumerates random choices and answers the fixed-depth oracle queries using polynomial space.

Recent counting-hierarchy bounds address other polynomial feasibility problems. Andrews, Garg, and Schost place Hilbert’s Nullstellensatz over Q\mathbb{Q} and several other fields in CH [2]; the common zeros there lie in an algebraic closure. Balaji, Shirmohammadi, Tavenas, and Worrell prove counting-hierarchy bounds for approximate polynomial satisfiability over Q\mathbb{Q} and finite fields [3], where the question is membership of zero in the Zariski closure of a polynomial image over the algebraic closure. Exact real quantification must also control the reality of solutions, their attainment, and the dependence of a quantified fiber on its parameters. These are the issues addressed by the argument here.

Our algebraic tools belong to the critical-point and deformation methods of real algebraic geometry [4]. Multiplication determinants are evaluated through the classical relation between residues and traces [7, 13]. We prove the needed identities and computational rules directly, including their behavior under parameter specialization. These computational rules apply to implicitly represented families that need not have short coefficient lists or arithmetic circuits.

From quantified fibers to short algebraic witnesses

Fix the existential tuple xx. Introducing gate and auxiliary variables turns failure of Φ(x,y)\Phi(x,y) into a real zero of a nonnegative quartic F(x,z)F(x,z), where zz includes yy and the auxiliaries. Thus we seek an xx for which the fiber F(x,⋅)F(x,\cdot) has no real zero. Call such an xx good. Merely testing fibers does not provide a finite description of a good parameter. The main geometric argument produces such descriptions.

For u≥0u \ge0, consider the minimum

mx(u)=min⁡z∈Rn(∑i=1nzi6+6uF(x,z)).m_x(u)=\min_{z\in\mathbb{R}^n}\left(\sum_{i=1}^{n}z_i^6+6uF(x,z)\right).

The sixth powers keep bounded sublevel sets compact. It follows that mx(u)m_x(u) remains bounded as u→∞u\to\infty precisely when the fiber has a zero. At a minimizing point the critical equations have pure fifth powers as their leading terms. Their quotient algebra has dimension D=5nD=5^n, and multiplication by the minimized polynomial has a monic characteristic polynomial Q(x,u,Y)Q(x,u,Y) satisfying Q(x,u,mx(u))=0Q(x,u,m_x(u))=0.

This identity supplies a uniform growth test: xx is good precisely when mx(vD+1)>vm_x(v^{D+1})>v for all sufficiently large vv. Form

E(x,v)=Q(x,vD+1,v).E(x,v)=Q(x,v^{D+1},v).

The coefficient of vDv^D is always 1, so E(x,⋅)E(x,\cdot) is never zero. Partition parameter space into the sets on which E(x,⋅)E(x,\cdot) has each possible degree. On each such degree piece, polynomial root bounds give a locally uniform threshold beyond which EE does not vanish. Continuity of the minimum then makes goodness locally constant on that piece. Introducing the reciprocal of its leading coefficient realizes the piece as a closed algebraic set. Both the good and nongood parts of this lift are closed.

A second minimization argument now extracts candidate coordinates. Choose a compact sublevel set of a coercive polynomial with a good point in its interior. Within this set, the good and nongood parts of the lift are separated. Minimize the coercive polynomial plus a growing nonnegative polynomial penalty that vanishes exactly on the lift, restricting to a compact neighborhood that avoids the nongood part. A subsequence of minimizers converges to a good point and is eventually interior to the neighborhood, so these minimizers satisfy the unconstrained critical equations. The highest parameter coefficients of their coordinate characteristic polynomials therefore vanish at the limit coordinates. This produces finitely indexed univariate polynomial families whose roots contain the coordinates of a suitable witness, without computing the good part or its connected components. Section 6 proves this geometric construction and completes the main theorem.

Two computational ingredients make these candidate coordinates usable. First, all polynomials just described have degree and logarithmic coefficient bounds with polynomial-length binary encodings, and their finite-field evaluations lie at fixed counting levels. We call such families controlled. Sections 2 and 3 establish their closure rules and the evaluation of multiplication determinants without constructing the matrices.

Second, a chosen real root needs a short description even when its polynomial has exponential degree. Derivative signs distinguish real roots, as in Thom encodings [4], but the full sign string can be too long. Section 4 compresses that string to a weighted integer sum with weights computed modulo a short prime, and realizes the resulting label by a polynomial positivity test. Every desired real root can be isolated, including a root of a polynomial with multiplicities. The sign approximation uses geometric products of the type studied by Beigel, Reingold, and Spielman [5]. This arbitrary-root labeling rule and the coordinate construction are reusable ingredients of the proof.

Finally, Section 5 proves an existential decision procedure for controlled families. For a guessed coordinate description, we use it twice: the described parameter set must be nonempty, and it must contain no parameter with a zero of FF. A suitable choice of root labels singles out the good point constructed above. All choices have polynomial total bit length, and all family constructions have fixed depth. Counting over these choices therefore gives one fixed level of the hierarchy.

Counting and controlled polynomial families

The polynomials used below can have exponentially large degrees and coefficients with exponentially many bits. Their full expansions are therefore unsuitable as algorithmic data. We retain instead three pieces of information: a degree bound, a coefficient-norm bound, and a procedure for evaluation modulo a prime. This section develops the counting operations that preserve this description and recover the sign of an integer from it. The modular-product and approximate Chinese-remainder methods follow the arithmetic approach of Allender et al. [1]; we prove the forms, including the oracle bounds, that we need.

Uniformity and counting

Recall that C0P=P\mathrm{C}_{0}\mathrm{P} = \mathrm{P} and Ca+1P=⋃A∈CaPPPA\mathrm{C}_{a+1}\mathrm{P} = \bigcup_{A \in\mathrm{C}_{a}\mathrm{P}} \mathrm{PP}^{A}. Put

Fa=⋃A∈CaPFPA.\mathrm{F}_{a} = \bigcup_{A \in\mathrm{C}_{a}\mathrm{P}} \mathrm{FP}^{A}.

A function in Fa\mathrm{F}_{a} has polynomially bounded output length and is computed in polynomial bit time with one fixed oracle in CaP\mathrm{C}_{a}\mathrm{P}. We call a function available if it belongs to Fa\mathrm{F}_{a} for some fixed aa. A decision made by such a function belongs to Ca+1P\mathrm{C}_{a+1}\mathrm{P}: a probabilistic oracle machine can perform the same computation and ignore its random bits.

The levels CaP\mathrm{C}_{a}\mathrm{P} are increasing and are closed under finite tagged unions. For the second assertion, induct on aa, select the machine indicated by the tag, and replace its oracle by the tagged union of the finitely many lower-level oracles. Padding with unused random bits gives one polynomial random-bit bound. Consequently, polynomial-time computation using any fixed finite collection of available functions again gives an available function. This observation permits adaptive calls; it makes no assertion that adaptive access to PP collapses to PP.

An integer or index is called short if its binary encoding has length bounded by a fixed polynomial in the relevant input length. For a tuple, this means its total encoding length. A short integer may have exponentially large value. Every index range below has a fixed polynomial encoding bound, and every machine is fixed independently of the input. All algorithms are total: length and range checks prevent invalid accesses, and undefined arithmetic operations receive fixed defaults. Their asserted algebraic guarantees apply on the specified domains.

Lemma 2.1 (Counting and summation). Fix a≥0a \ge0. Let b(w)b(w) and s(w)s(w) be polynomially bounded nonnegative integers computable in polynomial time. If A(w,i)A(w,i), for i∈{0,1}b(w)i \in\{0,1\}^{b(w)}, is a predicate computable in Fa\mathrm{F}_a, then

C(w)=#{i∈{0,1}b(w):A(w,i)}C(w)=\#\{i\in\{0,1\}^{b(w)}:A(w,i)\}

is in Fa+1\mathrm{F}_{a+1}. Existential and universal quantification over these indices are also in Fa+1\mathrm{F}_{a+1}. If f(w,i)f(w,i) is in Fa\mathrm{F}_a and 0≤f(w,i)<2s(w)0\le f(w,i)<2^{s(w)}, then ∑if(w,i)\sum_i f(w,i) is in Fa+1\mathrm{F}_{a+1}. The same conclusion holds for sums modulo a positive short integer.

Proof. Write b=b(w)b=b(w). To test C(w)>tC(w)>t for 0≤t≤2b0\le t\le2^b, use one fair choice bit and bb further random bits. On the first choice accept exactly when A(w,i)A(w,i) holds; on the second accept on exactly 2b−t2^b-t of the bb-bit strings. There are

C(w)+2b−tC(w)+2^b-t

accepting choices, a strict majority precisely when C(w)>tC(w)>t. The computation of AA is polynomial time with a fixed FaP\mathrm{F}_a\mathrm{P} oracle, so the threshold language lies in Fa+1P\mathrm{F}_{a+1}\mathrm{P}. Binary search recovers C(w)C(w), whose encoding uses at most b+1b+1 bits. Unused random bits can pad this machine to a fixed polynomial bound without changing its majority test.

The two quantified predicates follow by comparing the count with 00 or 2b2^b. For summation, count pairs (i,j)(i,j) with j∈{0,1}s(w)j\in\{0,1\}^{s(w)} and j<f(w,i)j<f(w,i). The resulting integer has at most b+s(w)+1b+s(w)+1 bits. Reduction modulo a short modulus takes polynomial bit time. Restrictions on the indices may be included in the predicate or implemented by zero summands.

A sum over a tuple of indices uses one application of Lemma 2.1, as long as the tuple has polynomial total length. In particular, the number of counting levels does not grow with the number of coordinates in a grid.

Lemma 2.2 (Products in a finite field). Fix a≥0a\ge0. Let pp be a prime of polynomial bit length and let b(w)b(w) be polynomially bounded and computable in polynomial time. Suppose f(w,p,i)∈Fpf(w,p,i)\in\mathbb{F}_p, for i∈{0,1}b(w)i\in\{0,1\}^{b(w)}, is computable in Fa\mathrm{F}_a. Then

∏i∈{0,1}b(w)f(w,p,i)(modp)\prod_{i\in\{0,1\}^{b(w)}} f(w,p,i)\pmod p

is computable in Fa+4\mathrm{F}_{a+4}. A restricted index range can be used by assigning factor 11 outside it. The algorithm can be made total, with a fixed default when pp is not prime.

Proof. Primality can be tested in F1\mathrm{F}_1 by quantifying over possible divisors. For prime pp, the multiplicative group Fp∗\mathbb{F}_p^* is cyclic. Here is the elementary argument. Let LL be the least common multiple of the element orders. For each prime power dividing LL, a power of some group element has exactly that prime-power order. The product of these elements has order LL, since the orders are pairwise coprime. Thus L≤p−1L\le p-1. Every nonzero field element is a root of zL−1z^L-1, so p−1≤Lp-1\le L by the polynomial root bound. Hence L=p−1L=p-1.

A nonzero γ∈Fp\gamma\in\mathbb{F}_p is a generator precisely when

γe≠1(modp)(1≤e≤p−2).\gamma^e\ne1\pmod p\qquad(1\le e\le p-2).

Each power is computable in polynomial bit time. By Lemma 2.1, the universal test is in F1\mathrm{F}_1. An existential search over a short interval of candidates, followed by binary search, therefore finds the least generator in F2\mathrm{F}_2. For p=2p=2 the displayed range is empty and γ=1\gamma=1.

First test whether any factor is zero, in which case the product is zero. Otherwise, each factor has a unique discrete logarithm ei∈{0,…,p−2}e_i \in\{0,\ldots,p-2\} satisfying

γei=f(w,p,i)(modp).\gamma^{e_i}=f(w,p,i)\pmod p.

Existential searches over intervals, again followed by binary search, recover eie_i in Fmax⁡(a,2)+1\mathrm{F}_{\max(a,2)+1}. Summation puts ∑iei\sum_i e_i in Fmax⁡(a,2)+2\mathrm{F}_{\max(a,2)+2}. This sum is short, since it is less than 2b(w)p2^{b(w)}p. Reduce it modulo p−1p-1 and raise γ\gamma to the resulting exponent. Since max⁡(a,2)+2≤a+4\max(a,2)+2\le a+4, all operations, including the zero test and primality check, fit the asserted level.

If a function receives pp as an additional input, its polynomial bounds may use ∣w∣+bitlength⁡(p)|w|+\operatorname{bitlength}(p). An application on a smaller input, however, must supply pp with length polynomial in that smaller input. We will distinguish such evaluation inputs from the data that describe the underlying polynomial family.

Polynomial families accessible by evaluation

Counting and finite-field products allow algebraic constructions without writing their coefficients. We now specify exactly what is retained about a polynomial, and prove that coefficient extraction and differentiation are compatible with this information. For an integer polynomial VV, write ∥V∥1\lVert V\rVert_1 for the sum of the absolute values of all its coefficients, in all its indeterminates.

Definition 2.3 (Controlled polynomial family). A family Vw∈Z[X1,…,Xn(w)]V_w\in\mathbb{Z}[X_1,\ldots,X_{n(w)}] is controlled if the following conditions hold.

(i) The number n(w)n(w) is polynomially bounded and computable in polynomial time.

(ii) Nonnegative short integers d(w)d(w), b(w)b(w), λ(w)\lambda(w) are computable in polynomial time and satisfy

deg⁡Vw≤d(w),∥Vw∥1≤2b(w).\deg V_w\le d(w),\qquad\lVert V_w\rVert_1\le2^{b(w)}.

The zero polynomial is permitted and satisfies every nonnegative degree bound.

(iii) For some fixed aa, evaluation

(w,p,z)⟼Vw(z) mod p,z∈Fpn(w),(w,p,z)\longmapsto V_w(z)\bmod p,\qquad z\in\mathbb{F}_p^{n(w)},

is in Fa\mathrm{F}_a on prime inputs p>λ(w)p>\lambda(w). Field elements are given by their least nonnegative binary representatives.

References

  1. [1]Eric Allender, Peter Bürgisser, Johan Kjeldgaard-Pedersen, and Peter Bro Miltersen. On the complexity of numerical analysis. SIAM Journal on Computing, 38(5): 1987–2006, 2009. doi: 10.1137/070697926.DOI
  2. [2]Robert Andrews, Abhijhav Garg, and Éric Schost. Hilbert’s Nullstellensatz is in the counting hierarchy. arXiv:2602.17904, 2026. URL https://arxiv.org/abs/2602.17904. To appear in FOCS 2026.
  3. [3]Nikhil Balaji, Mahsa Shirmohammadi, Sébastien Tavenas, and James Worrell. Approximate polynomial satisfiability is in the counting hierarchy. arXiv:2610.00644, 2026. URL https://arxiv.org/abs/2610.00644. Version 1, September 30, 2026.
  4. [4]Saugata Basu, Richard Pollack, and Marie-Françoise Roy. Algorithms in Real Algebraic Geometry, volume 10 of Algorithms and Computation in Mathematics. Springer, second edition, 2006. doi: 10.1007/3-540-33909-2.
  5. [5]Richard Beigel, Nick Reingold, and Daniel Spielman. PP is closed under intersection. Journal of Computer and System Sciences, 50(2):191–202, 1995. doi: 10.1006/jcss.1995.1017.DOI
  6. [6]John F. Canny. Some algebraic and geometric computations in PSPACE. In Proceedings of the Twentieth Annual ACM Symposium on Theory of Computing, pages 460–467. ACM, 1988. doi: 10.1145/62212.62257.DOI
  7. [7]Eduardo Cattani, Alicia Dickenstein, and Bernd Sturmfels. Computing multidimensional residues. In Laureano González-Vega and Tomás Recio, editors, Algorithms in Algebraic Geometry and Applications, volume 143 of Progress in Mathematics, pages 135–164. Birkhäuser, Basel, 1996. doi: 10.1007/978-3-0348-9104-2_8. URL https://arxiv.org/abs/alg-geom/9404011.
  8. [8]George E. Collins. Quantifier elimination for real closed fields by cylindrical algebraic decomposition. In H. Brakhage, editor, Automata Theory and Formal Languages, volume 33 of Lecture Notes in Computer Science, pages 134–183. Springer, 1975. doi: 10.1007/3-540-07407-4_17.DOI
  9. [9]Mohamed Elkadi and Bernard Mourrain. Symbolic-numeric methods for solving polynomial equations and applications. In Alicia Dickenstein and Ioannis Z. Emiris, editors, Solving Polynomial Equations: Foundations, Algorithms, and Applications, volume 14 of Algorithms and Computation in Mathematics, pages 125–168. Springer, 2005. doi: 10.1007/3-540-27357-3_3.DOI
  10. [10]James Renegar. On the computational complexity and geometry of the first-order theory of the reals. II. The general decision problem. Preliminaries for quantifier elimination. Journal of Symbolic Computation, 13(3):301–327, 1992. doi: 10.1016/S0747-7171(10)80004-5.DOI
  11. [11]Marcus Schaefer and Daniel Štefankovič. Beyond the existential theory of the reals. Theory of Computing Systems, 68(2):195–226, 2024. doi: 10.1007/s00224-023-10151-x. Revised version arXiv:2210.00571v6, March 3, 2025.DOI
  12. [12]Marcus Schaefer, Jean Cardinal, and Tillmann Miltzow. The existential theory of the reals as a complexity class: A compendium. In János Pach and Géza Tóth, editors, Courses in Discrete and Computational Geometry, volume 31 of Bolyai Society Mathematical Studies, pages 167–313. Springer, 2026. doi: 10.1007/978-3-032-10503-5_5.DOI
  13. [13]Günter Scheja and Uwe Storch. Über Spurfunktionen bei vollständigen Durchschnitten. Journal für die reine und angewandte Mathematik, 278/279:174–190, 1975. doi: 10.1515/crll.1975.278-279.174.DOI
  14. [14]Jacob T. Schwartz. Fast probabilistic algorithms for verification of polynomial identities. Journal of the ACM, 27(4):701–717, 1980. doi: 10.1145/322217.322225.DOI
  15. [15]Alfred Tarski. A Decision Method for Elementary Algebra and Geometry. University of California Press, Berkeley, second edition, 1951.
  16. [16]Klaus W. Wagner. The complexity of combinatorial problems with succinct input representation. Acta Informatica, 23(3):325–356, 1986. doi: 10.1007/BF00289117.DOI

Paper details

vlnc:W_u3gd7p5v
Version
v1 · latest
Published
License
LicenseRef-OpenAI-public
Usage

views · 16

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Mathematics

unreleased internal OpenAI model

View statement
Looking for related papers…
Contents