1 Introduction

Sparse (or toric) resultants offer today a standard as well as efficient way of studying algebraic systems while exploiting their structure. They have numerous applications in elimination and implicitization theory and many other areas of algebraic geometry. We examine matrix-based methods for expressing and computing this resultant, since they allow us to reduce critical questions to linear algebra computations.

The Canny–Emiris formula was stated in [9] as a rational formula for the sparse resultant that generalizes Macaulay’s classic formula in [28]. It gives a combinatorial construction of a Sylvester-type matrix \(\mathcal {H}_{\mathcal {A},\rho }\) depending on the family of polynomial supports \(\mathcal {A} = (\mathcal {A}_0,\dots ,\mathcal {A}_n)\) in a lattice M of rank n, and a mixed subdivision \(S(\rho )\) defined from a lifting function \(\rho \) on the Minkowski sum \(\Delta \) of the Newton polytopes \(\Delta _i = {{\,\textrm{conv}\,}}(\mathcal {A}_i)\). Each row of this matrix corresponds to a lattice point \(b \in M\) contained in a translation \(\delta \) of the polytope \(\Delta \). Moreover, to each lattice point we can associate a type vector \(t_b = (t_{b,0},\dots ,t_{b,n})\) corresponding to the dimensions of the components \(D_i \subset \Delta _i\) of the cell \(D \in S(\rho )\) in which b is lying. Imposing that

$$\begin{aligned} \sum _{i = 0}^nt_{b,i} = n, \quad \forall b \in (\Delta + \delta ) \cap M, \end{aligned}$$

it is possible to build such matrix \(\mathcal {H}_{\mathcal {A},\rho }\) and a principal submatrix \(\mathcal {E}_{\mathcal {A},\rho }\) of \(\mathcal {H}_{\mathcal {A},\rho }\) so that the sparse resultant can be expressed in the form:

$$\begin{aligned}{{\,\textrm{Res}\,}}_{\mathcal {A}} = \frac{\det (\mathcal {H}_{\mathcal {A},\rho })}{\det (\mathcal {E}_{\mathcal {A},\rho })}.\end{aligned}$$

D’Andrea, Jerónimo, and Sombra proved this formula in their seminal article [16] under the assumption that \(S(\rho )\) admits an incremental chain of mixed subdivisions:

$$\begin{aligned} S(\theta _0) \preceq \dots \preceq S(\theta _n) \preceq S(\rho )\end{aligned}$$

satisfying some combinatorial properties, where \(\preceq \) denotes that \(S(\theta _i)\) refines \(S(\theta _{i-1})\), namely each cell \(D \in S(\theta _i)\) is contained in a cell of \(S(\theta _{i-1})\). This proof extended the first proof given by D’Andrea in [15] for generalized unmixed systems.

On the other hand, and quite earlier, Canny and Pedersen gave in [11] another approach for the construction of the matrix \(\mathcal {H}_{\mathcal {A},\rho }\) besides the subdivision-based algorithm. Starting at a lattice point \(b \in M\), one can construct the matrix by only adding the rows corresponding to the columns that have a nonzero entry in a previously considered row. This is a greedy way of understanding these matrices: their construction only considers the strictly necessary rows and columns given the mixed subdivision \(S(\rho )\).

This paper aims to give a family of lifting functions \(\rho \) that correspond to mixed subdivisions for which:

  1. (i)

    the proof of the formula in [16] holds, and

  2. (ii)

    the size of the matrices is reduced, since this determines complexity.

The family that we propose is associated with a vector \(v \in {{\,\textrm{Hom}\,}}(M_{\mathbb {R}},\mathbb {R})\) outside the hyperplane arrangement associated with the polytope \(\Delta \). We extend the proof that verifies that these matrices satisfy the conditions in [16] by giving a self-contained result in tropical geometry on refinement of mixed subdivisions; see Theorem 3.

We expect this family of lifting functions to reduce the size of the Canny–Emiris matrices obtained by the greedy algorithm for a general sparse system. We measure this reduction only for the case where the Newton polytopes are zonotopes generated by n independent line segments. Namely, we simplify the computations to the case where the supports \(\mathcal {A}_0,\dots ,\mathcal {A}_n\) are:

$$\begin{aligned} \mathcal {A}_i = \big \{(b_j)_{j = 1,\dots ,n} \in \mathbb {Z}^n \quad | \quad 0 \le b_j \le a_{ij} \big \}, \quad i = 0,\dots ,n, \end{aligned}$$

assuming that \(0 < a_{0j} \le \dots \le a_{n-1j}\) for all \(j = 1,\dots ,n\). The main results in [12] is Theorem 5 and show that the greedy algorithm will end by reaching only those lattice points with type vector \(t_{b}\) satisfying:

$$\begin{aligned} \sum _{i = 0}^I t_{b,i} \le I + 1, \quad \forall I < n.\end{aligned}$$

To find all the lattice points in cells with a given type vector, we introduce the type functions:

$$\begin{aligned} \varphi _b: \{1,\dots ,n\} \xrightarrow []{} \{0,\dots ,n\}, \quad t_{b,i} = |\varphi _b^{-1}(i)|. \end{aligned}$$

These combinatorial objects contain all the information of the cells of the mixed subdivision and can help us construct the matrices. In Corollary 3, we give a combinatorial measure of the number of rows of the matrix \(\mathcal {H}_{\mathcal {G}}\) given by the greedy algorithm as:

$$\begin{aligned} \sum _{\varphi _b: \{1,\dots ,n\} \xrightarrow []{} \{0,\dots ,n\}}\prod _{j = 1}^na_{\varphi _b(j)j}\end{aligned}$$

where \(\varphi _b\) satisfies \(|\varphi ^{-1}_b(\{0,\dots ,I\})| \le I + 1\). This result is not optimal amongst all the possible mixed subdivsions of an n-zonotope system, but it might be so amongst the ones given by affine lifting functions; see Examples 1, 2, 3.

In [12], we also showed that some multihomogeneous resultant matrices can be seen as an instance of the previous case by embedding their Newton polytopes and the mixed subdivisions of their Minkowski sum into an n-zonotope. Despite the existence of many exact determinantal formulas for some of these cases; see [4, 5, 10, 19, 33], we expect our approach to have an easier generalization to general sparse systems through the use of the type functions and the underlying combinatorics. On the other, we beleive that using non-affine lifting functions, one could possibly find the minimal matrices from one which one can have the Canny–Emiris formula for the sparse resultant. In Conjecture 1, we state a conjecture on the greedy subsets involved in such minimal construction for multi-homogeneous systems.

We motivate the practical use of resultant matrices by showing its applications in computer vision and computer-aided geometric design. Namely, we show how resultant matrices apply in the solution of the 5-points problem [6] and to the surface implicitization problem [7, 8, 23]. In both cases, the goal of reducing the size of the matrices appears to be one of the main lines for possible improvement. We add examples of these formulations in the JULIA implementation of the treated cases (n-zonotopes as Newton polytopes, and multihomogeneous systems). More than improving the existing formulas (which give, in general, smaller Sylvester matrices), the goal of this implementation is to introduce the type functions, which are instrumental in the construction of the resultant matrices.

This paper is based on the results of the authors’ paper [12]. Compared to that version, here we provide a new family of examples, a conjecture on the minimal size of resultant matrices, as well as two applications of resultant formulas in computer vision and in implicitization. We also improve the method of proof of Theorem 2 through a different approach which uses tropical geometry.

This paper is structured as follows. In Sect. 1, we summarize the proof of the Canny–Emiris formula in [16] and we explain the greedy approach of [11]. In Sect. 2, a concrete family of mixed subdivisions is given by considering a hyperplane arrangement associated to the Newton polytopes, thus formalizing an important aspect of the combinatorial construction. It is then proven that the Canny–Emiris formula holds when the construction uses this arrangement. In Sect. 3, we prove a result on tropical geometry, providing an alternative proof of Theorem 2. Section 4 is devoted to combinatorially finding the size of the Canny–Emiris matrices when the Newton polytopes are zonotopes generated by n line segments. In Sect. 5, we conjecture that the liftings providing minimal size of the matrices are related to the degree reverse lexicographical monomial order. In Sect. 6, we have added the examples of application of the Canny–Emiris formula in the 5-point problem and in surface implicitization.

