Efficiently and Effectively Recognizing Toricity of Steady State Varieties

We consider the problem of testing whether the points in a complex or real variety with non-zero coordinates form a multiplicative group or, more generally, a coset of a multiplicative group. For the coset case, we study the notion of shifted toric varieties which generalizes the notion of toric varieties. This requires a geometric view on the varieties rather than an algebraic view on the ideals. We present algorithms and computations on 129 models from the BioModels repository testing for group and coset structures over both the complex numbers and the real numbers. Our methods over the complex numbers are based on Gröbner basis techniques and binomiality tests. Over the real numbers we use first-order characterizations and employ real quantifier elimination. In combination with suitable prime decompositions and restrictions to subspaces it turns out that almost all models show coset structure. Beyond our practical computations, we give upper bounds on the asymptotic worst-case complexity of the corresponding problems by proposing single exponential algorithms that test complex or real varieties for toricity or shifted toricity. In the positive case, these algorithms produce generating binomials. In addition, we propose an asymptotically fast algorithm for testing membership in a binomial variety over the algebraic closure of the rational numbers.


Introduction
We are interested in situations where the points with non-zero coordinates in a given complex or real variety form a multiplicative group or, more generally, a coset.We illustrate this by means of a simple example.For K ∈ {C, R}, (K * ) n denotes the direct power of the multiplicative group of the respective field.Consider a family of ideals with a rational parameter k.Let V k be the complex variety of I k , and let 1 forms a group, but V * −1 does not, because it does not contain (1,1).However, Over the reals, V * 1 ∩ (R * ) 2 is again a group, but V * −1 ∩ (R * ) 2 = ∅ is not a coset of any group.Consider now V 1 = V 11 ∪ V 12 , where V 11 and V 12 are given by x − y and x + y , respectively.Notice that V * 11 is itself a group, and V * 12 is a coset of V * 11 .Both V * 11 and V *   12 are irreducible because their generating ideals are prime.Under the additional condition of irreducibility V * 11 forms a torus and V * 12 forms a shifted torus.We then call the varieties V 11 and V 12 toric and shifted toric, respectively.
Toric varieties are well established and have an important role in algebraic geometry [32,24].However, our principal motivation to study generalizations of toricity comes from the sciences, specifically chemical reaction networks such as the following: Assuming, e.g., mass action kinetics [66] one can derive a system of autonomous ordinary differential equations describing the development of concentrations of the species A and B as functions of time [29,Section 2.1.2].For the given reaction network one obtains a polynomial vector field generating exactly our ideals I k in (1).Our methods thus detect whether equilibrium points with non-zero coordinates form a group or a coset.
Detecting toricity of a variety in general, and of the steady state varieties of chemical reaction networks in particular, is a difficult problem [7].The first issue in this regard is finding suitable notions to describe the structure of the steady states.Existing work typically addresses algebraic properties of the steady state ideal, e.g., the existence of binomial Gröbner bases.In this article, in contrast, we take a geometric approach, focusing on varieties rather than ideals.We propose to study toricity and shifted toricity of varieties V over K ∈ {C, R}, which for irreducible varieties coincides with V ∩ (K * ) n forming a multiplicative group or coset, respectively.It is noteworthy that chemical reaction network theory generally takes place in the interior of the first orthant of R n , i.e., all species concentrations and reaction rates are assumed to be strictly positive [29].Our considering (C * ) n in contrast to C n is a first step in this direction, considering also (R * ) n is another step.
Toric dynamical systems have been studied by Feinberg [27] and by Horn and Jackson [44].Craciun et al. [17] showed that toric dynamical systems correspond to complex balancing [29].Our generalized notions of toricity are inspired by Grigoriev and Milman's work on binomial varieties [40].There are further definitions in the literature, where the use of the term "toric" is well motivated.Gatermann et al. considered deformed toricity for steady state ideals [33].The exact relation between the principle of complex balancing and various definitions of toricity has obtained considerable attention in the last years [55,34,51].
Complex balancing itself generalizes detailed balancing, which has widely been used in the context of chemical reaction networks [28,29,44].Gorban et al. [36,35] related reversibility of chemical reactions in detailed balance to binomiality of the corresponding varieties.Historically, the principle of detailed balancing has attracted considerable attention in the sciences.It was used by Boltzmann in 1872 in order to prove his H-theorem [4], by Einstein in 1916 for his quantum theory of emission and absorption of radiation [23], and by Wegscheider [68] and Onsager [53] in the context of chemical kinetics, which lead to Onsager's Nobel prize in Chemistry in 1968.Pérez-Millán et al. [55] consider steady state ideals with binomial generators.They present a sufficient linear algebra condition on the stoichiometry matrix of a chemical reaction network in order to test whether the steady state ideal has binomial generators.Conradi and Kahle proposed a corresponding heuristic algorithm.They furthermore showed that the sufficient condition is even equivalent when the ideal is homogenous [15,47,46].Based on the above-mentioned linear algebra condition, MESSI systems have been introduced in [54].Recently, binomiality of steady state ideals was used to infer network structure of chemical reaction networks out of measurement data [67].
Besides its scientific adequacy as a generalization of complex balancing there are practical motivations for studying toricity.Relevant models are typically quite large.For instance, with our comprehensive computations in this article we will encounter systems up to 90 polynomials in dimension 71.This potentially takes symbolic computation to its limits.A possible approach to overcome this is to discover systematic occurrences of certain structural properties in the input, and to exploit those structural properties towards more efficient algorithms.From this point of view, toricity and shifted toricity are interesting concepts because tools from toric geometry can be used as a complexity reduction step in the multistationarity problem.Grigoriev and Weber [41] gave a complexity analysis for solving binomial varieties, based on the computation of Smith normal forms.More interestingly, toric and shifted toric models are known to have scale invariant multistationarity in the space of linear conserved quantities, which further reduces the dimension of the multistationarity problem [14].
Our original contributions in this article are the following.Interested in the geometric structure of real and complex varieties V rather than the algebraic structure of the corresponding ideals, we study primarily V * = V ∩ (K * ) n .We call V shifted toric when V is irreducible and V * is a coset.This generalizes the notion of toric varieties V for groups V * .Within this setting, we have two principal results: • Relating our novel geometric view to the established algebraic view, we give a characterization in terms of Gröbner bases for V * to be a group or coset.(Proposition 7).
• We show that Zariski closures of groups in (C * ) n are binomial varieties (Proposition 6).The converse had been shown in [40].
We propose practical algorithms testing for given polynomial systems F whether their varieties contain group or coset structures.
• We consider over the complex numbers V (F ) * (Algorithm 1) and V (P i ) * for prime components P i of F (Algorithm 3).
• We consider the same over the real numbers, V (F ) * (Algorithm 4) and V (P i ) * (Algorithm 6).
• With prime decomposition we find that for up to 98% of the prime components V K (P i ) * is either empty or a coset.
Our algorithms are implemented in Maple1 and Reduce2 [43,42] and systematically applied to the steady state varieties of 129 models from the BioModels repository3 .Our objective was to build on robust, off-the-shelf software, which has a chance to be accepted by scientific communities outside symbolic computation in the foreseeable future.As a consequence, our proposed algorithms must rely on existing implementations.Over C we use Gröbner bases [8,25,26], and over R we use real quantifier elimination techniques.
Gröbner bases and real quantifier elimination mentioned above come with high intrinsic complexity.The former are complete for exponential space [50].The latter are double exponential [18,38,69].From a more theoretical point of view we study the intrinsic complexity of the problems actually addressed.We follow Chistov-Grigoriev's complexity results for first-order quantifier elimination over algebraically closed fields [11], the algorithm constructing irreducible components of a variety [11,37] and Grigoriev-Vorobjov's algorithm for solving polynomial system of inequalities [39].These results are used to propose an algorithm to test within single exponential complexity bounds whether: • a given complex variety is toric or shifted toric (Theorem 25); • a given real variety is toric or shifted toric (Theorem 26); • a given point belongs to a given binomial variety (Theorem 27).
The plan of the article is as follows.In Section 2 we present preliminaries from the literature and introduce our new notions and related results.In Section 3, we present new algorithms for group and coset tests over C and R. As a first step towards irreducible varieties we also use prime decompositions over the coefficient field, i.e., rational numbers.For the sake of a concise discussion, the major part of our rather comprehensive computation results can be found in Appendix A. In Section 4 we propose asymptotically fast algorithms for the practical computations in Section 3. The proposed algorithms induce upper complexity bounds on the corresponding problems.In Section 5 we summarize our findings and mention perspectives for future work.

