1 Introduction

The main purpose of the study here presented is producing two implemented algorithms aimed to determining all the complete and simplicial fans, admitting a fixed non-degenerate set of vectors as generators of their 1-skeleton. In particular their interplay allows us to discerning if the associated toric varieties admit a projective embedding, that is ample divisors, in particular for higher values (\(\ge 4\)) of dimension and Picard number.

In fact, it is well known that a complete toric variety may not be projective. This cannot happen for toric varieties of dimension \(\le 2\) [19, § 8, Prop. 8.1], but for higher dimension it has been shown by several examples, the first of which was given by Demazure [5]. Kleinschmidt and Sturmfels [15] proved that, for Picard number (in the following also called the rank) \(r\le 3\), smooth and complete toric varieties are projective in every dimension, that is they have to admit ample divisors. This result cannot be extended to higher values of the rank, as shown by a famous example given by Oda [20, p. 84], who presented a smooth complete 3-dimensional toric variety X of rank \(r=4\), whose nef cone has dimension 2: therefore X admits non-trivial numerically effective classes (among which the anti-canonical one) but does not admit any ample class.

When dropping the smoothness hypothesis, Kleinschmidt–Sturmfels bound does no longer hold even for \(\mathbb {Q}\)-factorial singularities: a counterexample has been given by Berchtold and Hausen [2, Ex. 10.2] who provided a \(\mathbb {Q}\)-factorial complete 3-dimensional toric variety X of rank \(r=3\) whose nef cone is 1-dimensional and generated by the anti-canonical class. This example is actually a divisorial contraction of the Oda’s example, as it can be obtained by suppressing a fan generator. As the Oda’s one, the Berchtold–Hausen example is still a sharp counterexample, as \(\mathbb {Q}\)-factorial complete toric varieties of rank \(r\le 2\) turn out to be projective in any dimension, as recently proved in [24] by the authors of the present paper.

In the literature, further examples of non-projective complete toric varieties are known. In particular Fujino and Payne [7] provided an example of a smooth toric threefold of rank \(r=5\) without any non-trivial numerically effective divisor, that is, whose nef cone is trivial, and showed that such a phenomenon cannot happen, in the smooth -dimensional case, when \(r\le 4\). Moreover an example of a \(\mathbb {Q}\)-factorial complete 3-dimensional toric variety, of rank \(r=3\), whose nef cone is trivial has been recently given by the authors [24, § 3], showing that in the \(\mathbb {Q}\)-factorial setup that bound reduces to giving \(r\le 2\), when actually the involved varieties have to be projective and so admitting even ample divisors. Again, the last example turns out to be a divisorial contraction of the Fujino–Payne one. Moreover it has been obtained by slightly deforming, in a sense better described in the final Sect. 8.4, the Berchtold–Hausen example, so breaking up its symmetry in such a way that the two non-projective varieties sharing the same nef cone generated by the anti-canonical class deform, on the one hand to a projective variety and on the other one to a still worse non-projective one, no more admitting even non-trivial nef divisors.

This fact reveals two interesting evidences.

The first one is that many known examples of complete and non-projective toric varieties are intimately related, showing that, morally, they turn out to be an ad hoc variation of the classical Oda’s example. We believe this happens because it is very difficult constructing example of this kind for higher values of dimension and rank and maintaining low values of those parameters forces us to work in a too narrow environment.

The second evidence is that we find a gap in the theory, when we try to explain how non-projective varieties arise among complete toric varieties: is it true that a general complete toric variety is projective? What is the precise meaning of the word “general” in the previous question? Why slightly deforming the secondary fan, e.g. by moving a ray of the effective cone, generated by the classes of effective divisors, non-projective varieties can appear and disappear? As stimulating examples in Sect. 8.4 we present two families, over \(\mathbb {Q}\), of complete \(\mathbb {Q}\)-factorial toric varieties, the first admitting a projective general fibre with a non-projective special fibre and the second admitting general fibre without any non trivial nef divisor and a special fibre whose anticanonical class generates the nef cone. These examples seem to be representative of apparently opposite phenomena calling for a more general theoretic explanation we are not able to give in this moment.

Both these evidences requires a huge multitude of examples to consider and study, in particular for higher values of dimension and rank, so highlighting the need of a computer-aided approach to this kind of problems.

In the literature there are algorithms computing projective fans (i.e. regular triangulations) but also algorithm computing all kind of triangulations (see for example [3, 4, 12] ) In this paper we propose two algorithms calculating complete \(\mathbb {Q}\)-factorial fans over a set of vectors.

The first one, described in Sect. 3, computes projective and non projective fans. Although it is quite inefficient, it is theoretically interesting as leading us to the topological-combinatoric Conjecture 2, about the definition of a fan. We performed a Maple implementation of this algorithm, making it compatible with packages like Convex by Franz [6] and MDSpackage by Keicher and Hausen [8]. These connections reveal to be quite useful for several applications. The first one in computing movable and nef cones associated to the computed fans and so detecting if the associated toric variety is projective or not. The second one to study possible embedded Mori Dream spaces.

The second algorithm uses Gröbner bases of toric ideals, and the fact, established by Sturmfels [26, Prop. 8.15], that the Gröbner fan of a toric ideal refines the secondary fan associated with the corresponding configuration of vectors. Whilst most of the literature on this subject deals with homogeneous toric ideals, here we focus our attention on toric ideals arising from a complete configuration; these ideals cannot be homogeneous. We describe the Gröbner region and translate the problem of calculating fans in a problem of linear programming, as done in [27] in the homogeneous case. It turns out a surjective map (Corollary 1) from a set of initial ideals of the toric ideal and the set of simplicial projective fans having as 1-skeleton the rays generated by all the vectors in the configuration. This correspondence in general is not injective, but initial ideals associated to the same fan result to have the same radical.

The above theoretical results, mainly concentrated in § 5, are probably the most original contribution of the research here presented, and allow us to formulate, in Sect. 6, an algorithm which determines all projective complete simplicial fans with a given 1-skeleton, based on the computation of the Gröbner fan of the associated toric ideal. For the latter purpose, we exploit the existing software for finding the Gröbner fan of toric ideals such as TiGERS or CATS (incorporated in GFAN) (see [11, 13, 14]). This software works with homogeneous ideals and in Sect. 6.2 we explain how to adapt it to our situation by taking as input the homogeneized ideal and modifying the output in a suitable way. The algorithm produced in this way turns out to be much more efficient than that presented in Sect. 3. Sect. 7 is devoted to present some examples. Sect. 8 points out some open problems and directions for future work.

2 Preliminaries and notation

Let \(A\in {\mathbf {M}}(d,m;\mathbb {Z})\) be a \(d\times m\) integer matrix (along the paper, d will be replaced by either r (the Picard number) or n (the dimension), depending on the situation). Then

$$\begin{aligned} \begin{array}{lll} &{\mathcal {L}}_{\rm r}(A)\subseteq {\mathbb {Z}}^m& {\text {denotes}}\,{\text {the}}\,{\text {sublattice}}\, {\text {spanned}}\,{\text {by}}\,{\text {the}}\,{\text {rows}}\,{\text {of }} A; \\ &{\mathcal {L}}_{\rm c}(A)\subseteq {\mathbb {Z}}^d&{ \text {denotes}}\,{\text {the}}\,{\text { sublattice}}\,{\text { spanned}}\,{\text { by}}\,{\text { the}}\,{\text {columns}}\,{\text { of }} A; \\ &{\mathcal {V}}_{{\rm r}}(A)\subseteq {\mathbb {R}}^m& {\text {denotes}}\, {\text {the}}\,{\text {subspace}}\,{\text { spanned}}\,{\text { by}}\,{\text { the}}\,{\text { rows}}\,{\text {of }} A; \\ & {\mathcal {V}}_{\rm c}(A)\subseteq {\mathbb {R}}^d& {\text {denotes}}\,{\text { the}}\,{\text { subspace}}\,{\text { spanned}}\,{\text { by}}\,{\text { the}}\,{\text { columns}}\,{\text { of }} A; \\ &A_I,\,A^I& \forall \,I\subseteq \{1,\ldots ,m\}\, {\text {the}}\,{\text { former}}\,{\text { is}}\,{\text { the}}\,{\text { submatrix}}\,{\text { of}}\,{\text { A}}\,{\text { given}}\,{\text { by}}\\ && {\text {the}}\,{\text { columns}}\,{\text { indexed}}\,{\text { by }} I{ \text {and}}\,{\text { the}}\,{\text { latter}}\,{\text { is}}\,{\text { the}}\,{\text { submatrix}}\,{\text {of}}\\ && A {\text { whose}}\,{\text { columns}}\,{\text { are}}\,{\text { indexed}}\,{\text { by}}\,{\text { the}}\,{\text { complementary }}\\ && {\text {subset }} \{1,\ldots ,m\}\backslash I; \\ \end{array} \end{aligned}$$

We denote by \({\mathrm{supp}}({\mathbf {u}})\) the support \(\{i \ |\ u_i\not =0\}\) of a vector \({\mathbf {u}}\in \mathbb {R}^m\). For a monomial \({\mathbf {x}}^{\mathbf {u}}\) we set \({\mathrm{supp}}({\mathbf {x}}^{\mathbf {u}}) = {\mathrm{supp}}({\mathbf {u}})\).