1.1 The Canny–Emiris Formula

Let M be a lattice of rank n and \(M_{\mathbb {R}} = M \otimes \mathbb {R}\) the corresponding real vector space. Let \(N = {{\,\textrm{Hom}\,}}(M,\mathbb {Z})\) be its dual and \(\mathbb {T}_N = N \otimes \mathbb {C}^{\times }\) the underlying torus. Let \(\mathcal {A}_0,\dots ,\mathcal {A}_n \subset M\) be a family of supports corresponding to the polynomials:

$$\begin{aligned} F_i = \sum _{a \in \mathcal {A}_i}u_{i,a}\chi ^a \in \mathbb {Z}[u_{i,a}][M], \quad a \in \mathcal {A}_i \quad i = 0,\dots ,n, \end{aligned}$$

where \(\chi ^a\) are the characters in \(\mathbb {T}_N\) of the lattice points \(a \in \mathcal {A}_i\). Let \(\Delta _i = {{\,\textrm{conv}\,}}(\mathcal {A}_i) \subset M_{\mathbb {R}}\) for \(i = 0,\dots ,n\) be the convex hulls of the supports, also known as Newton polytopes, and \(\Delta \) their Minkowski sum in \(M_{ \mathbb {R}}\).

The incidence variety \(Z(\textbf{F})\) is defined as the zero set in \(\mathbb {T}_N \times \prod _{i = 0}^n\mathbb {P}^{\mathcal {A}_i}\) of the polynomials \(\textbf{F} = (F_0,\dots ,F_n)\). Denote by \(\pi : \mathbb {T}_N \times \prod _{i = 0}^n\mathbb {P}^{\mathcal {A}_i} \xrightarrow []{} \prod _{i = 0}^n\mathbb {P}^{\mathcal {A}_i}\) the projection onto the second factor and let \(\pi _*(Z(\textbf{F}))\) be the direct image of the zero set of \(F_0,\dots ,F_n\).

Definition 1

The sparse resultant, denoted as \({{\,\textrm{Res}\,}}_{\mathcal {A}}\), is any primitive polynomial in \(\mathbb {Z}[u_{i,a}]\) defining the direct image \(\pi _{*}(Z(\textbf{F}))\).

There are some lattice operations that can help us simplify the computation of these objects.

Lemma 1

[16, Proposition 3.2] Let \(\phi : M \xrightarrow []{} M'\) be a monomorphism of lattices of rank n. Then, \({{\,\textrm{Res}\,}}_{\phi (\mathcal {A})} = {{\,\textrm{Res}\,}}_{\mathcal {A}}^{[M': \phi (M)]}\).

Remark 1

Moreover, the sparse resultant is invariant under translations. Therefore, we can always assume \(0 \in \mathcal {A}_i\) for all \(i = 0,\dots ,n\).

Definition 2

A mixed subdivision of \(\Delta \) is a decomposition of this polytope in a union of cells \(\Delta = \cup D\) such that:

  1. (i)

    the intersection of two cells is either a cell or empty,

  2. (ii)

    every face of a cell is also a cell of the subdivision and,

  3. (iii)

    every cell D has a component structure \(D = D_0 + \dots + D_n\) where \(D_i\) is a cell of the subdivision in \(\Delta _i\).

The usual way to construct mixed subdivisions is by considering piecewise affine convex lifting functions \(\rho _i: \Delta _i \xrightarrow []{} \mathbb {R}\) as explained in [24]. A global lifting function \(\rho : \Delta \xrightarrow []{} \mathbb {R}\) is obtained after taking the inf-convolution of the previous functions, as explained in [16, Sec. 2].

Definition 3

A mixed subdivision of \(\Delta \) is tight if, for every n-cell D, its components satisfy:

$$\begin{aligned} \sum _{i=0}^n\dim D_i = n.\end{aligned}$$

In the case of \(n + 1\) polynomials and n variables, this property guarantees that every n-cell has a component that is 0-dimensional. The cells that have a single 0-dimensional component are called mixed (i-mixed if it is the i-th component). The rest of the cells are called non-mixed.

Let \(\delta \) be a generic vector such that the lattice points in the interior of \(\Delta + \delta \) lie in n-cells. Then, consider:

$$\begin{aligned} \mathcal {B} = (\Delta + \delta ) \cap M.\end{aligned}$$

Each element \(b \in \mathcal {B}\) lies in one of these translated cells \(D + \delta \) and let \(D_i\) be the components of this cell. As the subdivision is tight, there is at least one i such that \(\dim D_i = 0\).

Following the language of [30], we call \(t_b = (t_{b,0},\dots ,t_{b,n})\) the type vector associated with b, defined as \(t_{b,i} = \dim D_i\) for \(b \in D + \delta \).

Definition 4

The row content is a function

$$\begin{aligned} {{\,\textrm{rc}\,}}: \mathcal {B} \xrightarrow []{} \cup _{i = 0}^n\{i\} \times \mathcal {A}_i \end{aligned}$$

where, for \(b \in \mathcal {B}\) lying in an n-cell D, \({{\,\textrm{rc}\,}}(b)\) is a pair (i(b), a(b)) with \(i(b) = \max \{i \in \{0,\dots ,n\} \, | \, t_{b,i} = 0\}\) and \(a(b) = D_{i(b)}\).

This provides a partition of \(\mathcal {B}\) into subsets:

$$\begin{aligned} \mathcal {B}_i = \{b \in \mathcal {B} \quad | \quad i(b) = i\}. \end{aligned}$$