Toric, Shifted Toric and Binomial Varieties
We use K to denote either C or R when definitions or results hold for both fields.The natural numbers N include 0. For positive n ∈ N and X = (x 1 , . . ., x n ), the polynomial ring with coefficients in Q and variables x 1 , . . ., When mentioning Gröbner bases of ideals we always mean reduced Gröbner bases; when not mentioned explicitly the term order is not relevant.Given this naturally generalizes to sets F of polynomials and ideals I. Vice versa, given a variety V ⊆ K n , we define the ideal of V to be Recall that over algebraically closed fields, I(V (J)) = √ J, the radical of J. Let K * be the multiplicative group of K.A subgroup G ⊆ (K * ) n is called a torus over the direct product (K * ) n , where multiplication is coordinate-wise, if there exists m ∈ N such that G is isomorphic to (K * ) m .A variety V ⊆ K n is called toric if it is irreducible and there exists a torus G ⊆ (K * ) n such that V = G, the Zariski closure of G [63].It is noteworthy that there are alternative definitions that requires the variety to be normal as well [32].
For a variety V ⊆ K n , by V * we denote V ∩ (K * ) n , i.e., the points in V with non-zero coordinates.It is well-known that every torus is the (irreducible) zero set of a set of Laurent binomials of the form X γ − 1 where γ ∈ Z [32].We are going to make use of the following proposition, which is a consequence of results in [32,63].

is a toric variety if and only I(V ) is prime and the reduced Gröbner basis (with respect to any term order) of I(V ) contains only binomials of the form X
By definition, V is toric if and only if V is irreducible and there exists a torus T such that V = T .Assume that V is given by a set of generators of I(V ).Since V is irreducible, then V * is irreducible, hence T = V * , V = V * , and I(V ) = I(V * ).Therefore, it suffices to compute a Gröbner basis of I(V ) instead of I(V * ) and use Proposition 1 in order to check if V * is a group.Note that if there is a Gröbner basis of I(V ) where all elements are of the form X α − X β and the ideal is prime, then V * is clearly non-empty.For more detailed study of toric varieties refer to [32] and [63].
Not all subgroups of (K * ) n are reducible.For example if a group, however it is not reducible, hence not a torus.Actually V can be decomposed into the torus Varieties that admit a group structure have interesting properties.A class of such varieties, called binomial varieties are studied by Grigoriev and Milman [40], where the authors present a structure theorem for them and discuss the complexity of their Nash resolution.We remind ourselves of the definition and the structure theorem of binomial varieties, which will be used for classifying steady state ideals.

