A complexity theory of constructible functions and sheaves
Abstract.
In this paper we introduce constructible analogs of the discrete complexity classes and of sequences of functions. The functions in the new definitions are constructible functions on or . We define a class of sequences of constructible functions that play a role analogous to that of in the more classical theory. The class analogous to is defined using Euler integration. We discuss several examples, develop a theory of completeness, and pose a conjecture analogous to the vs. conjecture in the classical case. In the second part of the paper we extend the notions of complexity classes to sequences of constructible sheaves over (or its one point compactification). We introduce a class of sequences of simple constructible sheaves, that could be seen as the sheaftheoretic analog of the BlumShubSmale class . We also define a hierarchy of complexity classes of sheaves mirroring the polynomial hierarchy, , in the BSS theory. We prove a singly exponential upper bound on the topological complexity of the sheaves in this hierarchy mirroring a similar result in the BSS setting. We obtain as a result an algorithm with singly exponential complexity for a sheaftheoretic variant of the real quantifier elimination problem. We pose the natural sheaftheoretic analogs of the classical vs. question, and also discuss a connection with Toda’s theorem from discrete complexity theory in the context of constructible sheaves. We also discuss possible generalizations of the questions in complexity theory related to separation of complexity classes to more general categories via sequences of adjoint pairs of functors.
Key words and phrases:
constructible functions, constructible sheaves, polynomial hierarchy, complexity classes, adjoint functors1991 Mathematics Subject Classification:
Primary 14P10, 14P25; Secondary 68W30Communicated by Teresa Krick and James Renegar.
Contents
1. Introduction
The vs. problem is considered a central problem in theoretical computer science. There have been several reformulations and generalizations of the classical discrete version of this problem. Most notably Blum, Shub and Smale [BSS89] generalized the vs. problem to arbitrary fields, and posed the conjecture that , and that . In another direction, Valiant [Valiant79, Valiant82, Valiant84] introduced a nonuniform function theoretic analog. Valiant’s definition concerned classes of functions as opposed to sets (see [Burgisserbook2] for results on the exact relationship between Valiant’s conjecture and the classical complexity questions between complexity classes of sets). The class and its variants, such as the class (see [Burgisserbook2] for many subtle details), are supposed to represent functions that are easy to compute and plays a role analogous to the role of class in the case of complexity classes of sets. While the class of functions, , was supposed to play a role analogous to that of the class of languages . Valiant’s theory leads to an elegant reduction of the question whether to a purely algebraic one – namely, whether the polynomial given by the permanent of an matrix (with indeterminate entries) can be expressed as the determinant of another (possibly polynomially larger) matrix whose entries are are linear combinations of the entries of the original matrix. Thus, the question of whether reduces to a purely mathematical question about polynomials and mathematical tools from representation theory and algebraic geometry can be made to bear on this subject (see [MS01, BLMW2011]).
The aim of this paper is to lay a foundation of studying complexity questions similar to the the various existing vs. type questions in a more geometric setting. Fundamentally, the question whether concerns the behavior under projections of sequences of sets (where each is constructible or semialgebraic, depending on whether the underlying field or respectively) whose membership is easy to test (that is admits a polynomialtime algorithm for testing whether a given point belongs to a set in the sequence). The conjecture that can then be understood as saying that there exists sequences admitting polynomialtime membership testing for which the sequence does not admit polynomial time membership testing, where is some nonnegative polynomial in . Notice that membership of a point in the image only records information about where the fiber is empty or not. However, in many geometric situations it is useful to know more. In fact, one would like to have a partition of the base space such that over a set in the partition the fibers maintains some invariant (which could be topological or algebrogeometric in nature). Instead of studying the complexity of just the image one would like to understand the complexity of this partition. Thus, in our view the main geometric objects whose complexity we study are no longer individual subsets of , but rather finite (constructible or semialgebraic) partitions. We then define natural notions of “pushforwards” of such partitions. The geometric analog of vs. problem then asks whether such a pushforward can increase (exponentially) the complexity of a sequence of partitions.
We develop this theory in two settings. In the first part of the paper we develop a geometric analog of the complexity classes and introduced by Valiant [Valiant79, Valiant82, Valiant84]. Recall that the classes and as defined by Valiant are nonuniform. The circuits or formulas whose sizes measure the complexity of functions are allowed to be different for different sizes of the input. Also recall that unlike in the classical theory the elements of the classes and are not languages but sequences of functions. In Valiant’s work the emphasis was on functions (for some field ). Since any function on can be expressed as a polynomial, it makes sense to consider only polynomial functions. In particular, characteristic functions of subsets of are also expressible as polynomials – and this provides a crucial link between the function viewpoint and the classical question about languages.
1.1. Complexity theory of constructible functions
We formulate a certain geometric analog of Valiant’s complexity classes. The first obstacle to overcome is that unlike in the classical (Boolean) case, when the underlying field is infinite (say or ), the characteristic function of a definable set (i.e., a constructible set in the case and a semialgebraic set in case ) is no longer expressible as a polynomial. But a class of functions that appears very naturally in the algebraic geometry over real and complex numbers are the so called constructible functions. We will see later that many discrete valued functions that appear in complexity theory including functions such as the characteristic functions of constructible as well as semialgebraic sets, ranks of matrices and higher dimensional tensors, topological invariants such as the Betti numbers or EulerPoincaré characteristics, local dimensions of semialgebraic sets are all examples of such functions. Constructible functions in the place of so called “counting” functions have already appeared in BSS style complexity theory over and . For example, in [BZ09] (respectively, [Basucomplextoda]) a real (respectively, complex) analog of Toda’s theorem of discrete complexity theory was obtained. The notion of counting the number of satisfying assignments of a Boolean equation was replaced in these papers by the problem of computing the Poincaré polynomial of a semialgebraic/constructible set (see also [BurgisserCucker06, BurgisserCuckersurvey]). A first goal of this paper is to build a (nonuniform) complexity theory for constructible functions over real as well as complex numbers that mirror Valiant’s theory in the discrete case.
The choice of constructible functions as a “good” class of functions is also motivated from another direction. First recall that in the case of languages, the languages in the class can be thought of as the images under projections of the languages in the class (see Section LABEL:subsec:recallPH for more precise definitions of these classes). For classes of functions such as the class , in order to define an analog of the class one needs a way of “pushing forward” a function under a projection. It is folklore that functions (or more generally maps) can be pulledback tautologically, but pushing forward requires some effort. The standard technique in mathematics is to define such a pushforward using “fiberwise integration”. In Valiant’s original definition of the class this pushforward was implemented by taking the sum of the function to be integrated over the Boolean cube . This operation is not very geometric and thus not completely satisfactory in a geometric setting. On the other hand integration against most normal measures (other than finite atomic ones such as the one used by Valiant in his definition) will not be computable exactly as the results will not be algebraic. It thus becomes a subtle problem to choose the right class of functions and the corresponding pushforward. It turns out that the class of constructible functions is particularly suited for this purpose, where a discrete notion of integration (with respect to additive invariants such as the EulerPoincaré characteristic) already exists. It makes sense now to put these together and develop an analog of Valiant theory for this class, which is what we begin to do in this paper. The complexity classes of constructible functions and their corresponding “ vs. ”type questions that will arise in these new models, should be considered as the “constructible” versions of the corresponding questions in Valiant’s theory. We define formally these new classes, prove the existence of certain “complete” sequences of functions, give some examples, and finally pose a “constructible” analog of the vs. question.
Constructible functions on produce a constructible or semialgebraic partition of . Pushforwards of constructible functions being themselves constructible also induce similar partitions. Note that the complexity of semialgebraic partitions defined by the constancy of some topological or algebraic invariant of the fibers of a map is not a new notion. Indeed, Hardt’s triviality theorem in semialgebraic geometry [Hardt] (see also [BCR, Theorem 9.3.2.]) implies the existence of such a partition where the topological invariant being preserved is the semialgebraic homeomorphism type of the fibers. Unfortunately, the best known upper bound on the complexity of the partition in Hardt’s theorem in terms of the number and degrees of the defining polynomials of the semialgebraic sets involved is doublyexponential, while the best lower bound known is singly exponential [BV06]. A doubly exponential lower bound on the complexity on the partition of the Hardt’s triviality theorem could be in principle a step towards proving a version of the “” problem (more precisely the conjecture that posed below). However, such a doubly exponential lower bound is considered unlikely. A singly exponential upper bound on the number of homotopy types of fibers of a semialgebraic map was proved in [BV06] . Even though a partition of the base space was not constructed explicitly in that paper, a singly exponential sized partition is implicit in the proof of the main theorem in that paper.
Another result in a similar direction that is worth mentioning here is a theorem on bounding the number of possible vectors of multiplicities (defined below) of the zeros of a polynomial system , in terms of the degrees of the ’s proved in [GrigorievVorobjov2000]. In this paper the authors prove a doubly exponential upper bound on the number of possible vectors of multiplicities of the zeros of (assuming that the system is zerodimensional) in terms of the degrees of the polynomials in . A vector of multiplicity , where each is the multiplicity of a unique zero of the system . In [Grigoriev2001], an explicit construction of a sequence of parametrized polynomial systems with a polynomially bounded straightline complexity is given that realizes a doubly exponential number (in the number of parameters) of multiplicity vectors. In the context of the current paper, this would imply that the partition of the base space (i.e the space of parameters) would need to have at least a doubly exponential number of elements in its partition, so as to maintain the constancy of the vector of multiplicities in the fibers over each element of the partition. This would prove a version of “” for our model – except that “multiplicity” is not an additive invariant, and many solutions having different vectors of multiplicities would have the same value of additive invariants (such as the generalized EulerPoincaré characteristic or the virtual Poincaré polynomial defined later in the paper in Sections 2.4.2 and 2.4.4 respectively). This shows that pushing forward of functions using fiberwise integration with respect to an additive invariant is a very important element of the theory developed in this paper.
1.2. Complexity theory of constructible sheaves
The second part of the paper has no analog in discrete complexity theory but is strongly motivated by the first part, and prior results on algorithmic complexity of various problems in semialgebraic geometry. One way that constructible functions appear in various applications is as the fiberwise EulerPoincaré characteristic of certain sheaves of complexes with bounded cohomology. The right generality to consider these objects – namely a bounded derived category of sheaves of modules, which are locally constant on each element of a semialgebraic partition of the ambient manifold into locally closed semialgebraic sets – lead naturally to the category of constructible sheaves. Constructible sheaves are a particularly simple kind of sheaves arising in algebraic geometry [SGA4] and have found many applications in mathematics (in the theory of linear systems of partial differential equations and microlocal analysis [KS], in the study of singularities that appear in linear differential equations with meromorphic coefficients [Delignereguliersingulier, Pham], study of local systems in algebraic geometry [DeligneSGA4half], intersection cohomology theory [Borel] amongst many others) but to our knowledge they have not been studied yet from the structural complexity point of view. Constructible functions have also being studied by many authors from different perspectives, such as [ParusinskiMccrory, CluckersEdmundo, CluckersLoeser]. Recently they have also found applications in more applied areas such as signal processing and data analysis [Ghrist2010], but to our knowledge they have not being studied from the point of view of complexity.
The category of constructible sheaves is closed under the so called “six operations of Grothendieck” – namely [SGA4] (see [Dimcasheaves, Theorem 4.1.5]). The closure under these operations is reminiscent of the closure of the class of semialgebraic sets under similar operations – namely, set theoretic operations, direct products, pullbacks and direct images under semialgebraic maps. Of this the closure under the last operation – that is the fact that the image of a semialgebraic set is also semialgebraic – is the most nontrivial property and corresponds to the TarskiSeidenberg principle (see for example, [BPRbook2, Chapter 2] for an exposition). The computational difficulty of this last operation – i.e., elimination of an existential block of quantifiers – is also at the heart of the vs. problem in the BSS theory [BSS89, BCSS98].
As mentioned above the category of constructible sheaves is closed under taking direct sums, tensor products and pullbacks. These should be considered as the “easy” operations. The statement analogous to the TarskiSeidenberg principle is the stability under taking direct images. These observations hint at a complexity theory of such sheaves that will subsume the ordinary set theoretic complexity classes as special cases. Starting with a properly defined class, , of “simple” sheaves, a conjectural hierarchy can be built up by taking successive direct images followed by truncations, tensor products etc. which resembles the polynomial hierarchy in the BSS model. The class corresponds roughly to the sequences of constructible sheaves for which there is a compatible stratification of each underlying ambient space (which we will assume to be spheres of various dimensions in this paper) which is singly exponential in size, and where point location can be accomplished in polynomial time (see Definition LABEL:def:sheafP below for a precise definition). In this paper we lay the foundations of such a theory. We give several examples and also prove a result on the topological complexity of sequences of sheaves belonging to such a hierarchy. Even though constructible sheaves can be defined over any fields – for the purposes of this paper we restrict ourselves to the field of real numbers.
One important unifying theme behind the two parts of this paper is a certain shift of viewpoint – from considering sequences of polynomial functions (as in Valiant’s model) or sequences of subsets of or as in the BSS notion of a “language” – to considering sequences of semialgebraic or constructible partitions of and compatible with a sequence constructible functions or sheaves. The goal is then to study how the “complexity” of such partitions increase under an appropriate pushforward operation giving rise to constructive analogs of question. This “pushforward” operation which corresponds to “summing fibers” in the Valiant model, and taking the image under projection in the BSS model – for us is defined geometrically as “Euler integration” in case of constructible functions, and taking the “higher direct images” in the case of constructible sheaves. The extra structure of a constructible functions or sheaves allow us to define this pushforward operation – while the complexities of these objects are measured in terms of the “complexity” of the underlying geometric partitions.
1.3. A functorial view of complexity questions and the role of adjoint functors
Another aspect of complexity theory that the sheaftheoretic point of view brings to the forefront (but which we do not explore in full generality in this paper) is the role of adjoint functors.
Recall that any map between sets and induces three functors
in the poset categories of their respective power sets . The functors are defined as follows. For all and ,
It is a wellknown observation (see for example, [Maclanebook, page 58, Theorem 2]) that is left adjoint to , and is left adjoint to , i.e., as functors between the poset categories .
The adjunctions defined above appear in complexity theory in the following guise. Let be either a finite field or the field of real or complex numbers. Suppose that is a sequence belonging to the complexity class , and let be the projection maps on the first coordinates. Then, the sequence is clearly also in . The question whether the sequences (respectively, ), belong to corresponds to the vs. (respectively, the vs. ) problem. Thus, basic questions in complexity theory can be posed as questions about sequences of functors and their adjoints.
Perhaps not surprisingly, adjoint pairs of functors appear as well in the sheaftheoretic version of complexity theory studied in this paper – in particular, the adjoint pairs , and (see Section 3.2 for precise definitions). The role of P is played by the class defined later (see Section LABEL:subsec:definePsheaves for definition), and we prove that it is stable under the left adjoint functor sequences and , where is an appropriate sequence of projection maps as above, and is any sequence of constructible sheaves belonging to the class (see Proposition LABEL:prop:stabilitysheafP below). The stability of under the two sequences of right adjoints of these functors, namely and , are left as open problems (see Conjecture LABEL:conj:main and Question LABEL:question:closureunderhom below), and we believe that stability does not hold in these cases. Indeed Conjecture LABEL:conj:main is a sheaftheoretic version of the usual P vs. NP, as well as the vs. coNP problem, in the classical theory.
Guided by the above examples, it is interesting to speculate whether one can define useful notions of “polynomially bounded complexity” for sequences of objects in more general categories and functor sequences. Once the notion of “complexity” and the class
of objects having “polynomial complexity” (i.e. the class P) are defined, one can ask,
given a sequence of functors that preserves the class , whether the sequences of its (left or right) adjoints (if they exist) also preserve the class P (and thus obtain categorical generalizations of the classical P vs. NP problem). All this suggests the interesting possibility of
categorification of complexity theory. We do not pursue these ideas further in the current paper.
The rest of the paper is organized as follows. In Section 2 we define new complexity classes of constructible functions, give some basic examples and pose a question analogous to the vs. conjecture in the discrete case. In Section 3, we extend these notions to the category of constructible sheaves. We begin by giving in Section 3.2 a brief introduction to the basic definitions and results of sheaf theory, especially those related to cohomology of sheaves, and derived category of complexes of sheaves with bounded cohomology, that we will need. The reader is referred to the books [KS, Dimcasheaves, Iversen, Borel, Schurmann] for the missing details. In Section LABEL:subsec:recallPH we recall the definitions of the main complexity classes in the classical BSS setting. In Section LABEL:subsec:definePsheaves we define the new sheaftheoretic complexity class . In Section LABEL:subsec:definePHsheaves, we extend the definition of to a hierarchy, , which mirrors the compact polynomial hierarchy . We also formulate the conjectures on separations of sheaftheoretic complexity classes analogous to the classical one and prove a relationship between these conjectures in Section LABEL:subsec:inclusions. In Section LABEL:sec:topologicalcomplexitysheaves, we prove a complexity result (Theorem LABEL:thm:topologicalcomplexitysheaves) bounding from above the topological complexity (see Definition LABEL:def:topologicalcomplexitysheaves below) of a sequence in the class . More precisely, we prove that the topological complexity of sheaves in is bounded singly exponentially, mirroring a similar result in the classical case. As a result we also obtain a singly exponential upper bound on the complexity of the “direct image functor” (Theorem LABEL:thm:effective) which is analogous to singly exponential upper bound results for effective quantifier elimination in the first order theory of the reals. This last result might be of interest independent of complexity theory because of its generality. Finally, in Section LABEL:sec:connectiontoToda, we revisit Toda’s theorem in the discrete as well as BSS setting, and conjecture a similar theorem in the sheaftheoretic setting.
2. Complexity theory of constructible functions
2.1. Main definitions
Our first goal is to develop a complexity theory for constructible functions on and in the style of Valiant’s algebraic complexity theory. In particular, we define in the case of real and complex numbers separately, and for each “additive” invariant on the classes of semialgebraic and constructible sets respectively (see Definition 2.25 below for the definition of additive invariants), two new complexity classes of sequences of such functions which should be considered as “constructible analogs” of the classes and defined by Valiant. Since our goal is to be as geometric as possible, the underlying geometric objects in these complexity classes are certain semialgebraic (respectively, constructible) partitions of (respectively, ). We formulate a series of conjectures (depending on the additive invariant that is chosen) that the class of partitions corresponding to the second class (namely the analog of ) is strictly larger than the class of partitions corresponding to the first (namely the analog of ). Since we are interesting in measuring complexity of partitions (induced by constructible functions) and not in the complexity of computing polynomials our approach in defining these classes is different from that of Valiant. Still, the definitions of the new classes which correspond to the Valiant’s class is very closely related to the original definition of Valiant. It is in the passage of going from the class to the potentially larger where our theory diverges and is hopefully more geometric. We also develop a theory of completeness parallel to Valiant’s theory and prove the existence of certain complete sequences of functions.
We begin with a few definitions and some notation.
Definition 2.1 (Constructible and semialgebraic sets).
A constructible subset of is a finite union of subsets of , each defined by a finite number of polynomial equations and inequations. A semialgebraic subset of is a finite union of subsets of , each defined by a finite number of polynomial equations and inequalities.
Remark 2.2.
Notice that by identifying with by separating the real and imaginary parts, any constructible subset of can be thought of as a semialgebraic subset of .
Definition 2.3 (The value algebra).
For , we say that a graded algebra is polynomially bounded if for each , is finite dimensional as a vector space, and the Hilbert function of , namely , is bounded by a polynomial in .
Remark 2.4.
In fact the only two graded algebras that will be important for us are the algebra itself (with the trivial grading), and the algebra of polynomials graded by degree.
Definition 2.5 (Constructible functions).
For , let denote a polynomially bounded graded algebra.
A function is said to be a valued constructible function if it is a linear combination of the characteristic functions of a finite number of constructible subsets of . Similarly, a function is said to be a valued constructible function if it is a linear combination of the characteristic functions of a finite number of semialgebraic subsets of .
For any semialgebraic or a constructible set , we will denote by the characteristic function of the set , which is a constructible function for any .
Notation 2.6.
Let be the field or , and let denote a polynomially bounded graded algebra. For any constructible function , we will denote by the finite partition of into the different level sets of . Note that these level sets are semialgebraic subsets of in the case (respectively, constructible subsets of in the case ). If are two finite partitions of , then we say is finer than (denoted ), if for every set belonging to the partition , there exists a (unique) set belonging to , with .
Remark 2.7.
Note that it is an immediate consequence of Definition 2.5 that a valued constructible function takes only a finite number of values in . Moreover, it is often the induced partition, , that is of geometric interest, and not the precise values that the function takes. Given two valued constructible functions , if and only if for all , . Notice that if , then there exists a function , such that . Moreover, in case , since takes only a finite number of values, by Lagrange interpolation formula, can be chosen to be a polynomial in , whose degree equals the number of distinct values taken by .
Remark 2.8.
Since the sum, product and constant multiples of constructible functions are again constructible, the set of constructible functions on (respectively, ) is an (infinitedimensional) algebra (respectively, algebra).
Example 2.9.
The constant function (respectively, ) as well as any multiple of it, are constructible.
Example 2.10 (Rank function on matrices and tensors).
The function (respectively, ) which evaluates to the rank of an matrix with entries in (respectively, ) is an example of valued (respectively, valued) constructible function. Similarly, the rank function of higher order tensors (see Definition 2.50 below) are also constructible.
We next define a notion of size of a formula defining a constructible function that will be used in defining different complexity classes. We first need some notation.
Notation 2.11.
For , we denote
For , we denote
Notation 2.12.
Let be a finite family. We call to be a sign condition on . Similarly, for a finite family , we call to be a zero pattern on . Given a sign condition and a semialgebraic subset , we denote by the semialgebraic set defined by
and call the realization of on .
Similarly, given a zero pattern and a constructible subset , we denote by the constructible set defined by
and call the realization of on . We say that a sign condition (respectively, zero pattern ) is realizable on a semialgebraic (respectively, constructible) set if (respectively, ).
More generally, for any first order formula with atoms of the form (respectively, ) we denote by (the realization of on ) the semialgebraic (respectively, constructible) set defined by
Given any polynomial (respectively, ), and a semialgebraic set (respectively, constructible subset ), we will denote by the set of zeros of in . More generally, for any finite family of polynomials (respectively, ) we will denote by the set of common zeros of in .
Definition 2.13 (Formulas defining constructible functions).
Let denote a polynomially bounded graded algebra. Formulas for valued constructible functions defined over are defined inductively as follows.

