1 Introduction

The tropical variety \({{\,\mathrm{Trop}\,}}(I)\) of a polynomial ideal I is the image of its algebraic variety under component-wise valuation. Tropical varieties are commonly described as combinatorial shadows of their algebraic counterparts and arise naturally in many applications throughout mathematics and beyond. Inside mathematics for example, they enable new insights into important invariants in algebraic geometry [23] or the complexity of central algorithms in linear optimization [1]. Outside mathematics, they arise as spaces of phylogenetic trees in biology [25, 29], loci of indifference prizes in economics [3, 31] or in the proof of the finiteness of central configurations in the 4, 5-body problem in physics [10, 11].

As the image of an algebraic variety, a tropical variety equals the intersection of all tropical hypersurfaces of the polynomials inside the ideal. A natural question in this context is whether this equality already holds for a given finite generating set \(F\subseteq I\), i.e.,

$$\begin{aligned} {{\,\mathrm{Trop}\,}}(I)=\bigcap _{f\in I} {{\,\mathrm{Trop}\,}}(f){\mathop {=}\limits ^{?}}\bigcap _{f\in F}{{\,\mathrm{Trop}\,}}(f)=:{{\,\mathrm{Trop}\,}}(F). \end{aligned}$$
(*)

We call \({{\,\mathrm{Trop}\,}}(F)\) a tropical prevariety and, if equality holds, F a tropical basis. This question is important for two main reasons. On the one hand, tropical prevarieties can provide upper dimension bounds where Gröbner bases are infeasible to compute, see [10, 11], and a tropical basis implies that this bound is actually sharp. On the other hand, the difference between a tropical variety and prevariety can be interesting in and of itself, e.g., tropical matrices of Kapranov rank r versus tropical matrices of tropical rank r [9], tropical Grassmannians versus their Dressians [14], or other realizability loci of combinatorial objects such as \(\Delta \)-matroids [28] or gaussoids [5].

Nevertheless, checking the equality in (\(*\)) is a computationally highly challenging task. Current algorithms for computing tropical varieties require a Gröbner basis for each maximal Gröbner polyhedron, of which there can be many even for tropicalization of linear spaces [19]. Additionally, it is known that deciding the equality in (\(*\)) is co-NP-hard, as is merely deciding whether \({{\,\mathrm{Trop}\,}}(F)\) is connected [30].

In practice, testing the equality in (\(*\)) can fail for multiple reasons:

  1. (P1)

    Computing \({{\,\mathrm{Trop}\,}}(F)\) might not be possible due to its size or due to the number of intersections necessary to compute it.

  2. (P2)

    Computing \({{\,\mathrm{Trop}\,}}(I)\) might not be feasible due to its size or due to problematic Gröbner cones in \({{\,\mathrm{Trop}\,}}(I)\) whose Gröbner bases are too hard to compute.

In this article, we introduce the notion of tropical defects, certificates for generating sets which are not tropical bases, and propose two randomized algorithms for computing tropical defects around affine subspaces of complementary dimension. An independent verification of these certificates will require a single Gröbner basis computation.

The basic idea is simple, relying on some recent results on (stable) intersections of tropical varieties [18, 24]: To reduce the complexity of the computations, we (stably) intersect both sides of Equation (\(*\)) with a random affine space of complementary dimension, and look for differences between the tropical variety and prevariety around it. Under certain genericity assumptions, this yields a zero-dimensional tropical variety on the left, which is not only simpler to compute than its positive-dimensional counterparts, but also implies that the tropical prevariety computation on the right can be aborted if a positive-dimensional polyhedron is found. Therefore, our algorithm operates within the realm where (P1) and (P2) are infeasible, but the following key computational ingredients are not:

  1. (K1)

    computation of zero-dimensional tropical varieties in Singular [8, 15],

  2. (K2)

    computation of zero-dimensional tropical prevarieties in DynamicPrevariety [17].

To a degree, our approach for finding tropical defects is related to the approach for studying tropical bases in [12, 13]. In [12, 13], the authors consider preimages of projections to \(\mathbb {R}^{d+1}\), where \(d:=\dim {{\,\mathrm{Trop}\,}}(I)\). Our hyperplanes are generally given as preimages of points under a projection to \(\mathbb {R}^d\), but can also be regarded as preimages of lines under a projection to \(\mathbb {R}^{d+1}\). Hence, our approach can be seen as a relaxation where instead of considering the preimage of the entire projection to \(\mathbb {R}^{d+1}\) we only consider the parts of the projection which meet a fixed line.

In Sects. 3 and 4, we present two tropical defects found using out algorithm, disproving Conjecture 5.3 in [27] and Conjecture 8.4 in [5]. Note that the tropical defects were postprocessed for the ease of reproduction; see Remark 2.8. Code and auxiliary materials for this article are available at software.mis.mpg.de. More information on gaussoids can be found at gaussoids.de.

2 Tropical defects

In this section, we introduce the notion of tropical defects for generating sets of polynomial ideals, and two algorithms to find them around generic affine spaces \(L={{\,\mathrm{Trop}\,}}(H)\) of complementary dimension. To be precise, Algorithm 2.9 requires a generic tropicalization L, whereas Algorithm 2.13 merely requires a generic realization H.

We begin by briefly recalling some basic notions of tropical geometry that are of immediate relevance to us. Our notation coincides with that of [21], to which we refer for a more in-depth introduction of the subject.

Convention 2.1

For the remainder of this article, fix an algebraically closed field K with valuation \(\nu :K^*\rightarrow \mathbb {R}\) and residue field \(\mathfrak K\) with trivial valuation. Since K is algebraically closed, there is a group homomorphism \(\mu :\nu (K^*)\rightarrow K^*\) such that \(\nu \circ \mu ={{\,\mathrm{id}\,}}_{\nu (K^*)}\), and we abbreviate \(t^{\lambda }:=\mu (\lambda )\) for \(\lambda \in \nu (K^*)\). Moreover, we fix a multivariate (Laurent) polynomial ring \(K[x^{\pm 1}]:=K[x_1^{\pm 1},\ldots ,x_n^{\pm 1}]\).