Definition 2 (Binomial Variety
1 , . . ., x ±1 n ] and V = V * .Using Gröbner bases instead of Laurent polynomials, one can see that if a variety V ⊆ C n is binomial then all elements of every Gröbner basis of I(V ) are binomials of the form X α − X β , where α, β ∈ N \ {0}.The following theorem by Grigoriev and Milman shows the structure of the binomial varieties by precisely describing their irreducible components.Theorem 3. [40,Theorem 3.7] The irreducible components of a binomial variety V ⊆ C n include exactly one toric variety T , where T ⊆ (C * ) n is a torus, and several varieties Later in this section we will show that the closure of any subgroup of (C * ) n is a binomial variety.Proposition 1 gives the form of the polynomials in a Gröbner basis of the ideal describing the toric component of a binomial variety.For the components that are cosets of the torus, one can easily derive the form of the reduced Gröbner basis from the definition of the torus and Proposition 1.This is stated precisely in the following proposition.Intuitively, non-toric components of a binomial variety can be considered as the shifts of the toric component.This motivates us to define shifted toric varieties.Definition 4 (Shifted Toric Variety).A shifted torus in (K * ) n is defined to be a coset of a torus in (K * ) n .A variety V ⊆ K n is called shifted toric if it is the closure of a shifted torus.
Since every group is a coset of itself, every torus is a shifted torus, and therefore every toric variety is a shifted toric variety.However, a shifted toric variety is not necessarily a toric variety.Following the definition of shifted toric varieties and using Proposition 1, we show in the following proposition that ideals of shifted toric varieties have Gröbner bases of a specific form.Proposition 5. V * ⊆ C n is a shifted torus if and only if V * is a zero set of Laurent binomials of the form X g α − 1, where g ∈ V * and α ∈ Z n .Similarly, V is shifted toric if and only if I(V ) is prime and the reduced Gröbner basis (with respect to any term order) of I(V ) contains only binomials of the form Proof.V is shifted toric if and only if there exists a torus T and a coset C of T with respect to some g ∈ K n (i.e., C = gT ), such that V = C. Since V is irreducible, then V * = C = V and I(V ) = I(V * ) = I(C), and this ideal is prime.Assume that V given by a set of generators of I(V ).V is shifted toric if and only if I(V * ) = I(V ) is prime and V * is a coset.This holds if and only if I(V * ) is prime and g −1 V * is a group.Note that g −1 V * is irreducible if and only if V * is irreducible.This holds if and only if I(V * ) is prime, or equivalently I(V ) is prime.Therefore, by Proposition 1, V is shifted toric if and only if I(V ) is prime and all the elements of every Gröbner basis of I(g −1 V * ) is of the form X α − X β , for α, β ∈ N n \ {(0, . . ., 0)}.Equivalently, all the elements of I(V ) are of the form X g α − X g β .Cleaning the denominator, we have the desired form of the Gröbner basis elements.Proposition 5 along with the structure theorem for binomial ideals imply that the primary decomposition of an ideal generated by binomials of the form X α −X β include an ideal generated by binomials of the form X α −X β and several ideals generated by binomials of the form X α −cX β .
Using Proposition 5, one can design a randomised algorithm for testing shifted toricity of a variety V = V * .Let g 1 , . . ., g m be generic points in V * and consider the set of Laurent binomials be the matrix of exponents of the Laurent binomials and make it row reduced.This leads to a linear combination of rows with coefficients in Z, say d i .Then V is shifted toric if and only if which holds if and only if Solving the linear equations (3) will give us the exponents of the Laurent polynomials.Note that G obtained in this way is a reduced Gröbner basis.
One can see that a binomial variety is the closure of a group and furthermore, by Proposition 3, it can be decomposed into toric and shifted toric varieties as its irreducible components.A natural question is whether this property holds for every variety that is the closure of a group.The answer to this question is positive and indeed such varieties are precisely binomial varieties.This is explicitly formulated in a remark in [24, after Proposition 2.3].Proposition 6.Let W be a subgroup of (C * ) n .Then W is a binomial variety.
Proof.By definition of binomial variety, we have to prove that W is the zero set of binomials of the form X α − X β and W * = W .The equality W * = W directly comes from the definition of Zariski closure.For proving that the generators of I(W ) have the desired form, we use the notations of [24].By Proposition 2.3(a) in the latter reference, C[X ±1 ]I(W ) = I(ρ), for some partial character ρ ∈ Hom(Z n , C * ).By Theorem 2.1(b) in the same reference, I(ρ) = x m1 − ρ(m 1 ), . . ., x mr − ρ(m r ) where m 1 , . . ., m r ∈ Z n is a basis of L ρ .As W is a group, (1, . . ., 1) ∈ W ; hence ρ(m 1 ) = . . .= ρ(m r ) = 1 and therefore I(W ) is generated by binomials of the form X α − X β where α, β ∈ N. Since W = V (I(W )), we have proved the proposition.Proposition 6 can also be proved over the positive real numbers by considering the logarithm map on (R >0 ) n acting coordinate-wise.The image of this map forms a linear space.A basis of this linear space provides a parametrization of a group.
From a computational point of view, a variety V = V (I) is usually given by a set of generators of I and we would like to derive information about toricity, binomiality or coset property of V by computations over the generators of I.This can be done via Gröbner bases.Assume that G is a Gröbner basis of I, hence V = V (G), and V * = ∅.If all elements of G are of the form X α − X β , then V * is a subgroup of (C * ) n .If all elements of G are of the form c α X α − c β X β where c α = 0 and c β = 0, then V * is a coset of a subgroup of (C * ) n .Note that the converse of the above does not hold.This is because V * and V may not be equal and therefore I(V * ) and I(V ) may not be equal, which means that a Gröbner basis of I(V ) does not give information about group or coset structure of V * .In case V is irreducible, we have that V * = V , e.g., when V is toric or shifted toric.In order to solve this problem one needs to saturate I with the multiplication of the variables and then consider the radical of this saturation.Saturation removes the points that are in V but not in V * .The following proposition states this precisely and is the essence of this section for computations over complex numbers.Proposition 7. Let I be an ideal in Q[x 1 , . . ., x n ], let V := V (I) ⊆ C n be the variety of I, and let G ⊆ Q[x 1 , . . ., x n ] be a reduced Gröbner basis of the radical of I : (ii) V * is a coset of a subgroup of (C * ) n if and only if all elements of G are of the form c α X α − c β X β where c α = 0 and c β = 0.
Proof.In order to prove the proposition we use [16, Chapter 4, Theorem 10 (iii)], which states that over an algebraically closed field, we have that and V is a variety over C which is algebraically closed, we have that V * = V (I : V * = ∅ if and only if V (I)\V (x 1 . . .x n ) = ∅, which is the case if and only if V (I) ⊆ V (x 1 . . .x n ).This happens if and only if I(V (I)) = I(V (x 1 . . .x n )), if and only if x 1 , . . ., x n ⊆ √ I, which is the case if and only if some product of the variables is in I, or equivalently I : For proving (i), let V * be a group.By Proposition 6, we have that all the elements of every Gröbner basis of I(V * ) are of the form X α − X β .But according to (4) and the assumption that G is a Gröbner basis of I : x 1 . . .x n ∞ , this condition holds.
For the converse, let the elements of G have the desired form.Then V ( I : and therefore the latter is a group.Now using [16, Chapter 4, Theorem 10 (iii)], we have that V (I : One can easily check that the latter is equal to V (I) * .Hence V * = V (I) * is a group and we are done.
The proof of part (ii) is analogous to that of part (i) above.
For the rest of this section, we present the monomial parametrization of a torus and state propositions that allow one to find the cosets of a torus as irreducible components of a binomial variety using roots of unity.Readers primarily interested in our algorithms in Section 3 can safely skip this part.
We start with introducing the monomial parametrization of shifted toric varieties.Let T ⊆ (K * ) n be a torus of dimension m, hence T (K * ) m , and let x 0 ∈ (K * ) n .Following the monomial parametrization of a torus given in [24,Corollary 2.6], one can see that the coset x 0 T of T can be seen as the image of the following monomial map, which is the monomial parametrization of where A ∈ Z d×n is a rank m matrix.Note that while the matrix A is not unique, it only depends on T and not on x 0 .In particular, T is its own coset with respect to the unity Proof.If G = T , then it is its own coset with respect to 1 and we are done.Otherwise, let S i = ỹi T be a proper coset of T and suppose that there is no ξ ∈ (C * ) n such that the coordinates of ξ are roots of unity and S i = ξT .This means that for all such ξ the image of ϕ (ỹi,T ) is different from the image of ϕ (ξ,T ) .Hence there exists t ∈ (C * ) m such that for all s ∈ (C * ) m one has ϕ (ỹi,T ) (t) = ϕ (ξ,T ) (s).In other words, there exists t ∈ (C * ) m such that for all s ∈ (C * ) m one has ỹi t A = ξs A for some i ∈ {1, . . ., n}.As the coordinates of ξ are roots of unity, there is a natural number N such that ξ N = 1.Therefore, for all s ∈ (C * ) m one has ỹN i t N A = s N A for some i ∈ {1, . . ., n}.As the image of ϕ is invariant under A → N A, the cosets ỹN i T and T are distinct.By using a similar argument and induction, one can prove that T, ỹN i T , ỹ2N i T, . . .are distinct.As G is closed under multiplication, it contains all these cosets.However, this contradicts the assumption that G is reducible into a torus and a finite number of its cosets.
Remark 10.Let S 1 and S 2 be two cosets of a torus T ⊆ (C * ) n .The coset S 1 is called the complex conjugate of the coset S 2 , written S 1 = S + 2 , when every point of S 1 is the complex conjugate of a point of S 2 and every point of S 2 is the complex conjugate of a point of S 1 .As the complex conjugate is an automorphism of (C * ) m , S 1 is the complex conjugate of S 2 if and only if S 1 contains the complex conjugate of some point of S 2 .A pair S 1 , S 2 is called a pair of complex conjugates if ) n is reducible into a finite number of cosets of a torus then they come in pairs of complex conjugates.To see this, denote the toric component of G by T .If G = T , then clearly G = G + .Suppose that G contains a proper coset S of T .By Lemma 9 there is a point ξ ∈ S whose coordinates are roots of unity.Then ξξ + = 1.As G is a group, ξ + is an element of G.As S = ξT and ξ + T = (ξT ) + = S + , we conclude that S + is contained in G.
be a non-zero irreducible polynomial, where the coordinates of ξ ∈ (C * ) n are roots of unity.Then for all i in N there exist g i in C[X] and Hence one can take Substituting U m with the group U mi , i.e., the group of roots of unity of order mi, and following the steps for constructing g 1 accordingly, one can construct g i for all i ≥ 2.

Algorithmic Classification of Biomodels
We want to apply our concept of shifted toricity to biomodels focusing on the BioModels4 repository of mathematical models of biological and biomedical systems [9].The BioModels repository uses the Systems Biology Markup Language (SBML) [45,30].SBML is a representation format, based on XML, for communicating and storing computational models of biological processes.It is a free and open standard with widespread software support and a community of users and developers.SBML models have been typically created in the context of numerical computations or simulations and must be processed carefully with symbolic computation.For instance, numerical values, like reaction rate constants, contained in the models are often represented as truncated fixed point floats, and the available SBML parsers possibly introduce further rounding errors when implicitly performing substitutions with those values.Such issues are addressed by ODEbase 5 , which provides pre-processed versions of BioModels for use in symbolic computation.We consider here all models from ODEbase where the vector field of the ODE is polynomial over Q after application of certain SBML-specific rules and substitution of parameter values.This amounts to a total of 129 models considered in this article.
Following a convention often used in publications on chemical reaction network theory in the context of symbolic computation, ODEbase replaces names of species concentrations by more abstract names x i using numbers as indices.With the application of SBML rules some of those x i vanish in the ODEbase toolchain.We therefore consider, more abstractly, ordered sets X of variables, tacitly assuming that the order establishes a mapping between indeterminates in Q[X] and coordinates in K |X| .As a matter of fact, the variables will also vanish during our own algorithms discussed throughout this section.The following example illustrates this.
Example 12 (BIOMD0000000198).Consider the following system in Q[x 2 , . . ., x 10 ]: From its Gröbner basis G = {x 2 , x 6 , x 5 −100x 4 , 8x 8 −x 10 , x 7 , x 3 , −x 10 +80x 9 } we can read off that for every point in V C (F ) ⊆ C 9 , e.g., the x 2 -coordinate must be 0. It follows that V C (F ) * = ∅.Geometrically, V C (F ) lives in C 5 with coordinates x 4 , x 5 , x 8 , x 9 , x 10 .Thinking about toricity as a geometric notion, it makes sense to study the variety as an object in that lower dimensional space.Hence, consider Definition 13 (Compatible and canonical projection spaces).Let K ∈ {R, C}, let X be an ordered set of variables, and let V K = ∅ be a variety in K |X| .We say that a subset X ⊆ X describes a compatible projection space In other words, for all x ∈ X \ X and a ∈ V K the x-coordinate of a equals 0. It is easy to see that there is a unique such X with minimum cardinality, which, we say, describes the canonical projection space with respect to V K .
If X describes a canonical projection space and X = ∅, then π X (V K ) * = ∅.On the other hand, if V * K is empty, and X describes a compatible but not canonical projection space, then still π X (V k ) * = ∅.In that latter case the intuition is that the projection does not remove information from V K that is relevant for obtaining π Ŷ (V K ) * in the canonical projection space described by , as we did with the Gröbner basis G in Example 12.
The principle domain of interest for us is R-space, where, e.g., concentrations of species are located in the interior of the first orthant.In the literature there has been considerable attention to C-space.We therefore start our algorithmic considerations over C in Subsection 3.1, and then turn to R in Subsection 3.2.
In Example 12 we could conclude that V C ( F ) * is shifted toric because F consists of binomials of the characteristic shape according to Proposition 7, and one can easily see from its linearity that it generates a prime ideal over C. As prime ideal decomposition is related to polynomial factorization, decomposition or even primeness tests over our fields C and R of interest are not well supported in off-the-shelf computer algebra systems.In our algorithms we therefore limit ourselves to the properties "group" and "coset" rather than "toric" and "shifted toric".Nevertheless, we will consider prime decompositions over Q, which are well supported in software and provide at least partial decompositions over C and R. Note that for us the relevant notion is prime decomposition in contrast to primary decomposition, as the former corresponds to the irreducibility of the corresponding varieties.
) the following holds:

Classification over C
Our methods over C are, naturally, based on Gröbner bases [8,25,26], for which we rely on the commercial computer algebra system Maple.We generally leave it to Maple to find a good term order.Our classifications hold over any algebraically closed extension field of the coefficient field Q, including C as well as, e.g., the countable algebraic closure of Q.
With the following discussion of Algorithm 1 we will introduce some textbook facts from commutative algebra as lemmas, together with short proofs.The algorithm recognizes for a given ideal basis F whether V C (F ) * is a coset.
In line 1 we compute a Gröbner basis G of F .Recall from the previous section that we generally consider reduced Gröbner bases.We may safely assume that vars(G) ⊆ vars(F ).In line 2, the variables X occurring as elements of G are exactly those that must be zero for all points in V C (F ).Removing X from X in line 3 yields X which describes a compatible but not necessarily canonical projection space according to Definition 13, as the following example illustrates.
Then for X ⊆ X to describe the canonical projection space with respect to V (F ) it must not contain x 2 .However, x 2 does not show up in the Gröbner basis . This idea of line 3 is to have a good heuristic method at no extra computational cost.Removing X from G in line 4 is equivalent to plugging 0 into all X in G, which in turn realizes the projection of V C (F ) = V C (G) into X-space.Note that we follow the convention that the empty set is a generator of the trivial ideal [3,Definition 1.36].In line 5 we obtain G by saturating Ĝ and Algorithm 1 ProjectAndClassify C Input: 1. X, a finite ordered set of variables; 2. F ⊆ Q[X] finite and non-empty X describes a compatible projection space with respect to V C (F ).The letter γ classifies V C (F ) * in X-space, using upper case when X = X: G is a Gröbner basis convert γ to a lower case letter 9: end if 10: return X, γ subsequently taking the radical.In line 6 we call Algorithm 2 in order to apply Proposition 7 with I = Ĝ and G = G.From line 3 on we know that V C ( Ĝ) * = ∅ and apply in line 3 and line 5 the criteria from part (i) and (ii) of Proposition 7, respectively.In the negative case we return X in line 8.

Algorithm 2 Classify
This takes us back to line 7 of Algorithm 1.For convenience, we patch the classification letter γ from upper case to lower case when proper projection has taken place.That information could alternatively be reconstructed by comparing X with X, which is returned in line 10 along with γ.

Example 16 (BIOMD0000000519). Consider
, where X = {x 1 , x 2 , x 3 }: We obtain X = X and Ĝ = G = {ĝ 1 , . . ., ĝ4 }.For space reasons, we present ĝ1 , . . ., ĝ4 with approximate coefficients here: It is important to understand that, although we are using tools from ideal theory, our results in Section 2 clarify that our classification solely depends on geometry.In particular, results are invariant with respect to the input ideal basis F in Algorithm 1.
In Appendix A.1 we discuss practical aspects of our implementation and give in Table 1 classification results from applying Algorithm 1 to the 129 models introduced at the beginning of this section.We also address there the quality of our heuristic method for computing the description X of the projection space in Algorithm 1.For our discussion here we note that our algorithm terminates within a time limit of 6 hours per model on 104 out of the 129 models.We obtain 2 G, 20 C, and 6 c, which can be summarized as V C ( G) * forming a coset.We are now going to turn to prime decompositions over Q of the generating ideals F of our varieties V C (F ).Recall that shifted toricity requires, in addition to the coset structure of V C (F ) * , irreducibility of V C (F ), which in turn corresponds to prime decompositions of F even over C. From that point of view, our decompositions considered here are only a heuristic step into the right direction.On the other hand, the following example suggests that beyond the irreducibility issue, prime decompositions over Q can improve our hit rate on cosets.
The following is a prime decomposition of F over Q: Considering . ., P k ) are Gröbner bases of a prime decomposition over Q of F .In X = ( X1 , . . ., Xk ), Xi describes a compatible projection space with respect to V C (P i ).In Γ = (γ 1 , . . ., γ k ), the letter γ i classifies V C (P i ) * in Xi -space, using upper case when Xi = X: 1: P = (P 1 , . . ., P k ) := PrimeDecomposition Q (F ) P 1 , . . ., P k are Gröbner bases 2: for i = 1, . . ., k do 3: Pi is a Gröbner basis; the product runs over the set Xi 7: if Xi = X then 9: convert γ i to a lower case letter 10: end if 11: end for 12: return P, ( X1 , . . ., Xk ), (γ 1 , . . ., γ k ) Algorithm 3 formalizes the approach outlined in Example 17.We use the Weierstrass ℘ for power sets.The algorithm starts with the computation of a prime decomposition in line 1.We have Note that the obtained prime ideals P i are also radical.
Lemma 18.Let I ⊆ Q[X] be a prime ideal.Then I is a radical ideal.
Proof.Let f s ∈ I.We show by induction on s that f ∈ I.If s = 1, then we are done.Otherwise consider f s = f f s−1 ∈ I. Since I is prime, we have f ∈ I or f s−1 ∈ I.In the latter case, f ∈ I by the induction hypothesis.
In lines 3-10, Algorithm 3 follows in a for-loop essentially Algorithm 1 for each prime component basis P i .In line 5 we note that Pi is prime by the following lemma.
It follows that Pi is also radical by Lemma 18.When computing Pi in line 6 primality is again preserved, as the following lemma shows.