If , then are formulas defining the characteristic function of the semialgebraic sets respectively.

If are formulas defined over , and , then so are .
Formulas for constructible functions defined over are defined similarly. Let now denote a polynomially bounded graded algebra.

If , then are formulas defining the characteristic function of the constructible sets respectively.

If are formulas defined over , and , then so are .
We now define the size of a formula defining a constructible function. We begin by defining the size of a polynomial over and .
Definition 2.14 (Size of a polynomial ).
For (respectively, ), we define as the maximum of and the length of the smallest straightline program (see [Burgisserbook1, page 105, Definition 4.2] for definition) computing .
Remark 2.15.
In particular, note that is bounded by , and thus for any sequence of polynomials , such that the sequence is bounded by a polynomial in , we automatically have that the sequence is also bounded by the same polynomial.
We can now define a notion of size of a formula defining a constructible function.
Definition 2.16 (Size of a formula defining a constructible function).
Let (respectively, ) denote a polynomially bounded algebra (respectively, algebra). The size of a formula defining a valued (respectively, valued) constructible function is defined inductively as follows.

If (respectively, ), then
(respectively, ).

If are formulas defined over (respectively, ), then

if is a formula defined over (respectively, ), and (respectively, , then
Remark 2.17.
The last item in the above definition requires a remark. Note that if is a constructible function defined over , and , then . Since, it is the complexity of that is geometrically more meaningful, rather than the values taken by , we choose to ignore the cost of the last operation. It also makes the theory simpler in places.
2.2. Constructible analogs of
We now define sequences of constructible functions that will play a role similar to that of or in Valiant’s theory.
Definition 2.18 (The classes , ).
Let denote either the field or the field , and a polynomially bounded or algebra. Let be any nonnegative polynomial. We say that a sequence of valued constructible functions is in the class if for each there exists a formula defining the constructible function , and such that is bounded polynomially in .
Proposition 2.19.
Let denote either the field or the field . Let be any nonnegative polynomial. A sequence of constructible functions is in the class if for each there exists a formula defining the constructible function , such that is bounded polynomially in , and .
Proof.
Let be the field or . As an example of a sequence in the class we have the following. Recall that for , we denote by the function that maps an matrix to its rank.
Theorem 2.20.
The sequence of functions belongs to the class .
Proof.
Follows from the existence of efficient circuits for computing ranks of matrices [Mulmuley]. ∎
Another illustrative example of the power of this class is given by the following example.
Example 2.21.
Let be either the field or . For , let be the set of points of with exactly nonzero coordinates. Then the sequence of functions
belongs to the class . To see this observe that the constructible function
is defined by a formula of linear size, and clearly . Now apply Proposition 2.19.
A small modification of the above example shows that a sequence of constructible functions can belong to the class , even though grows exponentially.
Example 2.22.
Let be defined by
Then, clearly the sequence belongs to the class , but .
Remark 2.23.
Notice that our definition of the classes is very geometric, and it is the partitions induced by a sequence of functions that play the key role in this definition. Consider the following example. Let for each
and consider the following sequence of constructible functions defined by
Clearly, the sequence belongs to the class , and consists of singletons each containing a point in , as well as the set . It follows that for any sequence of subsets , the corresponding sequence of characteristic functions belongs to . Thus, membership in is not a good measure of tractability of Boolean functions.
2.3. Constructible analogs of
In this section we define the analogs of the Valiant complexity classes and . Before doing so we first need to introduce the Grothendieck rings, and , of semialgebraic and constructible sets, and additive (as well as multiplicative) invariants semialgebraic and constructible sets.
2.4. Grothendieck rings and additive invariants
Definition 2.24 (Grothendieck rings).
The Grothendieck ring of semialgebraic sets is defined as follows. The underlying additive group is generated by the classes , where is a semialgebraic set with the following relations:

if and are isomorphic as varieties;

for each closed subset of (in the Euclidean topology).
The multiplication operation is defined by
Similarly, the Grothendieck ring of complex algebraic varieties is defined as follows. The underlying additive group is generated by the classes , where is a complex algebraic variety, with the following relations:

if and are isomorphic as varieties;

for each closed subset of (in the Zariski topology).
The multiplication operation is defined by
We also need the notion of an additive invariant of classes of semialgebraic or constructible sets.
Definition 2.25 (Additive invariants of classes of semialgebraic or constructible sets).
Let and a algebra. Let if and if . We call a ring homomorphism to be additive invariant of the class of semialgebraic or constructible sets.
Given an additive invariant, there is a well defined notion of integrating a constructible function with respect to the invariant.
More precisely:
Definition 2.26 (Integration with respect to an additive invariant).
Let be either the field , or the field , and in case , and in case . Let be an additive invariant, and let be a valued constructible function defined by
where the ’s are semialgebraic sets in case and constructible sets if , and each . We define the integral of with respect to the additive invariant (following [Viroeuler, Schapira89, Schapira91]) to be
Remark 2.27.
The fact that the definition of is independent of the particular representation of the constructible function (which is far from being unique) is a classical fact [Viroeuler, Schapira89, Schapira91]. The integral defined above satisfies all the usual properties (of say the Lebesgue integral) such as additivity, Fubinitype theorem etc. [Viroeuler, Schapira89, Schapira91], and in particular can be used to define “pushforwards” of (constructible) functions via fiberwise integration.
We are now in a position to define the geometric analogs of Valiant’s classes and .
2.4.1. The classes
Let be the field (respectively, ), (respectively, ), a polynomially bounded graded algebra, and be an additive invariant.
Definition 2.28 (The class ).
Let be nonnegative polynomials with integer coefficients. We say that a sequence of constructible functions is in the class if there exists a sequence of constructible functions belonging to the class , and a nonnegative polynomial such that for each , , where is the valued constructible function defined by
(2.1) 
Here are two key examples.
2.4.2. The (generalized) EulerPoincaré characteristic of semialgebraic sets
Definition 2.29 (Generalized EulerPoincaré characteristic).
The generalized EulerPoincaré characteristic, , of a semialgebraic set is uniquely defined by the following properties [Dries, Chapter 4]:

is invariant under semialgebraic homeomorphisms.


is multiplicative, i.e., for any pair of semialgebraic sets .

is additive, i.e., for any pair of semialgebraic subsets .
Remark 2.30.
Note that the generalized EulerPoincaré characteristic is a homeomorphism (but not a homotopy) invariant. For a locally closed semialgebraic set ,
where is the the th cohomology group of with compact support (see Definition LABEL:def:cohomologycompactsupport). Thus, the definition agrees with the usual EulerPoincaré characteristic as an alternating sum of the Betti numbers for locally closed semialgebraic sets.
A few illustrative examples are given below.
Notation 2.31.
We denote by the open ball in of radius centered at the origin. We will denote by the open unit ball . Similarly, we denote by the sphere in of radius centered at the origin, and by the unit sphere .
Example 2.32.
For every ,
It is obvious from its definition that
Proposition 2.33.
The generalized EulerPoincaré characteristic is an additive invariant of the class of semialgebraic sets.
It was mentioned in the introduction that one difficulty in defining a pushforward of functions in the BSS model had to do with the impossibility of computing exactly integrals with respect to usual measures on (such as the Lebesgue measure), since such integrals could be transcendental numbers or might not converge. In contrast, we have the following effective upper bound on the complexity of computing integrals with respect to the generalized EulerPoincaré characteristic.
Theorem 2.34.
There exists an algorithm that takes as input a formula describing a constructible function , and computes
The complexity of the algorithm measured as the number of arithmetic operations over as well as comparisons is bounded singly exponentially in and the size of the formula .
Proof.
It is easy to verify using induction on the size of the formula , that there exists a family of polynomials , such that , as well as the degrees of the polynomials in , are bounded by . Moreover can be expressed as a linear combination of the characteristic functions of the realizations of the various sign conditions on . More precisely, there is an expression
where the . Moreover, the set of ’s can be computed from with complexity singly exponential in . From Definition 2.26 it follows that
It follows from the main result in [BPReulerpoincare] (see also [BPRbook2, Algorithm 13.5]) that the list
can be computed with complexity
Since, , the result follows. ∎
2.4.3. Uniform bounds on the generalized EulerPoincaré characteristic of semialgebraic sets
The following proposition giving a uniform bound on the generalized EulerPoincaré characteristic of semialgebraic sets will be useful later.
We first need a notation.
Notation 2.35.
Let be a finite set of polynomials. We say that a semialgebraic subset is a semialgebraic set, if is defined by a quantifierfree first order formula with atoms . We call a formula. We say that is a closed semialgebraic set, if is defined by a quantifierfree first order formula with no negations and atoms . We call a closed formula.
Similarly, if is a finite set of polynomials, we say that a constructible subset is a constructible set, if is defined by a quantifierfree first order formula with atoms .
Proposition 2.36.
Let be a finite set of polynomials, with , and . Let . Then,
More generally, let be any semialgebraic subset of . Then,
Remark 2.37.
In the proof of Proposition 2.36 we will need the following notation and result.
Notation 2.38.
If is a locally closed semialgebraic set then we denote
where (respectively, ) is the th cohomology group (respectively, the th cohomology group with compact support) of with coefficients in (see Definition LABEL:def:cohomologycompactsupport).
We denote
One important property of cohomology groups with compact supports is the following.
Theorem 2.39.
[Iversen, III.7, page 185] Let be a locally closed semialgebraic set and a closed subset and let . Then, there exists a long exact sequence
In particular,
(2.2) 
We are now ready to prove Proposition 2.36.
Proof of Proposition 2.36.
Let be a real number which will be chosen sufficiently large later.
It follows from Hardt’s triviality theorem (see [BCR, Theorem 9.3.2.]) that for all large enough , is semialgebraically homeomorphic to .
Hence, in particular since is a homeomorphism invariant,
(2.3) 
Let be the semialgebraic subset of defined by