For every vector \({\mathbf {u}}\in \mathbb {Z}^m\) we write \({\mathbf {u}}={\mathbf {u}}^+-{\mathbf {u}}^-\) where \({\mathbf {u}}^+,{\mathbf {u}}^-\in \mathbb {N}^m\) have disjoint support (we assume, here and elsewhere in the paper, that 0 belongs to the set of natural numbers \(\mathbb {N}\)). We denote by \(g_{{\mathbf {u}}}\) the binomial \({\mathbf {x}}^{{\mathbf {u}}^+}-{\mathbf {x}}^{{\mathbf {u}}^-}\).

For a subset X of \(\mathbb {R}^n\) the relative interior, \({{\,\mathrm{Relint}\,}}(X)\), is the interior of X inside the affine span of X.

In the following \(V=({\mathbf {v}}_1,\ldots , {\mathbf {v}}_m)\) is a \(n\times m\) complete CF-fan matrix (see the following Definition 1), Q is a Gale dual matrix of V (see the following Sect. 4.1); it has order \(r\times m\), where \(r+n=m\).0

We shall denote \(\langle {\mathbf {v}}_1,\ldots , {\mathbf {v}}_h\rangle\) the cone spanned by the vectors \({\mathbf {v}}_1,\ldots , {\mathbf {v}}_h\). If A is a matrix, then \(\langle A\rangle\) denotes the cone spanned by the columns of A.0

If M is a module over a ring R, we shall denote by \(M^{\vee }\) its dual module: \(M^\vee ={{\,\mathrm{Hom}\,}}_R(M,R)\).

If \(\sigma\) is a cone in a real vector space \(\mathbb {V}\), \(\sigma ^*\) denotes its dual cone:

$$\begin{aligned} \sigma ^*=\{f\in \mathbb {V}^\vee \ |\ f({\mathbf {y}}) \ge 0{\text { for}}\,{\text { every } }{\mathbf {y}}\in \sigma \}. \end{aligned}$$

\(\mathbb {K}\) is a field of characteristic 0.

3 F-matrices

An n-dimensional \(\mathbb {Q}\)-factorial complete toric variety \(X=X(\Sigma )\) of rank r is the toric variety defined by an n-dimensional simplicial and complete fan \(\Sigma\) such that \(|\Sigma (1)|=m=n+r\).

In particular the rank r coincides with the Picard number i.e. \(r={{\,\mathrm{rk}\,}}({{\,\mathrm{Pic}\,}}(X))\).

Given such a fan \(\Sigma\), it gives rise to a matrix V whose columns are integral vectors generating the rays of the 1-skeleton \(\Sigma (1)\).

The matrix V will be called a fan matrix of \(\Sigma\).

Fan matrices motivate the following definition (see [22] for any further detail).

Definition 1

A (reduced) F-matrix is a \(n\times m\) matrix V with integer entries, satisfying the conditions:

  1. a.

    \({{\,\mathrm{rk}\,}}(V)=n\);

  2. b.

    all the columns of V are non zero;

  3. c.

    if \(\mathbf{v}\) is a column of V, then V does not contain another column of the form \(\lambda \mathbf{v}\) where \(\lambda >0\) is a real number.

  4. d.

    V is F-complete: the cone generated by its columns is \(\mathbb {R}^n\);

  5. e.

    the \(\gcd\) of the elements of every columns is 1

A CF-matrix is a F-matrix satisfying the further requirement

  1. f.

    \({{\mathcal {L}}}_{\mathrm c}(V)=\mathbb {Z}^n\).

Let \(V=({\mathbf {v}}_1,\ldots ,{\mathbf {v}}_m)\) be a \(n\times m\) F-matrix. Let \(\mathcal {SF}(V)\) be the set of all simplicial and complete fans whose 1-skeleton is given by all the rays generated by the columns of V. For any choice \(\Sigma \in \mathcal {SF}(V)\) we get a \(\mathbb {Q}\)-factorial complete toric variety \(X=X(\Sigma )\).

\(X(\Sigma )\) is called a poly weighted projective space (PWS) if V is a CF-matrix.

Theorem 1

[23, Theorem 2.2] Every \(\mathbb {Q}\)-factorial complete toric variety \(X=X(\Sigma )\) admits a canonical finite abelian covering

$$\begin{aligned} Y({\widehat{\Sigma }})\twoheadrightarrow X(\Sigma ), \end{aligned}$$

unramified in codimension 1, such that \(Y({\widehat{\Sigma }})\) is a PWS.

The fans associated to the two varieties have the same combinatoric structure, in the sense that they involve the same sets of indices of columns in the corresponding fan matrices.

4 The “cercafan”algorithm for calculating \(\mathcal {SF}(V)\) and the pseudofan conjecture

Let \(V=({\mathbf {v}}_1,\ldots ,{\mathbf {v}}_m)\) be a \(n\times m\) F-matrix. Then \(\mathcal {SF}(V)\) can be computed by the following steps.

  1. 1.

    Compute the set \(\mathcal {M}\) of minimal n-dimensional cones generated by the columns of V, i.e. the simplicial cones not contaning other columns of V than those generating their extremal rays.

  2. 2.

    Compute the set \(\mathcal {F}\) of facets (that is, \((n-1)\)-dimensional faces) of cones in \(\mathcal {M}\) and for each \(f\in \mathcal {F}\) a normal vector \({\mathbf {n}}_f\) (the positive side of f).

  3. 3.

    for every \(f\in \mathcal {F}\) compute

    $$\begin{aligned} {\mathcal {M}}_f^+& = \{\sigma \in {\mathcal {M}} \ |\ f{\text { is}}\,{\text { a}}\,{\text { facet}}\,{\text { of }} \sigma {\text { and }} \sigma {\text { lies}}\,{\text { on}}\,{\text { the}}\,{\text { positive}}\,{\text { side}}\,{\text { of }} f\}\\ {\mathcal {M}}_f^{-}& = \{\sigma \in {\mathcal {M} }\ |\ f {\text{ is}}\,{\text { a}}\,{\text { facet}}\,{\text { of }} \sigma {\text { and }} \sigma {\text { lies}}\,{\text { on}}\,{\text { the}}\,{\text { negative}}\,{\text { side}}\,{\text { of }} f\} \end{aligned}$$
  4. 4.

    Starting from the collection

    $$\begin{aligned} \{(f, \mathcal {M}_f^+,\mathcal {M}_f^-) \ | \ f\in \mathcal {F}\} \end{aligned}$$

    eliminate in all possible ways cones from \(\mathcal {M}_f^+\) and \(\mathcal {M}_f^-\) until for every \(f\in \mathcal {F}\) either \(|\mathcal {M}_f^+|=|\mathcal {M}_f^-|=0\) or \(|\mathcal {M}_f^+|=|\mathcal {M}_f^-|=1\).

  5. 5.

    Put \(\mathcal {C}=\bigcup _f \mathcal {M}_f^+\cup \bigcup _f \mathcal {M}_f^-\).

  6. 6.

    Verify that \(\buildrel \circ \over \sigma \cap \buildrel \circ \over \tau =\emptyset\) for every \(\sigma ,\tau \in \mathcal {C}\); in this case \(\mathcal {C}=\Sigma (n)\) for a complete simplicial fan \(\Sigma\).

Conjecture 1

Step (6) is unnecessary.

More precisely we can define a pseudofan as a collection

$$\begin{aligned} \mathcal {C}=\{\sigma _1,\ldots ,\sigma _t\} \end{aligned}$$

of simplicial cones on the columns of V satisfying:

  • \(\mathcal {C}\subseteq \mathcal {M}\) i.e. every \(\sigma _i\) is a minimal maximal cone.

  • The set of vertices of cones in \(\mathcal {C}\) is the whole set of columns of V;

  • Every facet f of some \(\sigma _i\in \mathcal {C}\) is shared by unique other \(\sigma _j\in \mathcal {C}\) lying on the opposite side of f.

  • (maybe) \(\mathcal {C}\) is minimal with these properties.

Then the pseudofan conjecture can be stated as:

Conjecture 2

Every pseudofan is a fan in \(\mathcal {SF}(V)\).

The conjecture is trivial in dimension 2. Although we would not able to prove it in dimension \(\ge 3\), it is supported by a huge number of examples up to dimension 5 and rank 4.

5 Gale duality and secondary fan

Although its theoretical interest, the “cercafan ”algorithm is not very efficient and is in practice unusable as the size and number of vectors grow. The following of this paper will be devoted to present a second algorithm, based on the theory of Gröbner bases of toric ideals, computing the projective fans in \(\mathcal {SF}(V)\), for a given F-matrix V. A fundamental tool for this construction is Gale duality that we briefly recall in this section.

5.1 The Gale dual matrix of V

Let V be a \(n\times m\) F-matrix. If we think V as a linear application from \(\mathbb {Z}^{m}\) to \(\mathbb {Z}^n\) then \(\ker (V)\) is a lattice in \(\mathbb {Z}^{m}\), of rank \(r:=m-n\) and without cotorsion.

We shall denote \(Q={{\mathcal {G}}}(V)\) the Gale dual matrix of V: an integral \(r\times (n+ r)\) matrix Q whose rows are a \(\mathbb {Z}\)-basis of \(\ker (V)\); the matrix Q is well-defined up to left multiplication by \({\text {GL}}_r(\mathbb {Z})\) and can be characterized by the following universal property [22, §3.1]:

$$\begin{aligned} if\, A\in {\mathbf {M}}_r(\mathbb {Z})\, is\, such \,that\, A\cdot V^T=0\, then\, A=\alpha \cdot Q \,for\, some \,matrix\, \alpha \in {\mathbf {M}}_r(\mathbb {Z}). \end{aligned}$$

F-completeness implies that the span of the rows of Q contain a strictly positive vector, so that Q can be chosen non-negative.

Notice that \(\mathcal {G}(V)=\mathcal {G}({\widehat{V}})\) where \({\widehat{V}}\) is the CF-matrix associated to the 1-covering.

5.2 Gale duality

Recall notation introduced in Sect. 1.

Submatrices of Q and V correspond each other via the natural isomorphism

$$\begin{aligned} \mathbb {Z}^{m-k}/\mathcal {L}_c(Q^I)\buildrel \sim \over \longrightarrow \mathcal {L}_c(V)/\mathcal {L}_c(V_I),\quad \quad |I|=k. \end{aligned}$$

5.3 Bunches and the secondary fan

The Gale dual analogue of a fan is a bunch of cones (see [2]).

In our situation we can identify a bunch of cones with a family \(\Omega\) of simplicial cones on the columns of Q satisfying

$$\begin{aligned} \buildrel \circ \over \sigma \cap \buildrel \circ \over \tau \not = \emptyset {\text { for}}\,{\text { every } }\sigma ,\tau \in \Omega . \end{aligned}$$

A bunch \(\Omega\) is projective if \(\bigcap _{\sigma \in \Omega }\sigma\) (the chamber) is full-dimensional.

The set of chambers gives rise to the r-skeleton of a polyhedral fan (the secondary fan) with support \(\langle Q\rangle\).

If \(I\subseteq \{1,\ldots ,m\}\) and \(|I|=r\) then the correspondence \(\langle Q_I \rangle \mapsto \langle V^I\rangle\) induces a bijection between bunches and fans and in particular between

(1)

where \(\mathcal {B}(Q)=\{\Omega \ |\ {\text { for }} i=1,\ldots , m {\text { there is }} \sigma \in \Omega\) such that \(\sigma \subseteq \langle Q^{\{i\}} \rangle \}\). It induces a bijection

between projective fans and associated bunches.

Remark 1

We implemented the cercafan algorithm in Maple, making it compatible with packages like Convex [6] and MDSpackage [8]. Then one can quickly determine, for each computed fan, if it is projective, by checking if the intersection of all the cones in the bunch (i.e. the nef cone) is full dimensional or not. Moreover both nef and movable cones are quickly computable and one can also obtain useful information about possible embedded Mori Dream spaces.

6 The toric ideal

In this section we shall associate to every F-matrix V a toric ideal in a suitable polynomial ring, and investigate the properties of its Gröbner fan, which provides the structure of the initial ideals. Whilst most of the literature on this subject deals with homogeneous toric ideals, ideals associated to F-matrices cannot be homogeneous, due to the F-completeness requirement in Definition 1 d). We shall describe the Gröbner region and translate the problem of calculating fans in a problem of linear programming, as done in [27] in the homogeneous case.

Let \(\mathbb {K}\) be a field of characteristic 0 and \(V=({\mathbf {v}}_1,\ldots ,{\mathbf {v}}_m)\) be an F-matrix; it defines a ring homomorphism:

$$\begin{aligned} \pi :\mathbb {K}[x_1,\ldots , x_m ]\longrightarrow & {} \mathbb {K}[t_1^{\pm 1},\ldots t_n^{\pm 1}]\\ x_j\longmapsto & {} {\mathbf {t}}^{{\mathbf {v}}_j} \end{aligned}$$

The toric ideal of V, denoted as \(I_V\), is the kernel of the map \(\pi\).

The following facts on \(I_V\) (see [26] ) are well-known

  • \(I_V=I_{{\widehat{V}}}\).

  • \(I_V\) is generated by binomials \(g_{{\mathbf {u}}}={\mathbf {x}}^{{\mathbf {u}}^+}-{\mathbf {x}}^{{\mathbf {u}}^-}\), with \({\mathbf {u}}={\mathbf {u}}^+-{\mathbf {u}}^-\in \mathcal {L}_r(Q)\), and \({\mathbf {u}}^+,{\mathbf {u}}^-\in \mathbb {N}^m\) have disjoint support.

  • For every term order \(\preceq\) the reduced Gröbner basis of \(I_V\) with respect to \(\preceq\) consists of a finite set of binomials of the form \(g_{\mathbf {u}}\).

Remark 2

Completeness is equivalent to the fact that for \(i=1,\ldots , m\) there is a binomial \({\mathbf {x}}^{{\mathbf {u}}^+}-1\) in \(I_V\) such that \(i\in {\mathrm{supp}}({\mathbf {u}}^+)\). In particular every Gröbner basis for \(I_V\) contains a binomial \({\mathbf {x}}^{{\mathbf {u}}}-1\) where \({\mathbf {u}}\) is a non negative vector in \(\mathcal {L}_r(Q)\). This fact has been applied in order to compute non negative vectors in lattices (see [21]).

For every \({\mathbf {u}}\in \mathbb {N}^m\), the fiber \(\mathcal {F}({\mathbf {u}})\) of \({\mathbf {u}}\) is defined as

$$\begin{aligned} \mathcal {F}({\mathbf {u}})=(\mathcal {L}_{\rm r}(Q)+{\mathbf {u}})\cap \mathbb {N}^m. \end{aligned}$$

It is noteworthy to remark that fibers are infinite sets in the complete case.

We shall make use of the following technical result:

Proposition 1

Let \(f=\sum _{i\in I}\lambda _i{\mathbf {x}}^{{\mathbf {u}}_i}\in \mathbb {K}[{\mathbf {x}}]\) be a polynomial and write \(f=f_1+\cdots +f_k\) where each summand \(f_i\) is the sum of all monomials of f whose exponent vectors lie in the same fiber. Then \(f\in I_V\) if and only if \(f_i\in I_V\) for \(i=1,\ldots , k\).

Proof

Obviously, \(f\in I_V\) if every \(f_i\) lies in \(I_V\). Conversely, suppose that \(f\in I_V\). Then we can write \(f=\sum _{j\in J}\mu _jg_{{\mathbf {u}}_j}=\sum _{j\in J}\mu _j ({\mathbf {x}}^{{\mathbf {u}}_j^+}-{\mathbf {x}}^{{\mathbf {u}}_j^-})\) where \(\mathcal {F}({\mathbf {u}}_j^+)=\mathcal {F}({\mathbf {u}}_j^-)\). Then each \(f_i\) is in turn a sum of some summands of the form \(\mu _j g_{{\mathbf {u}}_j}\), so that \(f_i\in I_V\). \(\square\)

For \({\mathbf {b}}\in \mathbb {R}^n\) we define

$$\begin{aligned} P_{\mathbf {b}}=\{{\mathbf {u}}\in \mathbb {R}^m\ |\ V{\mathbf {u}}={\mathbf {b}}, {\mathbf {u}}\ge {\mathbf {0}}\}. \end{aligned}$$

(In the above formula, both \({\mathbf {u}}\) and \({\mathbf {b}}\) are thought of as “column”vectors, in order for matrix multiplication to be defined). By the completeness of V we know that for every \({\mathbf {b}}\), \(P_{\mathbf {b}}\) is a strictly convex polyhedron of dimension r. Moreover if \({\mathbf {b}}\in \mathbb {Z}^n\) then \(P_{\mathbf {b}}\cap \mathbb {Z}^m =\mathcal {F}({\mathbf {u}})\) for every \({\mathbf {u}}\in \mathbb {N}^m\) such that \(V{\mathbf {u}}={\mathbf {b}}\).

Remark 3

Notice that many notation introduced in the present section depend implicitly on the choice of a fixed F-matrix V, as, for instance, for the fiber \(\mathcal {F}\) and the polyhedron \(P_{\mathbf {b}}\) and the following cone \(\mathcal {W}\). Anyway, we prefer to keep a lighter notation without explicitly expressing V.

Let \({\mathbf {w}}\in \mathbb {R}^m\) and consider the linear map

$$\begin{aligned} \varphi _{\mathbf {w}}: \mathbb {R}^m_{\ge 0}\longrightarrow & {} \mathbb {R}\\ {\mathbf {u}}\longmapsto & {} {\mathbf {w}}^T{\mathbf {u}}\end{aligned}$$

For \({\mathbf {b}}\in \mathbb {R}^n\) put

$$\begin{aligned} \mathcal {W}_{\mathbf {b}}=\{{\mathbf {w}}\in \mathbb {R}^m\ |\ \varphi _{\mathbf {w}}{\text { is}}\,{\text { lower}}\,{\text { bounded}}\,{\text { on }} P_{\mathbf {b}}\} \end{aligned}$$

Proposition 2

\(\mathcal {W}_{\mathbf {b}}\) does not depend on \({\mathbf {b}}\in \mathbb {R}^n\).

Proof