Lemma 20. Let I ⊆ Q[X] be a prime ideal, and let
We once more call Lemma 18 to obtain that Pi is also radical.Therefore, the radical ideal computation in line 5 of Algorithm 1 is not necessary here.
In Appendix A.2 we discuss practical aspects of our computations and give in Table 3 classification results using Algorithm 3 on the 129 models introduced at the beginning of this section.We succeed on 105 out of the 129 models within a time limit of 6 hours per model.This yields 3426 prime components to test altogether.We obtain 2 G, 22 C, and 1085 c, which can be summarized as V C ( Pi ) * forming a coset.Furthermore, we have 2242 o, i.e., V C ( Pi ) * = ∅.The rest is only 34 X and 41 x.Again we visualize these results in terms of percentages of the total of 3426 prime components: Recall that our selection from the BioModels repository presented here is essentially complete with respect to polynomial examples.This comes with the disadvantage that our data is somewhat dominated by BIOMD0000000281, which contributes 1008 c and 2136 o.We have verified that the ideal dimensions for the 1008 c components are positive, pointing at non-trivial coset structures in contrast to isolated points.For the sake of scientific rigor we also present the statistics without BIOMD0000000281:

Classification over R
Our primary tool over R is real quantifier elimination [65,12,13,69,38,70].We use implementations by the fourth author and his students [21,59] in Redlog [20,57,60,61,62], which is integrated with the open-source computer algebra system Reduce [42,43].Our strategy is to apply virtual substitution methods [70,49,48] for quantifier elimination within the relevant degree bounds and fall back into partial cylindrical algebraic decomposition [19,56] with subproblems where this is not possible.Our results hold over any real-closed field, including R as well as, e.g, the countable field of real algebraic numbers.
Algorithm 4 is the real counterpart to Algorithm 1 in Subsection 3.1.In line 4 we construct Algorithm 4 ProjectAndClassify R Input: 1. X, a finite ordered set of variables; 2. F ⊆ Q[X] finite and non-empty X describes the canonical projection space with respect to V R (F ).The letter γ classifies V R (F ) * in X-space, using upper case when X = X: X := X \ {x i } 6: end if 8: end for 9: γ := Classify R ( X, F ) 10: if X = X then 11: convert γ to a lower case letter 12: end if 13: return X, γ for each x i ∈ X the first-order L OR -formula, where L OR denotes the language of ordered rings: The underlined universal quantifier denotes the universal closure, which universally quantifies all variables freely occurring within its scope.Our formula ψ straightforwardly states that for all points in V R ( F ) with coordinates x j ∈ X, which occur as variables in the polynomials f ∈ F , the specific coordinate x i is zero.The if-condition R |= ψ expresses that R is a model of this formula, meaning that the formula holds in R or, equivalently, in the model class of real closed fields.
A real quantifier elimination procedure computes for any given first-order L OR -formula ϕ an equivalent quantifier-free L OR -formula ϕ , where the variables in ϕ are a subset of the variables freely occurring in ϕ.Since ψ contains no free occurrences of variables, the corresponding ψ will be variable-free and can be easily simplified to either true or false.In the former case the if-condition holds, in the latter case it does not.
When some x i is identified to vanish in all points of V R ( F ) it is removed from X in line 5. Notice that in contrast to Algorithm 1 the final X describes not only a compatible but the canonical projection space with respect to V R (F ).Accordingly, x i is set to zero within F in line 6, where [x i /0] is a postfix operator substituting the term 0 for the variable x i in its argument F .From line 9 on, Algorithm 4 proceeds like its complex counterpart Algorithm 1 but using Algorithm 5 for real classification.In line 1 we define Φ(t 1 , . . ., t n ) to generate a first order Algorithm 5 Classify R Input: 1. X, a finite ordered set of variables, w.l.o.g.X = {x 1 , . . ., return C 18: end if L OR -formula which states that (t 1 , . . ., t n ) ∈ V R ( F ), where the t i are L OR -terms.In lines 2-4 we handle the case V R ( F ) * = ∅.Hence in line 5 we know V R ( F ) * = ∅.We are going to use the following characterization of cosets.(ii) there exists g 0 ∈ (K * ) n such that g −1 0 C is a group; (iii) there exists g 0 ∈ C such that g −1 0 C is a group; (iv) for all g ∈ C we have that g −1 C is a group.
Proof.The equivalence between (i) and (ii) is the definition of a coset.When (ii) holds, then C = g 0 G for a group G, hence g 0 • 1 ∈ C, which shows (iii).The implication from (iii) to (ii) is obvious, and so is the implication from (iv) to (iii).It remains to be shown that (iii) implies (iv).Assume that g 0 ∈ C and G = g −1 0 C is a group; equivalently C = g 0 G. Let g ∈ C. Then there is y ∈ G such that g = g 0 y.It follows that g Proposition 21(iv) yields a first-order characterization for V R ( F ) * to be a coset, which could be informally stated as follows: As a first-order L OR -formula this yields: In the equations originating from Φ(g 1 x −1 1 , . . ., g n x −1 n ) principal denominators containing variables from x 1 , . . ., x n can be equivalently dropped, because the left hand side of the implication requires those variables to be different from zero.The first-order L OR -formula τ can be equivalently transformed into τ inv ∧ τ mult with τ inv and τ mult as in line 5 and line 9 of Algorithm 5, respectively.Therefore it is correct to exit with γ = X in line 7 or 11 when either part does not hold.This splitting into subproblems has two advantages.First, separate quantifier eliminations on smaller problems are more efficient.Second, when τ inv does not hold in line 6, then τ mult need not be considered at all.
When reaching line 13, we know that V R ( F ) * is a coset and apply the following corollary, which concludes our discussion of Algorithm 5.

Corollary 22. Let C be a coset. Then C is group if and only if
is a group by Proposition 21(iv).The converse implication follows from the definition of a group.Remark 23.As an alternative to (5), Proposition 21(iii) yields the following characterization of cosets, which might appear more natural because it is closer to the original definition of cosets: The first difference to observe is that in (6) in contrast to (5) there is quantifier alternation from ∃ to ∀.The number of quantifier alternations is known to be a critical parameter for asymptotic complexity of the real quantifier elimination problem [38,69].Furthermore, in the presence of the leading existential quantifier prohibits our splitting into two independent smaller problems.Experimental computations on the complete dataset considered here have confirmed that formulation ( 5) is clearly preferable.
Example 24 (BIOMD0000000159).Consider F ⊆ Q[X], where X = {x 1 , . . ., x 3 }: In lines 3-8 of Algorithm 4 we consecutively apply real quantifier elimination to the following formulas: Neither of them holds in R so that in line 9 we enter Algorithm 5 with X = X and F = F .In line 2 of Algorithm 5 we test Real quantifier elimination [48] confirms that (7) holds in R, and extended quantifier elimination [49] even gives us a witness Therefore we set up τ inv in line 5 as follows: Notice that in the three equations in last line of ( 9) we have equivalently dropped denominators x 1 x 2 , x 2 x 3 , and x 1 x 3 , respectively.The inequalities for x 1 , . . ., x 3 in first line of ( 9) ensure that those denominators do not vanish.In line 10, quantifier elimination confirms that τ inv holds in R, and so does τ mult in line 10.Thus we reach line 13 and set up the following formula to test whether our coset F is even a group: This is obviously not the case.Algorithm 5 returns 'C' in line 17, and Algorithm 4 finally returns {x 1 , x 2 , x 3 } and 'C' in line 13.In Appendix A.1 we discuss practical aspects of our implementation and give in Table 1 classification results from applying Algorithm 4 to the 129 models introduced at the beginning of this section.For our discussion here we note that our algorithm terminates within a time limit of 6 hours per model on 94 out of the 129 models.We obtain 20 C and 6 c, which can be summarized as V R ( G) * forming a coset.Furthermore we have 4 O and 42 o, i.e., V R ( G) * = ∅.The rest is 21 X and one single x.In terms of percentages of the 94 successful computations this gives the following picture: coset 27.7% empty 48.9% Algorithm 6 DecomposeProjectAndClassify R Input: 1. X, a finite ordered set of variables; 2. F ⊆ Q[X] finite and non-empty O, X, g, c, o, x} k P = (P 1 , . . ., P k ) are Gröbner bases of a prime decomposition over Q of F .In X = ( X1 , . . ., Xk ), Xi describes the canonical projection space with respect to V R (P i ).In Γ = (γ 1 , . . ., γ k ), the letter γ i classifies V R (P i ) * in Xi -space, using upper case when Xi = X:  Xi , γ i := ProjectAndClassify R (X, P i ) 4: end for 5: return P, ( X1 , . . ., Xk ), (γ 1 , . . ., γ k ) In analogy to Algorithm 3 in Subsection 3.1, Algorithm 6 applies prime decompositions over Q also in the real case.It starts with the computation of a prime decomposition in line 1.We then have In lines 3-4 we apply Algorithm 4 to each component and collect the results.
In Appendix A.2 we discuss practical aspects of our computations and give in Table 3 classification results using Algorithm 6 on the 129 models introduced at the beginning of this section.We succeed on 88 out of the 129 models within a time limit of 6 hours per model.This yields 3390 prime components to test altogether.We obtain 2 G, 22 C, and 1083 c, which can be summarized as V R ( Pi ) * forming a coset.Furthermore, we have 7 O and 2232 o, i.e., V R ( Pi ) * = ∅.The rest is only 18 X and 26 x.In left hand side picture below, we visualize these results in terms of percentages of the total of 3390 prime components.In the right hand side picture, we see the corresponding statistics without BIOMD0000000281: Recall from the discussion at the end of Subsection 3.1 that we consider the left hand side picture more adequate and add the right hand side one for the sake of scientific rigor.