Definition 2.2

(Initial forms, initial ideals) Given a polynomial \(f\in K[x^{\pm 1}]\), say \(f=\sum _{\alpha \in \mathbb {Z}^n} c_{\alpha }\cdot x^{\alpha }\), its initial form with respect to a weight vector \(w\in \mathbb {R}^n\) is

$$\begin{aligned} {{\,\mathrm{in}\,}}_w(f) {}:={}&\textstyle \sum _{w\cdot \alpha + \nu (c_{\alpha }) \text { min.}} \overline{t^{-\nu (c_{\alpha })}c_{\alpha }}\cdot x^{\alpha }&\in \mathfrak K[x^{\pm 1}]. \end{aligned}$$

For a finite set \(F \subseteq K[x^{\pm 1}]\) and an ideal \(I\unlhd K[x^{\pm 1}]\), we denote

$$\begin{aligned} {{\,\mathrm{in}\,}}_w(F) \!:={}&\{{{\,\mathrm{in}\,}}_w(g) \mid g \in F\}&\subseteq \mathfrak K[x^{\pm 1}],\\ {{\,\mathrm{in}\,}}_w(I) {}:={}&\langle {{\,\mathrm{in}\,}}_w(g)\mid g\in I\rangle&\unlhd \mathfrak K[x^{\pm 1}]. \end{aligned}$$

Moreover, the Gröbner polyhedron of f, of I or of a finite set \(F\subseteq K[x^{\pm 1}]\) around w is defined as

Note that both \(C_w(f)\) and \(C_w(F)\) are in fact convex polyhedra, while \(C_w(I)\) is only guaranteed to be a convex polyhedron if I is homogeneous.

Definition 2.3

(Tropical variety, tropical prevariety) Given a polynomial \(f\in K[x^{\pm 1}]\), an ideal \(I\unlhd K[x^{\pm 1}]\) and a finite set \(F\subseteq K[x^{\pm 1}]\), the tropical varieties of f and I and the tropical prevariety of F are defined to be

$$\begin{aligned} {{\,\mathrm{Trop}\,}}(f)&:= \{w \in \mathbb {R}^n \mid {{\,\mathrm{in}\,}}_w(f) \text { is not a monomial}\},\\ {{\,\mathrm{Trop}\,}}(I)&:= \{w \in \mathbb {R}^n \mid {{\,\mathrm{in}\,}}_w(f) \text { is not a monomial for all } f\in I\},\\ {{\,\mathrm{Trop}\,}}(F)&:= \{w \in \mathbb {R}^n \mid {{\,\mathrm{in}\,}}_w(f) \text { is not a monomial for all } f\in F\}. \end{aligned}$$

We call a finite generating set \(F\subseteq I\) a tropical basis if

$$\begin{aligned} {{\,\mathrm{Trop}\,}}(F) = {{\,\mathrm{Trop}\,}}(I). \end{aligned}$$

Note that \({{\,\mathrm{Trop}\,}}(f)\), \({{\,\mathrm{Trop}\,}}(I)\) and \({{\,\mathrm{Trop}\,}}(F)\) are supports of polyhedral complexes. For both \({{\,\mathrm{Trop}\,}}(f)\) and \({{\,\mathrm{Trop}\,}}(F)\) these polyhedral complexes can be chosen to be a collection of Gröbner polyhedra, and, if I is homogeneous, so can \({{\,\mathrm{Trop}\,}}(I)\).

Let \(T\subseteq \mathbb {R}^n\) be the support of a polyhedral complex \(\Sigma \). Recall that the star of T around a point \(w\in \mathbb {R}^{n}\) is given by

$$\begin{aligned} {{\,\mathrm{Star}\,}}_w T := \{v\in \mathbb {R}^n\mid w+\varepsilon \cdot v\in T \text { for }\varepsilon >0 \text { sufficiently small}\} \end{aligned}$$

and that the stable intersection of T with respect to an affine subspace \(H\subseteq \mathbb {R}^n\) is defined to be

$$\begin{aligned} T\cap _{{{\,\mathrm{st}\,}}} H := \bigcup _{\begin{array}{c} \sigma \in \Sigma \\ \dim (\sigma + H)=n \end{array}} \sigma \cap H. \end{aligned}$$

Example 2.4

Let \(K=\mathbb {C}\{\!\{t\}\!\}\) be the field of complex Puiseux series and consider the ideal \(I\unlhd K[x^{\pm 1},y^{\pm 1}]\) which can be generated by either one of the following two generating sets:

Figure 1 compares the tropical prevarieties of both \(F_1\) and \(F_2\) with the tropical variety of I, showing that \(F_2\) is a tropical basis while \(F_1\) is not.

Fig. 1
figure 1

A tropical non-basis and a tropical basis

For the following result, we refer to [21], where it is only shown for polynomial rings. However, the result extends directly to Laurent polynomial rings, since \({{{\,\mathrm{in}\,}}_w(I \cap K[x]) \cdot K[x^{\pm 1}] = {{\,\mathrm{in}\,}}_w(I)}\) for all \(I \unlhd K[x^{\pm 1}]\).

Lemma 2.5

[21, Lemma 2.4.6 and Corollary 2.4.10] Given an element \(f\in K[x^{\pm 1}]\) and a homogeneous ideal \(I\unlhd K[x^{\pm 1}]\), we have for any weight vectors \(w,v\in \mathbb {R}^n\) and \(\varepsilon >0\) sufficiently small:

$$\begin{aligned} {{\,\mathrm{in}\,}}_v {{\,\mathrm{in}\,}}_w(f) = {{\,\mathrm{in}\,}}_{w+\varepsilon \cdot v}(f) \text { and } {{\,\mathrm{in}\,}}_v {{\,\mathrm{in}\,}}_w(I) = {{\,\mathrm{in}\,}}_{w+\varepsilon \cdot v}(I). \end{aligned}$$

In particular, for a finite set \(F\subseteq K[x^{\pm 1}]\) or an ideal \(I\unlhd K[x^{\pm 1}]\) this implies

$$\begin{aligned} {{\,\mathrm{Trop}\,}}({{\,\mathrm{in}\,}}_w F) = {{\,\mathrm{Star}\,}}_w {{\,\mathrm{Trop}\,}}(F) \text { and } {{\,\mathrm{Trop}\,}}({{\,\mathrm{in}\,}}_w I) = {{\,\mathrm{Star}\,}}_w {{\,\mathrm{Trop}\,}}(I). \end{aligned}$$

We will now introduce the notion of a tropical defect and two algorithms for finding them around affine spaces of complementary dimension. For the sake of simplicity, we restrict ourselves to affine spaces in direction of the last few coordinates; see Example 2.10 for general affine spaces.

Definition 2.6

(Tropical defects) Let \(I\unlhd K[x^{\pm 1}]\) be a polynomial ideal with finite generating set \(F\subseteq I\). We call a finite tuple \(\mathbf {w}:=(w_0,\dots ,w_k) \in (\mathbb {R}^n)^{k+1}\) a tropical defect if for all \(\varepsilon > 0\) sufficiently small we have

$$\begin{aligned} w_0 + \varepsilon w_1 + \dots + \varepsilon ^{k} w_k \in {{\,\mathrm{Trop}\,}}(F)\setminus {{\,\mathrm{Trop}\,}}(I). \end{aligned}$$

Example 2.7

For \(I=\langle F_1\rangle \) from Example 2.4, the tuple (wv) with \(w:=(0,1)\) and \(v:=(0,1)\) is a tropical defect, while the singleton (w) is not. On the other hand, the singleton (u) with \(u:=(0,2)\) is a tropical defect, see Fig. 2.

Fig. 2
figure 2

Two tropical defects

Remark 2.8

(Singleton tropical defects) Note that any tropical defect \((w_0,\ldots ,w_k)\) of a homogeneous ideal can be transformed into a singleton tropical defect u through a single (tropical) Gröbner basis [6] or standard basis computation [22]:

One can simulate the weight vector \(w_\varepsilon :=w_0 + \varepsilon w_1 + \dots + \varepsilon ^{k} w_k\) for \(\varepsilon >0\) sufficiently small through a sequence of weights as in Lemma 2.5. In particular, we can compute a Gröbner basis with respect to the sequence of weights, which gives us the inequalities and equations of the Gröbner cone \(C_{w_\varepsilon }(I)\) by [21, proof of Prop. 2.5.2]. Any \(u\in {{\,\mathrm{Relint}\,}}C_{w_\varepsilon }(I)\) is a singleton tropical defect.

For the ease of verification, the tropical defects in Sects. 3 and 4 have been transformed into singletons.

Algorithm 2.9 checks for tropical defects around affine subspaces which satisfy a strong genericity assumption.

Algorithm 2.9

(Testing for defects, strong genericity)

figure a

Correctness of Algorithm 2.9. Note that (SG) implies that \({{\,\mathrm{Trop}\,}}(I) \cap H\) is at most zero-dimensional, since H is of complementary dimension to \({{\,\mathrm{Trop}\,}}(I)\) and by [21, Theorem 3.6.10], while (\(*\)) ensures that it is not empty. By [24, Theorem 1.1], we therefore have