Finally, we construct the Canny–Emiris matrices \(\mathcal {H}_{\mathcal {A},\rho }\) whose rows correspond to the coefficients of the polynomials \(\chi ^{b - a(b)}F_{i(b)}\) for each of the \(b \in \mathcal {B}\). In particular, the entry corresponding to a pair \(b,b' \in \mathcal {B}\) is:

$$\begin{aligned}\mathcal {H}_{\mathcal {A},\rho }[b,b'] = {\left\{ \begin{array}{ll} u_{i(b),b'-b+a(b)} &{} b' - b + a(b) \in \mathcal {A}_i \\ 0 &{} \text {otherwise} \end{array}\right. } \end{aligned}$$

Remark 2

Each entry contains, at most, a single coefficient \(u_{i,a}\). In particular, the row content allows us to choose a maximal submatrix of \(\mathcal {H}_{\mathcal {A},\rho }\) from the matrix of a map sending a tuple of polynomials \((G_0,\dots ,G_n)\) to \(G_0F_0 + \dots + G_nF_n\).

Let \(\mathcal {C} \subset \mathcal {B}\) be a subset of the supports in translated cells. The matrix \(\mathcal {H}_{\mathcal {A},\rho ,\mathcal {C}}\) is defined by considering the submatrix of the corresponding rows and columns associated with elements in \(\mathcal {C}\). In particular, we look at the set of lattice points lying in translated non-mixed cells and consider:

$$\begin{aligned} \mathcal {B}^{\circ } = \{b \in \mathcal {B} \, | \, b \text { lies in a translated non-mixed cell}\}.\end{aligned}$$

With this, we form the principal submatrix:

$$\begin{aligned}\mathcal {E}_{\mathcal {A},\rho } = \mathcal {H}_{\mathcal {A},\rho ,\mathcal {B}^{\circ }}\end{aligned}$$

The Canny–Emiris conjecture states that the sparse resultant is the quotient of the determinants of these two matrices:

$$\begin{aligned}{{\,\textrm{Res}\,}}_{\mathcal {A}} = \frac{\det (\mathcal {H}_{\mathcal {A},\rho })}{\det (\mathcal {E}_{\mathcal {A},\rho })}.\end{aligned}$$

This result was conjectured by Canny and Emiris and proved by D’Andrea, Jerónimo, and Sombra under the restriction that the mixed subdivision \(S(\rho )\) given by the lifting \(\rho \) satisfies a certain condition, given on a chain of mixed subdivisions.

Definition 5

Let \(S(\phi ), S(\psi )\) be two mixed subdivisions of \(\Delta = \sum _{n = 0}^n\Delta _i\). We say that \(S(\psi )\) refines \(S(\phi )\) and write \(S(\phi ) \preceq S(\psi )\) if for every cell \(C \in S(\psi )\) there is a cell \(D \in S(\phi )\) such that \(C \subset D\). An incremental chain of mixed subdivisions \(S(\theta _0) \preceq \dots \preceq S(\theta _n)\) is a chain of mixed subdivisions of \(\Delta \) refining each other.

Remark 3

In [16, Definition 2.4], a common lifting function \(\omega \in \prod _{i = 0}^n\mathbb {R}^{\mathcal {A}_i}\) is considered and the \(S(\theta _i)\) are given by the lifting functions \(\omega ^{<i} = (\omega _0,\dots ,\omega _{i-1},0)\) as long as \(S(\theta _i) \preceq S(\theta _{i+1})\). The last zero represents the lifting on \((\Delta _i,\dots ,\Delta _n)\). The resulting mixed subdivision is the same as if we considered the zero lifting in \(\sum _{j = i}^n\Delta _j\).

Definition 6

The mixed volume of n polytopes \(P_1,\dots ,P_n \subset M_{\mathbb {R}}\), denoted as \({{\,\textrm{MV}\,}}_{M}(P_1,\dots ,P_n)\), is the coefficient of \(\prod _{i = 1}^n\lambda _i\) in:

$$\begin{aligned} {{\,\textrm{Vol}\,}}_n(\lambda _1 P_1 + \dots + \lambda _nP_n)\end{aligned}$$

which is a polynomial in \(\lambda _1,\dots ,\lambda _n\) [13, Theorem 6.7].

Proposition 1

[21, Theorem 3.4] Let \(S(\rho )\) be a tight mixed subdivision of \(\Delta = (\Delta _0,\dots ,\Delta _n)\). For \(i = 0,\dots ,n\), the mixed volume of all the polytopes except \(\Delta _i\) equals the volume of the i-mixed cells.

$$\begin{aligned}{{\,\textrm{MV}\,}}(\Delta _0,\dots ,\Delta _{i-1},\Delta _{i+1},\dots ,\Delta _n) = \sum _{D \, i\text {-mixed}}{{\,\textrm{Vol}\,}}_nD\end{aligned}$$

In particular, \({{\,\textrm{MV}\,}}(\Delta _0,\dots ,\Delta _{i-1},\Delta _{i+1},\dots ,\Delta _n)\) equals the degree of the sparse resultant in the coefficients of \(F_i\); see [13, Chapter 7, Theorem 6.3]. Each of the rows of \(\mathcal {H}_{\mathcal {A},\rho }\) will correspond to a lattice point b and each entry on that row will have degree 1 with respect to the coefficients of \(F_{i(b)}\) and zero with respect to the coefficients of the rest of polynomials. Therefore, if we add the lattice points in i-mixed cells, the degree of \(\mathcal {H}_{\mathcal {A},\rho }\) with respect to the coefficients of \(F_i\) will be at least the degree of the resultant with respect to the same coefficients.

Definition 7

[16, Definition 3.4] The fundamental subfamily of \(\mathcal {A}\) is the minimal family of supports \(\mathcal {A}_I = (\mathcal {A}_i)_{i \in I}\) such that the resultant has positive degree with respect to the coefficients of \(F_i\) for \(i \in I\). This definition can be given in other equivalent terms as shown in [32, Corollary 1.1].

Remark 4

Using Proposition 1, we can see that if the fundamental subfamily is empty, then the resultant is equal to 1 while if the fundamental subfamily is \(\{i\}\) then \(\mathcal {A}_i\) is given by a single point \(\{a\}\) and the resultant is \(u_{i,a}^{m_i}\) for \(m_i = {{\,\textrm{MV}\,}}(\Delta _0,\dots ,\Delta _{i-1},\Delta _{i+1},\dots ,\Delta _n)\). The Canny–Emiris formula holds naturally [16, Proposition 4.26] in both cases.

Definition 8

An incremental chain \(S(\theta _0) \preceq \dots \preceq S(\theta _n)\) is admissible if for each \(i = 0,\dots ,n\), each n-cell D of the subdivision \(S(\theta _i)\) satisfies either of the following two conditions

  1. (i)

    the fundamental subfamily of \(\mathcal {A}_D\) contains at most one support or

  2. (ii)

    \(\mathcal {B}_{D,i}\) is contained in the union of the translated i-mixed cells of \(S(\rho _D)\).

A mixed subdivision \(S(\rho )\) is called admissible if it admits an admissible incremental chain \(S(\theta _0) \preceq \dots \preceq S(\theta _n) \preceq S(\rho )\) refining it.

With all these properties, together with the use of the product formulas, one can reproduce the proof of the Canny–Emiris formula given in [16, Theorem 4.27] under the conditions of admissibility in \(S(\rho )\); see also [17, 32].

1.2 The Greedy Algorithm

Using the previous notation, we state the greedy algorithm in [11] for the construction of the matrix. Let \(b \in \mathcal {B}\) be a lattice point in a translated cell. The first step of the algorithm is to add the row of the matrix corresponding to b, and then continue by considering the lattice points corresponding to the columns that have a nonzero entry in this row. These lattice points are:

$$\begin{aligned} b - a(b) + \mathcal {A}_{i(b)}.\end{aligned}$$

All these lattice points will have to be added as rows of the matrix. If we add the lattice point \(b'\) at some point of the algorithm after having added another lattice point b, we say that we reach \(b'\) from b. The algorithm terminates when there are no more lattice points to add and it might give a square matrix \(\mathcal {H}_{\mathcal {G}}\) which has less rows and columns than \(\mathcal {H}_{\mathcal {A},\rho }\), which was constructed using all the lattice points in \(\mathcal {B}\). The rows and columns associated to lattice points in non-mixed cells also provide a minor \(\mathcal {E}_{\mathcal {G}}\) of \(\mathcal {H}_{\mathcal {G}}\).

It was not proved by Canny and Pedersen whether this approach would always include all the lattice points in mixed cells as rows of the matrix, independently of the starting point. As these points are necessary to achieve the degree of the resultant, we consider them to be the starting points of the algorithm.

Remark 5

We know that the entry corresponding to the diagonal of the matrix \(\mathcal {H}_{\mathcal {A},\rho ,\mathcal {C}}\) will be \(\prod _{b \in \mathcal {C}}u_{i(b),a(b)}\) for any subset \(\mathcal {C} \subset \mathcal {B}\). This term can be used in order to deduce that these matrices have non-zero determinant; see [16, Proposition 4.13].

Theorem 1

If the Canny–Emiris formula holds for a mixed subdivision \(S(\rho )\) and the greedy algorithm provides matrices \(\mathcal {H}_{\mathcal {G}}\) and \(\mathcal {E}_{\mathcal {G}}\) by starting at the lattice points in mixed cells, then:

$$\begin{aligned} {{\,\textrm{Res}\,}}_{\mathcal {A}} = \frac{ \det (\mathcal {H}_{\mathcal {G}})}{\det (\mathcal {E}_{\mathcal {G}})}.\end{aligned}$$

Proof

In general, there is a subset \(\mathcal {G} \subset \mathcal {B}\) corresponding to the rows and columns of \(\mathcal {H}_{\mathcal {G}}\). We are assuming that \(\mathcal {G}\) contains all the lattice points in translated mixed cells. Let \(\mathcal {H}_{\mathcal {A},\rho }\) be the matrix containing all lattice points in translated cells of \(S(\rho )\). Without loss of generality, we can assume that the matrix takes the following form:

$$\begin{aligned} \mathcal {H}_{\mathcal {A},\rho } = \begin{pmatrix} \mathcal {H}_{\mathcal {G}} &{} 0 \\ \bullet &{} \mathcal {H}_{\mathcal {B} - \mathcal {G}} \end{pmatrix} \end{aligned}$$

where \(\mathcal {H}_{\mathcal {G}}\) is the minor corresponding to the lattice points in \(\mathcal {G}\) and \(\mathcal {H}_{\mathcal {B} - \mathcal {G}}\) is the minor corresponding to the lattice points not in \(\mathcal {G}\). The zeros appear due to the fact that there is no pair \(b \notin \mathcal {G}\), \(b' \in \mathcal {G}\) such that \(b \in b' - a(b') + \mathcal {A}_{i(b)}\). The same block-triangular structure also appears in the principal submatrix \(\mathcal {E}_{\mathcal {A},\rho }\) and all the lattice points that are not in \(\mathcal {G}\) must be non-mixed, implying that \(\mathcal {E}_{\mathcal {B} - \mathcal {G}} = \mathcal {H}_{\mathcal {B} - \mathcal {G}}\).

Finally, using the fact that the determinant of a block-triangular matrix is the product of the determinants of the diagonal blocks, we can prove the resultant formula:

$$\begin{aligned} {{\,\textrm{Res}\,}}_{\mathcal {A}} = \frac{\det (\mathcal {H}_{\mathcal {A},\rho })}{\det (\mathcal {E}_{\mathcal {A},\rho })} = \frac{\det (\mathcal {H}_{\mathcal {G}})\cdot \det (\mathcal {H}_{\mathcal {B}-\mathcal {G}})}{\det (\mathcal {E}_{\mathcal {G}})\cdot \det (\mathcal {H}_{\mathcal {B}-\mathcal {G}})} = \frac{\det (\mathcal {H}_{\mathcal {G}})}{\det (\mathcal {E}_{\mathcal {G}})}.\end{aligned}$$

\(\square \)

Example 1

Let \(f_0,f_1,f_2\) be three bilinear equations corresponding to the supports \(\mathcal {A}_0 = \mathcal {A}_1 = \mathcal {A}_2 = \{(0,0),(1,0),(0,1),(1,1)\}\). A possible mixed subdivision \(S(\rho )\) is the following:

figure a

where the dots indicate the lattice points in translated mixed cells. The number of lattice points in translated cells is 9. However, if we construct the matrix greedily starting from the lattice points in translated mixed cells, we have an \(8 \times 8\) matrix, corresponding to the lattice points marked in red.

Example 2

Let \(f_0,f_1,f_2\) be three bihomogeneous equations with supports

$$\begin{aligned} \mathcal {A}_0 = \{(0,0),(1,0),(2,0),(0,1),(1,1),(2,1)\}, \end{aligned}$$
$$\begin{aligned} \mathcal {A}_1 = \{(0,0),(1,0),(0,1),(1,1),(0,2),(1,2)\}, \, \mathcal {A}_2 = \{(0,0),(1,0),(0,1),(0,1)\}. \end{aligned}$$

The expected number of supports lying in translated cells is 16. Let \(\rho _0 = (0,3,6,3,6,9)\), \(\rho _1 = (0,2,2,4,4,6)\) and \(\rho _2 = (0,1,1,2)\) be the lifting functions and \(\delta = (-\frac{1}{2},\frac{1}{2})\) give the following mixed subdivision:

figure b

However, if we use the greedy approach, we have an \(15 \times 15\) matrix, corresponding to the lattice points marked in red.

Example 3

Let \(f_0,f_1,f_2,f_3\) be four polynomials with

$$\begin{aligned} \mathcal {A}_0 = \mathcal {A}_1 = \mathcal {A}_2 = \mathcal {A}_3 = \{(0,0,0),(1,0,0),(0,1,0),(0,0,1),(1,0,1),(0,1,1)\} \end{aligned}$$

and \(\rho _0 = (0,3,6,3,6,9)\), \(\rho _1 = (0,2,4,2,4,6)\), \(\rho _2 = (0,1,2,1,2,3)\) and \(\rho _3 = (0,0,0,0,0,0)\) gives the mixed subdivision:

figure c

If we take the translation \(\delta = (-2/3,-2/3,-1/2)\) the number of points in traslated mixed cells is 24, but the degree of the resultant is \(3 + 3 + 3 + 3 = 12\). If we start at the point (0, 0, 0) and use the greedy algorithm, we achieve a matrix of size \(20 \times 20\).

2 A Family of Mixed Subdivisions

In this section, we give a family of lifting functions associated to the polytopes \(\Delta _0,\dots ,\Delta _n\) and we prove that the Canny–Emiris formula holds for the corresponding mixed subdivisions.

Definition 9

We can define a hyperplane arrangement \(\mathcal {H} \subset N_{\mathbb {R}}\) by considering the span of the \((n-1)\)-dimensional cones of the normal fan of \(\Delta \); see [34] for more on polytopes and hyperplane arrangements.

Example 4

A polytope \(\Delta \) (green), together with its normal fan (blue) and the hyperplane arrangement \(\mathbb {H}_{\Delta }\) (red).

figure d

Definition 10

Let \(\mathcal {H}\) be the hyperplane arrangement associated to \(\Delta \) and take a vector \(v \in N_\mathbb {R}\) which does not lie in \(\mathcal {H}\). We consider lifting functions \(\omega _i: \mathcal {A}_i \xrightarrow []{} \mathbb {R}\) defined as:

$$\begin{aligned} \omega _i(x) = \lambda _i\langle v, x\rangle \quad i = 0,\dots ,n \quad x \in \Delta _i\end{aligned}$$

for \(\lambda _0,\dots ,\lambda _n \in \mathbb {R}\) satisfying \(\lambda _0> \dots > \lambda _n \ge 0\) and small enough. Let \(\rho = (\omega _0,\dots ,\omega _n)\) be a family of lifting functions providing the mixed subdivision \(S(\rho )\).

Remark 6

This choice of the lifting function can also be seen as a case of the approach of [15], in a first proof of the rational formula for generalized unmixed systems. In particular, it is possible to think of the choice of the row content a(b) associated to each lattice point as trying to solve the simplex method with the lifting function as objective. This family guarantees that we are always choosing this point in the same direction; see Fig. 1 for a description of this process.

Theorem 2

\(S(\rho )\) is an admissible mixed subdivision.

Proving that \(S(\rho )\) is an admissible mixed subdivision consists on both proving that it has an incremental chain satisfying \(S(\theta _0) \preceq \dots \preceq S(\theta _n) \preceq S(\rho )\) and that this incremental chain satisfies the conditions in Definition 8.

The easiest way to prove the chain condition would be to use [16, Proposition 2.11], which claims that for each \(i = 0,\dots ,n\), there is an open neighboorhood of \(0 \in U \subset \mathbb {R}^{\mathcal {A}_i}\) such that for \(\omega _i \in U\) we have \(S(\theta _i) \preceq S(\theta _{i+1})\). In this case, for \(\lambda _{i+1}\) small enough satisfying \(\lambda _i> \lambda _{i+1} > 0\), \(\omega _i\) lies in U. Therefore, the \(S(\theta _i)\) form an incremental chain.

We can drop the restriction that \(\lambda _{i+1}\) is small enough by proving a more general result. In the following chapter, we explore this new proof in the more general context of tropical geometry.

3 Tropical Refinement: An Extended Proof of Theorem 2

This section can be read independently with respect to the rest of sections of this article. We describe, in much broader generality than we need, the refinement of mixed subdivisions. In particular, we draw the full picture of when a coherent mixed subdivision refines another one, by only changing the lifting function in \(\Delta _i\). In terms of the previous notation, we would like to know whether \(S(\theta _i) \preceq S(\theta _{i+1})\) for some \(i = 0,\dots ,n\). Instead of studying a given mixed subdivision, we define a dual of such object by introducing tropical geometry. After proving such result using tropical geometry, the family of lifting functions given in Sect. 2 will satisfy the refinement.

On the other hand, the study of the sparse resultant and the Canny–Emiris formula in the tropical setting is a topic of interest on its own; see [26]. Thus, we expect the results of this section to be interesting also from the point of view of computing the tropical resultant and verifying the validity of the Canny–Emiris formula in this setting.

Remark 7

As in this paper we are mainly interested in affine lifting functions, we restrict to such case. However, the following results could be reproduced for any piecewise affine lifting function.

The general context of tropical geometry consists of working over rings of polynomials over \(\mathbb {R}\) with the tropical operations:

$$\begin{aligned} x \oplus y = \min (x,y) \quad x \otimes y = x + y\end{aligned}$$

Definition 11

A tropical polynomial is the expression:

$$\begin{aligned} {{\,\textrm{trop}\,}}(f)(x) = \oplus _{a \in \mathcal {A}} \omega _a x^{\otimes a} = \min _{a \in \mathcal {A}}(\omega _a + ax)\end{aligned}$$

for \(x \in \mathbb {R}^n\) where \(\mathcal {A}\) is the support of f. A tropical hypersurface \(V({{\,\textrm{trop}\,}}(f)))\) in \(\mathbb {R}^n\) is the set of points where the previous minimum is attained, at least, twice.

Remark 8

We can consider the coefficients \(\omega _{a}\) to be the values of a lifting function. If the lifting is affine, we have \(\omega _a = \langle v, a \rangle \) for some vector \(v \in N_{\mathbb {R}}\). Therefore, the tropical polynomial with coefficients \(\omega _a\) would be:

$$\begin{aligned} \min _{a \in \mathcal {A}}(a(x + v))\end{aligned}$$

Definition 12

A tropical system \(\mathcal {T}_r\) is formed by \(r + 1\) tropical polynomials with supports \(P_0,\dots ,P_{r} \subset M\):

$$\begin{aligned}{{\,\textrm{trop}\,}}(f_i^{\omega _i})(x) = \bigoplus _{a_i \in P_i}\omega _{i,a} \otimes x^{\otimes a} = \min _{a \in P_i}\big (\omega _{i,a} + a \cdot x\big )\end{aligned}$$

where the coefficients of the system are given by some lifting function of the \(P_i\). In some references like [29], it is important to specify a valuation in the field but here we can suppose it to be trivial.

In our context (as in Remark 3), we have a family of tropical systems \(\mathcal {T}_i\) for \(i = 0,\dots ,n\) of the supports:

$$\begin{aligned}\mathcal {A}_0,\dots ,\mathcal {A}_{i-1},\sum _{j = i}^n\mathcal {A}_j \subset M \end{aligned}$$

The last tropical polynomial is formed by imposing 0 coefficients, therefore, it is defined by:

$$\begin{aligned} \min _{a \in \sum _{j = r}^n\Delta _j}\langle a,x\rangle \end{aligned}$$

which corresponds to the normal fan of \(\sum _{j = r}^n\Delta _j\). This coincides with the assumptions for \(S(\theta _i)\) in Remark 3.

Proposition 2

The expression \(\min _{a \in \Delta }\langle a,x\rangle \) is achieved twice in the \((n-1)\)-dimensional cones of the normal fan of \(\Delta = {{\,\textrm{conv}\,}}(\mathcal {A})\).

Proof

A j-th dimensional cone \(\mathcal {N}_F \subset M_{\mathbb {R}}\) of the normal fan of \(\Delta \) corresponds to a \((n-j)\)-dimensional face of \(\Delta \). Take \(v \in \mathcal {N}_F\), then the value \(\min _{a \in F}\langle a,v\rangle \) is the same for all \(a \in F\), which is a face. Therefore, the minimum \(\min _{a \in F}\langle a,x\rangle \) is achieved, at least, twice in \(\mathcal {N}_F\) if \(j < n\). On the other hand, if the minimum is achieved at least twice at v, the convex hull

$$\begin{aligned}{{\,\textrm{conv}\,}}\{a \in \Delta \quad \min \langle a, v\rangle \text { is achieved}\}\end{aligned}$$

is a positive dimensional face F of \(\Delta \), therefore v lies in a cone of dimension at most \((n-1)\) in the normal fan of \(\Delta \). \(\square \)

Proposition 3

The expression \(\min _{a \in \mathcal {A}}\langle a,x + v\rangle \) is achieved twice in the \((n-1)\)-dimensional cones of the normal fan of \(\Delta \) translated after \(v \in N_{\mathbb {R}}\).

Proof

The same proof as the previous works after translating by v. \(\square \)

In this context, we can see the tropical system \(\mathcal {T}_i\) as the superposition in \(N_{\mathbb {R}}\) of the normal fans \(\mathcal {F}_0,\dots ,\mathcal {F}_n\) centered at different points \(v_i \in N_{\mathbb {R}}\) which correspond to each of the lifting functions \(\omega _i: \Delta _i \xrightarrow []{} \mathbb {R}\).

Definition 13

A polyhedral complex \(\mathcal {P}\) is a union of cells (bounded or unbounded) in \(N_{\mathbb {R}}\) such that:

  • Every face of a cell in \(\mathcal {P}\) is also in \(\mathcal {P}\).

  • The (possibly empty) intersection of two cells in \(\mathcal {P}\) is also in \(\mathcal {P}\).

Fans (and also the complexes associated to tropical systems) are a good example of polyhedral complexes. In the next theorem, we explain the duality between polyhedral complexes and mixed subdivisions, i.e., the j-dimensional cells of a polyhedral complex correspond to the \((n-j)\)-dimensional cells of the mixed subdivision; see [29].

Proposition 4

Let \(\mathcal {A}_0,\dots ,\mathcal {A}_n\) be a family of supports and \(\omega : \sum _{i = 0}^n\mathcal {A}_i \xrightarrow []{} \mathbb {R}\) be a lifting function. The polyhedral complex defined by tropical system \(\mathcal {T}\) taking the values of \(\omega \) as coefficients is dual to the mixed subdivision \(S(\omega )\).

Proof

Let p be a 0-dimensional cell of the polyhedral complex defined by \(\mathcal {T}\). As it is the intersection of cones of each of the fans \(\mathcal {F}_i\), there is a cell of \(S(\rho )\) corresponding to the sum of the faces associated to the cones of each of the fans. On the other hand, an n-cell D on the mixed subdivision corresponds to a point p, which is the intersection of the normal cones of each of the summands \(D_i\). Each of the faces of D corresponds to a cell of the polyhedral complex in which p is contained. \(\square \)

Let’s denote by \(\mathbb {H}_i\), the hyperplane arrangement in \(\mathbb {R}^n\) associated to the tropical system \(\mathcal {T}_i\). Before stating the main theorem, we add an example of the refining construction.

Example 5

Let \(\mathcal {A}_0 = \{(0,0),(1,0),(0,1),(1,1)\}\), \(\mathcal {A}_1 = \mathcal {A}_2 = \{(0,0),(1,0),(0,1)\}\) with corresponding convex hulls \(\Delta _0,\Delta _1,\Delta _2\). We start with the trivial mixed subdivision.

figure e

In this case, the corresponding tropical system is given by the inner normal fan to the Minkowski sum, which corresponds to the superposition of the normal fans of each summand.

figure f

The dashed drawing represents the central hyperplane arrangement which we will denote as \(\mathbb {H}_0\). Any lifting of \(\Delta _0\) will refine the subdivision. However, we can see that refinement corresponds to moving the point (0, 0) of the blue fan to an adjacent chamber in \(\mathbb {H}_0\). Let’s take (2, 2) as a normal vector. This means lifting \(\Delta _0\) after an affine function of type \(c - 2x - 2y\). We can choose any constant c (say \(c = 4\)) as it will give the same lifting. The subdivision looks like:

figure g

Moreover, the corresponding tropical system \(\mathcal {T}_1\) and the corresponding (not central) hyperplane arrangement \(\mathbb {H}_1\) are:

figure h

We claim that we can move the orange fan and we will be refining the mixed subdivision. In particular, moving the orange fan to each of the adjacent cells on the hyperplane arrangement corresponds to all the possible ways to refine the previous mixed subdivision. For instance, if we take the translation given by the vector \((1,-1)\), which would be the normal vector to the affine lifting \(c - x + y\) with \(c = 1\). The mixed subdivision looks like:

figure i

and the tropical system after the translation vector \((1,-1)\), corresponds to:

figure j

We now recapitulate the notation used so far. Let \(\omega _i: \mathcal {A}_i \xrightarrow []{} \mathbb {R}\) be the lifting function. As in Theorem 2, \(S(\theta _i)\) be the mixed subdivisions of the candidate incremental chain given by the lifting functions \((\omega _0,\dots ,\omega _{i-1},0,\dots ,0)\). Let \(\mathcal {T}_i\) be the tropical systems dual to each of the mixed subdivisions \(S(\theta _i)\) for \(i = 0,\dots ,n\). Let \(\mathbb {H}_i\) be the hyperplane arrangement associated to each of the tropical systems. At this point, we have all the ingredients to state and prove the tropical refinement.

Theorem 3

(Tropical refinement) Let \(i = 1,\dots ,n\). The mixed subdivision \(S(\theta _i)\) refines \(S(\theta _{i-1})\), if and only if, the normal vector to the lifting function \(\omega _{i-1}: \mathcal {A} \xrightarrow []{} \mathbb {R}\) lives in a chamber of \(\mathbb {H}_i\) adjacent to \(0 \in \mathbb {R}^n\).

We now construct the tools needed for proving this result.

Definition 14

We say that a ray r of the normal fan \(\mathcal {F}_i\) preserves adjacencies if it is adjacent to the same cells in \(\mathcal {T}_i\) and \(\mathcal {T}_{i-1}\).

Lemma 2

Let \(S(\theta _i)\) be a mixed subdivision of \(\Delta _0,\dots ,\Delta _{i-1},\sum _{j = i}^n \Delta _j\) for \(i = 0,\dots ,n\). The lifting of \(\Delta _i\) will give \(S(\theta _i) \preceq S(\theta _{i+1})\), if and only if, each ray of \(\mathcal {F}_i\) preserves the adjacencies after the translation.

Proof

Suppose there is a ray r that doesn’t preserve an adjacencies. Then, take the 0-dimensional cell of the corresponding polyhedral complex where this adjacency fails and it must correspond to an n-cell of \(S(\theta _{i+1})\) that is not contained in the cell of \(S(\theta _i)\) corresponding to such adjacency.

On the other hand, take a cell C of \(S(\theta _{i+1})\) that is not contained in any of the cells of \(S(\theta _i)\) and, as we only lifted the polytope \(\Delta _i\), the corresponding dual cell on the polyhedral complex has to fail to be adjacent to the same rays. \(\square \)

Proof

(of the Theorem 3) Consider p as a point (0-dimensional cell) in the polyhedral complex that is dual to an n-cell D of \(S(\theta _{i-1})\). Let v be the normal vector to the lifting function \(\omega _i: \mathcal {A}_i \xrightarrow []{} \mathbb {R}\). We have to prove that v lies in an adjacent cell to 0 in \(\mathbb {H}_i\), if and only if, D is contained in a cell \(D'\) of \(S(\theta _{k})\).

Firstly, suppose there was not such cell \(D'\). This would mean that the adjacencies would not be preserved and we can find a ray r in \(\mathcal {F}_i\) where this property is failing. Consider the ray of a fan \(\mathcal {F}_k\) for \(k = 0,\dots ,i-1\) where this adjacency has changed and this means that we have crossed a hyperplane containing such ray in the previous fan.

On the other hand, if there is such cell \(D'\), then the lifting of \(\Delta _i\) preserves adjacencies. However, if we had moved v to a non-adjacent cell to 0, we would have crossed a hyperplane therefore, we would be able to find rays in such hyperplane where the adjacencies are not preserved. \(\square \)

This result extends the proposition 2.11 on [16, Proposition 2.11] and gives a full picture of refinement of mixed subdivisions. Therefore, we naturally understand all the ways to refine a given mixed subdivision \(S(\theta _i)\) with affine lifting functions on \(\Delta _i\).

Corollary 1

The chambers of the hyperplane arrangement \(\mathbb {H}_i\) adjacent to \(0 \in \mathbb {R}^n\) are in one to one correspondence to all the possible ways to refine \(S(\theta _{i})\). In particular, if \(S(\theta _{i})\) is tight, the chambers of \(\mathbb {H}_i\) correspond to tight mixed subdivisions.

In the context of Theorem 2, in the direction of \(v \notin \mathbb {H}_{\Delta }\), the function \(\langle \lambda _{i}v, x \rangle \) will reach the hyperplane arrangement \(\mathbb {H}_i\) when \(\lambda _i = \lambda _{i-1}\). Therefore, for any \(0< \lambda _i < \lambda _{i-1}\), the subdivision \(S(\theta _{i+1})\) will refine \(S(\theta _{i})\) for \(i = 0,\dots ,n\).

Theorem 4

The mixed subdivision \(S(\rho )\) in Definition 10 is admissible.

Proof

All the lattice points with row content 0 are 0-mixed. Therefore, \(S(\theta _0)\) satisfies ii) in Definition 8. Let D be an n-cell of \(S(\theta _i)\). If \(\dim D_i = 0\), then the fundamental subfamily of \(\mathcal {A}_D\) is at most \(\{i\}\) as shown in Remark 4. We show that, for our choice of the lifting function, the rest of cells D satisfy ii) in Definition 8.

Let \(D \in S(\theta _i)\) such that \(\dim D_i > 0\). Suppose that this cell contains a lattice point \(b \in \mathcal {B}\) that has row content i but is not i-mixed. Therefore, this lattice point b will be in a cell of \(S(\rho )\) with a 0-dimensional j-th component for some \(j < i\). Take \(C \supset D\) in \(S(\theta _j)\) containing the previous lattice point b. If \(\dim C_j > 0\), then the lifting function \(\omega _j = \lambda _j\langle v,x\rangle \) takes the same value in all the points of \(C_j\). Therefore, the vector v is normal to \(C_j\) and has to be contained in the hyperplane arrangement associated to \(\Delta \). As this is not the case, \(\dim C_j = 0\) and consequently \(\dim D_j = 0\), contradicting the initial hypothesis. \(\square \)

Thus, the Canny–Emiris formula holds for the family of lifting functions that we have defined; see [16, Theorem 4.27].

Fig. 1
figure 1

This table explains how the process of passing from the proposed lifting on \( \Delta _0\), \( \Delta _1, \Delta _2\) to the mixed subdivision works in the j-th coordinate for \(v_j < 0\) for any of the two components of Example 1. One clearly sees that, for instance, \(\overline{0a_{0,0}e_0} \subset D_0\), if and only if, \(x_0 \le a_{0,0}\) for \(x \in D\). The product of two subdivisions of this form gives the mixed subdivision in the figure of Example 1

4 The Case of n-Zonotopes

In this section, we restrict our attention to a particular family of Newton polytopes, i.e. n-zonotopes. In this subfamily, it will be easier to give a combinatorial description of the lattice points associated to the rows of the Canny–Emiris matrix, after applying the greedy algorithm. For simplicity, we suppose that the lattice is \(M = \mathbb {Z}^n\).

Definition 15

A zonotope is a polytope given as a sum of line segments. An n-zonotope is generated by n line segments, which span an n-dimensional lattice.

Consider linearly independent vectors \(v_1,\dots ,v_n \in \mathbb {Z}^{n}\) and the line segments \(\overline{0v_1},\dots ,\overline{0v_n} \subset \mathbb {R}^n\) forming an n-zonotope \(Z \subset \mathbb {R}^n\). If the Newton polytopes are n-zonotopes whose defining line segments are integer multiples of the \(\overline{0v_j}\), we can write the supports of the system as:

$$\begin{aligned} \mathcal {A}'_i = \big \{ \sum _{j = 1}^n \lambda _j v_j \in \mathbb {Z}^n\, | \quad \lambda _j \in \mathbb {Z}, \quad 0 \le \lambda _j \le a_{ij}\big \}. \end{aligned}$$

for some \(a_{ij} \in \mathbb {Z}_{>0}\). Let V be the nonsingular matrix whose columns are the coordinates of the \(v_j\) in the canonical basis of \(\mathbb {Z}^n\) for \(j = 1,\dots ,n\) and consider it as a monomorphism of lattices \(V: \mathbb {Z}^n \xrightarrow []{} \mathbb {Z}^n\) of rank n. Let \(e_1,\dots ,e_n\) be the canonical basis of \(\mathbb {Z}^n\).

Corollary 2

Let \(\mathcal {A}'_0, \dots , \mathcal {A}'_n\) be the previous family of supports, then \({{\,\textrm{Res}\,}}_{\mathcal {A}'} = {{\,\textrm{Res}\,}}_{\mathcal {A}}^{|\det (V)|}\), where:

$$\begin{aligned} \mathcal {A}_i = \big \{(b_j)_{j = 1,\dots ,n} \in \mathbb {Z}^n \quad | \quad 0 \le b_j \le a_{ij} \big \} \quad i = 0,\dots ,n \end{aligned}$$

Proof

Using Lemma 1, we can view the map \(V: \mathbb {Z}^n \xrightarrow []{} \mathbb {Z}^n\) as a monomorphism of lattices sending the canonical basis \(e_i\) to \(v_i\) for \(i = 1,\dots ,n\). The absolute value of the determinant \(|\det (V)|\) is the index of the image. This last result follows from the reduction of V to its Smith normal form [31, Theorem 2.3]. \(\square \)

Remark 9

The normal vectors of the n-zonotope are given by n pairs \((\eta _j,-\eta _j)_{j=1,\dots ,n}\) in N. The results that follow in this section could be proved without using Corollary 2, after changing \(b_j\) by \(\langle b, \eta _j\rangle \) for \(j = 1,\dots ,n\), choosing \(\eta _j\) to be the element in the pair such that \(0 \le \langle b,\eta _j \rangle \le a_{ij}\).

In order to prove our results, we assume that the \(a_{ij}\) are ordered, meaning that \(0 < a_{0j} \le a_{1j} \le \dots \le a_{n-1j}\) and \(j = 1,\dots ,n\), where we exclude \(\mathcal {A}_n\) form this assumption; notice that Example 2 wouldn’t satisfy this property without excluding \(\mathcal {A}_n\). Consider a translation \(\delta \in \mathbb {R}^n\) which is negative in each component and small enough. Then, the lattice points in translated cells of a mixed subdivision of the previous system are:

$$\begin{aligned} \mathcal {B} = \big \{(b_j)_{j = 1,\dots ,n} \in \mathbb {Z}^n \quad | \quad 0 \le b_j < \sum _{i = 0}^n a_{ij}\big \}. \end{aligned}$$

Let \(v \notin \cup _{i = 1}^n\{x_j = 0\}\) define the mixed subdivision \(S(\rho )\) as in the previous section. We assume \(v_j < 0\) for \(j = 1,\dots ,n\) and get the following result.

Proposition 5

[12, Proposition 3.1] Let \(b \in \mathcal {B}\) and \(i \in \{0,\dots ,n\}\). Then:

$$\begin{aligned} t_{b,i} = \big |\big \{j \in \{1,\dots ,n\} \quad | \quad \sum _{k = 0}^{i-1} a_{kj} \le b_j < \sum _{k = 0}^i a_{kj}\big \}\big |\end{aligned}$$

and the row content i(b) is the maximum index in \(\{0,\dots ,n\}\) such that:

$$\begin{aligned} \not \exists j \in \{1,\dots ,n\}: \quad \sum _{k = 0}^{i(b)-1} a_{kj} \le b_j < \sum _{k = 0}^{i(b)} a_{kj} \end{aligned}$$

with the support \(a(b) \in \mathcal {A}_{i(b)}\) satisfying:

$$\begin{aligned}a(b)_j = {\left\{ \begin{array}{ll} 0 &{} b_j < \sum _{k = 0}^{i(b)-1}a_{kj}, \\ a_{i(b)j} &{} b_j \ge \sum _{k = 0}^{i(b)}a_{kj}. \end{array}\right. }\end{aligned}$$

Remark 10

If \(v_j > 0\), we would change the inequalities by \(\sum _{k = i}^{n} a_{kj} \le b_j < \sum _{k = i - 1}^i a_{kj}\), but the results that follow would not change. Any other mixed subdivisions of this particular system can also be formed this way.

Definition 16

The type function \(\varphi _b: \{1,\dots ,n\} \xrightarrow {} \{0,\dots ,n\}\) associated to each lattice point \(b \in \mathcal {B}\) is defined as the vector of indices satisfying:

$$\begin{aligned}\sum _{k = 0}^{\varphi _b(j)-1}a_{kj} \le b_j < \sum _{k = 0}^{\varphi _b(j)}a_{kj}\end{aligned}$$

Following Proposition 5, it satisfies that \(t_{b,i} = |\varphi _b^{-1}(i)|\).

Definition 17

We define the greedy subset \(\mathcal {G} \subset \mathcal {B}\) to be formed by all the lattice points \(b \in \mathcal {B}\) such that:

$$\begin{aligned}\sum _{i = 0}^I t_{b,i} \le I + 1 \quad \forall I < n.\end{aligned}$$

Theorem 5

[12, Theorem 3.1, Theorem 3.2] Let \(b \in \mathcal {G}\) and \(b' \notin \mathcal {G}\). Then, \(b' \notin b - a(b) + \mathcal {A}_{i(b)}\). Moreover, if \(b,b' \in \mathcal {G}\) and b lines in a mixed cell, we can reach \(b'\) from b.

Corollary 3

[12, Corollary 3.3] The size of the matrix \(\mathcal {H}_{\mathcal {G}}\) is:

$$\begin{aligned} \sum _{\varphi _b: \{1,\dots ,n\} \xrightarrow []{} \{0,\dots ,n\}}\prod _{j = 1}^na_{\varphi _b(j)j}\end{aligned}$$

where the sum is over the functions that satisfy \(\varphi _b^{-1}(\{0,\dots ,I\}) \le I + 1 \quad \forall I < n\).

In [12], the authors showed that if one is able to embed the mixed subdivision of a given polynomial system into the mixed subdivision of an n-zonotope system, this construction also applies there. This is the case of multihomogeneous systems, in which the Newton polytopes are products of simplices. For such a case, there exist exact determinantal resultant formulas obtained by using the Weyman complex and other tecniques [4, 5, 18, 19, 33]. However, none of those formulas is directly using the Canny–Emiris formula. The use of type functions makes our approach easier to generalize to general Newton polytopes (Fig. 2). In the next section, we state a conjecture on which is the expected minimal size of these matrices.

Fig. 2
figure 2

This table represents the size of the matrices we achieve for zonotopes of dimensions from 2 to 5 with \(a_{ij} = 1\) using the greedy approach versus the original Canny–Emiris formula. We also compare to the degree of the resultant

5 Which are the Minimal Matrices?

A very natural question for sparse polynomial systems is which are the matrices of smallest size that one can build to represent the sparse resultant. In this section, we explain how this is related to the Hilbert function of a generic polynomial system with some given supports and state a conjecture saying that if the Hilbert function of a generic system attains the value zero at some multi-degree \(\textbf{m}\), there is a lifting and a greedy subset \(\mathcal {G}\) associated with the degree \(\textbf{m}\) providing a resultant formula. We state the conjecture for multi-homogeneous systems but one can easily generalize it to the sparse case by using degrees in the Cox ring of a toric variety [14].

One can motivate this question through Gröbner basis. For homogeneous systems, it is known that the computation of a Gröbner basis finishes once a certain degree in the generators is achieved. This degree coincides with an algebraic invariant called Castelnuovo-Mumford regularity and it was proven by Bayer and Stillman in [2] that it provides a tight bound to the degrees involved in a Gröbner basis. This result uses the degree reverse lexicographical order after a generic change of coordinates.

In the case of generic coefficients (still in the homogeneous case), this coincides with the degree at which one has to arrive in order to build resultant matrices: the Macaulay bound [20, 28]. There are analogues of the Macaulay bound [3, Proposition 8.2.2] but they are not tight in general [1]. In terms of the resultant construction, we can relate this to the mixed subdivisions that we considered in the previous sections.

In [12], the authors only considered affine lifting functions, for the sake of simplicity on the combinatorics of the greedy algorithm. However, the results are known to be not optimal, in the sense that there exist other lifting functions that provide smaller resultant matrices. Therefore, a natural question is to ask which subsets \(\mathcal {G} \subset \mathcal {B}\) can be obtained using the greedy algorithm for some lifting function and which of them are minimal.

Example 6

Consider the same bilinear system as in Example 1. Another possible non-affine mixed subdivision \(S(\rho )\) is the following:

figure k

The red dots indicate the greedy subset that one obtains by starting the algorithm at the lattice points in mixed cells. A possible lifting function giving this mixed subdivision is \(\omega _0 = (0,1,1,3), \omega _1 = (0,2,2,5), \omega _2 = (0,3,3,7)\), which is not affine.

Assume that we are working with coefficients in the field of complex numbers \(\mathbb {C}\). Consider \(\mathcal {A}_0,\dots ,\mathcal {A}_n\) be a family of supports corresponding to a multihomogeneous system. Assume also that each of the \(\mathcal {A}_i\) can be associated to a multidegree in \(\textbf{d}_i \in \mathbb {Z}^d\). The generic Hilbert function is defined as:

$$\begin{aligned} {{\,\textrm{HF}\,}}(\textbf{d}) = \dim (S/I)_{\textbf{d}} \quad \textbf{d} \in \mathbb {Z}^d \end{aligned}$$

where I is the ideal in \(\mathbb {C}[M]\) after specializing the \(u_{i,a}\) to generic values in \(\mathbb {C}\). This generic Hilbert function exists as we cannot have two different generic behaviours for coefficients in \(\mathbb {C}\). Moreover, it is natural to think that we can associate some of the subsets \(\mathcal {G} \subset \mathcal {B}\) to some multi-degrees. For instance, the whole subset \(\mathcal {B}\) can be naturally associated to the multi-homogeneous Macaulay bound. This idea can easily be extended to the sparse case by considering generic values of the Hilbert function associated to degrees in the Cox ring of a toric variety.

Conjecture 1

Assume that \(\mathcal {G} \subset \mathcal {B}\) is a set of lattice points in the translaated cells that corresponds to a multi-degree \(\textbf{d} \in \mathbb {Z}^d\). If \({{\,\textrm{HF}\,}}(\textbf{d}) = 0\), then there is a lifting function \(\omega \in \prod _{i = 0}^n\mathbb {R}^{\mathcal {A}_i}\) such that \(\mathcal {G}\) is the greedy subset of such system. Moreover, if \({{\,\textrm{HF}\,}}(\textbf{d}') \ne 0\) for \(\textbf{d}' \lneq \textbf{d}\), \(\mathcal {G}\) contains no greedy subset.

It is natural to think that this lifting function must be related to the degree reverse lexicograpical order. Namely, that for two monomials \(x^A, x^B \in k[M]\), we have:

$$\begin{aligned} x^A <_{\mathfrak {drl}} x^B \iff \omega (A) \le \omega (B). \end{aligned}$$

Here \(\omega (A)\) refers to evaluating the exponents of \(x^A\) in the inf-convolution of \(\omega \) as in Definition 2.

Example 7

The lifting function given in Example 6 satisfies this degree reverse lexicographical condition. Moreover, the subset \(\mathcal {B}\) obtained by considering all the lattice points in translated cells can be related to the bi-degree (2, 2). However, the greedy subset \(\mathcal {G}\) that we have found corresponds to the bi-degree (2, 1). In particular, this bi-degree corresponds to some existing exact resultant formulas [18].

6 Applications

Resultants and matrix representations of polynomial systems can be used in applications for solving polynomial systems. The ideas that are useful for solving a large number of problems in applications and offer standard methods that can be applied in several contexts. We add two examples of these applications in computer vision and design: the 5-points problem and the implicitization problem. We have updated the JULIA implementation in [12] so that it includes these examples.

6.1 Computer Vision: The 5 Point Problem

A typical computer vision problem is interested in computing the displacement of a camera between two positions in a static environment. Namely, we would like to find the displacement of a rigid body between two snapshots taken by a stationary camera. The identifiable features of the body include only points.

Usually, a minimum number of 5 point matches is available. The algebraic problem reduces to a well-constrained system of polynomial equations and we are able to give a closed-form solution. Typically, computer vision applications use at least 8 points in order to reduce the number of possible solutions to one, in generic coordinates. In addition, computing the displacement reduces to a linear problem and the effects of noise in the input can be diminished [27].

Let \(a_i \in (\mathbb {R}^3)\) for \(i = 1,\dots ,5\) be the 5 points in the first snapshot and \(a'_i \in (\mathbb {R}^3)\) for \(i = 1,\dots ,5\) be the points in the second snapshot. A quaternion formulation of this problem was proposed in [25]. This quaternion formulation reduces the problem to solving the polynomial system given by the following equations in the variables \(q \in \mathbb {R}^3\) (representing a rotation) and \(d \in \mathbb {R}^3\) (representing a translation)

$$\begin{aligned} (a_i^Tq)(d^Ta'_i) + a_i^Ta'_i + (a_i \times q)^Ta'_i + (a_i \times q)^T(d \times a'_i) + a_i^T(d \times a'_i) = 0, \quad i = 1,\dots ,5, \\ 1 - d^Tq = 0, \end{aligned}$$

where \(\times \) represents the usual exterior product. The first five equations represents each of the 5 displacements while the last one represents a normalization between the vectors qd. This system is bilinear in the two groups of variables. We can solve it by building the u-resultant. Namely, we introduce a new linear equation \(P_u = u_0 + u_1d_1 + u_2d_2 + u_3d_3 + u_4q_1 + u_5q_2 + u_6q_3\). Once we consider the resultant of this system, we get a polynomial that factors into linear forms, whose coefficients are the values of the solutions (they are a finite number in this case); see also [22] for a similar approach.

Using our approach, we get a square matrix of dimension 784 while the degree of the resultant is 770.

6.2 An Implicitization Problem

The implicitization problem has many appications in computer-aided design, since it is one of the major problems in changing representation. It has been addressed by a multitude of methods, including sparse resultants e.g. [23]. Namely, given the equations of a surface in \(\mathbb {R}^2\) given by two parameters st:

$$\begin{aligned} \phi : \mathbb {R}^2 \xrightarrow []{} \mathcal {X} \subset \mathbb {R}^3, \quad (s,t) \xrightarrow []{} (\phi _1(s,t), \phi _2(s,t), \phi _3(s,t)), \end{aligned}$$

we would like to find a polynomial equation in three variables P(XYZ) that represents the surface \(\mathcal {X} = \{P(X,Y,Z) = 0\}\). Therefore, we are forced to eliminate the variables st from the polynomial system:

$$\begin{aligned} X - \phi _1(s,t), Y - \phi _2(s,t), Z - \phi _3(s,t). \end{aligned}$$

This sums up to computing the resultant, assuming that the Newton polytope of \(\phi _i\) for \(i = 1,\dots ,3\) is a zonotope.

Example 8

Suppose that \(\phi _1 = 1 + 3s - 2st + s^2t, \phi _2 = -1 -3s + 4st + 5s^2t, \phi _3 = -2 + 5s + 4st - 1s^2t\). Our construction provides the following matrix for the resultant computation of the implicitization problem:

where the principal minor is marked in green.