Upper Complexity Bounds
In this section we give asymptotic upper bounds on the worst case complexity of problems addressed in this paper.In Subsection 4.1 we derive bounds for recognizing toric and shifted toric varieties over algebraically closed fields of characteristic zero.In Subsection 4.2 we derive corresponding bounds for toric varieties over real closed fields.Subsection 4.3 finally gives bounds for the membership problem in subgroups of (Q * ) n , which correspond to binomial varieties.

Toricity over Algebraically Closed Fields of Characteristic Zero
As mentioned in Section 2, a torus G can be represented as the set of solutions of binomials of the form where a ji ∈ Z and m is equal to the dimension of G and every Gröbner basis of a toric variety G consists only of binomials of the form where integers b ji , c ji are non-negative [63].Let f 1 , . . ., f k ∈ Z[x 1 , . . ., x n ] and V ⊆ C n be the algebraic variety of common zeroes of f 1 , . . ., f k .We design an algorithm which recognizes whether V is toric.Note that f 1 , . . ., f k are not necessary binomials.To estimate the complexity of the algorithm we suppose that deg(f i ) ≤ d, 1 ≤ i ≤ k and that the bit-size of each integer coefficient of f 1 , . . ., f k does not exceed L. Invoking [10,37] we first verify whether V is irreducible and V * = V (if this is not true then V is not toric).The complexity of the algorithms from [10,37] can be bounded by (Ld n 2 ) O (1) .Then we verify that V * is a group.This holds if and only if we have the following first-order formula in the theory of algebraically closed fields of characteristic zero: (10) This can be verified via the algorithm in [11].The complexity of this step is bounded by (Ld n 2 ) O (1) as well.
So far, the algorithm has verified whether V is toric.Now we show how to find a system of binomial equations determining V * .In order to do so, in this subsection we find a set of Laurent binomials determining V * instead of binomials in C[X] whose set of solutions is V .This is because as it has been shown by Mayr and Meyer in their seminal work, the number of binomials and their degrees in a Gröbner basis of I(V ) can be double-exponential [50].Using the algorithms from [10,37] one can produce m = dim V coordinates among x 1 , . . ., x n which form a transcendental basis of V * .Without loss of generality, assume that {x 1 , . . ., x m } be a transcendental basis.Fix an integer j, m < j ≤ n and project V * on the space generated by x 1 , . . ., x m , x j , which is isomorphic to (C * ) m+1 invoking again [11].Let W ⊆ (C * ) m+1 be image of the projection.Due to the choice of the transcendental basis, we have that dim W = m and W is a hypersurface.Therefore, W can be determined by a single polynomial h := h j ∈ Z[x 1 , . . ., x m , x j ] (c.f.e.g., [58]).Moreover, deg W ≤ deg V * ≤ d n ; the latter follows from Bezout inequality [58].The algorithm from [11] constructs h and a generic point of W within the complexity (Ld n 2 ) O (1) .
Observe that W is also a group.Hence h can be rewritten as a binomial of the form for suitable relatively prime integers q j1 , . . ., q jm , q j ∈ Z. Doing so for every j, m < j ≤ n, the algorithm yields polynomials h j ∈ Z[x 1 , . . ., x n ].Denote by H ⊆ (C * ) n the variety given by equations h j , m < j ≤ n.Clearly, V * ⊆ H, dim H = m and H is a group, therefore, V * is an irreducible component of H.Moreover, H is a binomial variety and hence, V * is its subgroup (of a finite index).In particular, (1, . . ., 1) ∈ V * , and every irreducible component H 1 of H has the form H 1 = gV * for an arbitrary element g ∈ H 1 .Moreover, one can choose g such that its coordinates are roots of unity [40, Remark 3.1, Remark 5.2].
In addition, in order to obtain the Laurent binomials defining V * , the algorithm finds a Z-basis of the intersection Q(Q m+1 , . . ., Q n ) ∩ Z n of the Q-linear space generated by vectors Q j = (q j1 , . . ., q jm , 0, . . ., 0, q j , 0 . . ., 0), m < j ≤ n with the grid Z n [40, Remark 3.1].To find that Z-basis, the algorithm first applies [31,22] to produce (within polynomial complexity) a Z-basis Z of the space of integer solutions of the linear system with rows Q j , m < j ≤ n, and subsequently applies [31,22] to construct a Z-basis of the linear system with the rows from Z.
Recall from the Definition 4 that for a torus V * ⊆ (C * ) n and a point g ∈ (C * ) n we call gV * a shifted torus, and gV * ⊆ C n a shifted toric variety.In particular, every irreducible component of a binomial variety in (C * ) n is a shifted torus (Proposition 3).One can modify the described algorithm to test whether an input variety V ⊆ C n is shifted toric.To this end, pick an arbitrary point g = (g 1 , . . ., g n ) ∈ V * and test whether g −1 V * is a torus.If the latter holds, the algorithm produces binomial equations for g −1 V * .Clearly a binomial equation The following theorem summarizes our algorithm.
with bit-sizes of integer coefficients of f 1 , . . ., f k at most L. One can design an algorithm which tests whether the variety V ⊆ C n determined by f 1 , . . ., f k is (shifted) toric.In the positive case, the algorithm yields a transcendental basis x i1 , . . ., ) .The complexity of the designed algorithm does not exceed (Ld n 2 ) O (1) .
One can extend the algorithm in Theorem 25 so that it takes a reducible variety V and decomposes V into irreducible components and then tests whether its irreducible components are toric or shifted toric (following the lines of the algorithm for each irreducible component of V * separately).Moreover, if the irreducible components of V are exclusively toric and shifted toric varieties and V * is a group, then the extended algorithm yields the described representation of V * by means of binomials.The complexity of the extended algorithm is still (Ld n 2 ) O (1) .
Our discussion here can be straightforwardly generalized to any algebraically closed field with characteristic zero.Independently, the algorithm can be generalized to coefficients from a finite field extension of Q [10,37].