$$\begin{aligned} {{\,\mathrm{Trop}\,}}(I')&= {{\,\mathrm{Trop}\,}}(I+\langle x_i-t^{v_i}\mid i=1,\dots ,d\rangle ) \\&= {{\,\mathrm{Trop}\,}}(I)\cap {{\,\mathrm{Trop}\,}}(\langle x_i-t^{v_i}\mid i=1,\dots ,d\rangle ) = {{\,\mathrm{Trop}\,}}(I) \cap H. \end{aligned}$$

If the algorithm terminates at Line 5, then \(C_w(F')\) is a positive-dimensional polyhedron contained in \({{\,\mathrm{Trop}\,}}(F') = {{\,\mathrm{Trop}\,}}(F) \cap H\), whereas \({{\,\mathrm{Trop}\,}}(I) \cap H\) consists of finitely many points. In particular, we have that \(w+\varepsilon u\notin {{\,\mathrm{Trop}\,}}(I)\) for \(\varepsilon >0\) sufficiently small.

If the algorithm terminates at Line 8, then w is a tropical defect since

$$\begin{aligned} w \in {{\,\mathrm{Trop}\,}}(F')\setminus {{\,\mathrm{Trop}\,}}(I') = ({{\,\mathrm{Trop}\,}}(F) \cap H) \setminus ({{\,\mathrm{Trop}\,}}(I) \cap H) \subseteq {{\,\mathrm{Trop}\,}}(F)\setminus {{\,\mathrm{Trop}\,}}(I). \end{aligned}$$

Finally, should the algorithm terminate at Line 10, then

$$\begin{aligned} {{\,\mathrm{Trop}\,}}(F) \cap H = {{\,\mathrm{Trop}\,}}(F') = {{\,\mathrm{Trop}\,}}(I') = {{\,\mathrm{Trop}\,}}(I) \cap H. \qquad \qquad \qquad \square \end{aligned}$$

Example 2.10

Consider the generating set F of the following one-dimensional ideal:

$$\begin{aligned} I:= \langle \underbrace{(x+1)(y+1),(x-1)(y+1)}_{=:F} \rangle \subseteq \mathbb {C}[x^{\pm 1},y^{\pm 1}], \end{aligned}$$

and let \(\pi :\mathbb {R}^{\{x,y\}}\rightarrow \mathbb {R}^{\{x\}}\) denote the projection onto the x-coordinate. Figure 3 shows the tropical variety \({{\,\mathrm{Trop}\,}}(I)\) and the tropical prevariety \({{\,\mathrm{Trop}\,}}(F)\).

Then, for any \(v\in \mathbb {R}\) the affine line \(H_v:=\pi ^{-1}(v)\) satisfies (SG). Algorithm 2.9 yields a tropical defect if and only if \(v=0\), in which case it terminates at Line 5.

Fig. 3
figure 3

\({{\,\mathrm{Trop}\,}}(I)\subseteq {{\,\mathrm{Trop}\,}}(F)\) in Example 2.10

We can also use arbitrary rational affine subspaces like \(L_v := v\cdot e_x + {{\,\mathrm{Span}\,}}(e_x+e_y)\) by applying a unimodular transformation \(\psi \) on the ring of Laurent polynomials whose induced map \(\psi ^\flat \) on the weight space aligns \(L_v\) with the coordinate axes:

This transformation yields

$$\begin{aligned} \psi (F)&= \{(ab+1)(b+1),(ab-1)(b+1)\} \text { and } \\ (\psi ^\flat )^{-1}(L_v)&= v\cdot e_a + {{\,\mathrm{Span}\,}}(e_b) \subseteq \mathbb {R}^{\{a,b\}}, \end{aligned}$$

which always satisfies (SG) and for which Algorithm 2.9 terminates at Line 8 if and only if \(v\ne 0\), as \({{\,\mathrm{Trop}\,}}(\psi (F))\cap (\psi ^\flat )^{-1}(L_v)\) consists of two points of which only one belongs to the tropical variety \({{\,\mathrm{Trop}\,}}(\psi (I))\); see Fig. 3.

Example 2.11

Consider the generating set F of the following one-dimensional ideal:

$$\begin{aligned} I:=\langle \underbrace{x+z+2, y+z+1}_{=:F} \rangle \unlhd \mathbb {C}[x^{\pm 1},y^{\pm 1},z^{\pm 1}], \end{aligned}$$

and let \(\pi :\mathbb {R}^{\{x,y,z\}}\rightarrow \mathbb {R}^{\{x\}}\) denote the projection onto the x-coordinate. Figure 4 shows \({{\,\mathrm{Trop}\,}}(I)\) as well as \({{\,\mathrm{Trop}\,}}(F)\). Consider the plane \(H_v:=\pi ^{-1}(v)\) for some \(v\in \mathbb {R}\). Note that while any \(H_v\) with \(v\ne 0\) satisfies (SG), only \(H_v\) with \(v>0\) yields a tropical defect in Algorithm 2.9, Line 5.

Fig. 4
figure 4

\({{\,\mathrm{Trop}\,}}(I)\subseteq {{\,\mathrm{Trop}\,}}(F)\) from Example 2.11

Remark 2.12

(Strong genericity) In Algorithm 2.9, the strong genericity assumption (SG) is only required for the correctness of the output at Line 5. If the algorithm does not terminate at Line 5, then (SG) must hold because \({{\,\mathrm{Trop}\,}}(F) \cap H = {{\,\mathrm{Trop}\,}}(F')\) is zero-dimensional, and hence, so is \({{\,\mathrm{Trop}\,}}(I) \cap H \subseteq {{\,\mathrm{Trop}\,}}(F)\cap H\). This implies that for \(\lambda _i \in K\) generic with \(\nu (\lambda _i) = v_i\), we have

$$\begin{aligned} {{\,\mathrm{Trop}\,}}(I) \cap H = {{\,\mathrm{Trop}\,}}(I+\langle x_i - \lambda _i \rangle ) = {{\,\mathrm{Trop}\,}}(I) \cap _{{{\,\mathrm{st}\,}}} H, \end{aligned}$$

where the first equality holds by [24, Theorem 1.1], and the second equality holds by [21, Theorem 3.6.1].

One possibility to ascertain whether (SG) holds upon termination at Line 5 is to compute the Gröbner polyhedron \(C_w(I)\), if I is homogeneous. However, that requires a tropical Gröbner basis or standard basis, and hence might not be viable for large examples.

In practice, affine subspaces satisfying the strong genericity assumption induce several problems; see Remark 2.16. This is why we introduce Algorithm 2.13, which relies on a weakened genericity assumption. Note that, compared to Algorithm 2.9, Algorithm 2.13 requires the computation of \({{\,\mathrm{Trop}\,}}({{\,\mathrm{in}\,}}_w(F))\) for some \(w\in {{\,\mathrm{Trop}\,}}(F)\cap H\) at Line 5. This is unproblematic, however, since \({{\,\mathrm{in}\,}}_w(f)\) has fewer terms than f for all \(f\in F\), so that \({{\,\mathrm{Trop}\,}}({{\,\mathrm{in}\,}}_w(f))\) will be simpler than \({{\,\mathrm{Trop}\,}}(f)\). In fact, generically \({{\,\mathrm{in}\,}}_w(f)\) will be a binomial and \({{\,\mathrm{Trop}\,}}({{\,\mathrm{in}\,}}_w(f))\) a linear space.

Algorithm 2.13

(Testing for defects, weak genericity)

figure b

Correctness of Algorithm 2.13

Suppose the algorithm terminates at Line 8. By Lemma 2.5, there exists \(\delta >0\) such that \(D:=\{w+\varepsilon u+\varepsilon ^2 v_1+\dots +\varepsilon ^{k+1} v_k\mid 0<\varepsilon <\delta \}\subseteq {{\,\mathrm{Trop}\,}}(F)\). Because any infinite subset of D has affine span \(w+{{\,\mathrm{Span}\,}}(C_u({{\,\mathrm{in}\,}}_w F))\) of dimension \(k>d=\dim {{\,\mathrm{Trop}\,}}(I)\), any polyhedron on \({{\,\mathrm{Trop}\,}}(I)\) will have a finite intersection with D. In particular, this implies that \(w+\varepsilon u+\varepsilon ^2 v_1+\dots +\varepsilon ^{k+1} v_k\notin {{\,\mathrm{Trop}\,}}(I)\) for \(\varepsilon >0\) sufficiently small.

Suppose the algorithm terminates at Line 14. Again, by Lemma 2.5, there exists \(\delta >0\) such that \(D:=\{w+\varepsilon u+\varepsilon ^2 v_1+\dots +\varepsilon ^{d+1} v_d\mid 0<\varepsilon <\delta \}\subseteq {{\,\mathrm{Trop}\,}}(F)\). Any infinite subset of D has affine span \(w+{{\,\mathrm{Span}\,}}(C_u({{\,\mathrm{in}\,}}_w F))\), which intersects H stably. We have \(w\notin {{\,\mathrm{Trop}\,}}(I')={{\,\mathrm{Trop}\,}}(I)\cap _{{{\,\mathrm{st}\,}}}H\) by assumption (WG), so any polyhedron on \({{\,\mathrm{Trop}\,}}(I)\) around w can only have a finite intersection with D. In particular, this implies that \(w+\varepsilon u+\varepsilon ^2 v_1+\dots +\varepsilon ^{k+1} v_k\notin {{\,\mathrm{Trop}\,}}(I)\) for \(\varepsilon >0\) sufficiently small.

Finally, suppose the algorithm terminates at Line 16. Since \({{\,\mathrm{Trop}\,}}(F)\supseteq {{\,\mathrm{Trop}\,}}(I)\), we always have \({{\,\mathrm{Trop}\,}}(F)\cap _{{{\,\mathrm{st}\,}}} H\supseteq {{\,\mathrm{Trop}\,}}(I)\cap _{{{\,\mathrm{st}\,}}} H\). For the converse, assume there exists a weight \(w\in {{\,\mathrm{Trop}\,}}(F)\cap _{{{\,\mathrm{st}\,}}} H \setminus {{\,\mathrm{Trop}\,}}(I)\cap _{{{\,\mathrm{st}\,}}} H\). Let \(C_{u}(F)\subseteq {{\,\mathrm{Trop}\,}}(F)\) be a Gröbner polyhedron of the prevariety with \(w\in C_{u}(F)\cap H\) and \(\dim (C_{u}(F) + H)=n\), which necessarily implies \(\dim C_{u}(F)\ge d\). If \(\dim C_{u}(F)>d\), then \(\dim C_u({{\,\mathrm{in}\,}}_w(F))>d\) and we would have terminated at Line 8. If \(\dim C_{u}(F)=d\), then w appears as the first entry of some tuple in \(\Delta \) by Lemma 2.5 and Lines 9 to 11; hence, we would have terminated at Line 14, as \({{\,\mathrm{Trop}\,}}(I')={{\,\mathrm{Trop}\,}}(I)\cap _{{{\,\mathrm{st}\,}}} H\) by assumption (WG). \(\square \)

Remark 2.14

(Weak genericity) If Algorithm 2.13 terminates at Line 8, then the output is correct even if the input did not satisfy the weak genericity assumption (WG), since a polyhedron in \({{\,\mathrm{Trop}\,}}(F)\) of too large dimension was found. On the other hand, the correctness of a tropical defect output at Step 14 does depend on the assumption (WG) on the input. In order to certify the correctness of the output regardless of the validity of (WG), one needs to check that there is no sufficiently small \(\varepsilon > 0\) such that \(w+\varepsilon u + \varepsilon ^2 v_1+\cdots +\varepsilon ^{d+1} v_d \in {{\,\mathrm{Trop}\,}}I\). If I is homogeneous, this can by Lemma 2.5 be achieved by certifying that the iterated initial ideal \({{\,\mathrm{in}\,}}_{v_d} \cdots {{\,\mathrm{in}\,}}_{v_1} {{\,\mathrm{in}\,}}_u {{\,\mathrm{in}\,}}_w I\) is the entire Laurent polynomial ring \(\mathfrak {K}[x^{\pm 1}]\).

Example 2.15

Consider the generating set from Example 2.10 (see also Fig. 3):

$$\begin{aligned} I:= \langle \underbrace{(x+1)(y+1),(x-1)(y+1)}_{=:F} \rangle \subseteq \mathbb {C}[x^{\pm 1},y^{\pm 1}]. \end{aligned}$$

Unlike before, Algorithm 2.13 will be unable to find a tropical defect around \(H_v\) even for \(v=0\), always terminating at Line 16. This is because without condition (SG) \(H_0\) need not have a zero-dimensional intersection with \({{\,\mathrm{Trop}\,}}(I)\), so that its positive-dimensional intersection with \({{\,\mathrm{Trop}\,}}(F)\) need not arise from a tropical defect.

However, Algorithm 2.13 will still find a tropical defect for \(L_v\) for \(v\ne 0\), in which case it terminates at Line 14.

Remark 2.16

(Strong genericity vs. weak genericity from a practical point of view) Theoretically, it is always possible to find tropical defects for generating sets which are not tropical bases using Algorithm 2.9 with the right choice of an affine subspace. In practice, however, it is much more reasonable to use Algorithm 2.13 instead. This is because generic \(v\in \mathbb {R}^d\) for Algorithm 2.9 usually entail high exponents in the polynomial computations, whereas generic \(\lambda \in (K^*)^d\) for Algorithm 2.13 only entail big coefficients, and most computer algebra software systems such as Macaulay2 or Singular are better equipped to deal with the latter. For instance, our Singular experiments using Algorithm 2.9 regularly failed due to exponent overflows, since exponents in Singular are stored in the type signed short (bounded by \(2^{15}\) for most CPU architectures), while coefficients are stored with arbitrary precision.

Remark 2.17

(Comparison with existing techniques) As hinted in the introduction, tropical basis verification is a problem that has been studied by many people. However, the only software currently capable of this task is gfan [16], which, for example, has been used to prove that the \(4\,\times \, 4\)-minors of a \(5\,\times \, n\) matrix form a tropical basis [7]. Its command gfan_tropicalbasis computes a tropical basis, and its command gfan_tropicalintersection for computing tropical prevarieties \({{\,\mathrm{Trop}\,}}(F)\) has an optional argument –tropicalbasistest to test whether \({{\,\mathrm{Trop}\,}}(F)\) equals the tropical variety \({{\,\mathrm{Trop}\,}}(I)\). Compared to the algorithms in gfan, our techniques have the following disadvantages and advantages.

Since our algorithms revolve around finding tropical defects, they are incapable to verify that a generating set is a tropical basis. As we only search around random hyperplanes of complementary dimension, we are also blind to lower-dimensional defects, i.e., if \(\dim ({{\,\mathrm{Trop}\,}}(I)\setminus {{\,\mathrm{Trop}\,}}(F))<\dim ({{\,\mathrm{Trop}\,}}(I))=:d\), then the probability for a random affine hyperplane of codimension d to intersect \({{\,\mathrm{Trop}\,}}(I)\setminus {{\,\mathrm{Trop}\,}}(F)\) is zero. One example where our algorithms failed to return a definite answer is [28, Conjecture 4.8].

In return, our algorithms avoid the computation of both \({{\,\mathrm{Trop}\,}}(F)\) and \({{\,\mathrm{Trop}\,}}(I)\). Instead of \({{\,\mathrm{Trop}\,}}(F)=\bigcap _{f\in F}{{\,\mathrm{Trop}\,}}(f)\), we compute \({{\,\mathrm{Trop}\,}}(F')=\bigcap _{f\in F} ({{\,\mathrm{Trop}\,}}(f)\cap H)\). This is faster, since \({{\,\mathrm{Trop}\,}}(f)\cap H\) is covered by fewer polyhedra compared to \({{\,\mathrm{Trop}\,}}(f)\). Moreover, instead of \({{\,\mathrm{Trop}\,}}(I)\) we compute \({{\,\mathrm{Trop}\,}}(I')\), where \(I':= I+\langle x_i\!-\!\lambda _i\mid i=1,\dots ,d\rangle \). This is easier since \(I'\) is zero-dimensional whereas I is not. Additionally, \({{\,\mathrm{Trop}\,}}(I')\) consists of up to \(\deg (I)\) many points, while \({{\,\mathrm{Trop}\,}}(I)\) is generally covered by many more polyhedra.

3 Application: Cox rings of cubic surfaces

Cox rings are global invariants of important classes of algebraic varieties. For example, they carry essential information about all morphisms to projective spaces and play a central role in the theory of universal torsors; see [2] for further details. In this section, we address [27, Conjecture 5.3] on Cox rings of smooth cubic surfaces, disproving it with a tropical defect.

Definition 3.1

Consider six points \(p_1, \ldots , p_6 \in \mathbb {P}_\mathbb {C}^2\) in general position in the complex projective plane. Up to change of coordinates, we may assume that

$$\begin{aligned} p_i=(1:d_i:d_i^3) \quad \text {for some } d_i\in \mathbb {C}, \end{aligned}$$

where \(d_i\) satisfy certain genericity conditions; see [26, §6]. Blowing up \(\mathbb {P}_\mathbb {C}^2\) in these points results in a smooth cubic surface \(X := {{\,\mathrm{Bl}\,}}_{p_1, \ldots , p_6} \mathbb {P}_\mathbb {C}^2\). The geometry of this surface is captured by its Cox ring

$$\begin{aligned} {{\,\mathrm{Cox}\,}}(X) := \bigoplus _{(a_0,\ldots ,a_6) \in \mathbb {Z}^7} H^0(X, \mathcal {O}_X(a_0 E_0 + a_1 E_1 + \cdots + a_6 E_6)), \end{aligned}$$

where

  • \(E_1, \ldots , E_6 \subseteq X\) are the exceptional divisors over the points \(p_1, \ldots , p_6 \in \mathbb {P}_\mathbb {C}^2\),

  • \(E_0 \subseteq X\) is the preimage of a line in \(\mathbb {P}_\mathbb {C}^2\) not containing \(p_1, \ldots , p_6\), and

  • \(H^0(X, \mathcal {O}_X(a_0 E_0 + a_1 E_1 + \ldots + a_6 E_6)) \subseteq K(X)\) are the rational functions on X which vanish along each \(E_i\) with multiplicity at least \(-a_i\) (vanishing with negative multiplicity meaning poles of positive order).

For a smooth cubic surface X, the Cox ring \({{\,\mathrm{Cox}\,}}(X)\) is a finitely generated integral domain with a natural set of 27 generators which are the rational functions on X establishing the linear equivalence of each of the 27 lines on the cubic surface X to a divisor of form \(\sum _i a_i E_i \in {{\,\mathrm{Div}\,}}(X)\); see [4, Theorem 3.2].

Proposition 3.2

[27, Proposition 2.2] Let \(d_1,\ldots ,d_6\in \mathbb {C}\) and X be the cubic surface that is the blowup of \((1:d_i:d_i^3)\in \mathbb {P}_\mathbb {C}^2\). Then,

where, up to saturation at the product of all variables, \(I_X\) is generated by the following 10 trinomials and their 260 translates under the action of the Weyl group of type \(\mathbf {E}_6\):

$$\begin{aligned}&(d_3{-}d_4)(d_1{+}d_3{+}d_4)E_2F_{12} - (d_2{-}d_4)(d_1{+}d_2{+}d_4)E_3F_{13} + (d_2{-}d_3)(d_1{+}d_2{+}d_3)E_4F_{14} ,\\&(d_3{-}d_5)(d_1{+}d_3{+}d_5)E_2F_{12} - (d_2{-}d_5)(d_1{+}d_2{+}d_5)E_3F_{13} + (d_2{-}d_3)(d_1{+}d_2{+}d_3)E_5F_{15} ,\\&(d_3{-}d_6)(d_1{+}d_3{+}d_6)E_2F_{12} - (d_2{-}d_6)(d_1{+}d_2{+}d_6)E_3F_{13} + (d_2{-}d_3)(d_1{+}d_2{+}d_3)E_6F_{16} , \\&(d_4{-}d_5)(d_1{+}d_4{+}d_5)E_2F_{12} - (d_2{-}d_5)(d_1{+}d_2{+}d_5)E_4F_{14} + (d_2{-}d_4)(d_1{+}d_2{+}d_4)E_5F_{15} , \\&(d_4{-}d_6)(d_1{+}d_4{+}d_6)E_2F_{12} - (d_2{-}d_6)(d_1{+}d_2{+}d_6)E_4F_{14} + (d_2{-}d_4)(d_1{+}d_2{+}d_4)E_6F_{16} , \\&(d_5{-}d_6)(d_1{+}d_5{+}d_6)E_2F_{12} - (d_2{-}d_6)(d_1{+}d_2{+}d_6)E_5F_{15} + (d_2{-}d_5)(d_1{+}d_2{+}d_5)E_6F_{16} , \\&(d_4{-}d_5)(d_1{+}d_4{+}d_5)E_3F_{13} - (d_3{-}d_5)(d_1{+}d_3{+}d_5)E_4F_{14} + (d_3{-}d_4)(d_1{+}d_3{+}d_4)E_5F_{15} , \\&(d_4{-}d_6)(d_1{+}d_4{+}d_6)E_3F_{13} - (d_3{-}d_6)(d_1{+}d_3{+}d_6)E_4F_{14} + (d_3{-}d_4)(d_1{+}d_3{+}d_4)E_6F_{16} ,\\&(d_5{-}d_6)(d_1{+}d_5{+}d_6)E_3F_{13} - (d_3{-}d_6)(d_1{+}d_3{+}d_6)E_5F_{15} + (d_3{-}d_5)(d_1{+}d_3{+}d_5)E_6F_{16} ,\\&(d_5{-}d_6)(d_1{+}d_5{+}d_6)E_4F_{14} - (d_4{-}d_6)(d_1{+}d_4{+}d_6)E_5F_{15} + (d_4{-}d_5)(d_1{+}d_4{+}d_5)E_6F_{16}. \end{aligned}$$

Here,

  • \(E_i\) represents the exceptional divisor over the point \(p_i\),

  • \(F_{ij}\) represents the strict transform of the line through \(p_i\) and \(p_j\),

  • \(G_i\) represents the strict transform of the conic through \(\{p_1,\ldots ,p_6\} \setminus \{p_i\}\).

The following theorem answers [27, Conjecture 5.3] negatively:

Theorem 3.3

For generic \(d_1,\ldots ,d_6 \in \mathbb {C}\), the 270 trinomial generators of \(I_X\) described in Proposition 3.2 are not a tropical basis.

Proof

Fix the following ordered set of variables:

$$\begin{aligned} S := \{&E_1,E_2,E_3,E_4,E_5,E_6,F_{12},F_{13},F_{14},F_{15},F_{16},F_{23},F_{24},F_{25},F_{26},\\&F_{34},F_{35},F_{36},F_{45},F_{46},F_{56},G_1,G_2,G_3,G_4,G_5,G_6\}. \end{aligned}$$

Let \(I_X\) be the ideal in the polynomial ring \(\mathbb {C}(d_1,\dots ,d_6)[S]\) generated by the 270 trinomials described in Proposition 3.2, and consider the weight vector

$$\begin{aligned} w:=(2,1,0,1,1,1,0,2,0,0,0,1,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0)\in \mathbb {R}^{S}. \end{aligned}$$

One can verify that w is a tropical defect, i.e., w lies in the tropical prevariety, since \({{\,\mathrm{in}\,}}_w(f)\) is at least binomial for each trinomial generator f, and outside the tropical variety, since \({{\,\mathrm{in}\,}}_w(I_X)\) contains the monomial \(E_6F_{56}G_6\). \(\square \)

Remark 3.4

The statements in the proof of Theorem 4.3 can be easily verified using a computer algebra system such as Singular. The following script is available on software.mis.mpg.de, and the following shortened transcript was produced using Singular’s online interface (version 4.1.1) available at singular.uni-kl.de:8003/:

figure d

4 Application: realizability of valuated gaussoids

Gaussoids are combinatorial structures introduced by Lněnička and Matúš [20] that encode conditional independence relations among Gaussian random variables. Reminiscent of the study of matroids, Boege et al. [5] introduced the notions of oriented and valuated gaussoids. In this section, we address the question whether all valuated gaussoids on four elements are realizable, disproving it with a tropical defect. This was initially conjectured in the first version of [5], as found on arXiv. The published version has since been updated with our Theorem 4.3.

Definition 4.1

[5, §1] Fix \(n\in \mathbb {N}\). Consider the Laurent polynomial ring

$$\begin{aligned} R_n := \mathbb {C}\big [p_{I}^{\pm 1}\mid I\subseteq [n]\big ]\big [a_{\{i,j\}|K}^{\pm 1}\mid i,j \in [n] \text { distinct}, K\subseteq [n]\setminus \{i,j\}\big ], \end{aligned}$$

in which we abbreviate \(a_{\{i,j\}|K}\) to \(a_{ij|K}\), and the ideal \(T_n\) generated by the following \(2^{n-2}\left( {\begin{array}{c}n\\ 2\end{array}}\right) \) square trinomials and the following \(12\cdot 2^{n-3}\left( {\begin{array}{c}n\\ 3\end{array}}\right) \) edge trinomials:

$$\begin{aligned}&a_{ij|K}^2 - p_{K \cup \{i\}}\,p_{K \cup \{j\}} + p_{K \cup \{i,j\}}\,p_K \quad \text {for } i,j \in [n] \text { distinct, } K\subseteq [n]\setminus \{i,j\}, \\&p_{L \cup \{k\}}\, a_{ij|L \setminus \{i,j\}} - p_{L}\, a_{ij|L \cup \{k\} \setminus \{i,j\}} - a_{k i |L \setminus \{i\}}\, a_{k j|L\setminus \{j\}}\\&\quad \text {for } i,j,k \in [n] \text { distinct, } L\subseteq [n]\setminus \{k\}. \end{aligned}$$

A valuated gaussoid is a point in the tropical prevariety defined by the square and edge trinomials. It is called realizable if it lies in the tropical variety \({{\,\mathrm{Trop}\,}}(T_n)\).

Remark 4.2

The variables of the ring R correspond to the principal and almost-principal minors of a symmetric \(n \times n\)-matrix (i.e., determinants of square submatrices whose row and column index sets differ by at most one index). The ideal \(T_n\) corresponds to the polynomial relations among these minors for symmetric matrices with nonzero principal minors by [5, Proposition 6.2].

The following theorem negatively answers Conjecture 8.4 in the first arXiv-version of [5], and is now Theorem 8.4 in the final published version of [5]:

Theorem 4.3

Not all valuated gaussoids on four elements are realizable, i.e., the square and edge trinomials in Definition 4.1 are not a tropical basis of \(T_4\).

Proof

Consider the following ordered set S of the variables of \(R_4\) and weight vector \(w\in \mathbb {R}^S\):

$$\begin{aligned} S\!:=\!\{&p_{\emptyset },p_{1},p_{12},p_{123},p_{1234},p_{124},p_{13},p_{134},p_{14},p_{2},p_{23},p_{234},p_{24},p_{3},p_{34},p_{4},\\&a_{12},a_{12|3},a_{12|34},a_{12|4},a_{13},a_{13|2},a_{13|24},a_{13|4},a_{14},a_{14|2},a_{14|23},a_{14|3},\\&a_{23},a_{23|1},a_{23|14},a_{23|4},a_{24},a_{24|1},a_{24|13},a_{24|3},a_{34},a_{34|1},a_{34|12},a_{34|2}\}\\ w\!:=\!(&14,10,6,0,6,8,8,2,8,6,6,2,8,8,8,8,8,4,2,10,9,3,5,5,9,11,\\&1,5,7,5,5,5,7,7,1,5,8,6,4,4)\in \mathbb {R}^S. \end{aligned}$$

One can check that w is a tropical defect, i.e., w lies in the tropical prevariety, since \({{\,\mathrm{in}\,}}_w(f)\) is at least binomial for all square and edge trinomials, and outside the tropical variety, since \({{\,\mathrm{in}\,}}_w(T_4)\) contains the monomial \(a_{23}a_{23|1}\). \(\square \)

Remark 4.4

The statements in the proof of Theorem 4.3 can be easily verified using a computer algebra system such as Singular. The following script is available on software.mis.mpg.de, and the following shortened transcript was produced using Singular’s online interface (version 4.1.1) available at singular.uni-kl.de:8003/:

figure e

Remark 4.5

(sampling affine subspaces for tropical defects) The tropical defects in Theorems 3.3 and 4.3 were found by repeatedly running Algorithm 2.13 on random affine subspaces \(H\subseteq \mathbb {R}^n\). In the sampling of the affine subspaces, a situation which we tried to avoid are two subspaces intersecting the tropical variety in exactly the same Gröbner polyhedra. In the following, we describe our sampling approach which we based on this thought.

Even though we were unable to compute the tropical variety \({{\,\mathrm{Trop}\,}}(I)\) or the tropical prevariety \({{\,\mathrm{Trop}\,}}(F)\) in both problems, we were able to compute

  1. (1)

    a Gröbner basis of I with respect to a graded reverse lexicographical ordering,

  2. (2)

    for selected finite fields \(\mathbb {F}\) and \(d+1:=\dim (I)+1\) variables \(x_{i_0},\dots ,x_{i_d}\), the generator \({\overline{g}}\in \mathbb {F}[x_{i_0},\dots ,x_{i_d}]\) of the principal elimination ideal \((I\otimes _{\mathbb {Z}}\mathbb {F}) \cap \mathbb {F}[x_{i_0},\dots ,x_{i_d}]\).

In other words, (2) allowed for educated guesses for generators g of principal elimination ideals \(I \cap K[x_{i_0},\dots ,x_{i_d}]\), while (1) allowed for tests whether the guesses were correct. Thus, we were able to compute tropical hypersurfaces \({{\,\mathrm{Trop}\,}}(g)\subseteq \mathbb {R}^{d+1}\) which are the images of \({{\,\mathrm{Trop}\,}}(I)\) under selected orthogonal projections \(\pi :\mathbb {R}^n\rightarrow \mathbb {R}^{d+1}\).

For each projection, we then constructed affine lines \(L_1,\ldots ,L_k\subseteq \mathbb {R}^{d+1}\) such that each maximal polyhedron of \({{\,\mathrm{Trop}\,}}(g)\) intersects at least one line. Their preimages \(\pi ^{-1}L_1,\ldots ,\pi ^{-1}L_k\) are then d-codimensional affine subspaces which were our samples for H.