# Efficiently and Effectively Recognizing Toricity of Steady State Varieties

Dima Grigoriev, Alexandru Iosif, Hamid Rahkooy, Thomas Sturm, Andreas Weber

► To cite this version:

Dima Grigoriev, Alexandru Iosif, Hamid Rahkooy, Thomas Sturm, Andreas Weber. Efficiently and Effectively Recognizing Toricity of Steady State Varieties. Mathematics in Computer Science, 2021, 15 (2), pp.199 - 232. 10.1007/s11786-020-00479-9. hal-03438165

HAL Id: hal-03438165

https://hal.science/hal-03438165

Submitted on 21 Nov 2021

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Efficiently and Effectively Recognizing Toricity of Steady State Varieties

Dima Grigoriev · Alexandru Iosif ·

Hamid Rahkooy · Thomas Sturm ·

Andreas Weber

Received: 8 October 2019 / Revised: 14 March 2020 / Accepted: 30 March 2020 / Published online: 21 July 2020
© The Author(s) 2020

**Abstract** 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

**Electronic Supplementary material** The online version of this article (https://doi.org/10.1007/s11786-020-00479-9) contains supplementary material, which is available to authorized users.

D. Grigoriev

CNRS, University of Lille, Lille, France

e-mail: dmitry.grigoryev@univ-lille.fr

A. Iosif

RWTH Aachen University, Aachen, Germany

e-mail: iosif@aices.rwth-aachen.de

H. Rahkooy · T. Sturm

CNRS, Inria, and the University of Lorraine, Nancy, France

H. Rahkooy

e-mail: hamid.rahkooy@inria.fr

T. Sturm

e-mail: thomas.sturm@loria.fr

T. Sturm (✉)

MPI Informatics and Saarland University, Saarbrücken, Germany

e-mail: sturm@mpi-inf.mpg.de

A. Weber

University of Bonn, Bonn, Germany

e-mail: weber@informatik.uni-bonn.de
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.

**Keywords** Binomial ideals · Chemical reaction networks · Complexity bounds · Complex balancing · Gröbner bases · Mass-action kinetics · Real quantifier elimination · Scientific computing · Symbolic computation · Toric varieties

**Mathematics Subject Classification** Primary 14Q20; Secondary 14P05 · 92C42

# 1 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 \in \{\mathbb{C}, \mathbb{R}\}$, $(K^*)^n$ denotes the direct power of the multiplicative group of the respective field. Consider a family of ideals

$$I_k = \langle x^2 - ky^2 \rangle \qquad (1)$$

with a rational parameter $k$. Let $V_k$ be the complex variety of $I_k$, and let $V_k^* = V_k \cap (\mathbb{C}^*)^2$. Then $V_1^*$ forms a group, but $V_1^*$ does not, because it does not contain $(1, 1)$. However, $V_{-1}^* = (1, i) \cdot V_1^*$ forms a coset of $V_1^*$. Over the reals, $V_1^* \cap (\mathbb{R}^*)^2$ is again a group, but $V_{-1}^* \cap (\mathbb{R}^*)^2 = \emptyset$ is not a coset of any group. Consider now $V_1 = V_{11} \cup V_{12}$, where $V_{11}$ and $V_{12}$ are given by $\langle x - y \rangle$ and $\langle x + y \rangle$, 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 [24,32]. However, our principal motivation to study generalizations of toricity comes from the sciences, specifically chemical reaction networks such as the following:

$$2A \xrightarrow{\frac{k}{2}} 2B.$$

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 \in \{\mathbb{C}, \mathbb{R}\}$, which for irreducible varieties coincides with $V \cap (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 $\mathbb{R}^n$, i.e., all species concentrations and reaction rates are assumed to be strictly positive [29]. Our considering $(K^*)^n$ in contrast to $\mathbb{C}^n$ is a first step in this direction, considering also $(\mathbb{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 [34,51,55].

Complex balancing itself generalizes detailed balancing, which has widely been used in the context of chemical reaction networks [28,29,44]. Gorban et al. [35,36] 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,46,47]. 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 \cap (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 $(\mathbb{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 $\langle P_i \rangle$ of $\langle F \rangle$ (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 Maple<fnref n="1" /> and Reduce<fnref n="2" /> [42,43] and systematically applied to the steady state varieties of 129 models from the BioModels repository.<fnref n="3" /> 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 $\mathbb{C}$ we use Gröbner bases [8,25,26], and over $\mathbb{R}$ we use real quantifier elimination techniques.

<footnote n="1">¹ Maple (2019). Maplesoft, a division of Waterloo Maple Inc., Waterloo, Ontario.</footnote>

<footnote n="2">² https://sourceforge.net/projects/reduce-algebra/.</footnote>

<footnote n="3">³ https://www.ebi.ac.uk/biomodels/.</footnote>
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 Sect. 2 we present preliminaries from the literature and introduce our new notions and related results. In Sect. 3, we present new algorithms for group and coset tests over $\mathbb{C}$ and $\mathbb{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 Appendix A. In Sect. 4 we propose asymptotically fast algorithms for the practical computations in Sect. 3. The proposed algorithms induce upper complexity bounds on the corresponding problems. In Sect. 5 we summarize our findings and mention perspectives for future work.

## 2 Toric, Shifted Toric and Binomial Varieties

We use $K$ to denote either $\mathbb{C}$ or $\mathbb{R}$ when definitions or results hold for both fields. The natural numbers $\mathbb{N}$ include 0. For positive $n \in \mathbb{N}$ and $X = (x_1, \dots, x_n)$, the polynomial ring with coefficients in $\mathbb{Q}$ and variables $x_1, \dots, x_n$ is written $\mathbb{Q}[X] = \mathbb{Q}[x_1, \dots, x_n]$. For $\alpha = (\alpha_1, \dots, \alpha_n) \in \mathbb{N}^n$, $X^\alpha = x_1^{\alpha_1} \dots x_n^{\alpha_n}$ is a monomial in $\mathbb{Q}[X]$. 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 a polynomial $f \in \mathbb{Q}[X]$, the variety of a $f$ over $K$ is $V(f) = \{z \in K \mid f(z) = 0\} \subseteq K^n$; this naturally generalizes to sets $F$ of polynomials and ideals $I$. Vice versa, given a variety $V \subseteq K^n$, we define the ideal of $V$ to be $I(V) = \{f \in \mathbb{Q}[X] \mid f(z) = 0 \text{ for all } z \in V\}$. Recall that over algebraically closed fields, $I(V(J)) = \sqrt{J}$, the radical of $J$.

Let $K^*$ be the multiplicative group of $K$. A subgroup $G \subseteq (K^*)^n$ is called a *torus* over the direct product $(K^*)^n$, where multiplication is coordinate-wise, if there exists $m \in \mathbb{N}$ such that $G$ is isomorphic to $(K^*)^m$. A variety $V \subseteq K^n$ is called *toric* if it is irreducible and there exists a torus $G \subseteq (K^*)^n$ such that $V = \bar{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 \subseteq K^n$, by $V^*$ we denote $V \cap (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^\gamma - 1$ where $\gamma \in \mathbb{Z}$ [32]. We are going to make use of the following proposition, which is a consequence of results in [32, 63].

**Proposition 1** Let $V \subseteq \mathbb{C}^n$ be a variety. $V$ is a toric variety 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 $X^\alpha - X^\beta$ where $\alpha, \beta \in \mathbb{N}^n$.

By definition, $V$ is toric if and only if $V$ is irreducible and there exists a torus $T$ such that $V = \bar{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 = \bar{V}^*$, and $I(V) = I(\bar{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^\alpha - X^\beta$ 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 $K = \mathbb{C}$ and $V = V(x^2 - y^2) \subseteq \mathbb{C}^n$, one can check that $V^* = V \cap (\mathbb{C}^*)^2$ is a group, however it is not irreducible, hence not a torus. Actually $V$ can be decomposed into the torus $V_1 = V(x - y) \cap (\mathbb{C}^*)^2$ and $V_2 = V(x + y) \cap (\mathbb{C}^*)^2$, which is a coset of $V_1$. 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)** A variety $V \subseteq \mathbb{C}^n$ is called binomial if $V^* := V \cap (\mathbb{C}^*)^n$ is the zero set of a finite set of binomials of the form $X^\alpha - 1 \in K[x_1^{\pm 1}, \dots, x_n^{\pm 1}]$ and $V = \overline{V}^*$.

Using Gröbner bases instead of Laurent polynomials, one can see that if a variety $V \subseteq \mathbb{C}^n$ is binomial then all elements of every Gröbner basis of $I(V)$ are binomials of the form $X^\alpha - X^\beta$, where $\alpha, \beta \in \mathbb{N} \setminus \{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 \subseteq \mathbb{C}^n$ include exactly one toric variety $\overline{T}$, where $T \subseteq (\mathbb{C}^*)^n$ is a torus, and several varieties $V_1 = \overline{x_1T}$, ..., $V_r = \overline{x_rT}$, where $x_1T, \dots, x_rT \subseteq (\mathbb{C}^*)^n$ are cosets of $T$ as a group, with respect to $x_1, \dots, x_r \in (\mathbb{C}^*)^n$, respectively.*

Later in this section we will show that the closure of any subgroup of $(\mathbb{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 \subseteq 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^* \subseteq \mathbb{C}^n$ is a shifted torus if and only if $V^*$ is a zero set of Laurent binomials of the form $(\frac{X}{g})^\alpha - 1$, where $g \in V^*$ and $\alpha \in \mathbb{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 $X^\alpha + cX^\beta$ where $c \in \mathbb{C}^*$, $\alpha, \beta \in \mathbb{N}^n \setminus \{(0, \dots, 0)\}$.

*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 \in K^n$ (i.e., $C = gT$), such that $V = \overline{C}$. Since $V$ is irreducible, then $\overline{V^*} = \overline{C} = V$ and $I(V) = I(\overline{V^*}) = I(\overline{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(\overline{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 $\overline{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^\alpha - X^\beta$, for $\alpha, \beta \in \mathbb{N}^n \setminus \{(0, \dots, 0)\}$. Equivalently, all the elements of $I(V)$ are of the form $(\frac{X}{g})^\alpha - (\frac{X}{g})^\beta$. Cleaning the denominator, we have the desired form of the Gröbner basis elements. $\square$

**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^\alpha - X^\beta$ include an ideal generated by binomials of the form $X^\alpha - X^\beta$ and several ideals generated by binomials of the form $X^\alpha - cX^\beta$.

Using Proposition 5, one can design a randomised algorithm for testing shifted toricity of a variety $V = \overline{V}^*$. Let $g_1, \dots, g_m$ be *generic points* in $V^*$ and consider the set of Laurent binomials $G = \{ (\frac{X}{g_i})^{\gamma_i} - 1 \mid i = 1, \dots, m \}$
with symbolic exponents $\gamma_i = (\gamma_{i1}, \dots, \gamma_{in})$. Let

$$ M = \begin{pmatrix} \gamma_{11} & \cdots & \gamma_{1n} \\ \vdots & \ddots & \vdots \\ \gamma_{m1} & \cdots & \gamma_{mn} \end{pmatrix} \qquad (2) $$

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 $\mathbb{Z}$, say $d_i$. Then $V$ is shifted toric if and only if

$$ \sum_{i=1}^{m} d_i \gamma_i = 0, \qquad (3) $$

which holds if and only if $\prod_{i=1}^{m} (g_{i1}^{d_{i1}} \cdots g_{in}^{d_{in}}) = 1$. 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 $(\mathbb{C}^*)^n$. Then $\overline{W}$ is a binomial variety.

*Proof* By definition of binomial variety, we have to prove that $\overline{W}$ is the zero set of binomials of the form $X^\alpha - X^\beta$ and $(\overline{W})^* = \overline{W}$. The equality $(\overline{W})^* = \overline{W}$ directly comes from the definition of Zariski closure.

For proving that the generators of $I(\overline{W})$ have the desired form, we use the notations of [24]. By Proposition 2.3(a) in the latter reference, $\mathbb{C}[X^{\pm 1}]I(W) = I(\rho)$, for some partial character $\rho \in \mathrm{Hom}(\mathbb{Z}^n, \mathbb{C}^*)$. By Theorem 2.1(b) in the same reference, $I(\rho) = \langle x^{m_1} - \rho(m_1), \dots, x^{m_r} - \rho(m_r) \rangle$ where $m_1, \dots, m_r \in \mathbb{Z}^n$ is a basis of $L_\rho$. As $W$ is a group, $(1, \dots, 1) \in W$; hence $\rho(m_1) = \dots = \rho(m_r) = 1$ and therefore $I(W)$ is generated by binomials of the form $X^\alpha - X^\beta$ where $\alpha, \beta \in \mathbb{N}$. Since $\overline{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 $(\mathbb{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^* \neq \emptyset$. If all elements of $G$ are of the form $X^\alpha - X^\beta$, then $V^*$ is a subgroup of $(\mathbb{C}^*)^n$. If all elements of $G$ are of the form $c_\alpha X^\alpha - c_\beta X^\beta$ where $c_\alpha \neq 0$ and $c_\beta \neq 0$, then $V^*$ is a coset of a subgroup of $(\mathbb{C}^*)^n$. Note that the converse of the above does not hold. This is because $\overline{V^*}$ and $V$ may not be equal and therefore $I(\overline{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 $\overline{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 $\overline{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 $\mathbb{Q}[x_1, \dots, x_n]$, let $V := V(I) \subseteq \mathbb{C}^n$ be the variety of $I$, and let $G \subseteq \mathbb{Q}[x_1, \dots, x_n]$ be a reduced Gröbner basis of the radical of $I : \langle x_1 \dots x_n \rangle^\infty$. Then $V^* = \emptyset$ if and only if $G = \{1\}$. If $V^* \neq \emptyset$, then the following hold:
(i) $V^*$ is a subgroup of $(\mathbb{C}^*)^n$ if and only if all elements of $G$ are of the form $X^\alpha - X^\beta$.

(ii) $V^*$ is a coset of a subgroup of $(\mathbb{C}^*)^n$ if and only if all elements of $G$ are of the form $c_\alpha X^\alpha - c_\beta X^\beta$ where $c_\alpha \neq 0$ and $c_\beta \neq 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 $\overline{V(J_1) \setminus V(J_2)} = V(J_1 : J_2^\infty)$ for ideals $J_1$ and $J_2$. Set $J_1 = I$ and $J_2 = \langle x_1 \dots x_n \rangle$. Since $V^* = V(I) \setminus V(x_1 \dots x_n)$, and $V$ is a variety over $\mathbb{C}$ which is algebraically closed, we have that $\overline{V^*} = V(I : \langle x_1 \dots x_n \rangle^\infty)$. Then

$$I(\overline{V^*}) = I(V(I : \langle x_1 \dots x_n \rangle^\infty)) = \sqrt{I} : \langle x_1 \dots x_n \rangle^\infty. \quad (4)$$

$V^* = \emptyset$ if and only if $V(I) \setminus V(x_1 \dots x_n) = \emptyset$, which is the case if and only if $V(I) \subseteq V(x_1 \dots x_n)$. This happens if and only if $I(V(I)) = I(V(x_1 \dots x_n))$, if and only if $\langle x_1, \dots, x_n \rangle \subseteq \sqrt{I}$, which is the case if and only if some product of the variables is in $I$, or equivalently $I : \langle x_1 \dots x_n \rangle^\infty = \langle 1 \rangle$, i.e., $G = 1$.

For proving (i), let $V^*$ be a group. By Proposition 6, we have that all the elements of every Gröbner basis of $I(\overline{V^*})$ are of the form $X^\alpha - X^\beta$. But according to (4) and the assumption that $G$ is a Gröbner basis of $\sqrt{I} : \langle x_1 \dots x_n \rangle^\infty$, this condition holds.

For the converse, let the elements of $G$ have the desired form. Then $V(\sqrt{I} : \langle x_1 \dots x_n \rangle^\infty)^*$ is obviously a group. But $V(\sqrt{I} : \langle x_1 \dots x_n \rangle^\infty)^* = V(I : \langle x_1 \dots x_n \rangle^\infty)^*$ and therefore the latter is a group. Now using [16, Chapter 4, Theorem 10 (iii)], we have that $V(I : \langle x_1 \dots x_n \rangle^\infty)^* = (\overline{V(I) \setminus V(x_1 \dots x_n)})^*$. 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. $\square$

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 Sect. 3 can safely skip this part.

We start with introducing the monomial parametrization of shifted toric varieties. Let $T \subseteq (K^*)^n$ be a torus of dimension $m$, hence $T \simeq (K^*)^m$, and let $x_0 \in (K^*)^n$. Following the monomial parametrization of a torus given in [24, Corollary 2.6], one can see that the coset $x_0T$ of $T$ can be seen as the image of the following monomial map, which is the monomial parametrization of $x_0T$.

$$\varphi_{(x_0,A)} : (K^*)^m \to (K^*)^n, \quad \varphi_{(x_0,A)}(t_1, \dots, t_m) = \left( (x_0)_1 \prod_{i=1}^m t_i^{A_{i1}}, \dots, (x_0)_n \prod_{i=1}^m t_i^{A_{in}} \right),$$

where $A \in \mathbb{Z}^{d \times 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 $1 := (1, \dots, 1) \in (K^*)^n$. Note that if $B \in \mathbb{Z}^{d \times n}$ is another matrix such that $T$ equals the image of $\varphi_{(1,B)}$, then $B$ corresponds to a re-parametrization of $T$.

**Example 8** $V(xy - 1) \cap (\mathbb{C}^*)^2$ can be seen as the image of $\varphi_{(1,(1,-1))} : \mathbb{C}^* \to (\mathbb{C}^*)^2$ with $\varphi_{(1,(1,-1))}(t) = (t, t^{-1})$ or as the image of $\varphi_{(1,(-1,1))} : \mathbb{C}^* \to (\mathbb{C}^*)^2$ with $\varphi_{(1,(-1,1))}(t) = (t^{-1}, t)$.

**Proposition 9** If $G \subseteq (\mathbb{C}^*)^n$ is a group and reducible into $r \in \mathbb{N}$ cosets of a torus $T$, then there exist $y_1, \dots, y_r \in (\mathbb{C}^*)^n$ whose coordinates are roots of unity and $G = \bigcup_{i=1}^r y_i T$ is the irreducible decomposition of $G$.

*Proof* If $G = T$, then it is its own coset with respect to $1$ and we are done. Otherwise, let $S_i = \tilde{y}_i T$ be a proper coset of $T$ and suppose that there is no $\xi \in (\mathbb{C}^*)^n$ such that the coordinates of $\xi$ are roots of unity and $S_i = \xi T$. This means that for all such $\xi$ the image of $\varphi_{(\tilde{y}_i, T)}$ is different from the image of $\varphi_{(\xi, T)}$. Hence there exists $t \in (\mathbb{C}^*)^m$ such that for all $s \in (\mathbb{C}^*)^m$ one has $\varphi_{(\tilde{y}_i, T)}(t) \neq \varphi_{(\xi, T)}(s)$. In other words, there exists $t \in (\mathbb{C}^*)^m$ such that for all $s \in (\mathbb{C}^*)^m$ one has $\tilde{y}_i^A t^A \neq \xi s^A$ for some $i \in \{1, \dots, n\}$. As the coordinates of $\xi$ are roots of unity, there is a natural number $N$ such that $\xi^N = 1$. Therefore, for all $s \in (\mathbb{C}^*)^m$ one has $\tilde{y}_i^N t^{NA} \neq s^{NA}$ for some $i \in \{1, \dots, n\}$. As the image of $\varphi$ is invariant under $A \mapsto NA$, the cosets $\tilde{y}_i^N T$ and $T$ are distinct. By using a similar argument
and induction, one can prove that $T, \tilde{y}_i^N T, \tilde{y}_i^{2N} T, \dots$ 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. $\square$

**Remark 10** Let $S_1$ and $S_2$ be two cosets of a torus $T \subseteq (\mathbb{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 $(\mathbb{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 $S_1 = S_2^+$. If $G \subseteq (\mathbb{C}^*)^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 $\xi \in S$ whose coordinates are roots of unity. Then $\xi \xi^+ = 1$. As $G$ is a group, $\xi^+$ is an element of $G$. As $S = \xi T$ and $\xi^+ T = (\xi T)^+ = S^+$, we conclude that $S^+$ is contained in $G$.

**Proposition 11** Let $P = (X/\xi)^u - (X/\xi)^v \in \mathbb{C}[X]$ be a non-zero irreducible polynomial, where the coordinates of $\xi \in (\mathbb{C}^*)^n$ are roots of unity. Then for all $i$ in $\mathbb{N}$ there exist $g_i$ in $\mathbb{C}[X]$ and $\alpha_i, \beta_i$ in $\mathbb{N}^n$ such that $g_i P = X^{i\alpha_i} - X^{i\beta_i}$.

*Proof* Note that $P = (X^u - \xi^{u-v}X^v)/\xi^u$. As the coordinates of $\xi$ are roots of unity, $\gamma = \xi^{u-v}$ is also a root of unity. Let $m$ be the smallest positive integer such that $\gamma^m = 1$. As $\mathfrak{U}_m = \{\gamma, \gamma^2, \dots, \gamma^m\}$ is a group of roots of unity of order $m$, it is clear that

$$(X^u - \gamma X^v)(X^u - \gamma^2 X^v) \cdots (X^u - \gamma^m X^v) = (X^{mu} - X^{mv}).$$

Hence one can take

$$g_1 = \xi^u (X^u - \gamma^2 X^v) (X^u - \gamma^3 X^v) \cdots (X^u - \gamma^m X^v).$$

Substituting $\mathfrak{U}_m$ with the group $\mathfrak{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 \ge 2$. $\square$

### 3 Algorithmic Classification of Biomodels

We want to apply our concept of shifted toricity to biomodels focusing on the BioModels<fnref n="4" /> repository of mathematical models of biological and biomedical systems [9]. The BioModels repository uses the Systems Biology Markup Language (SBML) [30,45]. 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,<fnref n="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 $\mathbb{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 $\mathbb{Q}[X]$ and coordinates in $K^{\mathbb{X}}$. As a matter of fact, the variables will also vanish during our own algorithms discussed throughout this section. The following example illustrates this.

<footnote n="4">⁴ https://www.ebi.ac.uk/biomodels/.</footnote>

<footnote n="5">⁵ http://odebase.cs.uni-bonn.de/.</footnote>
**Example 12 (BIOMD0000000198)** Consider the following system in $\mathbb{Q}[x_2, \dots, x_{10}]$:

$$F = \{-350x_2 + 800x_3, 350x_2 - 1650x_3, 4250x_3 - 100x_4 + x_5, 100x_4 - x_5, \\ -350x_6 + 800x_7, 350x_6 - 1650x_7, 1700x_7 - 5x_8 + 50x_9, x_{10} + 125x_8 - 1330x_9, -x_{10} + 80x_9\}.$$

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_{\mathbb{C}}(F) \subseteq \mathbb{C}^9$, e.g., the $x_2$-coordinate must be 0. It follows that $V_{\mathbb{C}}(F)^* \neq \emptyset$. Geometrically, $V_{\mathbb{C}}(F)$ lives in $\mathbb{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

$$\hat{G} = G \setminus \{x_2, x_3, x_6, x_7\} = \{x_5 - 100x_4, 8x_8 - x_{10}, -x_{10} + 80x_9\} \subseteq \mathbb{Q}[x_4, x_5, x_8, x_9, x_{10}].$$

It turns out that $V_{\mathbb{C}}(\hat{G})$ is shifted toric in $\mathbb{C}^5$.

**Definition 13 (Compatible and canonical projection spaces)** Let $K \in \{\mathbb{R}, \mathbb{C}\}$, let $X$ be an ordered set of variables, and let $V_K \neq \emptyset$ be a variety in $K^{|X|}$. We say that a subset $\hat{X} \subseteq X$ describes a compatible projection space $K^{|\hat{X}|} \subseteq K^{|X|}$ with respect to $V_K$ if for the projection $\pi_{X \setminus \hat{X}}: K^{|X|} \to K^{|X \setminus \hat{X}|}$ into the complement of $K^{|\hat{X}|}$ we have $\pi_{X \setminus \hat{X}}(V_K) = \{0\}$. In other words, for all $x \in X \setminus \hat{X}$ and $a \in V_K$ the $x$-coordinate of $a$ equals 0. It is easy to see that there is a unique such $\hat{X}$ with minimum cardinality, which, we say, describes the canonical projection space with respect to $V_K$.

If $\hat{X}$ describes a canonical projection space and $\hat{X} \neq \emptyset$, then $\pi_{\hat{X}}(V_K)^* \neq \emptyset$. On the other hand, if $V_K^*$ is empty, and $\hat{X}$ describes a compatible but not canonical projection space, then still $\pi_{\hat{X}}(V_K)^* = \emptyset$. In that latter case the intuition is that the projection does not remove information from $V_K$ that is relevant for obtaining $\pi_{\hat{Y}}(V_K)^*$ in the canonical projection space described by $Y \subseteq X$. When $V_K$ is given as $V_K(F)$ for $F \subseteq \mathbb{Q}[X]$, then we write $\hat{F} = F \cap \mathbb{Q}[\hat{X}]$, as we did with the Gröbner basis $G$ in Example 12.

The principle domain of interest for us is $\mathbb{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 $\mathbb{C}$-space. We therefore start our algorithmic considerations over $\mathbb{C}$ in Sect. 3.1, and then turn to $\mathbb{R}$ in Sect. 3.2.

In Example 12 we could conclude that $V_{\mathbb{C}}(\hat{F})^*$ is shifted toric because $\hat{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 $\mathbb{C}$. As prime ideal decomposition is related to polynomial factorization, decomposition or even primeness tests over our fields $\mathbb{C}$ and $\mathbb{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 $\mathbb{Q}$, which are well supported in software and provide at least partial decompositions over $\mathbb{C}$ and $\mathbb{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.

**Example 14 (Comparison of $V_{\mathbb{C}}^*$ with $V_{\mathbb{R}}^*$)** For $F_1 = \langle x^2 + 2 \rangle$, $F_2 = \langle (x^2 - 1)(x^2 + 2) \rangle$ the following holds:

(i) $V_{\mathbb{C}}(F_1)^* = \{i\sqrt{2}, -i\sqrt{2}\}$ is a coset in $\mathbb{C}^*$, because $(-i\sqrt{2})^{-1}V_{\mathbb{C}}(F_1)^* = \{1, -1\}$ is a group. In contrast, $V_{\mathbb{R}}(F_1)^* = \emptyset$ is not a coset in $\mathbb{R}^*$.

(ii) $V_{\mathbb{C}}(F_2)^* = \{1, -1, i\sqrt{2}, -i\sqrt{2}\}$ is a coset in $\mathbb{C}^*$ if and only if it is group, due to $1 \in V_{\mathbb{C}}(F_2)^*$. This is not the case because it is not closed under multiplication: $(i\sqrt{2})(-i\sqrt{2}) = 2 \notin V_{\mathbb{C}}(F_2)^*$. In contrast, $V_{\mathbb{R}}(F_2)^* = \{1, -1\}$ is a group.

## 3.1 Classification over $\mathbb{C}$

Our methods over $\mathbb{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 $\mathbb{Q}$, including $\mathbb{C}$ as well as, e.g., the countable algebraic closure of $\mathbb{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_{\mathbb{C}}(F)^*$ is a coset.

**Algorithm 1 ProjectAndClassify<sub>\mathbb{C}</sub>**

**Input:** 1. $X$, a finite ordered set of variables; 2. $F \subseteq \mathbb{Q}[X]$ finite and non-empty

**Output:** 1. $\hat{X} \subseteq X$; 2. $\gamma \in \{\text{G}, \text{C}, \text{O}, \text{X}, \text{g}, \text{c}, \text{o}, \text{x}\}$

$\hat{X}$ describes a compatible projection space with respect to $V_{\mathbb{C}}(F)$. The letter $\gamma$ classifies $V_{\mathbb{C}}(F)^*$ in $\hat{X}$-space, using upper case when $\hat{X} = X$:

$G/g - V_{\mathbb{C}}(F)^*$ is a group; $C/c - V_{\mathbb{C}}(F)^*$ is a proper coset; $O/o - V_{\mathbb{C}}(F)^* = \emptyset$; $X/x$ else.

1: $G := \text{GroebnerBasis}(F)$

2: $X' := G \cap X$

3: $\hat{X} := X \setminus X'$

4: $\hat{G} := G \setminus X'$

5: $\tilde{G} := \text{Radical}(\text{Saturate}(\hat{G}, \prod \hat{X}))$

6: $\gamma := \text{Classify}_{\mathbb{C}}(\hat{X}, \tilde{G})$

7: **if** $\hat{X} \neq X$ **then**

8: convert $\gamma$ to a lower case letter

9: **end if**

10: **return** $\hat{X}, \gamma$

$\triangleright \langle \emptyset \rangle = \langle 0 \rangle$

$\triangleright \tilde{G}$ is a Gröbner basis

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 $\text{vars}(G) \subseteq \text{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_{\mathbb{C}}(F)$. Removing $X'$ from $X$ in line 3 yields $\hat{X}$ which describes a compatible but not necessarily canonical projection space according to Definition 13, as the following example illustrates.

*Example 15* Consider $F = \{x_2^2, x_1 + x_2, x_2 + x_3 + 1\}$. Then for $\hat{X} \subseteq 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 $G = \{x_3^2 + 2x_3 + 1, x_2 + x_3 + 1, x_1 - x_3 - 1\}$ of $F$.

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_{\mathbb{C}}(F) = V_{\mathbb{C}}(G)$ into $\hat{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 $\tilde{G}$ by saturating $\hat{G}$ and subsequently taking the radical. In line 6 we call Algorithm 2 in order to apply Proposition 7 with $I = \langle \hat{G} \rangle$ and $G = \tilde{G}$.

**Algorithm 2 Classify<sub>\mathbb{C}</sub>**

**Input:** 1. $\hat{X}$, a finite ordered set of variables; 2. $\tilde{G} \subseteq \mathbb{Q}[\hat{X}]$, a Gröbner basis of a saturated radical ideal

**Output:** $\gamma \in \{\text{G}, \text{C}, \text{O}, \text{X}\}$

1: **if** $\hat{X} = \emptyset$ **or** $\tilde{G} = \{1\}$ **then**

2: **return** $\emptyset$

3: **else if** all elements of $\tilde{G}$ are of the form $\hat{X}^{\alpha} - \hat{X}^{\beta}$ with $\alpha, \beta \in \mathbb{N}^m$ **then**

4: **return** $\mathbb{G}$

5: **else if** all elements of $\tilde{G}$ are of the form $c_{\alpha} \hat{X}^{\alpha} - c_{\beta} \hat{X}^{\beta}$ with $\alpha, \beta \in \mathbb{N}^m, c_{\alpha} \neq 0, c_{\beta} \neq 0$ **then**

6: **return** $\mathbb{C}$

7: **else**

8: **return** $\mathbb{X}$

9: **end if**
In line 1 of Algorithm 2, if $\hat{X} = \emptyset$, then we are in zero-dimensional $\mathbb{C}$-space and certainly $V_{\mathbb{C}}(\hat{G})^* = \emptyset$. Otherwise $\tilde{G} = \{1\}$ is an equivalent criterion for $V_{\mathbb{C}}(\hat{G})^* = \emptyset$ by Proposition 7. From line 3 on we know that $V_{\mathbb{C}}(\hat{G})^* \neq \emptyset$ 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 $\mathcal{X}$ in line 8.

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

**Example 16 (BIOMD0000000519)** Consider $F = \{f_1, f_2, f_3\} \subseteq \mathbb{Q}[X]$, where $X = \{x_1, x_2, x_3\}$:

$$f_1 = -110569195060524661790966049x_1^2 - 110569195060524661790966049x_1x_2 - 110569195060524661790966049x_1x_3 + 8268303407262959414915925880x_1,$

$$f_2 = -39340519602534770292542037060x_1^2 - 64716470904160708181625699581x_1x_2 - 39340519602534770292542037060x_1x_3 + 4720862352304172435105044447200x_1 - 25375951301625937889083662521x_2^2 - 25375951301625937889083662521x_2x_3 + 1783712878395505546690039502520x_2,$

$$f_3 = -40542202233642354036972112493x_1x_2 - 40542202233642354036972112493x_2^2 - 40542202233642354036972112493x_2x_3 + 4865064268037082484436653499160x_2 - 11013853477224600000000000000x_3.$$

We obtain $\hat{X} = X$ and $\hat{G} = G = \{\hat{g}_1, \dots, \hat{g}_4\}$. For space reasons, we present $\hat{g}_1, \dots, \hat{g}_4$ with approximate coefficients here:

$$\hat{g}_1 \approx 5.72 \times 10^{41}x_3 - 1.05 \times 10^{42}x_2 + 1.47 \times 10^{42}x_1,$$

$$\hat{g}_2 \approx 3.63 \times 10^{80}x_1^2 - 6.37 \times 10^{80}x_1,$$

$$\hat{g}_3 \approx 8.89 \times 10^{67}x_1x_2 - 2.44 \times 10^{69}x_1,$$

$$\hat{g}_4 \approx 2.34 \times 10^{111}x_2^2 - 9.39 \times 10^{112}x_1 - 5.82 \times 10^{112}x_2.$$

Notice that $g_4$ is not binomial. After saturation we obtain $\tilde{G} = \{\tilde{g}_1, \tilde{g}_2, \tilde{g}_3\}$ with

$$\tilde{g}_1 = \hat{g}_2, \quad \tilde{g}_2 = \hat{g}_3, \quad \tilde{g}_3 \approx 2.66 \times 10^{92}x_3 - 1.21 \times 10^{94},$$

which is classified as $\gamma = \mathbb{C}$. Again, for $\tilde{g}_3$ we computed exactly but present here only approximate coefficients.

It is important to understand that, although we are using tools from ideal theory, our results in Sect. 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 $\hat{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 $\mathbb{G}$, 20 $\mathbb{C}$, and 6 $\mathbb{C}$, which can be summarized as $V_{\mathbb{C}}(\tilde{G})^*$ forming a coset. Furthermore we have 4 $\mathbb{O}$ and 42 $\mathbb{O}$, i.e., $V_{\mathbb{C}}(\tilde{G})^* = \emptyset$. The rest is 29 $\mathcal{X}$ and one single $\mathcal{X}$. In terms of percentages of the 104 successful computations this yields the following picture:
<figure><img src="image_2.png" /></figure>

We are now going to turn to prime decompositions over $\mathbb{Q}$ of the generating ideals $F$ of our varieties $V_{\mathbb{C}}(F)$. Recall that shifted toricity requires, in addition to the coset structure of $V_{\mathbb{C}}(F)^*$, irreducibility of $V_{\mathbb{C}}(F)$, which in turn corresponds to prime decompositions of $F$ even over $\mathbb{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 $\mathbb{Q}$ can improve our hit rate on cosets.

**Example 17** [BIOMD0000000359] Consider $F \subseteq \mathbb{Q}[X]$, where $X = \{x_1, \dots, x_7, x_9\}$:

$$F = \{-125x_1x_2 - 125x_1x_5 - 11x_1x_7 + 19250x_3 + 19250x_4, -5x_1x_2 + 20x_3x_7 + 770x_3, \\ 5x_1x_2 - 20x_3x_7 - 1190x_3, 250x_1x_5 - 300x_4x_6 + 21000x_3 - 38500x_4 + x_9, \\ -2500x_1x_5 - 27x_5x_6 + 385000x_4 + 10x_7, -3000x_4x_6 - 27x_5x_6 + 10x_7 + 10x_9, \\ -220x_1x_7 - 10000x_3x_7 + 27x_5x_6 - 10x_7, 11x_1x_7, 1000x_3x_7 + 300x_4x_6 - x_9\}.$$

Applying Algorithm 1 to $X$ and $F$ yields $\hat{X} = \{x_1, x_2, x_4, \dots, x_7\}$, $\hat{G} = \{x_1x_7, x_4x_7, x_1x_5 - 154x_4, x_1x_2, x_4x_6, 27x_5x_6 - 10x_7, x_2x_4\}$, and the saturated radical basis $\tilde{G} = \{1\}$. The classification result is $\hat{X}$ together with $\gamma = 0$. The following is a prime decomposition of $F$ over $\mathbb{Q}$:

$$\mathcal{P} = (\{x_1, x_3, x_4, x_9, -27x_5x_6 + 10x_7\}, \{x_1, x_3, x_4, x_5, x_7, x_9\}, \{x_1, x_3, x_4, x_6, x_7, x_9\}, \\ \{x_2, x_3, x_4, x_5, x_7, x_9\}, \{x_2, x_3, x_6, x_7, x_9, x_1x_5 - 154x_4\}).$$

Considering each prime component individually yields respective compatible subsets of variables $\hat{X} = (\{x_5, x_6, x_7\}, \emptyset, \emptyset, \{x_1, x_4, x_5\})$ and Gröbner bases

$$\tilde{G} = \hat{G} = (\{-27x_5x_6 + 10x_7\}, \{0\}, \{0\}, \{0\}, \{x_1x_5 - 154x_4\}),$$

which are already saturated. Application of Algorithm 2 to pairs of elements of $\hat{X}$ and $\tilde{G}$ yields $\Gamma = (\emptyset, 0, 0, 0, \emptyset)$. This tells us that $V_{\mathbb{C}}(F)^*$ has two components, which live in different 3-dimensional subspaces of $\mathbb{C}^8$. Both of them are cosets.

Algorithm 3 formalizes the approach outlined in Example 17. We use the Weierstrass $\wp$ for power sets. The algorithm starts with the computation of a prime decomposition in line 1. We have

$$\bigcup_{i=1}^{k} V_{\mathbb{C}}(P_i) = V_{\mathbb{C}}(F) = V_{\mathbb{C}}(\sqrt{\langle F \rangle}) \quad \text{and} \quad \bigcap_{i=1}^{k} \langle P_i \rangle = \sqrt{\langle F \rangle}.$$

Note that the obtained prime ideals $\langle P_i \rangle$ are also radical.

**Lemma 18** Let $I \subseteq \mathbb{Q}[X]$ be a prime ideal. Then $I$ is a radical ideal.

*Proof* Let $f^s \in I$. We show by induction on $s$ that $f \in I$. If $s = 1$, then we are done. Otherwise consider $f^s = ff^{s-1} \in I$. Since $I$ is prime, we have $f \in I$ or $f^{s-1} \in I$. In the latter case, $f \in I$ by the induction hypothesis.
**Algorithm 3 DecomposeProjectAndClassify<sub>C</sub>**

**Input:** 1. X, a finite ordered set of variables; 2. F ⊆ Q[X] finite and non-empty

**Output:** 1. P ∈ ℘(Q[X])<sup>k</sup>; 2. ˆX ∈ ℘(X)<sup>k</sup>; 3. Γ ∈ {G, C, O, X, G, C, O, X}<sup>k</sup>

P = (P<sub>1</sub>, ..., P<sub>k</sub>) are Gröbner bases of a prime decomposition over Q of ⟨F⟩. In ˆX = (ˆX<sub>1</sub>, ..., ˆX<sub>k</sub>), ˆX<sub>i</sub> describes a compatible projection space with respect to V<sub>C</sub>(P<sub>i</sub>). In Γ = (γ<sub>1</sub>, ..., γ<sub>k</sub>), the letter γ<sub>i</sub> classifies V<sub>C</sub>(P<sub>i</sub>)* in X̂<sub>i</sub>-space, using upper case when X̂<sub>i</sub> = X:

G/g - V<sub>C</sub>(P<sub>i</sub>)* is a group; C/c - V<sub>C</sub>(P<sub>i</sub>)* is a proper coset; O/O - V<sub>C</sub>(P<sub>i</sub>)* = ∅; X/X else.

1: P = (P<sub>1</sub>, ..., P<sub>k</sub>) := PrimeDecomposition<sub>Q</sub>(F) ▷ P<sub>1</sub>, ..., P<sub>k</sub> are Gröbner bases

2: **for** i = 1, ..., k **do**

3: X'<sub>i</sub> := P<sub>i</sub> ∩ X

4: X̂<sub>i</sub> := X<sub>i</sub> \ X'<sub>i</sub>

5: P̂<sub>i</sub> := P<sub>i</sub> \ X'<sub>i</sub> ▷ ⟨∅⟩ = ⟨0⟩

6: P̃<sub>i</sub> := Saturate(P̂<sub>i</sub>, ⋂ X̂<sub>i</sub>) ▷ P̃<sub>i</sub> is a Gröbner basis; the product runs over the set X̂<sub>i</sub>

7: γ<sub>i</sub> := Classify<sub>C</sub>(X̂<sub>i</sub>, P̂<sub>i</sub>) ▷ call Algorithm 2

8: **if** X̂<sub>i</sub> ≠ X **then**

9: convert γ<sub>i</sub> to a lower case letter

10: **end if**

11: **end for**

12: **return** P, (X̂<sub>1</sub>, ..., X̂<sub>k</sub>), (γ<sub>1</sub>, ..., γ<sub>k</sub>)

In lines 3–10, Algorithm 3 follows in a for-loop essentially Algorithm 1 for each prime component basis Pᵢ. In line 5 we note that ⟨P̂ᵢ⟩ is prime by the following lemma.

**Lemma 19** Let $G \subseteq \mathbb{Q}[X]$ be a reduced Gröbner basis of a prime ideal $\langle G \rangle$, and let $x \in G \cap X$. Then $\langle G \setminus \{x\} \rangle$ is prime.

*Proof* Notice that ⟨G \ {x}⟩ is the elimination ideal ⟨G⟩<sub>x</sub> = ⟨G⟩ ∩ Q[X \ {x}]. Let fg ∈ ⟨G⟩<sub>x</sub> ⊆ ⟨G⟩. Then w.l.o.g. f ∈ ⟨G⟩, because ⟨G⟩ is prime. Since x does not occur in fg, it does not occur in f either. Hence f ∈ ⟨G⟩<sub>x</sub>. □

It follows that ⟨P̂ᵢ⟩ is also radical by Lemma 18. When computing P̃ᵢ in line 6 primality is again preserved, as the following lemma shows.

**Lemma 20** Let $I \subseteq \mathbb{Q}[X]$ be a prime ideal, and let $f \in \mathbb{Q}[X]$. Then $I : \langle f \rangle^\infty$ is a prime ideal.

*Proof* Recall that $I \subseteq I : \langle f \rangle^\infty$. Let $gh \in I : \langle f \rangle^\infty$. We must show that $g \in I : \langle f \rangle^\infty$ or $h \in I : \langle f \rangle^\infty$. By definition there is $s \in \mathbb{N}$ such that $f^s g h \in I$. If $f^s \in I$, then $I : \langle f \rangle^\infty = \langle 1 \rangle$, which is prime. Otherwise $gh \in I$ and therefore $g \in I \subseteq I : \langle f \rangle^\infty$ or $h \in I \subseteq I : \langle f \rangle^\infty$. □

We once more call Lemma 18 to obtain that ⟨P̃ᵢ⟩ 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<sub>C</sub>(P̃ᵢ)* forming a coset. Furthermore, we have 2242 O, i.e., V<sub>C</sub>(P̃ᵢ)* = ∅. 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:
<figure><img src="image_3.png" /></figure>

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:

<figure><img src="image_4.png" /></figure>

## 3.2 Classification over $\mathbb{R}$

Our primary tool over $\mathbb{R}$ is real quantifier elimination [12, 13, 38, 65, 69, 70]. We use implementations by the fourth author and his students [21,59] in Redlog [20,57,60–62], which is integrated with the open-source computer algebra system Reduce [42,43]. Our strategy is to apply virtual substitution methods [48,49,70] 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 $\mathbb{R}$ as well as, e.g, the countable field of real algebraic numbers.

Algorithm 4 is the real counterpart to Algorithm 1 in Sect. 3.1.

**Algorithm 4 ProjectAndClassify$_{\mathbb{R}}$**

**Input:** 1. $X$, a finite ordered set of variables; 2. $F \subseteq \mathbb{Q}[X]$ finite and non-empty

**Output:** 1. $\hat{X} \subseteq X$; 2. $\gamma \in \{G, C, O, X, g, c, o, x\}$

$\hat{X}$ describes the canonical projection space with respect to $V_{\mathbb{R}}(F)$. The letter $\gamma$ classifies $V_{\mathbb{R}}(F)^*$ in $\hat{X}$-space, using upper case when $\hat{X} = X$:

$G/G - V_{\mathbb{R}}(F)^*$ is a group; $C/C - V_{\mathbb{R}}(F)^*$ is a proper coset; $O/O - V_{\mathbb{R}}(F)^* = \emptyset$; $X/X$ else.

1. $\hat{X} := X$

2. $\hat{F} := F$

3. **for** $x_i \in X$ **do**

4. &nbsp;&nbsp;&nbsp;&nbsp;**if** $\mathbb{R} \models \forall (\bigwedge_{f \in \hat{F}} f = 0 \rightarrow x_i = 0)$ **then**

5. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$\hat{X} := \hat{X} \setminus \{x_i\}$

6. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$\hat{F} := \hat{F}[x_i/0]$

7. **end if**

8. **end for**

9. $\gamma := \text{Classify}_{\mathbb{R}}(\hat{X}, \hat{F})$

10. **if** $\hat{X} \neq X$ **then**

11. &nbsp;&nbsp;&nbsp;&nbsp;convert $\gamma$ to a lower case letter

12. **end if**

13. **return** $\hat{X}, \gamma$
(iii) there exists $g_0 \in C$ such that $g_0^{-1}C$ is a group;

(iv) for all $g \in 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_0G$ for a group $G$, hence $g_0 \cdot 1 \in 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 \in C$ and $G = g_0^{-1}C$ is a group; equivalently $C = g_0G$. Let $g \in C$. Then there is $y \in G$ such that $g = g_0y$. It follows that $g^{-1}C = (g_0y)^{-1}C = y^{-1}g_0^{-1}C = y^{-1}G = G$. $\square$

**Proposition 21**(iv) yields a first-order characterization for $V_R(\hat{F})^*$ to be a coset, which could be informally stated as follows:

$$ \forall g, x, y \in (\mathbb{R}^*)^n: g \in V_R(\hat{F}) \wedge gx \in V_R(\hat{F}) \wedge gy \in V_R(\hat{F}) \Rightarrow gx^{-1} \in V_R(\hat{F}) \wedge gxy \in V_R(\hat{F}). \quad (5) $$

As a first-order $L_{OR}$-formula this yields:

$$ \tau \doteq \forall \left( \bigwedge_{i=1}^{n} g_i \neq 0 \wedge \bigwedge_{i=1}^{n} x_i \neq 0 \wedge \bigwedge_{i=1}^{n} y_i \neq 0 \wedge \Phi(g_1, \dots, g_n) \wedge \Phi(g_1 x_1, \dots, g_n x_n) \wedge \Phi(g_1 y_1, \dots, g_n y_n) \longrightarrow \Phi(g_1 x_1^{-1}, \dots, g_n x_n^{-1}) \wedge \Phi(g_1 x_1 y_1, \dots, g_n x_n y_n) \right). $$

In the equations originating from $\Phi(g_1x_1^{-1}, \dots, g_nx_n^{-1})$ principal denominators containing variables from $x_1, \dots, 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 $\tau$ can be equivalently transformed into $\tau_{inv} \wedge \tau_{mult}$ with $\tau_{inv}$ and $\tau_{mult}$ as in line 5 and line 9 of Algorithm 5, respectively. Therefore it is correct to exit with $\gamma = 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 $\tau_{inv}$ does not hold in line 6, then $\tau_{mult}$ need not be considered at all.

When reaching line 13, we know that $V_R(\hat{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 $1 \in C$.

*Proof* If $1 \in C$, then $C = 1^{-1}C$ 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:

$$ \exists g \in (\mathbb{R}^*)^n \forall x, y \in (\mathbb{R}^*)^n: gx \in V_R(\hat{F}) \wedge gy \in V_R(\hat{F}) \Rightarrow gx^{-1} \in V_R(\hat{F}) \wedge gxy \in V_R(\hat{F}). \quad (6) $$

The first difference to observe is that in (6) in contrast to (5) there is quantifier alternation from $\exists$ to $\forall$. 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 \subseteq \mathbb{Q}[X]$, where $X = \{x_1, \dots, x_3\}$:

$$ F = \{-32x_1x_2 + 3, -x_2 + x_3, 4x_1 - x_3\}. $$
In lines 3–8 of Algorithm 4 we consecutively apply real quantifier elimination to the following formulas:

$$ \forall x_1 \forall x_2 \forall x_3 (-32x_1x_2 + 3 = 0 \land -x_2 + x_3 = 0 \land 4x_1 - x_3 = 0 \longrightarrow x_i = 0), \quad i = 1, \dots, 3. $$

Neither of them holds in $\mathbb{R}$ so that in line 9 we enter Algorithm 5 with $\hat{X} = X$ and $\hat{F} = F$. In line 2 of Algorithm 5 we test

$$ \exists x_1 \exists x_2 \exists x_3 (x_1 \neq 0 \land x_2 \neq 0 \land x_3 \neq 0 \land -32x_1x_2 + 3 = 0 \land -x_2 + x_3 = 0 \land 4x_1 - x_3 = 0). \quad (7) $$

Real quantifier elimination [48] confirms that (7) holds in $\mathbb{R}$, and extended quantifier elimination [49] even gives us a witness

$$ (x_1, x_2, x_3) = \left( \frac{\sqrt{3}}{8\sqrt{2}}, \frac{\sqrt{3}}{2\sqrt{2}}, \frac{\sqrt{3}}{2\sqrt{2}} \right) \in V_{\mathbb{R}}(F)^*. \quad (8) $$

Therefore we set up $\tau_{inv}$ in line 5 as follows:

$$ \begin{align} \tau_{inv} & \doteq \forall g_1 \forall g_2 \forall g_3 \forall x_1 \forall x_2 \forall x_3 (g_1 = 0 \land g_2 = 0 \land g_3 = 0 \land x_1 = 0 \land x_2 = 0 \land x_3 = 0 \nonumber \\ & \qquad \land -32g_1g_2 + 3 = 0 \land -g_2 + g_3 = 0 \land 4g_1 - g_3 = 0 \nonumber \\ & \qquad \land -32g_1x_1g_2x_2 + 3 = 0 \land -g_2x_2 + g_3x_3 = 0 \land 4g_1x_1 - g_3x_3 = 0 \nonumber \\ & \longrightarrow -32g_1g_2 + 3x_1x_2 = 0 \land -g_2x_3 + g_3x_2 = 0 \land 4g_1x_3 - g_3x_1 = 0). \tag{9} \end{align} $$

Notice that in the three equations in last line of (9) we have equivalently dropped denominators $x_1x_2$, $x_2x_3$, and $x_1x_3$, respectively. The inequalities for $x_1, \dots, x_3$ in first line of (9) ensure that those denominators do not vanish. In line 10, quantifier elimination confirms that $\tau_{inv}$ holds in $\mathbb{R}$, and so does $\tau_{mult}$ in line 10. Thus we reach line 13 and set up the following formula to test whether our coset $\hat{F}$ is even a group:

$$ -32 + 3 = 0 \land -1 + 1 = 0 \land 4 - 1 = 0. $$

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_{\mathbb{R}}(\hat{G})^*$ forming a coset. Furthermore we have 4 o and 42 o, i.e., $V_{\mathbb{R}}(\hat{G})^* = \emptyset$. The rest is 21 x and one single x. In terms of percentages of the 94 successful computations this gives the following picture:

<figure><img src="image_5.png" /></figure>

In analogy to Algorithm 3 in Sect. 3.1, Algorithm 6 applies prime decompositions over $\mathbb{Q}$ also in the real case. It starts with the computation of a prime decomposition in line 1. We then have

$$ \bigcup_{i=1}^{k} V_{\mathbb{R}}(P_i) = V_{\mathbb{R}}(F) \quad \text{and} \quad \mathbb{R} \models \bigvee_{i=1}^{k} \bigwedge_{p \in P_i} p = 0 \longleftrightarrow \bigwedge_{f \in F} f = 0. $$

In lines 3–4 we apply Algorithm 4 to each component and collect the results.
**Algorithm 6 DecomposeProjectAndClassify<sub>R</sub>**

Input: 1. X, a finite ordered set of variables; 2. F ⊆ Q[X] finite and non-empty

Output: 1. P ∈ ℘(Q[X])<sup>k</sup>; 2. ˆX ∈ ℘(X)<sup>k</sup>; 3. Γ ∈ {G, C, O, X, G, C, O, X}<sup>k</sup>

P = (P₁, ..., Pₖ) are Gröbner bases of a prime decomposition over Q of ⟨F⟩. In ˆX = (X̂₁, ..., X̂ₖ), X̂ᵢ describes the canonical projection space with respect to V<sub>R</sub>(Pᵢ). In Γ = (γ₁, ..., γₖ), the letter γᵢ classifies V<sub>R</sub>(Pᵢ)* in X̂ᵢ-space, using upper case when X̂ᵢ = X:

G/G - V<sub>R</sub>(P<sub>i</sub>)* is a group; C/C - V<sub>R</sub>(P<sub>i</sub>)* is a proper coset; O/O - V<sub>R</sub>(P<sub>i</sub>)* = ∅; X/X else.

1: P = (P₁, ..., Pₖ) := PrimeDecomposition(Q)(F)

2: **for** i = 1, ..., k **do**

3: X̂ᵢ, γᵢ := ProjectAndClassify<sub>R</sub>(X, Pᵢ)

4: **end for**

5: **return** P, (X̂₁, ..., X̂ₖ), (γ₁, ..., γₖ)

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<sub>R</sub>(P̃<sub>i</sub>)* forming a coset. Furthermore, we have 7 O and 2232 O, i.e., V<sub>R</sub>(P̃<sub>i</sub>)* = ∅. 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:

<figure><img src="image_6.png" /></figure>

Recall from the discussion at the end of Sect. 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.

4 Upper Complexity Bounds

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

4.1 Toricity over Algebraically Closed Fields of Characteristic Zero

As mentioned in Sect. 2, a torus $G$ can be represented as the set of solutions of binomials of the form $x_1^{a_{1i}} \cdots x_n^{a_{ni}} = 1$, $1 \le i \le n-m$, where $a_{ji} \in \mathbb{Z}$ and $m$ is equal to the dimension of $G$ and every Gröbner basis of a toric variety $\bar{G}$ consists only of binomials of the form $x_1^{b_{1i}} \cdots x_n^{b_{ni}} - x_1^{c_{li}} \cdots x_n^{c_{ni}}$ where integers $b_{ji}$, $c_{ji}$ are non-negative [63].

Let $f_1, \dots, f_k \in \mathbb{Z}[x_1, \dots, x_n]$ and $V \subseteq \mathbb{C}^n$ be the algebraic variety of common zeroes of $f_1, \dots, f_k$. We design an algorithm which recognizes whether $V$ is toric. Note that $f_1, \dots, f_k$ are not necessary binomials. To estimate the complexity of the algorithm we suppose that $\deg(f_i) \le d$, $1 \le i \le k$ and that the bit-size of each integer coefficient
of $f_1, \dots, f_k$ does not exceed $L$. Invoking [10,37] we first verify whether $V$ is irreducible and $\overline{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:

$$ \forall x \forall y (x \neq 0 \land y \neq 0 \land \bigwedge_i f_i(x) = 0 \land \bigwedge_i f_i(y) = 0 \rightarrow \bigwedge_i f_i(xy) = 0 \land \bigwedge_i f_i(1/x) = 0). \quad (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 $\mathbb{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, \dots, x_n$ which form a transcendental basis of $V^*$. Without loss of generality, assume that $\{x_1, \dots, x_m\}$ be a transcendental basis. Fix an integer $j, m < j \le n$ and project $V^*$ on the space generated by $x_1, \dots, x_m, x_j$, which is isomorphic to $(\mathbb{C}^*)^{m+1}$ invoking again [11]. Let $W \subseteq (\mathbb{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 \in \mathbb{Z}[x_1, \dots, x_m, x_j]$ (c.f. e.g., [58]). Moreover, $\deg W \le \deg V^* \le 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 $x_1^{q_{j1}} \cdots x_m^{q_{jm}} \cdot x_j^{q_j} - 1 \in \mathbb{Z}[x_1^{\pm}, \dots, x_n^{\pm}]$ for suitable relatively prime integers $q_{j1}, \dots, q_{jm}, q_j \in \mathbb{Z}$. Doing so for every $j, m < j \le n$, the algorithm yields polynomials $h_j \in \mathbb{Z}[x_1, \dots, x_n]$. Denote by $H \subseteq (\mathbb{C}^*)^n$ the variety given by equations $h_j, m < j \le n$. Clearly, $V^* \subseteq 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, \dots, 1) \in V^*$, and every irreducible component $H_1$ of $H$ has the form $H_1 = gV^*$ for an arbitrary element $g \in 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 $\mathbb{Z}$-basis of the intersection $\mathbb{Q}(Q_{m+1}, \dots, Q_n) \cap \mathbb{Z}^n$ of the $\mathbb{Q}$-linear space generated by vectors $Q_j = (q_{j1}, \dots, q_{jm}, 0, \dots, 0, q_j, 0, \dots, 0)$, $m < j \le n$ with the grid $\mathbb{Z}^n$ [40, Remark 3.1]. To find that $\mathbb{Z}$-basis, the algorithm first applies [22,31] to produce (within polynomial complexity) a $\mathbb{Z}$-basis $Z$ of the space of integer solutions of the linear system with rows $Q_j$, $m < j \le n$, and subsequently applies [22,31] to construct a $\mathbb{Z}$-basis of the linear system with the rows from $Z$.

Recall from the Definition 4 that for a torus $V^* \subseteq (\mathbb{C}^*)^n$ and a point $g \in (\mathbb{C}^*)^n$ we call $gV^*$ a shifted torus, and $\overline{gV^*} \subseteq \mathbb{C}^n$ a shifted toric variety. In particular, every irreducible component of a binomial variety in $(\mathbb{C}^*)^n$ is a shifted torus (Proposition 3). One can modify the described algorithm to test whether an input variety $V \subseteq \mathbb{C}^n$ is shifted toric. To this end, pick an arbitrary point $g = (g_1, \dots, g_n) \in 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 $x_1^{s_1} \cdots x_n^{s_n} = 1$ vanishes on $g^{-1}V^*$ if and only if $x_1^{s_1} \cdots x_n^{s_n} = g_1^{s_1} \cdots g_n^{s_n}$ vanishes on $V^*$.

The following theorem summarizes our algorithm.

**Theorem 25** Let $f_1, \dots, f_k \in \mathbb{Z}[x_1, \dots, x_n]$, $\deg(f_i) \le d$, $1 \le i \le k$ with bit-sizes of integer coefficients of $f_1, \dots, f_k$ at most $L$. One can design an algorithm which tests whether the variety $V \subseteq \mathbb{C}^n$ determined by $f_1, \dots, f_k$ is (shifted) toric. In the positive case, the algorithm yields a transcendental basis $x_{i_1}, \dots, x_{i_m}, m = \dim V$ of $V$. It furthermore yields binomial equations defining $V^* = V \cap (\mathbb{C}^*)^n$. Each binomial equation has the form $x_1^{s_1} \cdots x_n^{s_n} = g_1^{s_1} \cdots g_n^{s_n}$ for all $(g_1, \dots, g_n) \in V^*$ and for suitable integers $s_1, \dots, s_n \in \mathbb{Z}$ satisfying $|s_i| < O(d^{n^2})$. 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 $\mathbb{Q}$ [10,37].

## 4.2 Toricity over Real Closed Fields

In this subsection we design an algorithm that recognizes toricity of a semi-algebraic set over $\mathbb{R}$. We refer to [2] for the algorithms in real algebraic geometry. Let $\mathbb{R}_{>0} := \{z \in \mathbb{R} | z > 0\}$ denote the positive orthant. Keeping the notations from Sect. 4.1 consider the semi-algebraic set $T := \{x \in (\mathbb{R}_{>0})^n | f_i(x) \ge 0, 1 \le i \le k\}$. Modify (10) replacing $\mathbb{C}^*$ by $\mathbb{R}_{>0}$ and equalities $f_i = 0$ by inequalities $f_i \ge 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) \subseteq \mathbb{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, \dots, x_m$. Fix $j, m < j \le n$ and denote by $U_j$ the projection of $T$ on the $(m+1)$-dimensional space with coordinates $x_1, \dots, 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, \dots, x_m$. Then $p(U_j) = U$. Since $\dim(U_j) = \dim(U) = m$, we have that $p(\log(U_j)) = \log(U) = \mathbb{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

$$x_1^{t_{j1}} \cdots x_m^{t_{jm}} x_j^{t_j} = c_j \quad (11)$$

for some reals $t_{j1}, \dots, 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 \to U$ and conclude that equation (11) is algebraic, thus $t_{j1}, \dots, t_{jm}, t_j \in \mathbb{Z}$. The algorithm also yields $t_{j1}, \dots, t_{jm}, t_j$. Note that without loss of generality one can assume that they are relatively prime, otherwise divide by their greatest common divisor. The complexity of the algorithm is again $(Ld^{n^2})^{O(1)}$. Doing so for each $j, m < j \le n$, the algorithm yields binomial equations of the form (11) which determine $T$ uniquely. Similar to Sect. 4.1 one can produce a $\mathbb{Z}$-basis of the intersection of $\mathbb{Q}$-linear space generated by vectors $(t_{j1}, \dots, t_{jm}, 0, \dots, 0, t_j, 0, \dots, 0)$ with the grid $\mathbb{Z}^n$. Then any vector $(s_1, \dots, s_n)$ from this basis provides a binomial $X_1^{s_1} \cdots X_n^{s_n} - 1$ that vanishes on $T$. The above $\mathbb{Z}$-basis need not be constructed, since binomials of the form (11) already determine $T$ uniquely. We summarize the described algorithm in the following theorem.

**Theorem 26** Let $f_1, \dots, f_k \in \mathbb{Z}[x_1, \dots, x_n]$, $\deg(f_i) \le d, 1 \le i \le k$ with bit-sizes of integer coefficients of $f_1, \dots, f_k$ at most $L$. One can design an algorithm which tests whether the semi-algebraic set $T := \{x \in (\mathbb{R}_{>0})^n | f_i(x) \ge 0, 1 \le i \le k\}$ is a group (a torus). In the positive case, the algorithm yields coordinates $x_{i_1}, \dots, x_{i_m}$, where $m = \dim(T)$, such that the dimension of the projection of $T$ on the $m$-dimensional space with the coordinates $x_{i_1}, \dots, x_{i_m}$ equals $m$. It furthermore yields for each $j \notin \{i_1, \dots, i_m\}$ a binomial equation of the form $x_1^{t_{j1}} \cdots x_m^{t_{jm}} x_j^{t_j} = 1$ which vanishes on $T$, with relatively prime $t_{j1}, \dots, t_{jm}, t_j \in \mathbb{Z}$, where $|t_{j1}|+\dots +|t_{jm}|+|t_j| \le d^{O(n)}$. The complexity of the algorithm does not exceed $(Ld^{n^2})^{O(1)}$.

Similar to Subsect. 4.1, our results here can be generalized to arbitrary real closed field.

## 4.3 Membership in Binomial Varieties

Let a group $G \subset (\overline{\mathbb{Q}}^*)^n$ be given by binomial equations $x_1^{a_{i,1}} \cdots x_n^{a_{i,n}} = 1, 1 \le i \le k$, where $a_{i,j} \in \mathbb{Z}, |a_{i,j}| \le d$. Let $v = (v_1, \dots, v_n) \in \mathbb{Q}^n$ be a point such that the absolute values of the numerators and denominators of $v_1, \dots, v_n$ do not exceed $M$. We design an algorithm which tests whether $v \in \overline{G}$. Recall that $\overline{G}$ is a binomial variety, and it is a toric variety when $G$ is irreducible.
**Theorem 27** There is an algorithm which tests whether a point $v$ belongs to a binomial variety $\overline{G}$ with its complexity bounded by

(i) $(k \cdot \log M \cdot (dn)^n)^{O(1)}$ and by

(ii) $(k \cdot M \cdot n \cdot \log d)^{O(1)}$.

*Proof* Permuting the coordinates, assume w.l.o.g. that $v = (0, \dots, 0, v_{s+1}, \dots, v_n)$, where $v_{s+1} \cdots v_n \neq 0$. Due to Claim 5.3 in [40], $v \in \overline{G}$ if and only if there exist a point $u = (u_1, \dots, u_s, v_{s+1}, \dots, v_n) \in G$ and positive $0 < b_1, \dots, b_s \in \mathbb{Z}$ such that

$$v = \lim_{t \to 0} (u_1 \cdot t^{b_1}, \dots, u_s \cdot t^{b_s}, v_{s+1}, \dots, v_n) \qquad (12)$$

and for all $t \neq 0$, i.e., a shift of a one-parametric subgroup, we have that $(u_1 \cdot t^{b_1}, \dots, u_s \cdot t^{b_s}, v_{s+1}, \dots, v_n) \in G$. Then (12) is equivalent to the existence of $u \in G$ and a one-parametric subgroup $\{(t^{b_1}, \dots, t^{b_s}, 1, \dots, 1) \mid t \neq 0\} \subseteq G$. The existence of the latter is equivalent to the existence of a non-negative vector $(b_1, \dots, b_s, 0, \dots, 0)$ orthogonal to the vectors $(a_{i,1}, \dots, a_{i,n})$, $1 \le i \le k$. This can be checked by means of linear programming.

The existence of a point $u \in G$ satisfying (12) is equivalent to the existence of non-zero $u_1, \dots, u_s \in \overline{\mathbb{Q}}^*$ satisfying the binomial equations

$$u_1^{a_{i,1}} \cdots u_s^{a_{i,s}} = v_{s+1}^{-a_{i,s+1}} \cdots v_n^{-a_{i,n}}, \quad 1 \le i \le k. \qquad (13)$$

One can apply the algorithm in [41] to this system and transform the $k \times s$ submatrix $A = (a_{i,j})$, $1 \le i \le k$, $1 \le j \le 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

$$\prod_{1 \le i \le k} (v_{s+1}^{-a_{i,s+1}} \cdots v_n^{-a_{i,n}})^{c_i} = 1 \qquad (14)$$

for some integers $c_i$ being suitable minors of matrix $A$, hence $|c_i| \le (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}, \dots, v_n$. This leads to the complexity bound (i). Alternatively, one can factorize the numerators and denominators of $v_{s+1}, \dots, 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. $\square$

One can extend the complexity bound (i) for $v_j \in \overline{\mathbb{Q}}$, $1 \le j \le n$ being algebraic numbers. In this case $\log M$ plays the role of the bit-size of the representation of $v$.

## 5 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 $\mathbb{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 [1,52]. 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^*$.

**Acknowledgements** Open access funding provided by Projekt DEAL. This work has been supported by the bilateral project ANR-17-CE40-0036/DFG-391322026 SYMBIONT [5,6]. The first author is grateful to grant RSF-16-11-10075 and to MCCME for the inspiring atmosphere. Stephen Forrest at Maplesoft and Arthur Norman at the University of Cambridge greatly helped with Maple- and Reduce-related technical issues, respectively. Christoph Lüders at the University of Bonn greatly supported the project with discussions around and generation of suitable input data.

**Open Access** This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.

# Appendix A Computations on 129 Models from the BioModels Repository

We conducted our computations on a 2.40 GHz Intel Xeon E5-4640 with 512 GB RAM and 32 physical cores providing 64 CPUs via hyper-threading. For parallelization of the jobs for the individual models we used GNU Parallel [64]. Results are stored in an Sqlite3 database file, which contains considerably more information than can be presented here in print (Online Resource 1). Beyond our own computations the database imports data from BioModels and ODEbase, so that our models and the history of our input can be reliably tracked. For instance, we store the mappings between our variables and the original species names and even the original SBML file with each model.

Among the information imported from ODEbase there is a binary flag indicating whether or not a model has mass action kinetics [66] according to the following criterion [29, Section 2.1.2].

**Definition 28 (Mass Action Test)** A system is considered a mass action system when the kinetic law is made up of the product of the concentrations of the reactant species to the power of their respective stoichiometry times a constant.

## A.1 Classifications of the Original Systems

We start with the classification over $\mathbb{C}$ and $\mathbb{R}$ of the original, not decomposed, systems using algorithms from Sects. 3.1 and 3.2, respectively. For comments on the tables from a theoretical point of view compare those sections.
<caption>**Table 1** Applying ProjectAndClassify<sub>K</sub> over $\mathbb{C}$ and $\mathbb{R}$. Model numbers *nnn* stand for BIOMD0000000 *nnn*. “m/a” indicates mass action kinetics (Definition 28). |X| and |X̃| are numbers of variables before and after projection, respectively. γ is G for</caption>

group, C for cosine, 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 6h per model

<table><thead><tr><th rowspan="2">Model</th><th rowspan="2">m/a</th><th colspan="4">Algorithm 1 (C)</th><th colspan="4">Algorithm 4 (R)</th></tr><tr><th>|X|</th><th>|X̃|</th><th>γ</th><th>Time (s)</th><th>|X|</th><th>|X̃|</th><th>γ</th><th>Time (s)</th></tr></thead><tbody><tr><td>001</td><td>1</td><td>12</td><td>12</td><td>C</td><td>10.32</td><td>12</td><td>12</td><td>C</td><td>3.37</td></tr><tr><td>002</td><td>1</td><td></td><td></td><td>⊥</td><td></td><td></td><td></td><td></td><td>⊥</td></tr><tr><td>009</td><td>0</td><td>22</td><td>22</td><td>C</td><td>85.96</td><td>22</td><td>22</td><td>C</td><td>21.26</td></tr><tr><td>011</td><td>0</td><td>22</td><td>22</td><td>C</td><td>150.21</td><td>22</td><td>22</td><td>C</td><td>11.20</td></tr><tr><td>026</td><td>1</td><td>11</td><td>11</td><td>X</td><td>3.99</td><td>11</td><td>11</td><td>X</td><td>1.12</td></tr><tr><td>028</td><td>1</td><td>16</td><td>16</td><td>X</td><td>66.60</td><td></td><td></td><td></td><td>⊥</td></tr><tr><td>030</td><td>1</td><td>18</td><td>18</td><td>X</td><td>57.84</td><td></td><td></td><td></td><td>⊥</td></tr><tr><td>035</td><td>0</td><td>9</td><td>9</td><td>X</td><td>21.11</td><td>9</td><td>9</td><td>X</td><td>0.25</td></tr><tr><td>038</td><td>0</td><td></td><td></td><td></td><td>⊥</td><td></td><td></td><td></td><td>⊥</td></tr><tr><td>040</td><td>0</td><td>3</td><td>3</td><td>X</td><td>4.65</td><td>3</td><td>3</td><td>X</td><td>0.05</td></tr><tr><td>046</td><td>0</td><td></td><td></td><td></td><td>⊥</td><td></td><td></td><td></td><td>⊥</td></tr><tr><td>050</td><td>0</td><td>9</td><td>0</td><td>o</td><td>0.09</td><td>9</td><td>0</td><td>o</td><td>0.02</td></tr><tr><td>052</td><td>0</td><td>6</td><td>0</td><td>o</td><td>0.09</td><td>6</td><td>0</td><td>o</td><td>0.01</td></tr><tr><td>057</td><td>0</td><td>6</td><td>6</td><td>C</td><td>1.53</td><td>6</td><td>6</td><td>C</td><td>0.11</td></tr><tr><td>069</td><td>0</td><td>10</td><td>10</td><td>X</td><td>14.09</td><td></td><td></td><td></td><td>⊥</td></tr><tr><td>072</td><td>0</td><td>7</td><td>3</td><td>o</td><td>0.63</td><td>7</td><td>3</td><td>o</td><td>0.03</td></tr><tr><td>077</td><td>0</td><td>7</td><td>7</td><td>C</td><td>5.82</td><td>7</td><td>7</td><td>C</td><td>0.14</td></tr><tr><td>080</td><td>0</td><td>10</td><td>8</td><td>o</td><td>3.72</td><td>10</td><td>8</td><td>o</td><td>0.09</td></tr><tr><td>082</td><td>0</td><td>10</td><td>8</td><td>o</td><td>2.44</td><td>10</td><td>8</td><td>o</td><td>0.14</td></tr><tr><td>085</td><td>0</td><td></td><td></td><td></td><td>⊥</td><td></td><td></td><td></td><td>⊥</td></tr><tr><td>086</td><td>0</td><td></td><td></td><td></td><td>⊥</td><td></td><td></td><td></td><td>⊥</td></tr><tr><td>091</td><td>0</td><td>14</td><td>0</td><td>o</td><td>0.05</td><td>14</td><td>0</td><td>o</td><td>0.03</td></tr><tr><td>092</td><td>0</td><td>3</td><td>3</td><td>C</td><td>1.87</td><td>3</td><td>3</td><td>C</td><td>0.04</td></tr><tr><td>099</td><td>0</td><td>7</td><td>7</td><td>C</td><td>2.48</td><td>7</td><td>7</td><td>C</td><td>0.34</td></tr><tr><td>101</td><td>1</td><td>6</td><td>6</td><td>X</td><td>1.82</td><td>6</td><td>6</td><td>X</td><td>0.09</td></tr><tr><td>102</td><td>0</td><td>13</td><td>13</td><td>X</td><td>226.67</td><td></td><td></td><td></td><td>⊥</td></tr><tr><td>103</td><td>0</td><td>17</td><td>17</td><td>X</td><td>20238.89</td><td></td><td></td><td></td><td>⊥</td></tr><tr><td>104</td><td>0</td><td>4</td><td>4</td><td>o</td><td>1.36</td><td>4</td><td>4</td><td>o</td><td>0.01</td></tr><tr><td>105</td><td>0</td><td>26</td><td>0</td><td>o</td><td>0.24</td><td>26</td><td>0</td><td>o</td><td>0.51</td></tr><tr><td>108</td><td>0</td><td></td><td></td><td></td><td>⊥</td><td></td><td></td><td></td><td>⊥</td></tr><tr><td>122</td><td>0</td><td>12</td><td>12</td><td>X</td><td>8639.19</td><td></td><td></td><td></td><td>⊥</td></tr><tr><td>123</td><td>0</td><td></td><td></td><td></td><td>⊥</td><td></td><td></td><td></td><td>⊥</td></tr><tr><td>125</td><td>0</td><td>5</td><td>5</td><td>X</td><td>2.26</td><td>5</td><td>5</td><td>X</td><td>0.05</td></tr><tr><td>137</td><td>0</td><td>21</td><td>20</td><td>X</td><td>50.16</td><td>21</td><td>20</td><td>X</td><td>2.91</td></tr><tr><td>147</td><td>0</td><td></td><td></td><td></td><td>⊥</td><td></td><td></td><td></td><td>⊥</td></tr><tr><td>150</td><td>0</td><td>4</td><td>4</td><td>C</td><td>3.43</td><td>4</td><td>4</td><td>C</td><td>0.04</td></tr><tr><td>152</td><td>0</td><td></td><td></td><td></td><td>⊥</td><td></td><td></td><td></td><td>⊥</td></tr></tbody></table>
<table><caption>**Table 1** continued</caption><thead><tr><th rowspan="2">Model</th><th rowspan="2">m/a</th><th colspan="4">Algorithm 1 (C)</th><th colspan="4">Algorithm 4 (R)</th></tr><tr><th>|X|</th><th>|X&#770;|</th><th>&gamma;</th><th>Time (s)</th><th>|X|</th><th>|X&#770;|</th><th>&gamma;</th><th>Time (s)</th></tr></thead><tbody><tr><td>153</td><td>0</td><td></td><td></td><td></td><td>&perp;</td><td></td><td></td><td></td><td>&perp;</td></tr><tr><td>156</td><td>0</td><td>3</td><td>3</td><td>C</td><td>0.96</td><td>3</td><td>3</td><td>C</td><td>0.02</td></tr><tr><td>158</td><td>0</td><td>3</td><td>3</td><td>X</td><td>1.00</td><td>3</td><td>3</td><td>X</td><td>0.02</td></tr><tr><td>159</td><td>0</td><td>3</td><td>3</td><td>C</td><td>2.49</td><td>3</td><td>3</td><td>C</td><td>0.02</td></tr><tr><td>163</td><td>0</td><td>16</td><td>16</td><td>X</td><td>9.09</td><td>16</td><td>16</td><td>X</td><td>1.75</td></tr><tr><td>173</td><td>1</td><td></td><td></td><td></td><td>&perp;</td><td></td><td></td><td></td><td>&perp;</td></tr><tr><td>178</td><td>0</td><td>4</td><td>0</td><td>&odot;</td><td>0.06</td><td>4</td><td>0</td><td>&odot;</td><td>0.00</td></tr><tr><td>186</td><td>1</td><td>10</td><td>10</td><td>&odot;</td><td>4.63</td><td>10</td><td>10</td><td>&odot;</td><td>0.14</td></tr><tr><td>187</td><td>1</td><td>10</td><td>10</td><td>&odot;</td><td>9.85</td><td>10</td><td>10</td><td>&odot;</td><td>0.12</td></tr><tr><td>188</td><td>1</td><td>10</td><td>0</td><td>&odot;</td><td>0.10</td><td>10</td><td>0</td><td>&odot;</td><td>0.02</td></tr><tr><td>189</td><td>1</td><td>7</td><td>0</td><td>&odot;</td><td>0.03</td><td>7</td><td>0</td><td>&odot;</td><td>0.01</td></tr><tr><td>193</td><td>1</td><td>8</td><td>8</td><td>X</td><td>7.11</td><td>8</td><td>8</td><td>X</td><td>0.13</td></tr><tr><td>194</td><td>1</td><td>5</td><td>5</td><td>X</td><td>7.07</td><td>5</td><td>5</td><td>X</td><td>0.03</td></tr><tr><td>197</td><td>0</td><td>5</td><td>5</td><td>X</td><td>9.93</td><td>5</td><td>5</td><td>X</td><td>0.15</td></tr><tr><td>198</td><td>1</td><td>9</td><td>5</td><td>C</td><td>0.79</td><td>9</td><td>5</td><td>C</td><td>0.06</td></tr><tr><td>199</td><td>0</td><td>8</td><td>8</td><td>C</td><td>2.79</td><td>8</td><td>8</td><td>C</td><td>0.18</td></tr><tr><td>200</td><td>0</td><td></td><td></td><td></td><td>&perp;</td><td></td><td></td><td></td><td>&perp;</td></tr><tr><td>205</td><td>0</td><td></td><td></td><td></td><td>&perp;</td><td></td><td></td><td></td><td>&perp;</td></tr><tr><td>220</td><td>0</td><td>56</td><td>46</td><td>&odot;</td><td>5.27</td><td>56</td><td>46</td><td>&odot;</td><td>88.15</td></tr><tr><td>226</td><td>0</td><td>14</td><td>14</td><td>X</td><td>14.19</td><td></td><td></td><td></td><td>&perp;</td></tr><tr><td>227</td><td>0</td><td>39</td><td>0</td><td>&odot;</td><td>0.14</td><td>39</td><td>0</td><td>&odot;</td><td>0.19</td></tr><tr><td>229</td><td>0</td><td>7</td><td>7</td><td>C</td><td>1.33</td><td>7</td><td>7</td><td>C</td><td>0.20</td></tr><tr><td>230</td><td>0</td><td>24</td><td>23</td><td>&odot;</td><td>47.72</td><td></td><td></td><td></td><td>&perp;</td></tr><tr><td>233</td><td>0</td><td>2</td><td>2</td><td>X</td><td>1.03</td><td>2</td><td>2</td><td>X</td><td>0.01</td></tr><tr><td>243</td><td>0</td><td>19</td><td>12</td><td>&odot;</td><td>1.32</td><td>19</td><td>11</td><td>&odot;</td><td>5.21</td></tr><tr><td>257</td><td>1</td><td>8</td><td>8</td><td>X</td><td>2.65</td><td></td><td></td><td></td><td>&perp;</td></tr><tr><td>259</td><td>0</td><td>16</td><td>0</td><td>&odot;</td><td>0.38</td><td>16</td><td>0</td><td>&odot;</td><td>0.17</td></tr><tr><td>260</td><td>0</td><td>16</td><td>0</td><td>&odot;</td><td>0.09</td><td>16</td><td>0</td><td>&odot;</td><td>0.16</td></tr><tr><td>261</td><td>0</td><td>16</td><td>0</td><td>&odot;</td><td>0.09</td><td>16</td><td>0</td><td>&odot;</td><td>0.17</td></tr><tr><td>262</td><td>0</td><td>9</td><td>1</td><td>C</td><td>3.18</td><td>9</td><td>1</td><td>C</td><td>0.05</td></tr><tr><td>263</td><td>0</td><td>9</td><td>1</td><td>C</td><td>1.11</td><td>9</td><td>1</td><td>C</td><td>0.05</td></tr><tr><td>264</td><td>0</td><td>11</td><td>9</td><td>C</td><td>11.45</td><td>11</td><td>9</td><td>C</td><td>0.37</td></tr><tr><td>267</td><td>0</td><td>3</td><td>0</td><td>&odot;</td><td>0.09</td><td>3</td><td>0</td><td>&odot;</td><td>0.00</td></tr><tr><td>270</td><td>0</td><td></td><td></td><td></td><td>&perp;</td><td></td><td></td><td></td><td>&perp;</td></tr><tr><td>271</td><td>1</td><td>4</td><td>1</td><td>C</td><td>0.20</td><td>4</td><td>1</td><td>C</td><td>0.01</td></tr><tr><td>272</td><td>1</td><td>4</td><td>1</td><td>C</td><td>0.27</td><td>4</td><td>1</td><td>C</td><td>0.01</td></tr><tr><td>281</td><td>0</td><td>32</td><td>31</td><td>&odot;</td><td>1.20</td><td>32</td><td>31</td><td>&odot;</td><td>24.50</td></tr><tr><td>282</td><td>1</td><td>3</td><td>3</td><td>&odot;</td><td>0.16</td><td>3</td><td>3</td><td>&odot;</td><td>0.01</td></tr><tr><td>283</td><td>1</td><td>3</td><td>2</td><td>&odot;</td><td>0.28</td><td>3</td><td>2</td><td>&odot;</td><td>0.01</td></tr><tr><td>286</td><td>0</td><td></td><td></td><td></td><td>&perp;</td><td></td><td></td><td></td><td>&perp;</td></tr><tr><td>287</td><td>1</td><td>20</td><td>20</td><td>X</td><td>33.76</td><td></td><td></td><td></td><td>&perp;</td></tr><tr><td>289</td><td>0</td><td>4</td><td>4</td><td>X</td><td>0.84</td><td>4</td><td>0</td><td>&odot;</td><td>0.01</td></tr></tbody></table>
<table><caption>**Table 1** continued</caption><thead><tr><th rowspan="2">Model</th><th rowspan="2">m/a</th><th colspan="4">Algorithm 1 (C)</th><th colspan="4">Algorithm 4 (R)</th></tr><tr><th>|X|</th><th>|X&#770;|</th><th>&gamma;</th><th>Time (s)</th><th>|X|</th><th>|X&#770;|</th><th>&gamma;</th><th>Time (s)</th></tr></thead><tbody><tr><td>292</td><td>0</td><td>2</td><td>0</td><td>&odot;</td><td>0.16</td><td>2</td><td>0</td><td>&odot;</td><td>0.01</td></tr><tr><td>306</td><td>0</td><td>2</td><td>2</td><td>C</td><td>0.25</td><td>2</td><td>2</td><td>C</td><td>0.01</td></tr><tr><td>307</td><td>0</td><td>2</td><td>0</td><td>&odot;</td><td>0.14</td><td>2</td><td>0</td><td>&odot;</td><td>0.01</td></tr><tr><td>310</td><td>0</td><td>1</td><td>0</td><td>&odot;</td><td>0.02</td><td>1</td><td>0</td><td>&odot;</td><td>0.00</td></tr><tr><td>311</td><td>0</td><td>1</td><td>0</td><td>&odot;</td><td>0.02</td><td>1</td><td>0</td><td>&odot;</td><td>0.00</td></tr><tr><td>312</td><td>0</td><td>2</td><td>0</td><td>&odot;</td><td>0.02</td><td>2</td><td>0</td><td>&odot;</td><td>0.00</td></tr><tr><td>314</td><td>0</td><td>10</td><td>7</td><td>&odot;</td><td>0.73</td><td>10</td><td>7</td><td>&odot;</td><td>0.07</td></tr><tr><td>315</td><td>1</td><td></td><td></td><td>&perp;</td><td></td><td></td><td></td><td></td><td>&perp;</td></tr><tr><td>321</td><td>0</td><td>3</td><td>0</td><td>&odot;</td><td>0.02</td><td>3</td><td>0</td><td>&odot;</td><td>0.00</td></tr><tr><td>332</td><td>0</td><td></td><td></td><td>&perp;</td><td></td><td>70</td><td>64</td><td>&odot;</td><td>395.97</td></tr><tr><td>333</td><td>0</td><td>49</td><td>43</td><td>&odot;</td><td>573.10</td><td>49</td><td>43</td><td>&odot;</td><td>120.98</td></tr><tr><td>334</td><td>0</td><td></td><td></td><td>&perp;</td><td></td><td>69</td><td>63</td><td>&odot;</td><td>271.40</td></tr><tr><td>335</td><td>1</td><td>29</td><td>28</td><td>&odot;</td><td>97.52</td><td></td><td></td><td></td><td>&perp;</td></tr><tr><td>344</td><td>0</td><td></td><td></td><td>&perp;</td><td></td><td></td><td></td><td></td><td>&perp;</td></tr><tr><td>357</td><td>1</td><td>8</td><td>4</td><td>&odot;</td><td>0.20</td><td>8</td><td>4</td><td>&odot;</td><td>0.10</td></tr><tr><td>359</td><td>0</td><td>8</td><td>6</td><td>&odot;</td><td>0.21</td><td>8</td><td>6</td><td>&odot;</td><td>0.08</td></tr><tr><td>360</td><td>0</td><td>8</td><td>6</td><td>&odot;</td><td>0.93</td><td>8</td><td>6</td><td>&odot;</td><td>0.07</td></tr><tr><td>361</td><td>0</td><td>8</td><td>7</td><td>&odot;</td><td>1.04</td><td>8</td><td>7</td><td>&odot;</td><td>0.04</td></tr><tr><td>362</td><td>1</td><td>29</td><td>28</td><td>&odot;</td><td>1304.71</td><td>29</td><td>28</td><td>&odot;</td><td>429.42</td></tr><tr><td>363</td><td>0</td><td>3</td><td>0</td><td>&odot;</td><td>0.07</td><td>3</td><td>0</td><td>&odot;</td><td>0.00</td></tr><tr><td>364</td><td>1</td><td>12</td><td>10</td><td>&odot;</td><td>1.03</td><td>12</td><td>10</td><td>&odot;</td><td>0.54</td></tr><tr><td>365</td><td>1</td><td>30</td><td>24</td><td>&odot;</td><td>212.01</td><td></td><td></td><td></td><td>&perp;</td></tr><tr><td>407</td><td>0</td><td></td><td></td><td>&perp;</td><td></td><td></td><td></td><td></td><td>&perp;</td></tr><tr><td>413</td><td>1</td><td>5</td><td>5</td><td>X</td><td>1.05</td><td>5</td><td>5</td><td>X</td><td>0.06</td></tr><tr><td>416</td><td>0</td><td>32</td><td>32</td><td>X</td><td>25.87</td><td>32</td><td>32</td><td>X</td><td>4.17</td></tr><tr><td>430</td><td>0</td><td></td><td></td><td>&perp;</td><td></td><td>23</td><td>23</td><td>X</td><td>13.99</td></tr><tr><td>431</td><td>0</td><td></td><td></td><td>&perp;</td><td></td><td>27</td><td>27</td><td>X</td><td>31.90</td></tr><tr><td>439</td><td>0</td><td>20</td><td>20</td><td>X</td><td>52.51</td><td>20</td><td>20</td><td>X</td><td>15.42</td></tr><tr><td>459</td><td>0</td><td>3</td><td>3</td><td>C</td><td>0.50</td><td>3</td><td>3</td><td>C</td><td>0.09</td></tr><tr><td>460</td><td>0</td><td>3</td><td>3</td><td>X</td><td>0.52</td><td>3</td><td>3</td><td>X</td><td>0.04</td></tr><tr><td>475</td><td>0</td><td>22</td><td>20</td><td>&odot;</td><td>3.26</td><td>22</td><td>20</td><td>&odot;</td><td>7.92</td></tr><tr><td>478</td><td>0</td><td>29</td><td>28</td><td>&odot;</td><td>33.38</td><td>29</td><td>28</td><td>&odot;</td><td>16.85</td></tr><tr><td>479</td><td>0</td><td></td><td></td><td>&perp;</td><td></td><td></td><td></td><td></td><td>&perp;</td></tr><tr><td>483</td><td>0</td><td>6</td><td>6</td><td>X</td><td>1.26</td><td>6</td><td>6</td><td>X</td><td>0.11</td></tr><tr><td>484</td><td>0</td><td>1</td><td>1</td><td>C</td><td>0.14</td><td>1</td><td>1</td><td>C</td><td>0.01</td></tr><tr><td>485</td><td>0</td><td>1</td><td>1</td><td>X</td><td>1.22</td><td>1</td><td>1</td><td>X</td><td>0.12</td></tr><tr><td>486</td><td>1</td><td>2</td><td>2</td><td>C</td><td>0.63</td><td>2</td><td>2</td><td>C</td><td>0.02</td></tr><tr><td>487</td><td>1</td><td>6</td><td>6</td><td>C</td><td>0.69</td><td>6</td><td>6</td><td>C</td><td>0.16</td></tr><tr><td>491</td><td>1</td><td>57</td><td>57</td><td>G</td><td>12.21</td><td></td><td></td><td></td><td>&perp;</td></tr><tr><td>492</td><td>1</td><td>52</td><td>52</td><td>G</td><td>17.96</td><td></td><td></td><td></td><td>&perp;</td></tr><tr><td>504</td><td>0</td><td></td><td></td><td>&perp;</td><td></td><td></td><td></td><td></td><td>&perp;</td></tr><tr><td>519</td><td>0</td><td>3</td><td>3</td><td>C</td><td>4.71</td><td>3</td><td>3</td><td>C</td><td>0.18</td></tr></tbody></table>
<table><caption>**Table 1** continued</caption><thead><tr><th rowspan="2">Model</th><th rowspan="2">m/a</th><th colspan="4">Algorithm 1 (C)</th><th colspan="4">Algorithm 4 (R)</th></tr><tr><th>|X|</th><th>|X&#770;|</th><th>&gamma;</th><th>Time (s)</th><th>|X|</th><th>|X&#770;|</th><th>&gamma;</th><th>Time (s)</th></tr></thead><tbody><tr><td>546</td><td>0</td><td>3</td><td>0</td><td>&odot;</td><td>0.07</td><td>3</td><td>0</td><td>&odot;</td><td>0.00</td></tr><tr><td>559</td><td>0</td><td>71</td><td>0</td><td>&odot;</td><td>0.32</td><td>71</td><td>0</td><td>&odot;</td><td>0.91</td></tr><tr><td>581</td><td>0</td><td></td><td></td><td>&perp;</td><td></td><td>25</td><td>25</td><td>&times;</td><td>6.00</td></tr><tr><td>584</td><td>0</td><td>9</td><td>9</td><td>&C</td><td>0.60</td><td>9</td><td>9</td><td>&C</td><td>0.13</td></tr><tr><td>619</td><td>1</td><td>8</td><td>0</td><td>&odot;</td><td>0.07</td><td>8</td><td>0</td><td>&odot;</td><td>0.01</td></tr><tr><td>629</td><td>0</td><td>5</td><td>5</td><td>&C</td><td>0.41</td><td>5</td><td>5</td><td>&C</td><td>0.08</td></tr><tr><td>637</td><td>1</td><td>12</td><td>12</td><td>&times;</td><td>492.76</td><td></td><td></td><td></td><td>&perp;</td></tr><tr><td>647</td><td>1</td><td>11</td><td>11</td><td>&times;</td><td>6.03</td><td>11</td><td>11</td><td>&times;</td><td>0.37</td></tr></tbody></table>

<table><caption>**Table 2** Statistical information about the computations in Table 1</caption><thead><tr><th></th><th>Algorithm 1 (C)</th><th>Algorithm 4 (C)</th></tr></thead><tbody><tr><td>Time limit</td><td>6h</td><td>6h</td></tr><tr><td>#models</td><td>129</td><td>129</td></tr><tr><td>#successful computations</td><td>104</td><td>94</td></tr><tr><td>Success rate</td><td>80.62%</td><td>72.87%</td></tr><tr><td>Median (time)</td><td>1.33 s</td><td>0.09 s</td></tr></tbody></table>

<figure><img src="image_7.png" /><figcaption>**Fig. 1** Numbers of problems solved within certain time limits by Algorithm 1 over $\mathbb{C}$ (left) and Algorithm 4 over $\mathbb{R}$ (right). The total number of problems is 129</figcaption></figure>

Beyond the data presented here we generally save the sets $X, \hat{X}$. Furthermore, over $\mathbb{C}$ we save the computed Gröbner bases $G, \hat{G}, \tilde{G}$ and their term orders, and over $\mathbb{R}$ we save witnesses for $V_{\mathbb{R}}^* \neq \emptyset$.

Recall that over $\mathbb{C}$, $\hat{X}$ describes only compatible projection spaces, while over $\mathbb{R}$ it describes the canonical projection space.
Remark 29 Let $F \subseteq \mathbb{Q}[X]$. Let $Y_{\mathbb{R}}, Y_{\mathbb{C}} \subseteq X$ describe the canonical projection spaces with respect to $V_{\mathbb{R}}(F)$, $V_{\mathbb{C}}(F)$, respectively. Let furthermore $\hat{X}$ describe any compatible projection space with respect to $V_{\mathbb{C}}(F)$. Then $Y_{\mathbb{R}} \subseteq Y_{\mathbb{C}} \subseteq \hat{X}$ and thus $|Y_{\mathbb{R}}| \le |Y_{\mathbb{C}}| \le |\hat{X}|$. Using the fact that all sets are finite, $|\hat{X}| = |Y_{\mathbb{R}}|$ implies $\hat{X} = Y_{\mathbb{C}}$.

Recall that $\hat{X}$ as computed in Algorithm 1 describes only a compatible projection space with respect to the complex variety, while $\hat{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 $|\hat{X}|$ over $\mathbb{C}$ and $\mathbb{R}$ in Table 1 below, then that heuristic method was successful. This is the case with all models where the computation terminated over both $\mathbb{C}$ and $\mathbb{R}$ except for the models 243 and 289.

Since we obtain $\mathbb{X}$ in contrast to $\emptyset$ with model 289, we know that $\hat{X}$ describes a canonical projection space over $\mathbb{C}$ also there. With model 243, our obtained $\hat{X}$ indeed does not describe the canonical projection space over $\mathbb{C}$. Inspection of the computation shows that the Gröbner basis $G$ in I.1 of Algorithm 1 contains $x_0^2$. An improved heuristic method could check for powers of variables occurring in $G$. However, Example 15 shows that this would still be only heuristic.

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 $\emptyset$ over $\mathbb{C}$, from which we can conclude that they have the same classification over $\mathbb{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 $\mathbb{C}$ and $\mathbb{R}$ but obtained different classifications: model 289 has $\mathbb{X}$ over $\mathbb{C}$ but $\emptyset$ over $\mathbb{R}$.

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 $\mathcal{P}$ over $\mathbb{Q}$ and then apply our classification approach to each prime component individually. This yields lists $\mathcal{X}, \hat{\mathcal{X}}$ containing in turn lists $X$ and $\hat{X}$ of variables before and after projection, respectively, as well as a list $\Gamma$ of classifications $\gamma$. We have $|\mathcal{X}| = |\hat{\mathcal{X}}| = |\Gamma| = |\mathcal{P}|$, and elements can be matched by position. Since this information is too comprehensive to be displayed in a table, we give only $|\mathcal{P}|$ and summarize the numbers of occurrences of the various classifications in $\Gamma$. Our database, of course, stores the complete information.

There are 17 models where the complex classification in Table 3 succeeded but the real classification timed out: 002, 028, 030, 038, 046, 069, 102, 103, 108, 122, 173, 226, 230, 270, 287, 439, 637. Vice versa, there are no models where the classification succeeded over $\mathbb{R}$ but not over $\mathbb{C}$. There are 8 models where we succeeded over both $\mathbb{C}$ and $\mathbb{R}$ but obtained different classifications: 091, 105, 188, 189, 227, 289, 292, 559. All those differences are visible in the summaries $\Gamma_{\text{summary}}$ in Table 3. Model 289 is $\emptyset + \mathbb{X}$ over $\mathbb{C}$ but $2\emptyset$ over $\mathbb{R}$. We have addressed this difference already with the computations in Appendix A.1. With all other models listed above the difference is $\emptyset$ over $\mathbb{C}$ in contrast to $\emptyset$ over $\mathbb{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.
<caption>**Table 3** Applying DecomposeProjectAndClassify<sub>K</sub> over $\mathbb{C}$ and $\mathbb{R}$. Model numbers *nnn* stand for BIOMD0000000*nnn*. “m/a” indicates mass action kinetics (Definition 28). |P| is the number of prime components over $\mathbb{Q}$. $\Gamma_{\text{summary}}$ summarizes the classification of the components using $\mathbb{G}$ for group, $\mathbb{C}$ for coset, $\mathbb{O}$ for empty set, and $\mathbb{X}$ else; lower case letters indicate projection. Time columns give total CPU times in seconds or “$\perp$” for a timeout with a limit of 6h per model</caption>

<table><thead><tr><th rowspan="2">Model</th><th rowspan="2">m/a</th><th rowspan="2">|P|</th><th rowspan="2">Time (s)</th><th colspan="2">Algorithm 3 (C)</th><th colspan="2">Algorithm 6 (R)</th></tr><tr><th>Γ<sub>summary</sub></th><th>Time (s)</th><th>Γ<sub>summary</sub></th><th>Time (s)</th></tr></thead><tbody><tr><td>001</td><td>1</td><td>1</td><td>4.49</td><td>C</td><td>12.64</td><td>C</td><td>5.00</td></tr><tr><td>002</td><td>1</td><td>1</td><td>192.42</td><td>X</td><td>318.37</td><td></td><td>⊥</td></tr><tr><td>009</td><td>0</td><td>28</td><td>199.03</td><td>C + 13c + 14o</td><td>238.71</td><td>C + 13c + 14o</td><td>255.23</td></tr><tr><td>011</td><td>0</td><td>20</td><td>167.45</td><td>C + 9c + 10o</td><td>197.90</td><td>C + 9c + 10o</td><td>212.07</td></tr><tr><td>026</td><td>1</td><td>2</td><td>4.74</td><td>o + X</td><td>5.95</td><td>o + X</td><td>5.36</td></tr><tr><td>028</td><td>1</td><td>2</td><td>135.05</td><td>o + X</td><td>162.90</td><td></td><td>⊥</td></tr><tr><td>030</td><td>1</td><td>2</td><td>157.89</td><td>o + X</td><td>175.57</td><td></td><td>⊥</td></tr><tr><td>035</td><td>0</td><td>1</td><td>12.31</td><td>X</td><td>18.26</td><td>X</td><td>12.76</td></tr><tr><td>038</td><td>0</td><td>1</td><td>391.05</td><td>X</td><td>463.38</td><td></td><td>⊥</td></tr><tr><td>040</td><td>0</td><td>2</td><td>1.64</td><td>o + X</td><td>2.14</td><td>o + X</td><td>1.67</td></tr><tr><td>046</td><td>0</td><td>2</td><td>764.98</td><td>X + X</td><td>817.90</td><td></td><td>⊥</td></tr><tr><td>050</td><td>0</td><td>1</td><td>0.59</td><td>o</td><td>0.61</td><td>o</td><td>0.60</td></tr><tr><td>052</td><td>0</td><td>1</td><td>0.95</td><td>o</td><td>0.98</td><td>o</td><td>0.95</td></tr><tr><td>057</td><td>0</td><td>1</td><td>0.63</td><td>C</td><td>5.44</td><td>C</td><td>0.70</td></tr><tr><td>069</td><td>0</td><td>2</td><td>56.34</td><td>2x</td><td>61.34</td><td></td><td>⊥</td></tr><tr><td>072</td><td>0</td><td>2</td><td>0.26</td><td>2c</td><td>0.55</td><td>2c</td><td>0.27</td></tr><tr><td>077</td><td>0</td><td>1</td><td>1.05</td><td>C</td><td>6.26</td><td>C</td><td>1.15</td></tr><tr><td>080</td><td>0</td><td>7</td><td>9.43</td><td>3c + 4o</td><td>11.43</td><td>3c + 4o</td><td>9.62</td></tr><tr><td>082</td><td>0</td><td>7</td><td>8.45</td><td>3c + 4o</td><td>13.70</td><td>3c + 4o</td><td>8.64</td></tr><tr><td>085</td><td>0</td><td></td><td>⊥</td><td></td><td>⊥</td><td></td><td>⊥</td></tr><tr><td>086</td><td>0</td><td></td><td>⊥</td><td></td><td>⊥</td><td></td><td>⊥</td></tr><tr><td>091</td><td>0</td><td>1</td><td>0.02</td><td>o</td><td>0.06</td><td>o</td><td>0.02</td></tr><tr><td>092</td><td>0</td><td>2</td><td>0.75</td><td>C + o</td><td>1.36</td><td>C + o</td><td>0.77</td></tr><tr><td>099</td><td>0</td><td>1</td><td>0.26</td><td>C</td><td>0.92</td><td>C</td><td>0.47</td></tr><tr><td>101</td><td>1</td><td>1</td><td>0.36</td><td>X</td><td>5.90</td><td>X</td><td>0.43</td></tr><tr><td>102</td><td>0</td><td>1</td><td>38.46</td><td>X</td><td>249.72</td><td></td><td>⊥</td></tr><tr><td>103</td><td>0</td><td>1</td><td>3090.38</td><td>X</td><td>20628.00</td><td></td><td>⊥</td></tr><tr><td>104</td><td>0</td><td>4</td><td>0.63</td><td>4o</td><td>0.64</td><td>4o</td><td>0.63</td></tr><tr><td>105</td><td>0</td><td>1</td><td>0.37</td><td>o</td><td>0.55</td><td>o</td><td>0.37</td></tr><tr><td>108</td><td>0</td><td>2</td><td>40.86</td><td>2x</td><td>68.74</td><td></td><td>⊥</td></tr><tr><td>122</td><td>0</td><td>1</td><td>326.19</td><td>X</td><td>363.45</td><td></td><td>⊥</td></tr><tr><td>123</td><td>0</td><td></td><td>⊥</td><td></td><td>⊥</td><td></td><td>⊥</td></tr><tr><td>125</td><td>0</td><td>1</td><td>0.18</td><td>X</td><td>1.22</td><td>X</td><td>0.21</td></tr><tr><td>137</td><td>0</td><td>5</td><td>180.68</td><td>5x</td><td>220.13</td><td>5x</td><td>190.34</td></tr><tr><td>147</td><td>0</td><td></td><td>⊥</td><td></td><td>⊥</td><td></td><td>⊥</td></tr><tr><td>150</td><td>0</td><td>1</td><td>1.12</td><td>C</td><td>2.86</td><td>C</td><td>1.15</td></tr><tr><td>152</td><td>0</td><td></td><td>⊥</td><td></td><td>⊥</td><td></td><td>⊥</td></tr></tbody></table>
<table><caption>**Table 3** continued</caption><thead><tr><th rowspan="2">Model</th><th rowspan="2">m/a</th><th rowspan="2">|P|</th><th rowspan="2">Time (s)</th><th colspan="2">Algorithm 3 (C)</th><th colspan="2">Algorithm 6 (R)</th></tr><tr><th>Γ<sub>summary</sub></th><th>Time (s)</th><th>Γ<sub>summary</sub></th><th>Time (s)</th></tr></thead><tbody><tr><td>153</td><td>0</td><td></td><td>⊥</td><td></td><td>⊥</td><td></td><td>⊥</td></tr><tr><td>156</td><td>0</td><td>2</td><td>0.53</td><td>C + o</td><td>0.77</td><td>C + o</td><td>0.54</td></tr><tr><td>158</td><td>0</td><td>1</td><td>0.22</td><td>X</td><td>1.06</td><td>X</td><td>0.24</td></tr><tr><td>159</td><td>0</td><td>1</td><td>0.20</td><td>C</td><td>0.60</td><td>C</td><td>0.23</td></tr><tr><td>163</td><td>0</td><td>1</td><td>9.69</td><td>X</td><td>19.50</td><td>X</td><td>10.36</td></tr><tr><td>173</td><td>1</td><td>1</td><td>295.07</td><td>X</td><td>1719.63</td><td></td><td>⊥</td></tr><tr><td>178</td><td>0</td><td>1</td><td>3.66</td><td>o</td><td>3.67</td><td>o</td><td>3.66</td></tr><tr><td>186</td><td>1</td><td>5</td><td>4.73</td><td>2c + 3x</td><td>7.78</td><td>2c + 3x</td><td>5.09</td></tr><tr><td>187</td><td>1</td><td>5</td><td>18.41</td><td>2c + 3x</td><td>29.25</td><td>2c + 3x</td><td>18.79</td></tr><tr><td>188</td><td>1</td><td>1</td><td>0.27</td><td>o</td><td>0.29</td><td>o</td><td>0.27</td></tr><tr><td>189</td><td>1</td><td>1</td><td>0.02</td><td>o</td><td>0.04</td><td>o</td><td>0.02</td></tr><tr><td>193</td><td>1</td><td>1</td><td>6.50</td><td>X</td><td>7.12</td><td>X</td><td>6.62</td></tr><tr><td>194</td><td>1</td><td>1</td><td>1.38</td><td>X</td><td>1.98</td><td>X</td><td>1.41</td></tr><tr><td>197</td><td>0</td><td>1</td><td>4.18</td><td>X</td><td>6.96</td><td>X</td><td>4.24</td></tr><tr><td>198</td><td>1</td><td>1</td><td>0.69</td><td>c</td><td>3.16</td><td>c</td><td>0.72</td></tr><tr><td>199</td><td>0</td><td>1</td><td>0.35</td><td>C</td><td>2.63</td><td>C</td><td>0.50</td></tr><tr><td>200</td><td>0</td><td></td><td>⊥</td><td></td><td>⊥</td><td></td><td>⊥</td></tr><tr><td>205</td><td>0</td><td></td><td>⊥</td><td></td><td>⊥</td><td></td><td>⊥</td></tr><tr><td>220</td><td>0</td><td></td><td>⊥</td><td></td><td>⊥</td><td></td><td>⊥</td></tr><tr><td>226</td><td>0</td><td>1</td><td>17.10</td><td>X</td><td>25.93</td><td></td><td>⊥</td></tr><tr><td>227</td><td>0</td><td>1</td><td>0.03</td><td>o</td><td>0.15</td><td>o</td><td>0.03</td></tr><tr><td>229</td><td>0</td><td>2</td><td>1.60</td><td>C + c</td><td>6.77</td><td>C + c</td><td>1.73</td></tr><tr><td>230</td><td>0</td><td>5</td><td>181.14</td><td>5x</td><td>249.78</td><td></td><td>⊥</td></tr><tr><td>233</td><td>0</td><td>3</td><td>0.14</td><td>2c + o</td><td>2.46</td><td>2c + o</td><td>0.15</td></tr><tr><td>243</td><td>0</td><td>8</td><td>9.13</td><td>8o</td><td>9.19</td><td>8o</td><td>9.18</td></tr><tr><td>257</td><td>1</td><td>2</td><td>0.63</td><td>o + X</td><td>2.29</td><td>o + X</td><td>590.61</td></tr><tr><td>259</td><td>0</td><td>1</td><td>2.93</td><td>o</td><td>2.98</td><td>o</td><td>2.95</td></tr><tr><td>260</td><td>0</td><td>1</td><td>1.41</td><td>o</td><td>1.46</td><td>o</td><td>1.42</td></tr><tr><td>261</td><td>0</td><td>1</td><td>0.84</td><td>o</td><td>0.87</td><td>o</td><td>0.86</td></tr><tr><td>262</td><td>0</td><td>1</td><td>1.83</td><td>c</td><td>4.43</td><td>c</td><td>1.85</td></tr><tr><td>263</td><td>0</td><td>1</td><td>2.48</td><td>c</td><td>2.66</td><td>c</td><td>2.49</td></tr><tr><td>264</td><td>0</td><td>1</td><td>3.12</td><td>c</td><td>7.28</td><td>c</td><td>3.31</td></tr><tr><td>267</td><td>0</td><td>1</td><td>0.10</td><td>o</td><td>0.11</td><td>o</td><td>0.10</td></tr><tr><td>270</td><td>0</td><td>1</td><td>14511.34</td><td>X</td><td>15819.74</td><td></td><td>⊥</td></tr><tr><td>271</td><td>1</td><td>1</td><td>3.87</td><td>c</td><td>5.31</td><td>c</td><td>3.88</td></tr><tr><td>272</td><td>1</td><td>1</td><td>0.12</td><td>c</td><td>1.11</td><td>c</td><td>0.12</td></tr><tr><td>281</td><td>0</td><td>3144</td><td>8264.69</td><td>1008c + 2136o</td><td>8317.80</td><td>1008c + 2136o</td><td>8655.75</td></tr><tr><td>282</td><td>1</td><td>2</td><td>0.36</td><td>2o</td><td>0.37</td><td>2o</td><td>0.37</td></tr></tbody></table>
<table><caption>**Table 3** continued</caption><thead><tr><th rowspan="2">Model</th><th rowspan="2">m/a</th><th rowspan="2">|P|</th><th rowspan="2">Time (s)</th><th colspan="2">Algorithm 3 (C)</th><th colspan="2">Algorithm 6 (R)</th></tr><tr><th>Γ<sub>summary</sub></th><th>Time (s)</th><th>Γ<sub>summary</sub></th><th>Time (s)</th></tr></thead><tbody><tr><td>283</td><td>1</td><td>2</td><td>0.10</td><td>2o</td><td>0.11</td><td>2o</td><td>0.11</td></tr><tr><td>286</td><td>0</td><td></td><td>⊥</td><td></td><td>⊥</td><td></td><td>⊥</td></tr><tr><td>287</td><td>1</td><td>1</td><td>12.78</td><td>x</td><td>27.29</td><td></td><td>⊥</td></tr><tr><td>289</td><td>0</td><td>2</td><td>1.15</td><td>o + x</td><td>2.84</td><td>2o</td><td>1.15</td></tr><tr><td>292</td><td>0</td><td>1</td><td>1.20</td><td>o</td><td>1.20</td><td>o</td><td>1.20</td></tr><tr><td>306</td><td>0</td><td>2</td><td>0.53</td><td>c + o</td><td>1.04</td><td>c + o</td><td>0.54</td></tr><tr><td>307</td><td>0</td><td>1</td><td>0.02</td><td>o</td><td>0.03</td><td>o</td><td>0.02</td></tr><tr><td>310</td><td>0</td><td>1</td><td>0.02</td><td>o</td><td>0.03</td><td>o</td><td>0.02</td></tr><tr><td>311</td><td>0</td><td>1</td><td>0.02</td><td>o</td><td>0.02</td><td>o</td><td>0.02</td></tr><tr><td>312</td><td>0</td><td>1</td><td>0.04</td><td>o</td><td>0.05</td><td>o</td><td>0.04</td></tr><tr><td>314</td><td>0</td><td>3</td><td>0.94</td><td>3c</td><td>1.11</td><td>3c</td><td>0.99</td></tr><tr><td>315</td><td>1</td><td></td><td>⊥</td><td></td><td>⊥</td><td></td><td>⊥</td></tr><tr><td>321</td><td>0</td><td>1</td><td>0.07</td><td>o</td><td>0.08</td><td>o</td><td>0.07</td></tr><tr><td>332</td><td>0</td><td></td><td>⊥</td><td></td><td>⊥</td><td></td><td>⊥</td></tr><tr><td>333</td><td>0</td><td></td><td>⊥</td><td></td><td>⊥</td><td></td><td>⊥</td></tr><tr><td>334</td><td>0</td><td></td><td>⊥</td><td></td><td>⊥</td><td></td><td>⊥</td></tr><tr><td>335</td><td>1</td><td></td><td>⊥</td><td></td><td>⊥</td><td></td><td>⊥</td></tr><tr><td>344</td><td>0</td><td></td><td>⊥</td><td></td><td>⊥</td><td></td><td>⊥</td></tr><tr><td>357</td><td>1</td><td>2</td><td>0.23</td><td>2o</td><td>0.25</td><td>2o</td><td>0.24</td></tr><tr><td>359</td><td>0</td><td>5</td><td>0.96</td><td>2c + 3o</td><td>2.80</td><td>2c + 3o</td><td>1.02</td></tr><tr><td>360</td><td>0</td><td>4</td><td>0.72</td><td>2c + 2o</td><td>1.48</td><td>2c + 2o</td><td>0.77</td></tr><tr><td>361</td><td>0</td><td>2</td><td>0.48</td><td>2c</td><td>1.01</td><td>2c</td><td>0.60</td></tr><tr><td>362</td><td>1</td><td></td><td>⊥</td><td></td><td>⊥</td><td></td><td>⊥</td></tr><tr><td>363</td><td>0</td><td>1</td><td>0.26</td><td>o</td><td>0.27</td><td>o</td><td>0.26</td></tr><tr><td>364</td><td>1</td><td>4</td><td>2.23</td><td>2c + 2o</td><td>3.22</td><td>2c + 2o</td><td>2.37</td></tr><tr><td>365</td><td>1</td><td></td><td>⊥</td><td></td><td>⊥</td><td></td><td>⊥</td></tr><tr><td>407</td><td>0</td><td></td><td>⊥</td><td></td><td>⊥</td><td></td><td>⊥</td></tr><tr><td>413</td><td>1</td><td>1</td><td>1.07</td><td>x</td><td>1.59</td><td>x</td><td>1.11</td></tr><tr><td>416</td><td>0</td><td>3</td><td>36.24</td><td>x + 2x</td><td>43.95</td><td>x + 2x</td><td>41.76</td></tr><tr><td>430</td><td>0</td><td>20</td><td>112.47</td><td>8c + 10o + x + x</td><td>221.05</td><td>8c + 10o + x + x</td><td>12709.47</td></tr><tr><td>431</td><td>0</td><td></td><td>⊥</td><td></td><td>⊥</td><td></td><td>⊥</td></tr><tr><td>439</td><td>0</td><td>9</td><td>32.38</td><td>2c + 2o + x + 4x</td><td>40.10</td><td></td><td>⊥</td></tr><tr><td>459</td><td>0</td><td>1</td><td>0.24</td><td>c</td><td>0.50</td><td>c</td><td>0.25</td></tr><tr><td>460</td><td>0</td><td>1</td><td>1.27</td><td>x</td><td>1.49</td><td>x</td><td>1.30</td></tr><tr><td>475</td><td>0</td><td>30</td><td>30.46</td><td>14c + 4o + 12x</td><td>37.62</td><td>14c + 4o + 12x</td><td>43.66</td></tr><tr><td>478</td><td>0</td><td></td><td>⊥</td><td></td><td>⊥</td><td></td><td>⊥</td></tr><tr><td>479</td><td>0</td><td></td><td>⊥</td><td></td><td>⊥</td><td></td><td>⊥</td></tr><tr><td>483</td><td>0</td><td>1</td><td>0.23</td><td>x</td><td>0.59</td><td>x</td><td>0.28</td></tr><tr><td>484</td><td>0</td><td>1</td><td>0.10</td><td>c</td><td>0.14</td><td>c</td><td>0.11</td></tr></tbody></table>
<table><caption>**Table 3** continued</caption><thead><tr><th rowspan="2">Model</th><th rowspan="2">m/a</th><th rowspan="2">|P|</th><th rowspan="2">Time (s)</th><th colspan="2">Algorithm 3 (C)</th><th colspan="2">Algorithm 6 (R)</th></tr><tr><th>Γ<sub>summary</sub></th><th>Time (s)</th><th>Γ<sub>summary</sub></th><th>Time (s)</th></tr></thead><tbody><tr><td>485</td><td>0</td><td>1</td><td>0.16</td><td>X</td><td>0.23</td><td>X</td><td>0.23</td></tr><tr><td>486</td><td>1</td><td>1</td><td>0.15</td><td>C</td><td>0.27</td><td>C</td><td>0.16</td></tr><tr><td>487</td><td>1</td><td>1</td><td>1.40</td><td>C</td><td>1.78</td><td>C</td><td>1.49</td></tr><tr><td>491</td><td>1</td><td>1</td><td>2.55</td><td>G</td><td>22.49</td><td>G</td><td>47.84</td></tr><tr><td>492</td><td>1</td><td>1</td><td>1.59</td><td>G</td><td>10.04</td><td>G</td><td>35.49</td></tr><tr><td>504</td><td>0</td><td></td><td>⊥</td><td></td><td>⊥</td><td></td><td>⊥</td></tr><tr><td>519</td><td>0</td><td>3</td><td>1.60</td><td>C + c + o</td><td>4.15</td><td>C + c + o</td><td>1.62</td></tr><tr><td>546</td><td>0</td><td>1</td><td>0.13</td><td>o</td><td>0.14</td><td>o</td><td>0.13</td></tr><tr><td>559</td><td>0</td><td>1</td><td>0.98</td><td>o</td><td>1.18</td><td>o</td><td>0.99</td></tr><tr><td>581</td><td>0</td><td></td><td>⊥</td><td></td><td>⊥</td><td></td><td>⊥</td></tr><tr><td>584</td><td>0</td><td>1</td><td>0.26</td><td>C</td><td>2.36</td><td>C</td><td>0.38</td></tr><tr><td>619</td><td>1</td><td>1</td><td>0.86</td><td>o</td><td>0.88</td><td>o</td><td>0.88</td></tr><tr><td>629</td><td>0</td><td>1</td><td>1.03</td><td>C</td><td>1.70</td><td>C</td><td>1.06</td></tr><tr><td>637</td><td>1</td><td>3</td><td>8383.02</td><td>X + 2x</td><td>8464.64</td><td></td><td>⊥</td></tr><tr><td>647</td><td>1</td><td>1</td><td>5.95</td><td>X</td><td>6.70</td><td>X</td><td>6.23</td></tr></tbody></table>

<table><caption>**Table 4** Statistical information about the computations in Table 3</caption><thead><tr><th></th><th>Algorithm 3 (C)</th><th>Algorithm 6 (R)</th></tr></thead><tbody><tr><td>Time limit</td><td>6h</td><td>6h</td></tr><tr><td>#models</td><td>129</td><td>129</td></tr><tr><td>#successful computations</td><td>105</td><td>88</td></tr><tr><td>Success rate</td><td>81.40%</td><td>68.22%</td></tr><tr><td>Median (time)</td><td>2.80s</td><td>0.99s</td></tr></tbody></table>

<figure><img src="image_8.png" /><figcaption>**Fig. 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</figcaption></figure>
References

1. Ábrahám, E., Abbott, J., Becker, B., Bigatti, A.M., Brain, M., Buchberger, B., Cimatti, A., Davenport, J.H., England, M., Fontaine, P., Forrest, S., Griggio, A., Kroening, D., Seiler, W.M., Sturm, T.: SC²: satisfiability checking meets symbolic computation. In: Kohlhase, M., Johansson, M., Miller, B., de Moura, L., Tompa, F. (eds.) Intelligent Computer Mathematics. CICM 2016. LNCS, vol. 9791, pp. 28–43. Springer, Berlin (2016). https://doi.org/10.1007/978-3-319-42547-4_3

2. Basu, S., Pollack, R., Roy, M.-F.: Algorithms in Real Algebraic Geometry. Algorithms and Computation in Mathematics, vol. 10. Springer, Berlin (2006). https://doi.org/10.1007/3-540-33099-2

3. Becker, T., Weispfenning, V., Kredel, H.: Gröbner Bases: A Computational Approach to Commutative Algebra. Graduate Texts in Mathematics, vol. 141. Springer, Berlin (1993). https://doi.org/10.1007/978-1-4612-0913-3

4. Boltzmann, L.: Lectures on Gas Theory. University of California Press, Berkeley (1964)

5. Boulier, F., Fages, F., Radulescu, O., Samal, S.S., Schuppert, A., Seiler, W., Sturm, T., Walcher, S., Weber, A.: The SYMBIONT project: symbolic methods for biological networks. ACM Commun. Comput. Algebra 52(3), 67–70 (2018). https://doi.org/10.1145/3313880.3313885

6. Boulier, F., Fages, F., Radulescu, O., Samal, S.S., Schuppert, A., Seiler, W., Sturm, T., Walcher, S., Weber, A.: The SYMBIONT project: symbolic methods for biological networks. F1000Research (2018). https://doi.org/10.7490/f1000research.1115995.1

7. Bradford, R.J., Davenport, J.H., England, M., Errami, H., Gerdt, V.P., Grigoriev, D., Hoyt, C., Košta, M., Radulescu, O., Sturm, T., Weber, A.: Identifying the parametric occurrence of multiple steady states for some biological networks. J. Symb. Comput. 98, 84–119 (2019). https://doi.org/10.1016/j.jsc.2019.07.008

8. Buchberger, B.: Ein Algorithmus zum Auffinden der Basiselemente des Restklassenringes nach einem nulldimensionalen Polynom- mideal. Doctoral dissertation, Mathematical Institute, University of Innsbruck, Austria (1965)

9. Chelliah, V., Juty, N., Ajmera, I., Ali, R., Dumousseau, M., Glont, M., Hucka, M., Jalowicki, G., Keating, S., Knight-Schrijver, V., Lloret-Villas, A., NathNatarajan, K., Pettit, J.-B., Rodriguez, N., Schubert, M., Wimalaratne, S.M., Zhao, Y., Hermjakob, H., Le Novère, N., Laibe, C.: BioModels: ten-year anniversary. Nucl. Acids Res. 43(D1), D542–D548 (2015). https://doi.org/10.1093/ nar/gku1181

10. Chistov, A.L.: Algorithm of polynomial complexity for factoring polynomials and finding the components of varieties in subexponen- tial time. J. Sov. Math. 34(4), 1838–1882 (1986). https://doi.org/10.1007/BF01095643

11. Chistov, A.L., Grigor'ev, D.Y.: Complexity of quantifier elimination in the theory of algebraically closed fields. In: Chytil, M.P., Koubek, V. (eds.) MFCS 1984: Mathematical Foundations of Computer Science. LNCS, vol. 176, pp. 17–31. Springer, Berlin (1984). https://doi.org/10.1007/BFb0030287

12. Collins, G.E.: Quantifier elimination for the elementary theory of real closed fields by cylindrical algebraic decomposition. In: Brakhage, H. (ed.) Automata Theory and Formal Languages. 2nd GI Conference. LNCS, vol. 33, pp. 134–183. Springer, Berlin (1975). https://doi.org/10.1007/3-540-07407-4_17

13. Collins, G.E., Hong, H.: Partial cylindrical algebraic decomposition for quantifier elimination. J. Symb. Comput. 12(3), 299–328 (1991). https://doi.org/10.1016/S0747-7171(08)80152-6

14. Conradi, C., Iosif, A., Kahle, T.: Multistationarity in the space of total concentrations for systems that admit a monomial parametriza- tion. Bull. Math. Biol. 81(10), 4174–4209 (2019). https://doi.org/10.1007/s11538-019-00639-4

15. Conradi, C., Kahle, T.: Detecting binomiality. Adv. Appl. Math. 71, 52–67 (2015). https://doi.org/10.1016/j.aam.2015.08.004

16. Cox, D., Little, J., O’Shea, D.: Ideals, Varieties and Algorithms. Undergraduate Texts in Mathematics. Springer, Berlin (1992). https://doi.org/10.1007/978-1-4757-2181-2

17. Craciun, G., Dickenstein, A., Shiu, A., Sturmfels, B.: Toric dynamical systems. J. Symb. Comput. 44(11), 1551–1565 (2009). https://doi.org/10.1016/j.jsc.2008.08.006

18. Davenport, J.H., Heintz, J.: Real quantifier elimination is doubly exponential. J. Symb. Comput. 5(1–2), 29–35 (1988). https://doi.org/10.1016/S0747-7171(88)80004-X

19. Dolzmann, A., Seidl, A., Sturm, T.: Efficient projection orders for CAD. In: Gutierrez, J. (ed.) ISSAC 2004: Proceedings of the 2004 International Symposium on Symbolic and Algebraic Computation, pp. 111–118. ACM, New York, NY (2004). https://doi.org/10.1145/1005285.1005303

20. Dolzmann, A., Sturm, T.: Redlog: computer algebra meets computer logic. ACM SIGSAM Bull. 31(2), 2–9 (1997). https://doi.org/10.1145/261320.261324

21. Dolzmann, A., Sturm, T.: Simplification of quantifier-free formulae over ordered fields. J. Symb. Comput. 24(2), 209–231 (1997). https://doi.org/10.1006/jsco.1997.0123

22. Dumas, J.-G., Saunders, B.D., Villard, G.: On efficient sparse integer matrix Smith normal form computations. J. Symb. Comput. 32(1–2), 71–99 (2001). https://doi.org/10.1006/jsco.2001.0451

23. Einstein, A.: Strahlungs-emission und -absorption nach der Quantentheorie. Verh. Dtsch. Phys. Ges. 18, 318–323 (1916)

24. Eisenbud, D., Sturmfels, B.: Binomial ideals. Duke Math. J. 84(1), 1–45 (1996). https://doi.org/10.1007/s10463-010-0290-9

25. Faugère, J.-C.: A new efficient algorithm for computing Gröbner bases (F4). J. Pure Appl. Algebra 139(1–3), 61–88 (1999). https://doi.org/10.1145/780506.780516

26. Faugère, J.-C.: A new efficient algorithm for computing gröbner bases without reduction to zero (F5). In: Mora, T. (ed.) ISSAC 2002: Proceedings of the 2002 International Symposium on Symbolic and Algebraic Computation, pp 75–83. ACM, New York, NY (2002) https://doi.org/10.1145/780506.780516
27. Feinberg, M.: Complex balancing in general kinetic systems. Arch. Ration. Mech. Anal. 49(3), 187–194 (1972). https://doi.org/10.1007/BF00255665

28. Feinberg, M.: Stability of complex isothermal reactors—I. The deficiency zero and deficiency one theorems. Chem. Eng. Sci. 42(10), 2229–2268 (1987). https://doi.org/10.1016/0009-2509(87)80099-4

29. Feinberg, M.: Foundations of Chemical Reaction Network Theory. Applied Mathematical Sciences, vol. 202. Springer, Berlin (2019). https://doi.org/10.1007/978-3-030-03858-8

30. Finney, A., Hucka, M.: Systems biology markup language: level 2 and beyond. Biochem. Soc. Trans. 31(6), 1472–1473 (2003). https://doi.org/10.1042/bst0311472

31. Frumkin, M.A.: An application of modular arithmetic to the construction of algorithms for solving systems of linear equations. Dokl. Akad. Nauk SSSR 229(5), 1067–1070 (1976)

32. Fulton, W.: Introduction to Toric Varieties. Annals of Mathematics Studies, vol. 131. Princeton University Press, Princeton, NJ (1993). https://doi.org/10.1515/9781400882526

33. Gatermann, K.: Counting stable solutions of sparse polynomial systems in chemistry. In: Green, E.L., Hošten, S., Laubenbacher, R.C., Powers, V.A. (eds.) Symbolic Computation: Solving Equations in Algebra, Geometry, and Engineering. Contemporary Mathematics, vol. 286, pp. 53–69. AMS, Providence, RI (2001). https://doi.org/10.1090/conm/286/04754

34. Gatermann, K., Wolfrum, M.: Bernstein’s second theorem and Viro’s method for sparse polynomial systems in chemistry. Adv. Appl. Math. 34(2), 252–294 (2005). https://doi.org/10.1016/j.aam.2004.04.003

35. Gorban, A.N., Mirkes, E.M., Yablonski, G.S.: Thermodynamics in the limit of irreversible reactions. Physica A 392(6), 1318–1335 (2013). https://doi.org/10.1016/j.physa.2012.10.009

36. Gorban, A.N., Yablonski, G.S.: Extended detailed balance for systems with irreversible reactions. Chem. Eng. Sci. 66(21), 5388–5399 (2011). https://doi.org/10.1016/j.ces.2011.07.054

37. Grigor'ev, D.Y.: Factorization of polynomials over a finite field and the solution of systems of algebraic equations. J. Sov. Math. 34(4), 1762–1803 (1986). https://doi.org/10.1007/BF01095638

38. Grigor'ev, D.Y.: Complexity of deciding Tarski algebra. J. Symb. Comput. 5(1–2), 65–108 (1988). https://doi.org/10.1016/S0747-7171(88)80006-3

39. Grigor'ev, D.Y., Vorobjov, N.N.: Solving systems of polynomial inequalities in subexponential time. J. Symb. Comput. 5(1–2), 37–64 (1988). https://doi.org/10.1016/S0747-7171(88)80005-1

40. Grigoriev, D., Milman, P.D.: Nash resolution for binomial varieties as Euclidean division. A priori termination bound, polynomial complexity in essential dimension 2. Adv. Math. 231(6), 3389–3428 (2012). https://doi.org/10.1016/j.aim.2012.08.009

41. Grigoriev, D., Weber, A.: Complexity of solving systems with few independent monomials and applications to mass-action kinetics. In: Gerdt, V.P., Koepf, W., Mayr, E.W., Vorozhtsov, E.V. (eds.), Computer Algebra in Scientific Computing: 14th International Workshop, CASC 2012. Maribor, Slovenia, September 3–6, 2012. Proceedings, LNCS, vol. 7442, pp. 143–154. Springer (2012). https://doi.org/10.1007/978-3-642-32973-9_12

42. Hearn, A.C.: Reduce—a user-oriented system for algebraic simplification. ACM SIGSAM Bull. 1(6), 50–51 (1967)

43. Hearn, A.C.: Reduce: the first forty years. In: Dolzmann, A., Seidl, A., Sturm, T. (eds.) Algorithmic Algebra and Logic: Proceedings of the A3L 2005, April 3–6, Passau, Germany. Books on Demand, Norderstedt, Germany (2005)

44. Horn, F., Jackson, R.: General mass action kinetics. Arch. Ration. Mech. Anal. 47(2), 81–116 (1972). https://doi.org/10.1007/BF00251225

45. Hucka, M., Finney, A., Sauro, H.M., Bolouri, H., Doyle, J.C., Kitano, H., Arkin, A.P., Bornstein, B.J., Bray, D., Cornish-Bowden, A., Cuellar, A.A., Dronov, S., Gilles, E.D., Ginkel, M., Gor, V., Goryanin, I.I., Hedley, W.J., Hodgman, T.C., Hofmeyr, J.-H., Hunter, P.J., Juty, N.S., Kasberger, J.L., Kremling, A., Kummer, U., Le Novère, N., Loew, L.M., Lucio, D., Mendes, P., Minch, E., Mjolsness, E.D., Nakayama, Y., Nelson, M.R., Nielsen, P.F., Sakurada, T., Schaff, J.C., Shapiro, B.E., Shimizu, T.S., Spence, H.D., Stelling, J., Takahashi, K., Tomita, M., Wagner, J., Wang, J.: The systems biology markup language (SBML): a medium for representation and exchange of biochemical network models. Bioinformatics 19(4), 524–531 (2003). https://doi.org/10.1093/bioinformatics/btg015

46. Kahle, T.: Decompositions of binomial ideals. Ann. Inst. Stat. Math. 62(4), 727–745 (2010). https://doi.org/10.1007/s10463-010-0290-9

47. Kahle, T.: Decompositions of binomial ideals. J. Softw. Algebra Geom. 4(1), 1–5 (2012). https://doi.org/10.1007/s10463-010-0290-9

48. Košta, M.: New concepts for real quantifier elimination by virtual substitution. Doctoral dissertation, Saarland University, Germany (2016)

49. Košta, M., Sturm, T., Dolzmann, A.: Better answers to real questions. J. Symb. Comput. 74, 255–275 (2016). https://doi.org/10.1016/j.jsc.2015.07.002

50. Mayr, E.W., Meyer, A.R.: The complexity of the word problems for commutative semigroups and polynomial ideals. Adv. Math. 46(3), 305–329 (1982). https://doi.org/10.1016/0001-8708(82)90048-2

51. Müller, S., Feliu, E., Regensburger, G., Conradi, C., Shiu, A., Dickenstein, A.: Sign conditions for injectivity of generalized polynomial maps with applications to chemical reaction networks and real algebraic geometry. Found. Comput. Math. 16(1), 69–97 (2016). https://doi.org/10.1007/s10208-014-9239-3

52. Nieuwenhuis, R., Oliveras, A., Tinelli, C.: Solving SAT and SAT modulo theories: from an abstract Davis–Putnam–Logemann–Loveland procedure to DPLL(T). J. ACM 53(6), 937–977 (2006). https://doi.org/10.1145/1217856.1217859
53. Onsager, L.: Reciprocal relations in irreversible processes. I. Phys. Rev. 37(4), 405 (1931). https://doi.org/10.1103/PhysRev.37.405

54. PérezMillán, M., Dickenstein, A.: The structure of MESSI biological systems. SIAM J. Appl. Dyn. Syst. 17(2), 1650–1682 (2018). https://doi.org/10.1137/17M1113722

55. Pérez Millán, M., Dickenstein, A., Shiu, A., Conradi, C.: Chemical reaction systems with toric steady states. Bull. Math. Biol. 74(5), 1027–1065 (2012). https://doi.org/10.1007/s11538-011-9685-x

56. Seidl, A.: Cylindrical decomposition under application-oriented paradigms. Doctoral dissertation, University of Passau, Germany (2006)

57. Seidl, A.M., Sturm, T.: Boolean quantification in a first-order context. In: V.G. Ganzha, E.W. Mayr, E.V. Vorozhtsov (eds.) Proceedings of the 6th International Workshop on Computer Algebra in Scientific Computing, CASC 2003, pp. 329–345. Institut für Informatik, Technische Universität München, Garching, Germany (2003)

58. Shafarevich, I.R.: Basic Algebraic Geometry. Grundlehren der mathematischen Wissenschaften, vol. 213. Springer, Berlin (1974). https://doi.org/10.1007/978-3-642-96200-4

59. Sturm, T.: Real quantifier elimination in geometry. Doctoral dissertation, University of Passau, Germany (1999)

60. Sturm, T.: New domains for applied quantifier elimination. In: V.G. Ganzha, E.W. Mayr, E.V. Vorozhtsov (eds.) Computer Algebra in Scientific Computing: 9th International Workshop, CASC 2006, Chisinau, Moldova, September 11–15, 2006. Proceedings, LNCS, vol. 194, pp. 295–301. Springer (2006). https://doi.org/10.1007/11870814_25

61. Sturm, T.: REDLOG online resources for applied quantifier elimination. Acta Acad. Ab. 67(2), 177–191 (2007)

62. Sturm, T.: A survey of some methods for real quantifier elimination, decision, and satisfiability and their applications. Math. Comput. Sci. 11(3–4), 483–502 (2017). https://doi.org/10.1007/s11786-017-0319-z

63. Sturmfels, B.: Gröbner Bases and Convex Polytopes. University Lecture Series, vol. 8. AMS, Providence, RI (1996). https://doi.org/10.1090/ulect/008

64. Tange, O.: GNU parallel: the command-line power tool. login USENIX Mag. 36(1), 42–47 (2011)

65. Tarski, A.: Decision method for elementary algebra and geometry. Prepared for publication by J. C. C. McKinsey. RAND Report R109, August 1, 1948: Revised May 1951, 2nd edn. RAND, Santa Monica, CA, 1957

66. Voit, E.O., Martens, H.A., Omholt, S.W.: 150 years of the mass action law. PLoS Comput. Biol. 11(1), e1004012 (2015). https://doi.org/10.1371/journal.pcbi.1004012

67. Wang, S., Lin, J.-R., Sontag, E.D., Sorger, P.K.: Inferring reaction network structure from single-cell, multiplex data, using toric systems theory. PLoS Comput. Biol. 15(12), e1007311 (2019). https://doi.org/10.1371/journal.pcbi.1007311

68. Wegscheider, R.: Über simultane Gleichgewichte und die Beziehungen zwischen Thermodynamik und Reactionskinetik homogener Systeme. Monatsh. Chem. Verw. Tl. 22(8), 849–906 (1901). https://doi.org/10.1007/BF01517498

69. Weispfenning, V.: The complexity of linear problems in fields. J. Symb. Comput. 5(1–2), 3–27 (1988). https://doi.org/10.1016/S0747-7171(88)80003-8

70. Weispfenning, V.: Quantifier elimination for real algebra—the quadratic case and beyond. Appl. Algebra Eng. Commun. 8(2), 85–101 (1997). https://doi.org/10.1007/s002000050055

**Publisher's Note** Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.