Toricity over Real Closed Fields
In this subsection we design an algorithm that recognizes toricity of a semi-algebraic set over R. We refer to [2] for the algorithms in real algebraic geometry.Let R >0 := { z ∈ R | z > 0 } denote the positive orthant.Keeping the notations from Subsection 4.1 consider the semi-algebraic set (10) replacing C * by R >0 and equalities f i = 0 by inequalities f i ≥ 0, respectively.Also keep the first-order formula (10).This formula can be verified by applying the algorithms from [39].Clearly, (10) is true if and only if T is a group (a torus).Thus, assume that (10) is true.Then the image of the coordinate-wise logarithm map log(T ) ⊆ R n is a linear subspace.Hence, in particular, T is connected.
First, compute m := dim(T ) and produce m coordinates such that the projection U of T on m-dimensional space with these coordinates has the full dimension m.Without loss of generality assume that these coordinates are x 1 , . . ., x m .Fix j, m < j ≤ n and denote by U j the projection of T on the (m+1)-dimensional space with coordinates x 1 , . . ., x m , x j .Denote by p the projection map of the latter space along x j onto m-dimensional space with the coordinates x 1 , . . ., x m .Then p(U j ) = U .Since dim(U j ) = dim(U ) = m, we have that p(log(U j )) = log(U ) = R m , and therefore we conclude that any point of U has a unique preimage of p in U j .Moreover, U j is determined by a single binomial-type (analytic) equation of the form for some reals t j1 , . . ., t jm , t j , c j .Since U j is a group we get that c j = 1.
On the other hand, applying the algorithm from [2], one can construct the projection p : U j → U and conclude that equation ( 11) is algebraic, thus t j1 , . . ., t jm , t j ∈ Z.The algorithm also One can apply the algorithm in [41] to this system and transform the k × s submatrix A = (a i,j ), 1 ≤ i ≤ k, 1 ≤ j ≤ s to its Smith form.Then solvability of ( 13) is equivalent to that the right-hand side of ( 13) fulfils (at most k) relations of the form for some integers c i being suitable minors of matrix A, hence |c i | ≤ (ds) O(s) by Hadamard's inequality.
One can verify relations ( 14) using the binary form of the numerators and denominators of v s+1 , . . ., v n .This leads to the complexity bound (i).Alternatively, one can factorize the numerators and denominators of v s+1 , . . ., v n and execute calculations in terms of exponents of their prime factors which leads to the complexity bound (ii).This completes the verification of ( 12) and the description of the algorithm.
One can extend the complexity bound (i) for v j ∈ Q, 1 ≤ j ≤ n being algebraic numbers.In this case log M plays the role of the bit-size of the representation of v.