Let \({\mathbf {w}}\in \mathcal {W}_{\mathbf {b}}\) and suppose \(\varphi _{\mathbf {w}}({\mathbf {x}})\ge K\in \mathbb {R}\), for any \({\mathbf {x}}\in P_{\mathbf {b}}\). Let \({\mathbf {b}}'\in \mathbb {R}^n\) and choose by completeness \({\mathbf {x}}_0\in \mathbb {R}^{m}_{\ge 0}\) such that \(V{\mathbf {x}}_0={\mathbf {b}}-{\mathbf {b}}'\). Let \({\mathbf {x}}\in P_{{\mathbf {b}}'}\) then

$$\begin{aligned} \varphi _{\mathbf {w}}({\mathbf {x}})={\mathbf {w}}^T({\mathbf {x}}+{\mathbf {x}}_0-{\mathbf {x}}_0)={\mathbf {w}}^T({\mathbf {x}}+{\mathbf {x}}_0)-{\mathbf {w}}^T{\mathbf {x}}_0\ge K-{\mathbf {w}}^T{\mathbf {x}}_0 \end{aligned}$$

so that \({\mathbf {w}}\in \mathcal {W}_{{\mathbf {b}}'}\). \(\square\)

Let

$$\begin{aligned} \mathcal {U}=P_{\mathbf {0}}=\ker (V)\cap \mathbb {R}^m_{\ge 0} =\mathcal {V}_{\rm r}(Q) \cap \mathbb {R}^m_{\ge 0}. \end{aligned}$$
(2)

By the previous proposition, for every \({\mathbf {b}}\in \mathbb {R}^n\) we have \(\mathcal {W}_{\mathbf {b}}=\mathcal {W}\) where

$$\begin{aligned} \mathcal {W} = \mathcal {W}_{{\mathbf {0}}}= \{{\mathbf {w}}\ |\ \varphi _{\mathbf {w}}{\text{ is}}\,{\text { lower}}\,{\text { bounded}}\,{\text { on }}\mathcal {U}\} \end{aligned}$$
(3)

Proposition 3

\(\mathcal {W}\) is a polyhedral convex cone, containing \(\mathbb {R}^m_{\ge 0}\).

Proof

If \({\mathbf {w}},{\mathbf {w}}'\in \mathcal {W}\) then there exists \(K\in \mathbb {R}\) such that \({\mathbf {w}}^T{\mathbf {x}}, {\mathbf {w}}'^T{\mathbf {x}}\ge K\) for every \({\mathbf {x}}\in P_{{\mathbf {0}}}\). Then for \(\lambda ,\mu \ge 0\) and \({\mathbf {x}}\in P_{{\mathbf {0}}}\)

$$\begin{aligned} (\lambda {\mathbf {w}}+\mu {\mathbf {w}}')^T{\mathbf {x}}\ge (\lambda +\mu )K \end{aligned}$$

so that \(\lambda {\mathbf {w}}+\mu {\mathbf {w}}'\in \mathcal {W}\), and \(\mathcal {W}\) is a polyhedral convex cone.

The second assertion is obvious, since \(P_{{\mathbf {0}}}\subseteq \mathbb {R}^m_{\ge 0}\). \(\square\)

Proposition 4

\(\mathcal {W}\) is dual to the cone \(\mathcal {U}\):

$$\begin{aligned} \mathcal {W}=\mathcal {U}^*=\{{\mathbf {w}}\in \mathbb {R}^m\ |\ {\mathbf {w}}^T{\mathbf {x}}\ge 0,\forall {\mathbf {x}}\in \mathcal {U}\}. \end{aligned}$$

Proof

Obviously \(\mathcal {U}^*\subseteq \mathcal {W}\). Conversely suppose \({\mathbf {w}}\in \mathcal {W}\) and \({\mathbf {w}}^T{\mathbf {x}}<0\) for some \({\mathbf {x}}\in \mathcal {U}\). Then \(\lim _{\lambda \rightarrow +\infty }{\mathbf {w}}^T(\lambda {\mathbf {x}})=-\infty\), so that \(\varphi _{\mathbf {w}}\) is not lower bounded, a contradiction. Therefore \(\mathcal {W}\subseteq \mathcal {U}^*\). \(\square\)

The next propositions give further characterizations of the cone \(\mathcal {W}\) which will be useful in the following:

Proposition 5

$$\begin{aligned} \mathcal {W}=\{{\mathbf {w}}\in \mathbb {R}^m\ |\ \exists {\mathbf {y}}\in \mathbb {R}^n {\text { such}}\,{\text { that }} V^T{\mathbf {y}}\le {\mathbf {w}}\}. \end{aligned}$$

The proof is an immediate consequence of the following variant of Farkas’ Lemma applied with \(A=V^T\), by observing that \(\mathcal {U}=\{{\mathbf {u}}\in \mathbb {R}^m\ |\ V{\mathbf {u}}={\mathbf {0}}, {\mathbf {u}}\ge {\mathbf {0}}\}\).

Proposition 6

[25, Corollary 7.1e, p. 89] Let A be a \(m\times n\) real matrix and \({\mathbf {w}}\in \mathbb {R}^m\) be a column vector. Then the system \(A{\mathbf {y}}\le {\mathbf {w}}\) of linear inequalities has a solution \({\mathbf {y}}\in \mathbb {R}^n\) if and only if \({\mathbf {w}}^T {\mathbf {u}}\ge 0\) for each column vector \({\mathbf {u}}\ge {\mathbf {0}}\) in \(\mathbb {R}^m\) such that \(A^T{\mathbf {u}}={\mathbf {0}}.\)

Proposition 7

\(\mathcal {W}=Q^{-1}(\langle Q\rangle )\).

Proof

We firstly show that \(Q^{-1}(\langle Q\rangle )\subseteq \mathcal {W}\). Let \({\mathbf {w}}\in Q^{-1}(\langle Q\rangle )\). Then \(Q({\mathbf {w}})\in \langle Q\rangle\), so that there esists \({\mathbf {w}}'\in \mathbb {R}^m_{\ge 0}\) such that \(Q({\mathbf {w}})=Q({\mathbf {w}}')\). This in turn implies that there exists \({\mathbf {t}}\in \mathcal {L}_{\rm r}(V)\) such that \({\mathbf {w}}={\mathbf {w}}'+{\mathbf {t}}\). If \({\mathbf {u}}\in \mathcal {U}=\mathcal {V}_{\rm r}(Q)\cap \mathbb {R}^m_{\ge 0}\) then \({\mathbf {w}}^T {\mathbf {u}}=({\mathbf {w}}')^T{\mathbf {u}}+{\mathbf {t}}^T{\mathbf {u}}\ge 0\), because \(({\mathbf {w}}')^T{\mathbf {u}}\ge 0\) and \({\mathbf {t}}^T{\mathbf {u}}=0\). Then \({\mathbf {w}}\in \mathcal {U}^*=\mathcal {W}\).

Conversely, let \({\mathbf {u}}\in Q^{-1}(\langle Q\rangle )^*\), so that

$$\begin{aligned} {\mathbf {t}}^T{\mathbf {u}}\ge 0{\text { for}}\,{\text { every }} {\mathbf {t}}{\text{ such}}\,{\text { that }} Q{\mathbf {t}}\in \langle Q\rangle . \end{aligned}$$
(4)

Then \({\mathbf {u}}\in \mathcal {V}_{\rm {r}}(Q)\); indeed if \({\mathbf {t}}\in \mathcal {V}_{\rm r}(V)\) then \(Q{\mathbf {t}}=0\) so that, \(\pm {\mathbf {t}}\in Q^{-1}(\langle Q\rangle )\); then (4) implies that \(\pm {\mathbf {t}}^T{\mathbf {u}}\ge 0\), so that \({\mathbf {t}}^T{\mathbf {u}}=0\). Moreover \({\mathbf {u}}\in \mathbb {R}^m_{\ge 0}\); indeed every element \({\mathbf {e}}_i\) in the canonical basis of \(\mathbb {R}^m\) lies in \(Q^{-1}(\langle Q\rangle )\), so that (4) implies that \(u_i\ge 0\) for \(i=1,\ldots , m\). Therefore we have shown that \((Q^{-1}(\langle Q\rangle ))^*\subseteq \mathcal {V}_{\rm r}(Q)\cap \mathbb {R}^m_{\ge 0}=\mathcal {U}\); by the properties of the dual cone this implies \(\mathcal {W}=\mathcal {U}^*\subseteq (Q^{-1}(\langle Q\rangle ))^{**}=Q^{-1}(\langle Q\rangle ))\). \(\square\)

6.1 The Gröbner fan

To every \({\mathbf {w}}\in \mathbb {R}^m\), we can associate a relation \(\preceq _{\mathbf {w}}\) on \(\mathbb {N}^m\), defined by

$$\begin{aligned} {\mathbf {u}}_1\preceq _{\mathbf {w}}{\mathbf {u}}_2{\text{ if }} \varphi _{\mathbf {w}}({\mathbf {u}}_1)\le \varphi _{\mathbf {w}}({\mathbf {u}}_2). \end{aligned}$$

Let \(\mathbb {K}\) be any field, and \({\mathbf {x}}= x_1,\ldots , x_m\). For a polynomial \(f=\sum _{{\mathbf {a}}} c_{\mathbf {a}}{\mathbf {x}}^{\mathbf {a}}\in \mathbb {K}[{\mathbf {x}}]\) the inital term \({\mathrm {in}}_{\mathbf {w}}(f)\) of f w.r.t. \({\mathbf {w}}\) is defined as the sum of all terms \(c_{\mathbf {a}}{\mathbf {x}}^{\mathbf {a}}\) in f such that \(\varphi _{\mathbf {w}}({\mathbf {a}})\) is maximal. If I is an ideal in \(\mathbb {K}[{\mathbf {x}}]\), the initial ideal of I w.r.t. \({\mathbf {w}}\) is then \({\mathrm {in}}_{\mathbf {w}}(I)=\{\mathrm {in}_{\mathbf {w}}(f)\ |\ f\in I\}\). If \({\mathrm {in}}_{\mathbf {w}}(I)\) is monomial, then \({\mathbf {w}}\) is said generic for I. It is well-known [26, Cor. 1.10 and Prop. 1.11] that the set of initial ideals \({\mathrm {in}}_\preceq (I)\) of I determined by term orders \(\preceq\) coincide with the set of inital ideals \({\mathrm {in}}_{\mathbf {w}}(I)\) of I associated to generic weight vectors \({\mathbf {w}}\in \mathbb {R}^m_{\ge 0}\).

When \({\mathbf {w}}\not \in \mathbb {R}^m_{\ge 0}\), \(\preceq _{\mathbf {w}}\) cannot be refined to be a term order; however it is still possible that, for some ideal I, \({\mathrm {in}}_{{\mathbf {w}}}(I)\) is also the initial ideal of I with respect to some term order.

Therefore we introduce the following:

Definition 2

Let \(I\subseteq \mathbb {K}[{\mathbf {x}}]\) be an ideal. A monomial ideal J is an initial ideal of I if \(J={\mathrm {in}}_\preceq (I)\) for some term order \(\preceq\).

Proposition 8

Let \({\mathbf {w}}\in \mathbb {R}^m\) be generic; if \({\mathrm {in}}_{{\mathbf {w}}}(I_V)\) is an initial ideal of \(I_V\) then \({\mathbf {w}}\in \mathcal {W}\).

Proof

Suppose that \({\mathrm {in}}_{{\mathbf {w}}}(I_V)\) is an initial ideal of \(I_V\); then by definition there is a term order \(\preceq\) such that \({\mathrm {in}}_{{{\mathbf {w}}}}(I_V)={\mathrm {in}}_{\preceq }(I_V)\). Let \({\mathbf {u}}\in \mathcal {L}_{\mathrm r}(Q)\cap \mathbb {R}^m_{\ge 0}\); then \({\mathbf {x}}^{\mathbf {u}}-1\in I_V\) and thus \({\mathbf {x}}^{\mathbf {u}}\in \mathrm {in}_\preceq (I_V)=\mathrm {in}_{{{\mathbf {w}}}}(I_V)\). Then \({\mathbf {x}}^{\mathbf {u}}\succeq _{\mathbf {w}}1\) so that \({\mathbf {w}}^T{\mathbf {u}}\ge 0\). Notice that by (2) the cone \(\mathcal {U}\) is generated by \(\mathcal {L}_{\mathrm r}(Q)\cap \mathbb {R}^m_{\ge 0}\). This shows that \({\mathbf {w}}\in \mathcal {U}^*=\mathcal {W}\), by Proposition 4. \(\square\)

Two vectors in \(\mathcal {W}\) determine the same initial ideal of \(I_V\) when they represent linearly (i.e. numerically) equivalent divisors; this is established by the following

Proposition 9

Choose \({\mathbf {w}}_1,{\mathbf {w}}_2 \in \mathcal {W}\). If \(Q{\mathbf {w}}_1=Q{\mathbf {w}}_2\) then \({\mathrm {in}}_{{{\mathbf {w}}_1}}(I_V)={\mathrm {in}}_{{{\mathbf {w}}_2}}(I_V)\).

Proof

We can write \({\mathbf {w}}_2={\mathbf {w}}_1+{\mathbf {r}}\), with \({\mathbf {r}}\in \ker (Q)\). Then \({\mathbf {w}}_1^T {\mathbf {u}}={\mathbf {w}}_2^T{\mathbf {u}}\) holds for every \({\mathbf {u}}\in \mathcal {L}_{\rm r}(Q)\), so that \({\mathrm {in}}_{{{\mathbf {w}}_1}}(g_{\mathbf {u}})={\mathrm {in}}_{{{\mathbf {w}}_2}}(g_{\mathbf {u}})\). Then the result follows because \(I_V\) is generated by binomials \(g_{{\mathbf {u}}}\) for \({\mathbf {u}}\in \mathcal {L}_r(Q)\). \(\square\)

The converse of Proposition 8 is also true. In order to establish it we need some preliminary results.

Lemma 1

Let \({\mathbf {u}}\in \mathbb {N}^m, {\mathbf {w}}\in \mathcal {W}\). Then \(\preceq _{\mathbf {w}}\) refines the standard partial order \(\le\) on \(\mathcal {F}({\mathbf {u}})\); that is

$$\begin{aligned} {\mathbf {v}}_1\le {\mathbf {v}}_2\Rightarrow {{\mathbf {v}}_1}\preceq _{\mathbf {w}}{{\mathbf {v}}_2}, {\text { for every }} {\mathbf {v}}_1,{\mathbf {v}}_2\in \mathcal {F}({\mathbf {u}}). \end{aligned}$$

Proof

If \({\mathbf {v}}_1\le {\mathbf {v}}_2\) then \({\mathbf {v}}_2={\mathbf {v}}_1+{\mathbf {t}}\) for some \({\mathbf {t}}\in \mathbb {R}^m_{\ge 0} \cap \mathcal {L}_{\rm r}(Q)\subseteq \mathcal {U}\). Since \({\mathbf {w}}\in \mathcal {W}\), then \({\mathbf {w}}^T{\mathbf {t}}\ge 0\) by Proposition 4, so that \({\mathbf {w}}^T{\mathbf {v}}_1\le {\mathbf {w}}^T {\mathbf {v}}_2\). \(\square\)

Let us recall the following well known result:

Lemma 2

(Dickson Lemma, [9] Theorem 2.1.1) Every totally unordered subset of \(\mathbb {N}^m\) is finite.

Lemma 3

Let \({\mathbf {w}}\in \mathcal {W}\) be generic. For every \({\mathbf {u}}\in \mathbb {N}^m\) the fiber \(\mathcal {F}({\mathbf {u}})\) has a (unique) minimum with respect to \(\preceq _{\mathbf {w}}\).

Proof

By Proposition 2 and formula (3), \(\varphi _{\mathbf {w}}\) is lower bounded on \(\mathcal {F}({\mathbf {u}})\). Therefore the set

$$\begin{aligned} S:=\{{\mathbf {v}}\in \mathcal {F}({\mathbf {u}})\ |\ \varphi _{\mathbf {w}}{\text { attains}}\,{\text { its}}\,{\text { mimimum}}\,{\text { at }} {\mathbf {v}}\} \end{aligned}$$

is not empty. Assume that S contains two distinct elements \({\mathbf {v}}_1\not = {\mathbf {v}}_2\). Then \({\mathbf {x}}^{{\mathbf {v}}_1}-{\mathbf {x}}^{{\mathbf {v}}_2}\in I_V\) and \(\varphi _{\mathbf {w}}({\mathbf {v}}_1)=\varphi _{\mathbf {w}}({\mathbf {v}}_2)\), so that \({\mathbf {x}}^{{\mathbf {v}}_1}-{\mathbf {x}}^{{\mathbf {v}}_2}\in {\mathrm {in}}_{\mathbf {w}}(I_V)\). Since \({\mathbf {w}}\) is generic, \({\mathrm {in}}_{\mathbf {w}}(I_V)\) is monomial; thus \({\mathbf {x}}^{{\mathbf {v}}_1}, {\mathbf {x}}^{{\mathbf {v}}_2}\in {\mathrm {in}}_{\mathbf {w}}(I_V)\). Since \({\mathbf {x}}^{{\mathbf {v}}_1}\not \in I_V\), by Proposition 1 there exists \({\mathbf {v}}_0\in \mathcal {F}({\mathbf {u}})\) such that \(\varphi _{\mathbf {w}}({\mathbf {v}}_0)<\varphi _{\mathbf {w}}({\mathbf {v}}_1)\), contrarily to the fact that \({\mathbf {v}}_1\in S\). Then S contains a single element. \(\square\)

For a generic \({\mathbf {w}}\in \mathcal {W}\) define

$$\begin{aligned} {{\,\mathrm{Min}\,}}_{\mathbf {w}} &= \{{\mathbf {u}}\in \mathbb {N}^m \ |\ {\mathbf {u}}{\text { is}}\,{\text { the}}\,{\text { minimum}}\,{\text { of } }\mathcal {F}({\mathbf {u}}){\text { w.r.t.}}\preceq _{\mathbf {w}}\}\\ {\overline{{{\,\mathrm{Min}\,}}}}_{\mathbf {w}} &= \mathbb {N}^m\setminus {{\,\mathrm{Min}\,}}_{\mathbf {w}}\\ \end{aligned}$$

and let \({{\,\mathrm{M}\,}}_{\mathbf {w}}\) be the subset of \({{\,{\overline{{\text{Min}}}}\,}}_{\mathbf {w}}\) consisting of the minimal elements with respect to \(\le\). By Dickson’s Lemma, \({{\,\mathrm{M}\,}}_{\mathbf {w}}\) is a finite set.

Lemma 4

If \({\mathbf {u}}\in {{\,\mathrm{M}\,}}_{\mathbf {w}}\) and \({\mathbf {u}}_0\) is the minimum of \(\mathcal {F}({\mathbf {u}})\) w.r.t. \(\preceq _{{\mathbf {w}}}\), then \({\mathrm{supp}}({\mathbf {u}})\cap {\mathrm{supp}} ({\mathbf {u}}_0)=\emptyset\).

Proof

Assume that \(j\in {\mathrm{supp}}({\mathbf {u}})\cap {\mathrm{supp}}({\mathbf {u}}_0)\), let \({\mathbf {e}}_j\) be the vector having 1 at place j and 0 elsewhere and put \({\mathbf {u}}'={\mathbf {u}}-{\mathbf {e}}_j\), \({\mathbf {u}}'_0={\mathbf {u}}_0-{\mathbf {e}}_j\). Then \({\mathbf {u}}'_0\preceq _{\mathbf {w}}{\mathbf {u}}' <{\mathbf {u}}\) and \({\mathbf {u}}'-{\mathbf {u}}'_0={\mathbf {u}}-{\mathbf {u}}_0\), so that \({\mathbf {u}}'\) and \({\mathbf {u}}'_0\) lie in the same fiber. Therefore \({\mathbf {u}}'\in {{\,{\overline{{\text{Min}}}}\,}}_{\mathbf {w}}\) and \({\mathbf {u}}\) is not minimal. \(\square\)

Lemma 5

Let \({\mathbf {w}}\in \mathcal {W}\) be generic. Then the following equality of ideals holds:

$$\begin{aligned} {\mathrm {in}}_{{\mathbf {w}}}(I_V)=( {\mathbf {x}}^{\mathbf {u}}\ |\ {\mathbf {u}}\in {{\,{\overline{{\text{Min}}}}\,}}_{\mathbf {w}}) =({\mathbf {x}}^{\mathbf {u}}\ |\ {\mathbf {u}}\in {{\,\mathrm{M}\,}}_{\mathbf {w}}) \end{aligned}$$

Proof

The second equality is trivial, so we prove the first one. For \({\mathbf {u}}\in {{\,{\overline{{\text{Min}}}}\,}}_{\mathbf {w}}\), let \({\mathbf {u}}_0\) be the minimum of \(\mathcal {F}({\mathbf {u}})\) with respect to \(\preceq _{\mathbf {w}}\). Then \({\mathbf {u}}-{\mathbf {u}}_0\in \mathcal {L}_{\rm r}(Q)\), and \({\mathrm{supp}}({\mathbf {u}})\cap {\mathrm{supp}}({\mathbf {u}}_0)=\emptyset\) by Lemma 4. Then by definition \({\mathbf {x}}^{\mathbf {u}}-{\mathbf {x}}^{{\mathbf {u}}_0}\in I_V\), so that \(x^{\mathbf {u}}\in {\mathrm {in}}_{\preceq _{\mathbf {w}}}(I_V)\). Therefore the inclusion \((x^{\mathbf {u}}\ |\ {\mathbf {u}}\in {{\,{\overline{{\text{Min}}}}\,}}_{\mathbf {w}})\subseteq {\mathrm {in}}_{{\mathbf {w}}}(I_V)\) is shown. If it were not an equality, \({\mathrm {in}}_{{\mathbf {w}}}(I_V)\) would contain a monomial \({\mathbf {x}}^{{\mathbf {u}}_0}\) for some \({\mathbf {u}}_0\in {{\,\mathrm{Min}\,}}_{\mathbf {w}}\). Therefore it would exist a polynomial \(f\in I_V\) such that \({\mathrm {in}}_{\preceq _{\mathbf {w}}}(f)={\mathbf {x}}^{{\mathbf {u}}_0}\); by Proposition 1 we can assume that all monomials appearing in f lie in the same fiber, and since \({{\mathbf {u}}_0}\) is the minimum of its fiber f must be a single term: \(f=\lambda {\mathbf {x}}^{{\mathbf {u}}_0}\) for some \(\lambda \in \mathbb {K}\). But \(\pi ({\mathbf {x}}^{{\mathbf {u}}_0})\) is a monomial in \(\mathbb {K}[{\mathbf {t}}^{\pm 1}]\), so it cannot be zero. \(\square\)

With the notation above, let \({{\,\mathrm{M}\,}}_{\mathbf {w}}=\{{\mathbf {a}}_1,\ldots ,{\mathbf {a}}_s\}\); for every i let \({\mathbf {m}}_i\) be the minimum of \(\mathcal {F}({\mathbf {a}}_i)\) with respect to \(\preceq _{\mathbf {w}}\), and define \({\mathbf {b}}_i={\mathbf {a}}_i-{\mathbf {m}}_i\). Notice that, by Lemma 4, \({\mathbf {a}}_i\) and \({\mathbf {m}}_i\) have disjoint support, so that \({\mathbf {a}}_i={\mathbf {b}}_i^+\) and \({\mathbf {m}}_i={\mathbf {b}}_i^-\), and \(g_{{\mathbf {b}}_i}= {\mathbf {x}}^{{\mathbf {a}}_i}-{\mathbf {x}}^{{\mathbf {m}}_i}\). Put \(\mathcal {B}_{\mathbf {w}}=\{{\mathbf {b}}_1,\ldots , {\mathbf {b}}_s \}\) and \(\mathcal {G}_{\mathbf {w}}=\{g_{{\mathbf {b}}_i} \ |\ i=1,\ldots , s\}\subseteq I_V\).

Lemma 6

(Farkas Lemma, [28] Proposition 1.7) Let U be a \(d\times m\) real matrix, and \({\mathbf {z}}\in \mathbb {R}^d\). Then one and only one of the following holds:

  • there exists a vector \({\mathbf {y}}\in \mathbb {R}^m\) with \(U{\mathbf {y}}\le {\mathbf {z}}\),

  • there exists a vector \({\mathbf {u}}\in \mathbb {R}^d\) with \({\mathbf {u}}\ge 0\), \({\mathbf {u}}^T U = 0\) and \({\mathbf {u}}^T{\mathbf {z}}<0\).

Proposition 10

Let \({\mathbf {w}}\in \mathcal {W}\); then there is \({\mathbf {c}}\in \mathbb {R}^m_{\ge 0}\) such that \({\mathrm {in}}_{\preceq _{\mathbf {w}}}(I_V)={\mathrm {in}}_{\preceq _{\mathbf {c}}}(I_V)\).

Proof

Let B be the \(s\times m\) matrix having rows \({\mathbf {b}}_1,\ldots , {\mathbf {b}}_s\) and let U be the \((m+s)\times m\) matrix defined by

$$\begin{aligned} U=\begin{pmatrix} I_m\\ B\end{pmatrix} \end{aligned}$$

where \(I_m\) is the square identity matrix of order m. We firstly show that there exists \({\mathbf {c}}\in \mathbb {R}^m_{\ge 0}\) such that \({\mathbf {c}}\cdot {\mathbf {b}}_i > 0\) for every \(i=1,\ldots , s\). Suppose the contrary. Then there does not exist \({\mathbf {y}}\in \mathbb {R}^m\) such that \((-U){\mathbf {y}}\le {\mathbf {z}}\) where \({\mathbf {z}}=(-1,\ldots , -1)^T\). There exists \({\mathbf {u}}\in \mathbb {R}^{m+s}\) such that \({\mathbf {u}}\ge 0\), \({\mathbf {u}}\not ={\mathbf {0}}\) and \({\mathbf {u}}^TU={\mathbf {0}}\). Write \({\mathbf {u}}=(u^*_1,\ldots ,u^*_m,u_1,\ldots , u_s)\). Then for \(j=1,\ldots , m\)

$$\begin{aligned} u^*_j+u_1b_{1j}+\ldots +u_sb_{sj}=0 \end{aligned}$$

which implies

$$\begin{aligned} u_1b_{1j}+\ldots +u_sb_{sj}\le {\mathbf {0}}{\text { for} } j=1,\ldots , m. \end{aligned}$$

It follows that

$$\begin{aligned} u_1{\mathbf {b}}_1+\ldots +u_s{\mathbf {b}}_s\le {\mathbf {0}},\quad {\text { with }} u_1,\ldots , u_s\ge 0, {\text { not all zero}}. \end{aligned}$$

By Lemma 1 this implies that \(\sum _{i=1}^s u_i{\mathbf {b}}_i\preceq _{\mathbf {w}}0\). On the other hand by definition we have \({\mathbf {b}}_i\succ _{\mathbf {w}}{\mathbf {0}}\) and \(u_1,\ldots , u_s\) are not all zero, therefore \(\sum _{i=1}^s u_i{\mathbf {b}}_i\succ _{\mathbf {w}}{\mathbf {0}}\), a contradition.

It follows that \({\mathrm {in}}_{{\mathbf {w}}}(I_V)\subseteq{ \mathrm {in}}_{{\mathbf {c}}}(I_V)\). If this inclusion was not an equality then by Lemma 5\({\mathrm {in}}_{{\mathbf {c}}}(I_V)\) should contain some element \({\mathbf {m}}\) in \(\text {Min}_{\mathbf {w}}\) and so the whole fiber \(\mathcal {F}({\mathbf {m}})\), contradicting Lemma 5 itself. \(\square\)

By collecting Proposition 8 and Lemma 10 we obtain the following

Theorem 2

Let \({\mathbf {w}}\in \mathbb {R}^m\) be generic; then \({\mathrm {in}}_{{\mathbf {w}}}(I_V)\) is an initial ideal of \(I_V\) if and only if \({\mathbf {w}}\in \mathcal {W}\).

Theorem 2 asserts that \(\mathcal {W}\) is the Gröbner region of \(I_V\), in the sense of [18]. It is the support of the Gröbner fan of \(I_V\), whose construction we sketch briefly in the following. Two weight vectors \({\mathbf {w}}_1,{\mathbf {w}}_2\in \mathcal {W}\) are said equivalent modulo \(I_V\) if \({\mathrm {in}}_{{\mathbf {w}}_1}(I_V)={\mathrm {in}}_{{\mathbf {w}}_2}(I_V)\). Equivalence classes form relatively open polyhedral cones in \(\mathbb {R}^m\), whose closures are said Gröbner cones. For \({\mathbf {w}}\in \mathcal {W}\) let \(\mathcal {C}[{\mathbf {w}}]\) be the smallest Gröbner cone containing \({\mathbf {w}}\). Then \({\mathbf {w}}\) is generic if and only if \(\mathcal {C}[{\mathbf {w}}]\) is full-dimensional. The Gröbner fan of \(I_V\) is the collection of Gröbner cones \(\mathcal {C}[{\mathbf {w}}]\), for \({\mathbf {w}}\in \mathcal {W}\).

6.2 The Gröbner fan and the secondary fan

Obviously \({\mathbf {w}}+\ker Q\subseteq \mathcal {C}[{\mathbf {w}}]\) for every \({\mathbf {w}}\in \mathcal {W}\), so that we can consider the image fan via Q of the Gröbner fan in \(\mathbb {R}^r\).

In this way the Gröbner cone and the secondary fan both live in \(\mathbb {R}^r\) and they have the same support \(\langle Q\rangle\), by Proposition 7.

The following is a crucial result by Sturmfels:

Theorem 3

[26, Proposition 8.15] The Gröbner fan refines the secondary fan.

By restricting the support of both the Gröbner fan and the secondary fan to \({{\,\mathrm{Mov}\,}}(Q)=\bigcap _{i=1}^m \langle Q^{\{i\}}\rangle\) we get, in the light of (1), the following result

Corollary 1

There is a surjective computable map

$$\begin{aligned} \left\{ {\text {Initial ideals of }} I_V {\text { not containing a power of }} x_i, \forall i=1,\ldots , m \right\} \twoheadrightarrow \mathcal {PSF}(V). \end{aligned}$$

Proof

We follow the argument proving [26, Proposition 8.15]. Given an initial ideal \(\mathcal {I}\) for \(I_V\) the corresponding fan can be computed as

$$\begin{aligned} \Sigma _{\mathcal {I}}&=\{\langle V^I\rangle \ |\ I\subseteq \{1,\dots m\} {\text { and}} \,{\mathrm{supp}}({\mathbf {u}})\cap I\not =\emptyset {\text { for some monomial }} \,{\mathbf {u}}\in {\mathcal {I}}\}\\&=\{\langle V_J\rangle \ |\ J\subseteq \{1,\dots m\} {\text { and }}\,{ \mathrm{supp}}({\mathbf {u}})\not \subseteq J \,{\text{ for every monomial }} {\mathbf {u}}\in {\mathcal {I}}\} \end{aligned}$$

Then we see that for \(i=1,\ldots , m\)

$$\begin{aligned} \langle {\mathbf {v}}_i\rangle \in \Sigma _{\mathcal {I}}(1)&\Leftrightarrow {\mathrm{supp}}\,({\mathbf {u}})\not \subseteq \{i\} {\text { for every monomial } } {\mathbf {u} } \in {\mathcal {I}}\\ &\Leftrightarrow {\mathcal{I}} \,{\text { does not contain a power of} }\, x_i. \end{aligned}$$

Conversely, from \(\Sigma\) we can recover the radical \(\sqrt{\mathcal {I}}\) as the Stanley-Reisner ideal \(\Delta (\Theta )\) of the simplicial complex \(\Theta\) associated to \(\Sigma\):

$$\begin{aligned} \Theta&= \{ J\subseteq \{1,\ldots , m\}\ |\ \langle V_J\rangle \in \Sigma \}\\ \sqrt{\mathcal {I}}&= \Delta (\Theta )= (\prod _{i\in I} x_i\ |\ I\in \{1,\ldots , m\} {\text { and } } I\not \in \Theta \}. \end{aligned}$$

This shows that the correspondence \(\mathcal {I}\mapsto \Sigma _{\mathcal {I}}\) is surjective.\(\square\)

In general the correspondence \(\mathcal {I}\mapsto \Sigma _{\mathcal {I}}\) is not injective; see Example 7.1 below. It is shown in [26, Corollary 8.9] that \(\mathcal {I}\) is radical if and only if \(\Sigma _{\mathcal {I}}\) gives rise to a smooth toric variety i.e. all cones in \(\Sigma _{\mathcal {I}}(n)\) have normalized volume 1. It follows that the correspondence is injective when V is unimodular (see [26, Remark 8.10], taking into account that V is a CF-matrix, so that its maximal minors are coprime).

7 Calculating \(\mathcal {PSF}(V)\)

Corollary 1 provides an algorithm for computing the set \(\mathcal {PSF}(V)\) for any F-matrix V:

7.1 The “G-cercafan” algorithm

  1. 1.

    Compute the toric ideal \(I_V\).

  2. 2.

    Compute the Gröbner fan of \(I_V\).

  3. 3.

    For any full-dimensional Gröbner cone \(\mathcal {C}[{\mathbf {w}}]\) in the Gröbner fan, compute the initial ideal \(\mathcal {I}_{\mathbf {w}}={\mathrm {in}}_{\mathbf {w}}(I_V)\);

  4. 4.

    Eliminate those initial ideals containing a power of some \(X^i\).

  5. 5.

    For the remaining initial ideals \(\mathcal {I}\), compute the fan \(\Sigma _{\mathcal {I}}\) defined in the proof of Corollary 1.

  6. 6.

    Remove duplicate fans (if any).

Remark 4

Steps (2) and (3) may be englobed: in fact the software we used produces directly the initial ideals without making use of weight vectors.

7.2 Exploiting the existing software

Initial ideals can be determined by software computing the Gröbner fan of toric ideals, such as TiGERS [10] or CATS [14] (incorporatd in GFAN [13]); we mainly used the last one.

As well explained in [11], the general idea is starting with an arbitrary term order and generate successively all the initial ideals by going across “facet binomials ” in the corresponding Gröbner bases (flips).

There are two main strategies: for small size inputs, an exhaustive search is possible. When the latter is impracticable, a “Gröbner walk” can be implemented, progressively producing new Gröbner cones and consequently new fans.

This software always requires homogeneous toric ideals as input. Since toric ideals associated to F-matrices are never homogeneous, we adapted it to our situation by the following procedure:

  • Homogenize \(I_V\) by adding an auxiliary variable \(x_{m+1}\), getting a homogeneous toric ideal \(HI_V\).

  • Compute the set of initial ideals of \(HI_V\).

  • Eliminate those initial ideals containing a power of \(x_{m+1}\).

  • Dehomogenize the remaining initial ideals with respect to \(x_{m+1}\)

  • For any monomial ideal so obtained, pick up a minimal set of generators.

It is possible to show that this procedure is correct, i.e. it produces the Gröbner fan for \(I_V\).

In conclusion, we get an algorithm which is much more efficient than “cercafan”; however it presents two main disadvantages:

  • the same fan is computed many times;

  • non-projective fans are not seen by Gröbner methods.

8 Some examples

8.1 An example of proper refinement

Let \(n=4, r=3\) and

$$\begin{aligned} Q=\begin{pmatrix} 1&{} 1&{}0&{} 0&{} 2&{} 0&{}0\\ 0&{} 0&{} 1&{} 1&{} 2&{} 0&{}0\\ 0&{} 0&{} 0&{} 0&{} 1&{} 1&{}1\end{pmatrix}, \quad V=\mathcal {G}(Q)=\begin{pmatrix} 1&{} 1&{}0&{} 2&{}-1&{}0&{}1\\ 0&{}2&{}0&{}2&{}-1&{}0&{}1\\ 0&{}0&{}1&{}-1&{}0&{}0&{}0\\ 0&{}0&{}0&{}0&{}0&{}1&{}-1 \end{pmatrix} \end{aligned}$$

The toric ideal is

$$\begin{aligned} I_V=(x_1x_2-x_3x_4, x_5x_6x_7-1, x_3x_4x_5-x_6x_7, x_6^2x_7^2-x_3x_4). \end{aligned}$$

\(\mathcal {SF}(V)\) contains three fans, and all of them are projective.

There are six reduced Grobner bases. Every chamber in the secondary fan consists of two Gröbner cones. For example the following are two Gröbner bases whose initial ideals have the same radical:

$$\begin{aligned} GB_1&= (x_1x_2-x_3x_4, x_3x_4x_5-x_6x_7, x_5x_6x_7-1, x_6^2x_7^2-x_3x_4) \\ In_1 &= (x_1x_2,x_3x_4x_5,x_5x_6x_7, x_6^2x_7^2 ) \\ GB_2 &= (x_1x_2-x_3x_4, x_6x_7-x_3x_4x_5, x_3x_4x_5^2-1)\\ In_2 &= (x_1x_2,x_6x_7,x_3x_4x_5^2 ) \end{aligned}$$
Fig. 1
figure 1

The section, by the standard simplex in \(\mathbb {R}^3\), of the effective cone \(\mathcal {Q}_{BH}:=\langle Q_{BH}\rangle\) and the movable cone \({{\,\mathrm{Mov}\,}}(V_{BH})\) in [2, Ex. 10.2]

8.2 A non-projective fan

Let us consider the well-known Berchtold–Hausen example [2, Ex. 10.2], whose weight and fan matrices can be presented as follows

$$\begin{aligned} Q_{\text {BH}}=\begin{pmatrix} 1&{} 1&{}0&{} 0&{} 1&{} 0\\ 0&{} 1&{} 1&{} 1&{} 0&{} 0\\ 0&{} 0&{} 0&{} 1&{} 1&{} 1\end{pmatrix}\quad V_{\text {BH}}=\mathcal {G}\left( Q_{\text {BH}}\right) =\begin{pmatrix} 1&{} 0&{}0&{} 0&{}-1&{}1\\ 0&{}1&{}0&{}-1&{}-1&{}2\\ 0&{}0&{}1&{}-1&{}0&{}1 \end{pmatrix} \end{aligned}$$

Figure 1 represents a section of the effective cone \(\mathcal {Q}_{\text {BH}}:=\langle Q_{\text {BH}}\rangle \subset \mathbb {R}^3\) with the standard simplex in \(\mathbb {R}^3\), well describing the secondary fan.

The toric ideal is

$$\begin{aligned} I_{V_{\text {BH}}}=(x_1x_5-x_3x_4, x_2x_3-x_5x_6, x_1x_2-x_4x_6, x_4x_5x_6-1, x_1x_5^2x_6-x_3). \end{aligned}$$

\(\mathcal {SF}(V_{\text {BH}})\) contains eight fans, but GFAN returns only six inital ideals having different radicals: there are two non-projective fans. The six chambers enumerated in Fig. 1 give nef cones of the associated projective varieties. The two non-projective varieties shares the same nef cone, given by the intersection of all the six chambers and generated by the anti-canonical class.

9 Open problems

9.1 Recovering the initial ideal from the fan

For fans in \(\mathcal {PSF}(V)\) whose inverse image, by the map in Corollary 1, is a singleton, it is possible to recover, from the fan, a set of generators of the initial ideal, by choosing, in a universal Gröbner basis \(\mathcal {U}_V\) for \(I_V\), those binomials having a monomial support in the fan and considering, in each of them, the complementary monomial. This procedure can be performed also when the inverse image contains more than one initial ideal, or even when the fan is not projective. Of course, in the latter case, the obtained monomial ideal will not be an initial ideal of \(I_V\). However one can ask if it may be in some way significant and providing some interesting informations about the original fan. Anyway, this question seems to be related to the more general one: are non projective fans be detectable by algebraic methods?

9.2 The irrelevant ideal and Alexander duality

When passing from the initial ideal to the fan via the map of Corollary 1, one loses the information given by exponents in the generators of the ideal. This happens because the fan is only determined by the radical of the initial ideal, and in general initial ideals of \(I_V\) are not radical. Recall that the irrelevant ideal of a toric variety is the reduced monomial ideal having a minimal generator for each maximal cone in the fan, namely the product of the variables not indexed by elements of the list corresponding to the maximal cone. For complete \(\mathbb {Q}\)-factorial toric variety, the irrelevant ideal is the Alexander dual of the Stanley-Reisner ideal of the fan. In [16, 17], Miller provides a construction of Alexander duality for monomial ideals which may also be not radical. It would be interesting to study Alexander duals of initial ideals of \(I_V\) in the non-radical case, and investigate which kind of information they carry on about the geometry of the corresponding toric varieties.

9.3 The state polyhedron

It is well-known that, for homogeneous toric ideals, the Gröbner region coincides with the whole \(\mathbb {R}^m\), so that the Gröbner fan results to be polytopal and initial ideals can be recovered as vertices in the state polytope associated to \(I_V\) (see [26, Chapter 2]). Of course in our case the Gröbner fan is not polytopal, since fibers are infinite sets. Nevertheless, the Minkowski sum of Gröbner fibers give rise to a poyhedron see [1, Sects. 2–4], the state polyhedron of \(I_V\), whose normal fan coincides with the Gröbner fan of \(I_V\). The lower boundary of the state polyhedron should be the analog of the state polytope in the complete case. We intend to deepen this investigation in a future work.

9.4 Deforming the secondary fan

Consider the Berchtold–Hausen example presented in the previous Sect. 7.2 and move slightly a generator of the movable cone \({{\,\mathrm{Mov}\,}}(V_{\text {BH}})\), e.g. \({\mathbf {q}}_4\), to a near rational vector still belonging to the cone generated by the nearest generators of the effective cone \(\langle Q_{\text {BH}}\rangle\), that is \(\langle {\mathbf {q}}_3,{\mathbf {q}}_6\rangle\). This produces a deformation of the secondary fan represented in Fig. 2 by choosing, e.g.,

$$\begin{aligned} {\mathbf {q}}_4:=\left( \begin{array}{c} 0\\ 1\\ 2\\ \end{array} \right) \end{aligned}$$
(5)

that is

$$\begin{aligned} Q:=\left( \begin{array}{cccccc} 1&{}1&{}0&{}0&{}1&{}0\\ 0&{}1&{}1&{}1&{}0&{}0\\ 0&{}0&{}0&{}2&{}1&{}1 \\ \end{array} \right) \ ,\quad V=\mathcal {G}(Q)=\left( \begin{array}{cccccc} 1&{}0&{}0&{}0&{}-1&{}1 \\ 0&{}1&{}0&{}-1&{}-1&{}3 \\ 0&{}0&{}1&{}-1&{}0&{}2 \\ \end{array} \right) \,. \end{aligned}$$

This example has been extensively studied by the authors in [24, § 3], where we listed all the 8 fans in \(\mathcal {SF}(V)\) and in \(\mathcal {SF}(V_{\text {BH}})\), by running the Cercafan algorithm, implemented as a Maple routine. Fans in \(\mathcal {SF}(V)\) are exactly the same of those in \(\mathcal {SF}(V_{\text {BH}})\) after replacing \({\mathbf {v}}_6=(1\,,\,2\,,\,1)^T\) with \({\mathbf {v}}_6=(1\,,\,3\,,\,2)^T\). In particular the 6 projective varieties assigned by chambers from 1 to 6 in Fig. 1 remain projective and assigned by chambers in Fig. 2 admitting the same number. Moreover the 2 non-projective fans in \(\mathcal {SF}(V_{\text {BH}})\) sharing the same nef cone given by \(\langle (1\,,\,1\,,\,1)^T\rangle\), and represented by the barycenter of the triangle in Fig. 1, give rise to a new projective fan represented by chamber 7 in Fig. 2 and to a non-projective one, whose associated toric variety has trivial nef cone.

Fig. 2
figure 2

The section, by the standard simplex in \(\mathbb {R}^3\), of the effective cone \(\mathcal {Q}=\langle Q\rangle\) and the movable cone \({{\,\mathrm{Mov}\,}}(V)\), in the example studied in Sect. 8.4

The just described situation, determined by the particular choice (5), is actually the generic situation when \({\mathbf {q}}_4\) runs over all possible rational vectors in the open cone \({{\,\mathrm{Relint}\,}}\langle {\mathbf {q}}_3,{\mathbf {q}}_6\rangle\). Such a variation is given by

$$\begin{aligned} \forall \,p,q\in \mathbb {N}\setminus \{0\}:(p,q)=1\quad {\mathbf {q}}_4=\left( \begin{array}{c} 0\\ q\\ p\\ \end{array} \right) \in {{\,\mathrm{Relint}\,}}\left\langle \begin{array}{cc} 0&{}0\\ 1&{}0\\ 0&{}1\\ \end{array}\right\rangle \end{aligned}$$

determining the following variations of weight and fan matrices:

$$\begin{aligned} Q_{p/q}:= & {} \left( \begin{array}{cccccc} 1&{}1&{}0&{}0&{}1&{}0\\ 0&{}1&{}1&{}q&{}0&{}0\\ 0&{}0&{}0&{}p&{}1&{}1 \\ \end{array} \right) \\ V_{p/q}=\mathcal {G}(Q_{p/q})= & {} \left( \begin{array}{cccccc} 1&{}0&{}0&{}0&{}-1&{}1 \\ 0&{}1&{}q-1&{}-1&{}-1&{}p+1 \\ 0&{}0&{}q&{}-1&{}0&{}p \\ \end{array} \right) \end{aligned}$$

Considering only the 7-th chamber, gives rise to a family \(\mathcal {X}^7\longrightarrow \mathbb {Q}\) of complete and \(\mathbb {Q}\)-factorial toric varieties whose generic fibre \(X^7_{p/q}\) is projective and admitting a special non projective fibre \(X^7_1\).

On the other hand, considering the 8-th chamber gives rise to a family \(\mathcal {X}^8\longrightarrow \mathbb {Q}\) of never projective, complete, \(\mathbb {Q}\)-factorial toric varieties, whose generic fibre \(X^8_{p/q}\) does not admit any non-trivial nef divisor and admitting a special fibre \(X^8_1\) endowed with a non trivial nef divisor (in the present example represented by the anti-canonical one).

Finally chambers from 1 to 6 give rise to 6 families \(\mathcal {X}^i\longrightarrow B\) of projective \(\mathbb {Q}\)-factorial toric varieties.

We believe these are interesting phenomena which should often appear in studying toric deformations of toric varieties, but we are not aware of any theoretical explanation clarifying the described situation. An implementation of algorithms here presented can certainly produce a number of evidences over which trying to understand something more.