Conclusions and Future Work
We have taken a geometric approach to studying steady state varieties, which-besides significant theoretical results-generated comprehensive empirical data from computations on 129 networks from BioModels repository.We are not aware of any comparable systematic large scale symbolic computations on those data in the literature.We were indeed surprised by the success rate of Gröbner basis and real quantifier elimination techniques with input sizes up to 71 variables.We find this most encouraging and believe that robust and supported software tools for systems biology and medicine that include symbolic computation components are not out of reach.
It was important to learn that real methods do not significantly fall behind complex methods efficiency-wise.After all, chemical reaction network theory takes place in the interior of the positive first orthant.In a way, our consideration of V * in favor of V here marks a first step in that direction by looking at points in the variety rather than polynomials in the ideal.Only real methods allow to go further and, e.g., identify prime components whose varieties reach into the first orthant.
Our work here gives a number of quite concrete challenges to be considered in subsequent work.To start with, one must complete the step from "coset" to "shifted toric" in practical software by producing suitable prime decompositions beyond decompositions over Q.As mentioned above, real methods allow to explicitly refer to the interior of the first orthant, and our framework and the first-order descriptions we use should be refined in this direction.On the complex side, one should also test suitable elimination methods with the logic descriptions we developed here.
It is noteworthy that all quantifier elimination problems considered here were decision problems, even without quantifier alternation.On the one hand, this allows the application of methods and tools from Satisfiability Modulo Theories Solving [52,1].On the other hand, it shows that we are not yet using the full power of quantifier elimination methods.One could, e.g., leave a subset of reaction rates parametric and study invariance of shifted toricity under variation of those reaction rates.
Our input of 129 models considered here is in a way complete: We took all available models from BioModels/ODEbase for which we could straightforwardly produce polynomial vector fields.So far we did not consider systems with rational vector fields.Such systems come with interesting challenges on the algebraic side: While the variety V is blind for the presence or non-presence of polynomials factors from the denominators, those factors can still affect shifted toricity V * .
Beyond the data presented here we generally save the sets X, X.Furthermore, over C we save the computed Gröbner bases G, Ĝ, G and their term orders, and over R we save witnesses for Recall that over C, X describes only compatible projection spaces, while over R it describes the canonical projection space.Recall that X as computed in Algorithm 1 describes only a compatible projection space with respect to the complex variety, while X as computed in Algorithm 4 describes the canonical projection space with respect to the real variety.The idea with Algorithm 1 was to have a heuristic method to efficiently obtain a description of the canonical projection space also there.Remark 29 tells us that whenever we find equal numbers for | X| over C and R in Table 1 below, then that heuristic method was successful.This is the case with all models where the computation terminated over both C and R except for the models 243 and 289.
Since we obtain X in contrast to O with model 289, we know that X describes a canonical projection space over C also there.With model 243, our obtained X indeed does not describe the canonical projection space over C. Inspection of the computation shows that the Gröbner basis G in l.1 of Algorithm 1 contains x 2  6 .An improved heuristic method could check for powers of variables occurring in G.However, Example 15 shows that this would still be only heuristic.Table 2 collects some statistical information about the computations.Figure 1 provides some analysis of the computation times.Notice that many computations finish quite quickly.

A.2. Classifications of Rational Prime Decompositions
Recall that Algorithm 3 and Algorithm 6 compute prime decompositions P over Q and then apply our classification approach to each prime component individually.This yields lists X , X containing in turn lists X and X of variables before and after projection, respectively, as well as a list Γ of classifications γ.   3. Model 289 is o + X over C but 2o over R. We have addressed this difference already with the computations in Appendix A.1.With all other models listed above the difference is o over C in contrast to O over R.
Table 4 collects some statistical information about the computations.Figure 2 provides some analysis of the computation times.Notice that many computations finish quite quickly.
a group and reducible into r ∈ N cosets of a torus T , then there exist y 1 , . . ., y r ∈ (C * ) n whose coordinates are roots of unity and G = r i=1 y i T is the irreducible decomposition of G.

3 :
else if all elements of G are of the form Xα − Xβ with α, β ∈ N m then 4: return G 5: else if all elements of G are of the form c α Xα − c β Xβ with α, β ∈ N m , c α = 0, c β = 0 then end if In line 1 of Algorithm 2, if X = ∅, then we are in zero-dimensional C-space and certainly V C ( Ĝ) * = ∅.Otherwise G = {1} is an equivalent criterion for V C ( Ĝ) * = ∅ by Proposition 7.

Furthermore we have 4 O
and 42 o, i.e., V C ( G) * = ∅.The rest is 29 X and one single x.In terms of percentages of the 104 successful computations this yields the following picture: coset

Proposition 21 .
Let K * be a multiplicative group.Let C ⊆ (K * ) n , C = ∅.Then the following are equivalent: (i) C is a coset; .

1 :
P = (P 1 , . . ., P k ) := PrimeDecomposition Q (F ) 2: for i = 1, . . ., k do 3: describe the canonical projection spaces with respect to V R (F ), V C (F ), respectively.Let furthermore X describe any compatible projection space with respect to V C (F ).Then Y R ⊆ Y C ⊆ X and thus |Y R | ≤ |Y C | ≤ | X|.Using the fact that all sets are finite, | X| = |Y R | implies X = Y C .

Figure 1 :
Figure 1: Numbers of problems solved within certain time limits by Algorithm 1 over C (left)and Algorithm 4 over R (right).The total number of problems is 129.

Figure 2 :
Figure 2: Numbers of problems solved within certain time limits by Algorithm 3 over C (left)and Algorithm 6 over R (right).The total number of problems is 129.

Table 1 :
Applying ProjectAndClassify K over C and R.
Model numbers nnn stand forBIOMD0000000nnn."m/a" indicates mass action kinetics (Definition 28).|X| and | X| are numbers of variables before and after projection, respectively.γ is G for group, C fo coset, O for empty set, and X else; lower case letters indicate projection.Time columns give total CPU times in seconds or "⊥" for a timeout with a limit of 6 hours per model.

Table 1 :
Applying ProjectAndClassify K over C and R (continued)

Table 1 :
Applying ProjectAndClassify K over C and R (continued)

Table 1 :
Applying ProjectAndClassify K over C and R (continued) There are 15 models where the complex classification in Table 1 succeeded but the real classification timed out: 028, 030, 069, 102, 103, 122, 226, 230, 257, 287, 335, 365, 491, 492, 637.Among those, models 491 and 492 have classification G and models 230, 335, and 265 have classification o over C, from which we can conclude that they have the same classification over R, respectively.Vice versa, there are 5 models where real classification succeeded but complex classification timed out: 332, 334, 430, 431, 581.There is one single model where we succeeded over both C and R but obtained different classifications: model 289 has X over C but o over R.

Table 2 :
Statistical information about the computations in Table1.

Table 3 :
Applying DecomposeProjectAndClassify K over C and R. Model numbers nnn stand for BIOMD0000000nnn."m/a" indicates mass action kinetics (Definition 28).|P| is the number of prime components over Q. Γ summary summarizes the classification of the components using G for group, C fo coset, O for empty set, and X else; lower case letters indicate projection.Time columns give total CPU times in seconds or "⊥" for a timeout with a limit of 6 hours per model.

Table 3 :
Applying DecomposeProjectAndClassify K over C and R (continued)

Table 3 :
Applying DecomposeProjectAndClassify K over C and R (continued)

Table 4 :
Statistical information about the computations in Table3.