1 Introduction

Combinatorial decompositions of polynomial ideals often appear in commutative algebra, as they are very useful for many theoretical considerations [34]. Actually, they were first prominently used by Riquier [25] and Janet [22] in their works on general systems of partial differential equations and Janet also provided effective algorithms for their determination. Within commutative algebra, such decompositions were studied with an emphasis on complementary ones only much later: first by Rees [24] in a generic situation and then generally by Stanley [31] in the context of Hilbert function computations. Algorithms for the construction of complementary decompositions were presented e.g. by Sturmfels and White [33]. A particular combinatorial decomposition was also crucial for Dubé’s analysis of the complexity of Gröbner bases without genericity assumptions [12]. Combinatorial decompositions were also studied recently by Ceria [10].

As the theory of involutive bases (see [30] for a general introduction and an overview of applications) was developed by Gerdt and Blinkov [18] following ideas underlying the Janet-Riquier theory of differential equations, it is not surprising that involutive bases are closely related to combinatorial decompositions. Any (strong) involutive basis induces a direct sum decomposition of the ideal as linear space and thus allows for the immediate construction of the volume function of the ideal (and indirectly of its Hilbert function). Complementary decompositions, i. e. decompositions of the factor ring, are a bit harder to get, but the two types of involutive bases most often used in practise, Janet and Pommaret bases, also induce such decompositions. We will show that Janet-like bases—which may be considered as a condensed version of Janet bases introduced by Gerdt and Blinkov [19, 20]—provide a more efficient algorithm for the construction of a (condensed) complementary decomposition than Janet’s original algorithm.

In his work on idealistic exponents, Hironaka [21] constructed a complementary decomposition for monomial ideals in generic position. We will show that his construction terminates with a finite decomposition, if and only if the monomial ideal is quasi-stable, i. e. we find here a by now well studied genericity condition. This observation also implies that Hironaka essentially just rediscovered Rees’ decomposition. We will show furthermore that Janet’s algorithm presented almost 50 years before Hironaka’s work constructs the same decomposition more efficiently.

This article is structured as follows. The next section collects and recalls the basic notations and concepts used later on. Section 3 discusses a classical recursive algorithm for the construction of a complementary decomposition. We determine its complexity and describe an iterative variant of it. The construction of complementary decomposition following Janet’s ideas is the topic of Section 4. We formulate his algorithm in a graph theoretical language showing that it corresponds to a simple breadth-first traversal of the Janet tree associated with the given monomial ideal. This observation immediately gives us its complexity. We then show how Janet-like bases can be used for obtaining a more efficient version of the algorithm. In Section 5, we recall Hironaka’s construction and relate it to Pommaret bases and thus quasi-stable ideals. We then proceed to discuss in the following section the relation of complementary decompositions with primary and irreducible decompositions. We show that Hironaka’s construction yields as a by-product a primary decomposition and explain how an irreducible decomposition can be extracted from a complementary one. Finally, some conclusions are given.

2 Preliminaries

We review some basic definitions and notations from the theory of Gröbner and involutive bases which are used throughout the article. We consider the polynomial ring \({\mathcal {P}}={\mathbb {K}}[X]={\mathbb {K}}[x_{1},\dots ,x_{n}]\) over a field \({\mathbb {K}}\). Let \(f_1,\ldots ,f_k\in {\mathcal {P}}\) be some polynomials and \({{\,\mathrm{{{\mathcal {I}}}}\,}}=\langle f_1,\ldots ,f_k \rangle\) the ideal generated by them. We denote the total degree and the degree with respect to the variable \(x_{i}\) of a polynomial \(f\in {\mathcal {P}}\) by \(\deg (f)\) and \(\deg _{i}(f)\), respectively. If \(Y=\{y_1,\dots ,y_k\}\subseteq X\) is a subset of variables, then we denote by \({\mathcal {T}}_Y=\{ y_{1}^{\mu _{1}}\cdots y_{k}^{\mu _{k}} \mid \mu _{i}\in {\mathbb {N}}_0,\,1 \le i \le k \}\) the monoid of all terms in \({\mathcal {P}}\) depending only on the variables in Y. We write shortly \({\mathcal {T}}={\mathcal {T}}_X\), if all variables are considered. A term ordering on \({\mathcal {T}}\) is denoted by \(\prec\). The leading term of a given polynomial \(f \in {\mathcal {P}}\) with respect to \(\prec\) is denoted by \({\mathrm {lt}}(f)\). If \(F \subset {\mathcal {P}}\) is a finite set of polynomials, we denote by \({\mathrm {lt}}(F)\) the set \(\lbrace {\mathrm {lt}}(f) \mid f \in F \rbrace\).

A finite set \(G \subset {\mathcal {P}}\) is called a Gröbner basis for \({{\,\mathrm{{{\mathcal {I}}}}\,}}\) with respect to \(\prec\), if it satisfies \({\mathrm {lt}}{({{\,\mathrm{{{\mathcal {I}}}}\,}})} := \langle {\mathrm {lt}}(f) \mid f \in {{\,\mathrm{{{\mathcal {I}}}}\,}}\rangle = \langle {\mathrm {lt}}(G) \rangle\). Gröbner bases and the first algorithm to compute them were introduced by Buchberger in his PhD thesis [8], for more details on them see e.g. [11]. A key property of them is given by the following result due to Macaulay which will allow us to restrict in the rest of this article to monomial ideals (which we will identify with the set of terms contained in them).

Proposition 1

( [11, Prop. 4, pp. 250]) Let G be a Gröbner basis of the ideal \({{\,\mathrm{{{\mathcal {I}}}}\,}}\lhd {\mathcal {P}}\). Then, the factor ring \({\mathcal {P}}/{{\,\mathrm{{{\mathcal {I}}}}\,}}\) is isomorphic as a \({\mathbb {K}}\)-linear space to the space generated by all terms \(t\notin \langle {\mathrm {lt}}(G)\rangle\).

Involutive bases are a special kind of Gröbner bases with additional combinatorial properties. We recall some basic notions; for more details see [17, 30].

Definition 2

An involutive division \({\mathcal {L}}\) on \({\mathcal {T}}\) associates to any finite set \(U \subset {\mathcal {T}}\) of terms and any term \(u \in U\) a set of \({\mathcal {L}}\)-non-multipliers \(\bar{{\mathcal {L}}}(u,U)\) given by the terms contained in a prime monomial ideal. The variables generating this prime ideal are called the non-multiplicative variables \(\mathrm {NM}_{{\mathcal {L}}}(u,U)\subseteq X\) of \(u\in U\). The set of \({\mathcal {L}}\)-multipliers \({\mathcal {L}}(u,U)\) is given by the order ideal \({\mathcal {T}}\setminus \bar{{\mathcal {L}}}(u,U)\); defining the set of multiplicative variables \(\mathrm {M}_{{\mathcal {L}}}(u,U)=X\setminus \mathrm {NM}_{{\mathcal {L}}}(u,U)\), we have \({\mathcal {T}}\setminus \bar{{\mathcal {L}}}(u,U)={\mathcal {T}}_{\mathrm {M}_{{\mathcal {L}}}(u,U)}\). For any term \(u\in U\), its involutive cone is defined as \({\mathcal {C}}_{{\mathcal {L}}}(u,U)=u\cdot {\mathcal {L}}(u,U)\). Finally, \({\mathcal {L}}\) must satisfy the following conditions:

  1. 1.

    For two terms \(v\ne u \in U\) with \({\mathcal {C}}_{{\mathcal {L}}}(u,U) \cap {\mathcal {C}}_{{\mathcal {L}}}(v,U) \ne \emptyset\), we have \(u \in {\mathcal {C}}_{{\mathcal {L}}}(v,U)\) or \(v \in {\mathcal {C}}_{{\mathcal {L}}}(u,U)\).

  2. 2.

    If a term \(v \in U\) lies in an involutive cone \({\mathcal {C}}_{{\mathcal {L}}}(u,U)\), then \({\mathcal {L}}(v,U) \subseteq {\mathcal {L}}(u,U)\).

  3. 3.

    For any term u in a subset \(V \subset U\), we have \({\mathcal {L}}(u,U) \subseteq {\mathcal {L}}(u,V)\).

We write \(u \mid _{{\mathcal {L}}} w\) for a term \(u\in U\) and an arbitrary term \(w\in {\mathcal {T}}\), if \(w \in {\mathcal {C}}_{{\mathcal {L}}}(u,U)\). In this case, u is called an \({\mathcal {L}}\)-involutive divisor of w and w an \({\mathcal {L}}\)-involutive multiple of u.

Definition 3

For a finite set of terms \(U \subset {\mathcal {T}}\) and an involutive division \({\mathcal {L}}\) on \({\mathcal {T}}\), the involutive span of U is the union \({\mathcal {C}}_{{\mathcal {L}}}(U)= \bigcup _{u\in U}{\mathcal {C}}_{{\mathcal {L}}}(u,U)\). The set U is involutively complete or a weak involutive basis of the ideal generated by U, if \({\mathcal {C}}_{{\mathcal {L}}}(U)={\mathcal {T}}\cdot U\). For a (strong) involutive basis the union must be disjoint, i. e. every term in \({\mathcal {C}}_{{\mathcal {L}}}(U)\) has a unique involutive divisor. An involutive division is Noetherian, if every monomial ideal in \({\mathcal {P}}\) possesses an involutive basis.

One of the simplest involutive divisions is the Pommaret division:

Definition 4

Define the class of a term \(x^{\mu }\in {\mathcal {T}}\) with exponent vector \(\mu =(\mu _1,\ldots , \mu _n)\) as the index \({{\,\mathrm{cls}\,}}{(x^\mu )}=\min {\{i\mid \mu _{i}\ne 0\}}\). The Pommaret division \({\mathcal {P}}\) is defined as follows: Any variable \(x_{i}\) with \(i\le {{\,\mathrm{cls}\,}}{(x^\mu )}\) is \({\mathcal {P}}\)-multiplicative for \(x^{\mu }\ne 1\). For \(x^{(0,\ldots ,0)}=1\), all variables are multiplicative.

Remark 5

The Pommaret division \({\mathcal {P}}\) is a global division, i. e. the assignment of multiplicative variables to a term \(x^{\mu }\) is independent of any ambient set \(x^{\mu }\in U\subset {\mathcal {T}}\). The Pommaret division is not Noetherian, as e.g. the ideal \({{\,\mathrm{{{\mathcal {I}}}}\,}}=\langle x_{1}x_{2}\rangle\) does not possess a finite Pommaret basis, as it does not contain any element of class 2.

Each finite set \(U\subset {\mathcal {T}}\) contains a unique minimal subset \(A\subseteq U\) such that \(\langle A\rangle =\langle U\rangle\) as monomial ideals, but no term \(a\in A\) is Pommaret divisible by any other term \(b\in A\setminus \{a\}\). We say that A is derived from U by the process of Pommaret autoreduction.

The fact that the Pommaret division is not Noetherian singles out those monomial ideals which do have a finite Pommaret basis. It turns out that this class of monomial ideals is already well-known, as it appears in many different contexts. Its classical characterisation is of a combinatorial nature.

Definition 6

A monomial ideal \({{\,\mathrm{{{\mathcal {I}}}}\,}}\subset {\mathcal {P}}\) is called quasi-stable, if for any term \(x^{\mu }\in {{\,\mathrm{{{\mathcal {I}}}}\,}}\) and for any index \(k={{\,\mathrm{cls}\,}}{(x^\mu )}<i\le n\) an exponent \(s\ge 0\) exists such that \(x_i^s x^\mu /x_{k}\in {{\,\mathrm{{{\mathcal {I}}}}\,}}\).

Proposition 7

( [30, Prop. 5.3.4]) A monomial ideal \({{\,\mathrm{{{\mathcal {I}}}}\,}}\) possesses a finite Pommaret basis, if and only if it is quasi-stable.

One of the most important involutive divisions is the Janet division which like the Pommaret division was already introduced by Janet [22, pp. 16-17].

Definition 8

Let \(U \subset {\mathcal {P}}\) be a finite set of terms. For each sequence \(d_{1} , \ldots ,d_{n}\) of non-negative integers and for each index \(1 \le i \le n\), we introduce the corresponding Janet class as the subset

$$\begin{aligned} U_{[d_{i}, \ldots ,d_{n}]}= \bigl \lbrace u \in U \mid \deg _j{(u)}=d_{j},\ i \le j \le n \bigr \rbrace \subseteq U\;. \end{aligned}$$
(1)

The variable \(x_{n}\) is Janet multiplicative (or shorter \({\mathcal {J}}\)-multiplicative) for the term \(u \in U\), if \(\deg _n{(u)}= \max {\lbrace \deg _n{(v)}\mid v \in U \rbrace }\). For \(i<n\) the variable \(x_{i}\) is Janet multiplicative for \(u \in U_{[d_{i+1}, \ldots ,d_{n}]}\), if \(\deg _i{(u)}= \max {\lbrace \deg _i{(v)} \mid v \in U_{[d_{i+1}, \ldots , d_{n}]} \rbrace }\).

Remark 9

In contrast to the Pommaret division, the Janet division is Noetherian [30, Lem. 3.1.19], but not global.

Example 10

  1. 1.

    The ideal \(\langle x_1x_2\rangle \subseteq {\mathbb {K}}[x_1,x_2]\) has the one-element set \(\{x_1x_2\}\) as Janet basis.

  2. 2.

    The ideal \(\langle x_1^2,x_2^2\rangle\) has the set \(\{x_1^2,x_1^2x_2,x_2^2\}\) as smallest possible Janet basis. Note that, for example, also \(\{x_1^2,x_1^2x_2,x_2^2,x_2^3\}\) is another Janet basis of the same ideal.

To improve the computation of Gröbner bases for ideals where the Janet basis is much larger than the reduced Gröbner basis, Gerdt and Blinkov in [19] introduced a generalisation of Janet bases, the so-called Janet-like bases.

Definition 11

Let \(U \subset {\mathcal {T}}\) be a finite set of terms. For any term \(u \in U\) and any index \(1\le i \le n\), we set

$$\begin{aligned} h_i(u, U) = \max {\bigl \{\deg _i{(v)} \mid u, v \in U_{[d_{i+1},\ldots ,d_n]}\bigr \}} - \deg _i{(u)}\;. \end{aligned}$$

If \(h_i(u, U) > 0\), the power \(x_i^{k_i}\) with

$$\begin{aligned} k_i = \min {\bigl \{\deg _i{(v)} - \deg _i{(u)} \mid v, u \in U_{[d_{i+1},\ldots ,d_n]}, \deg _i{(v)} > \deg _i{(u)}\}} \end{aligned}$$

is called a non-multiplicative power of u for the Janet-like division. The set of all non-multiplicative powers of \(u \in U\) is denoted by \({{\,\mathrm{NMP}\,}}(u, U)\). The elements of the set

$$\begin{aligned} {{\,\mathrm{NM}\,}}(u, U) = \{v \in {\mathcal {T}}\mid \exists w \in {{\,\mathrm{NMP}\,}}(u, U) : w \mid v\} \end{aligned}$$

are called the J-non-multipliers for \(u \in U\). The terms outside of it are the J-multipliers for u. An element \(u \in U\) will be called a Janet-like divisor of \(w \in {\mathcal {T}}\), if \(w = u\cdot v\) with v a J-multiplier for u.

Example 12

Consider the set \(U=\{x_3^3,\,x_2^3x_3\,,x_1x_2x_3\}\subset {\mathbb {K}}[x_1,x_2,x_3]\). We can determine the Janet-like non-multiplicative powers of the elements of U as follows:

  1. 1.

    \(x_3^3\) has maximal \(x_3\)-degree in U. This implies immediately that no non-multiplicative power exists for it at the variable \(x_3\); moreover, since its \(x_3\)-degree is unique in U, no Janet class of U containing this term will contain any other term. Hence, \({{\,\mathrm{NMP}\,}}(x_3^3,U)=\emptyset .\)

  2. 2.

    \(x_2^3x_3\) and \(x_1x_2x_3\) both have \(x_3\)-degree 1. Comparing with \(x_3^3\), it follows that \(x_3^2\in {{\,\mathrm{NMP}\,}}(x_2^3x_3,U)\cap {{\,\mathrm{NMP}\,}}(x_1x_2x_3,U)\), 2 being the difference of the \(x_3\)-degrees. Since \(x_2^2x_3\) has the highest \(x_2\)-degree in U, we can conclude \({{\,\mathrm{NMP}\,}}(x_2^2x_3,U)=\{x_3^2\}.\)

  3. 3.

    Looking at the Janet class \(U_{[1]}=\{x_2^3x_3,x_1x_2x_3\}\), we observe a difference of 2 in the \(x_2\)-degrees. Hence, \(x_2^2\in {{\,\mathrm{NMP}\,}}(x_1x_2x_3,U)\). Now, noting that \(U_{[1,1]}=\{x_1x_2x_3\}\), we conclude that \({{\,\mathrm{NMP}\,}}(x_1x_2x_3,U)=\{x_2^2,x_3^2\}\).

The Janet-like division is not an involutive division, because it assigns sets of non-multipliers that are generated by powers of variables instead of only variables. Nevertheless, it preserves all algorithmic properties of the Janet division and allows for the construction of Janet-like bases and in turn Gröbner bases. Indeed, the main algorithmic idea for the construction of Janet-like bases is similar to that of Janet bases, instead of multiplying with non-multiplicative variables one now multiplies with non-multiplicative powers. One can show that any ideal has a Janet-like basis which is a subset of its Janet basis [20, Thm. 3].

2.1 The Janet tree

The lattice of the Janet classes together with the set theoretic inclusion relation possesses a natural tree structure for any finite set \(U\subset {\mathcal {T}}\) of terms. Following Gerdt et al. [15], we call this tree the Janet tree of U, although our tree is not the same as theirs. As their main concern was efficiency, they presented immediately a representation as binary tree which somewhat obscures the very natural underlying mathematical structure. Our presentation follows [30, Addendum §3.1] adapted to our purposes here. One should note that the bar codes of Ceria encode essentially the same information in a different manner [9]. Janet trees allow us to perform many operations relevant for Janet bases—like determining multiplicative variables or finding an involutive divisor—in a very efficient manner. We will show later that one can read off a complementary decomposition without any further computations by simply traversing the Janet tree.

Each node in the Janet tree corresponds to a non-empty Janet class and the edges represent inclusions. It turns out to be convenient to represent the Janet class \(U_{[d_{i}, \ldots ,d_{n}]}\) by the term \(x_{i}^{d_{i}}\cdots x_{n}^{d_{n}}\) (although this term is not necessarily contained in the class!). Furthermore, we store in each node a list of variables which are multiplicative for any term contained in the class so that each node is a pair \((x^{\nu },V)\) consisting of a term and a subset of the variables X.

Assume that \(U=\{x^{\mu _1},\ldots ,x^{\mu _m}\}\) where \(\mu _i=(\mu _{i1},\ldots ,\mu _{in})\) for each i and \(x^{\mu _1}\prec _{lex} \cdots \prec _{lex} x^{\mu _m}\) with \(x_1\prec _{lex} \cdots \prec _{lex}x_n\). We divide the tree into \(n+1\) levels with the root being at level \(n+1\) and all leaves at level 1. The root contains the term 1 (corresponding to the Janet class \(U_{[]}=U\)) and the empty set. Its children correspond to the non-empty classes \(U_{[d_n]}\) with \(0\le d_n\le \mu _{mn}\) and each contains the term \(x_{n}^{d_n}\) and the empty set except for \(d_n=\mu _{mn}\) which contains the set \(\{x_{n}\}\), as \(x_{n}\) is multiplicative for all terms in this Janet class. Then we continue recursively. Assume that we have a node \((x^{\nu },V)\) at level \(i+1\) with \(i<n\), i. e. \({{\,\mathrm{cls}\,}}{{x^{\nu }}}\ge i+1\). Then its children correspond to the non-empty Janet classes represented by terms of the form \(x_{i}^{a}x^{\nu }\) and they all contain the same set V except for the one with the maximal value of a where \(x_{i}\) is added to V. We sort the children according to increasing values of a, so that it is always the rightmost child which obtains the additional multiplicative variable \(x_{i}\). The nodes at level 1 contain then in lexicographic order the terms in U together with their Janet multiplicative variables. Figure 1 shows the Janet tree of the set \(U=\bigl \{x_1x_2x_3,\,x_2^3x_3,\,x_3^3\bigr \}\subset {\mathbb {K}}[x_1,x_2,x_3]\).

Fig. 1
figure 1

Janet tree of \(U=\{x_1x_2x_3,\,x_2^3x_3,\,x_3^3\} \subset {\mathbb {K}}[x_1,x_2,x_3]\)

2.2 The Janet-like tree

To adapt this tree representation to the Janet-like division, we add to each node a set M of Janet non-multipliers and obtain what we call the Janet-like tree of U. Assume as above that at level \(i+1\) we have the node \((x^{\nu },V,M)\) and that it has \(\ell\) children represented by the terms \(x_{i}^{a_{j}}x^{\nu }\) where \(a_{1}<a_{2}<\cdots <a_{\ell }\). Then the first \(\ell -1\) children are given by the nodes \((x_{i}^{a_{j}}x^{\nu },V,M\cup \{x_{i}^{a_{j+1}-a_{j}}\})\) and the last child is \((x_{i}^{a_{\ell }}x^{\nu },V\cup \{x_{i}\},M)\). We find then again at level 1 the terms of U in lexicographic order together with their multiplicative variables and their non-multiplicative powers. Figure 2 contains the Janet-like tree of the set \(U=\bigl \{x_1x_2x_3,\,x_2^3x_3,\,x_3^3\bigr \}\subset {\mathbb {K}}[x_{1},x_{2},x_{3}]\).

Fig. 2
figure 2

Janet-like tree of \(U=\{x_1x_2x_3,\,x_2^3x_3,\,x_3^3\} \subset {\mathbb {K}}[x_1,x_2,x_3]\)

3 Complementary decompositions from arbitrary generating sets

In this section, we recall the definition of complementary decompositions and give a more efficient variant of a well-known recursive approach for their construction for the special class of monomial ideals, for more details see [30, pp. 168-175].

Definition 13

A cone is a set of the form \({\mathcal {C}}_Y(t)={\mathcal {T}}_Y\cdot t\) for some term \(t\in {\mathcal {T}}\), its vertex, and some set of multiplicative variables \(Y\subseteq X\). A cone decomposition of an arbitrary subset \({\mathcal {S}}\subseteq {\mathcal {T}}\) is a representation as a disjoint finite union of cones: \({\mathcal {S}}=\bigsqcup _{(t,Y)\in {\mathcal {D}}} {\mathcal {C}}_{Y}(t)\) for some finite set \({\mathcal {D}}\) of pairs \((t\in {\mathcal {T}},Y\subseteq X)\).

In the above definition, we consider arbitrary subsets \({\mathcal {S}}\subseteq {\mathcal {T}}\). In practice, two cases are particularly relevant: \({\mathcal {S}}={{\,\mathrm{{{\mathcal {I}}}}\,}}\cap {\mathcal {T}}\) consists of the terms contained in a monomial ideal \({{\,\mathrm{{{\mathcal {I}}}}\,}}\) or \({\mathcal {S}}\) is the complement of such a set, i. e. \({\mathcal {S}}\) consists of the terms contained in an order ideal. In this work, we are mainly concerned with the second case which we call a complementary decomposition of the monomial ideal \({{\,\mathrm{{{\mathcal {I}}}}\,}}\). By Proposition 1, a complementary decomposition corresponds to a decomposition of the factor ring \({\mathcal {P}}/{{\,\mathrm{{{\mathcal {I}}}}\,}}\) as a \({\mathbb {K}}\)-linear space. Complementary decompositions are often called Stanley decomposition, as Stanley [31] used them for computing the Hilbert function of an ideal \({{\,\mathrm{{{\mathcal {I}}}}\,}}\) (actually, this approach to Hilbert functions goes back already to Janet [22]). Rees [24] considered already earlier the special case where all sets Y of multiplicative variables are of the special form \(Y=\{x_i,x_{i+1},\dots ,x_n\}\) for some index i; one then speaks of a Rees decomposition.

Given any finite complementary decomposition \({\mathcal {D}}\) of an ideal \({{\,\mathrm{{{\mathcal {I}}}}\,}}\), it is indeed straightforward to read off the Hilbert series and the Hilbert polynomial of \({{\,\mathrm{{{\mathcal {I}}}}\,}}\). Given a cone induced by the pair \((t,Y)\in {\mathcal {D}}\), we write \(q_t=\deg {(t)}\) for the degree of its vertex and \(k_t=|Y|\) for its dimension. The Hilbert series of \({{\,\mathrm{{{\mathcal {I}}}}\,}}\) is then given by

$$\begin{aligned} \mathrm{HS}_{{{\,\mathrm{{{\mathcal {I}}}}\,}}}(\lambda )= \sum _{(t,Y)\in {\mathcal {D}}}\frac{\lambda ^{q_t}}{(1-\lambda )^{k_t}} \end{aligned}$$

and the Hilbert polynomial by

$$\begin{aligned} \mathrm{HP}_{{{\,\mathrm{{{\mathcal {I}}}}\,}}}(q)= \sum _{\begin{array}{c} (t,Y)\in {\mathcal {D}}\\ k_t>0 \end{array}}\left( {\begin{array}{c}q-q_t+k_t-1\\ k_t-1\end{array}}\right) \;. \end{aligned}$$

This follows immediately from the disjointness required from a cone decomposition and from the fact that the above binomial coefficient gives the number of terms of degree q in the cone (tY) (for degrees \(q\ge q_t\)). For the Hilbert function, one must enforce that the cone (tY) contributes nothing for any degree \(q\le q_t\). Hence, using the Kronecker-Iverson symbol \([\cdot ]\) which yields 1 if the condition in the bracket is satisfied and 0 otherwise, we can write

$$\begin{aligned} \mathrm{HF}_{{{\,\mathrm{{{\mathcal {I}}}}\,}}}(q)= \sum _{\begin{array}{c} (t,Y)\in {\mathcal {D}}\\ k_t>0 \end{array}}[q\ge q_t]\left( {\begin{array}{c}q-q_t+k_t-1\\ k_t-1\end{array}}\right) \;+\sum _{\begin{array}{c} (t,Y)\in {\mathcal {D}}\\ k_t=0 \end{array}}[q= q_t]\;. \end{aligned}$$
(2)

Thus complementary decompositions provide us with an elementary proof of the fact that the Hilbert function of any ideal is of polynomial type and the maximal value of \(q_t\) bounds the Hilbert regularity. In [7], one can find a number of further results on Hilbert series that can be derived via complementary decompositions stemming from Pommaret bases.

Remark 14

By definition, any involutive basis of a monomial ideal \({{\,\mathrm{{{\mathcal {I}}}}\,}}\) induces a cone decomposition of \({{\,\mathrm{{{\mathcal {I}}}}\,}}\). As we will discuss in more details in the subsequent sections, Janet and Pommaret bases also induce complementary decompositions. In the case of a Pommaret basis, both the decomposition of \({{\,\mathrm{{{\mathcal {I}}}}\,}}\) and the complementary decomposition are Rees decompositions, see [30, Cor. 5.1.9].

The subject of computing complementary decompositions for monomial ideals has a long tradition, see e.g. [30,31,32,33]. The recursive Algorithm 1 represents a slightly optimised form of an approach which seems to be folklore. It can be found implicitly in [11] or explicitly in [33] (see also [30, Alg. 5.1] or [26] for variants). However, it seems that its complexity has never been studied. We shall note that in the sequel, the order of variables that we use for the recursive process is \(x_1,\ldots ,x_n\), however, we can impose any order of the variables that we might want to use.

figure a

Theorem 15

Algorithm 1 terminates in finitely many steps and is correct. Its arithmetic complexity is \(O\bigl ( (\lambda m)^{n}\bigr )\) where

$$\begin{aligned} \lambda =\max {\Bigl \{\lambda ^{(i)}_{0},\lambda ^{(i)}_{1}-\lambda ^{(i)}_{0},\ldots , \lambda ^{(i)}_{\ell }-\lambda ^{(i)}_{{\ell -1}} \mid i=1,\ldots , n\Bigr \}} \end{aligned}$$

with \(\lambda ^{(i)}_{0}<\lambda ^{(i)}_{1}<\cdots <\lambda ^{(i)}_{\ell }\) the sequence of the \(x_i\)-degrees of the terms \(t_j\) used to generate the ideal \({{\,\mathrm{{{\mathcal {I}}}}\,}}\).

Proof

The termination and the correctness follow from [30, Prop. 5.1.3]. To prove the complexity bound, we first note that one can construct the Janet tree of U using \(O(m^2+nm)\) comparisons, see [23, Thm. 4.2]. Now, it suffices to show (by an induction over the number n of variables) that at each iteration the number of constructed cones in \({\mathcal {D}}\) is \(O\bigl ( (\lambda m)^{n}\bigr )\). Here, following the notations used in the algorithm, we may assume without loss of generality that the elements of U are distributed uniformly and thus \(U'_{\lambda _i}\) contains \(m/(\ell +1)\) elements for each i. If \(n=1\), then there is nothing to prove. Assume now that the assertion holds for \(n-1\). Then the for-loop is repeated \(\ell +1\) times and in each iteration the set \(\bigcup _{j=0}^{i}U'_{\lambda _j}\) has \((i+1)m/(\ell +1)\) elements. Thus, by the lines 16 and 18, the number of cones in \({\mathcal {D}}\) is \(\lambda \times \sum _{i=0}^{\ell }O\bigl ( (\lambda (i+1)m/(\ell +1))^{n-1}\bigr ) \sim O\bigl ( \lambda (\ell +1) (\lambda m)^{n-1} \bigr )\). It follows from the fact that \(\ell +1\le m\) that the total number of elements added to \({\mathcal {D}}\) is \(O\bigl ((\lambda m)^{n}\bigr )\). Finally, we may assume that \(\lambda ,m,n\ge 2\) and therefore \((\lambda m)^{n}\) is the dominant factor in the complexity \(O\bigl ((\lambda m)^{n} + m^2+nm\bigr )\) and this ends the proof. \(\square\)

Example 16

Let us consider the ideal \({{\,\mathrm{{{\mathcal {I}}}}\,}}=\langle x_1^2x_2x_3,\,x_2^3x_3,\,x_3^3 \rangle\) in the polynomial ring \({\mathcal {P}}={\mathbb {K}}[x_1,x_2,x_3]\). By considering \(x_1\) as the first variable, we have \(\lambda _0=0\), \(\lambda _1=2\), \(U'_0=\{x_2^3x_3,\,x_3^3\}\) and \(U'_2=\{x_2x_3\}\). By applying the algorithm to \(U'_0\), we get

$$\begin{aligned} {\mathcal {D}}'_0=\bigl \{(1,\emptyset ),\, (x_3, \emptyset ),\, (x_3^2,\emptyset ),\, (x_2, \emptyset ),\, (x_2x_3, \emptyset ),\, (x_2x_3^2, \emptyset ),\, (x_2^2, \emptyset ), (x_2^2x_3, \emptyset ),\, (x_2^2x_3^2, \emptyset ),\, (x_2^3, \{x_2\})\bigr \}\;. \end{aligned}$$

Thus, by multiplying the first component of the elements of this set by both 1 and \(x_1\), we obtain the first version of \({\mathcal {D}}\). Now, we continue with \(\lambda _1\). Here, one observes that

$$\begin{aligned} U'_{\lambda _0} \cup U'_{\lambda _1}=\{x_2x_3,\,x_2^3x_3,\,x_3^3\} \end{aligned}$$

and the ideal generated by this set is \(\langle x_2x_3,x_3^3\rangle\). Applying the algorithm to it, on obtains its complementary decomposition \(\bigl \{(1, \emptyset ),\, (x_3, \emptyset ),\, (x_3^2, \emptyset ),\, (x_2, \{x_2\})\bigr \}\) and finally

$$\begin{aligned} {\mathcal {D}}\cup \bigl \{(x_1^2, \{x_1\}),\, (x_1^2x_3, \{x_1\}),\, (x_1^2x_3^2, \{x_1\}),\, (x_1^2x_2, \{x_1,x_2\})\bigr \} \end{aligned}$$

defines a complementary decomposition for \({{\,\mathrm{{{\mathcal {I}}}}\,}}\).

For a better understanding of the structure of the recursive Algorithm 1, we describe now an iterative variant of it: Algorithm 2. In it, we first order the set U according to the lexicographical order and then construct sets \({\mathcal {D}}_{i,j}\), where—with the notations used in the algorithm—\({\mathcal {D}}_{i,j}\) provides a complementary decomposition for the ideal \({\langle t_j,\ldots ,t_m \rangle |_{x_{1}=\cdots =x_{i-1}=1}}\). Thus, \({\mathcal {D}}_{1,1}\) defines the desired complementary decomposition for the given ideal \({{\,\mathrm{{{\mathcal {I}}}}\,}}\).

figure b

Theorem 17

Algorithm 2 terminates for any input and is correct. Its arithmetic complexity is \(O\bigl (\gamma m (\lambda m)^{n-1} \bigr )\) where

$$\begin{aligned} \lambda =\max {\Bigl \{\lambda ^{(i)}_{0},\lambda ^{(i)}_{1}-\lambda ^{(i)}_{0},\ldots ,\lambda ^{(i)}_{\ell }-\lambda ^{(i)}_{{\ell -1}} \mid i=1,\ldots , n\Bigr \}} \end{aligned}$$

with \(\lambda ^{(i)}_{0}<\lambda ^{(i)}_{1}<\cdots <\lambda ^{(i)}_{\ell }\) being the sequence of the \(x_i\)-degrees of the generators \(t_j\) and \(\gamma =\lambda ^{(n)}_{\ell }\).

Proof

Since this algorithm is a non-recursive variant of Algorithm 1, its finite termination and correctness follow from those of Algorithm 1. To prove the arithmetic complexity, we mainly follow the lines of the proof of Theorem 15. We proceed to find the number of cones in the decomposition \(\cup _{j=1}^m{\mathcal {D}}_{i,j}\) for each index \(i=n,\ldots ,1\) and the total number of constructed cones determines the complexity of the algorithm. We observe that for \(i=n\) the number of constructed cones is \(O(\gamma m)\). It follows from line 11 by applying a simple induction, that the number of cones in \({\mathcal {D}}_{i,j}\) is \(O\bigl (\gamma (\lambda m)^{n-i}\bigr )\). Thus, the total number of constructed cones is \(\gamma m+\gamma m (\lambda m)+\cdots \gamma m (\lambda m)^{n-1}\). We may assume that \(\lambda m\ge 2\) and this shows the claim. \(\square\)

Remark 18

One can see that arithmetic complexity of this algorithm is very close to that of Algorithm 1. However, at each iteration of Algorithm  2, we get complementary decompositions for the ideals \(\langle t_j,\ldots ,t_m \rangle |_{x_{1}=\cdots =x_{i-1}=1}\) which provide additional information about the input ideal. More precisely, for each \(1\le i\le n\) and \(1\le j \le m\), the set \({\mathcal {D}}_{i,j}\), constructed during the algorithm, forms a complementary decomposition for this ideal.

The following example illustrates the steps of the algorithm.

Example 19

Let us consider the ideal \({{\,\mathrm{{{\mathcal {I}}}}\,}}=\langle U \rangle\) in the polynomial ring \({\mathcal {P}}={\mathbb {K}}[x_1,x_2,x_3]\) with \(U=\{x_1^2x_2x_3,\,x_2^3x_3,\,x_3^3\}\). Obviously, we have \(\lambda ^{(3)}_{1}=1\), \(\lambda ^{(3)}_{2}=1\), and \(\lambda ^{(3)}_{3}=3\). We get \({\mathcal {D}}_{3,3}=\bigl \{(1,\emptyset ),(x_3,\emptyset ),(x_3^2,\emptyset )\bigr \}\) and \({\mathcal {D}}_{3,2}={\mathcal {D}}_{3,1}=\bigl \{(1,\emptyset )\bigl \}\). Note that \({\mathcal {D}}_{3,2}={\mathcal {D}}_{3,1}\) since \(x_3\in \langle x_3,x_3^3\rangle\). Entering into the main for-loop, we must consider in the iteration with \(i=2\) the three terms \(x_2x_3,\,x_2^3x_3,\,x_3^3\in {\mathbb {K}}[x_2,x_3]\) and hence obtain \(\lambda ^{(2)}_{1}=1\), \(\lambda ^{(2)}_{2}=3\), \(\lambda ^{(2)}_{3}=0\). The algorithm then yields

$$\begin{aligned} {\mathcal {D}}_{2,3} &= \Bigl \{\bigl (1,\{x_2\}\bigr ), \bigl (x_3,\{x_2\}\bigr ), \bigl (x_3^2,\{x_2\}\bigr ) \Bigr \}\;,\\ {\mathcal {D}}_{2,2} & =\Bigl \{(1,\emptyset ), (x_3,\emptyset ), (x_3^2,\emptyset ), (x_2,\emptyset ), (x_2x_3,\emptyset ), (x_2x_3^2,\emptyset ), (x_2^2,\emptyset ), (x_2^2x_3,\emptyset ), (x_2^2x_3^2,\emptyset ), \bigl (x_2^3,\{x_2\}\bigr ) \Bigr \}, \\ {\mathcal {D}}_{2,1} &=\Bigl \{(1,\emptyset ), (x_3,\emptyset ), (x_3^2,\emptyset ), \bigl (x_2,\{x_2\}\bigr ) \Bigr \}\;. \end{aligned}$$

It is worth noting that we may simplify the construction of \({\mathcal {D}}_{2,1}\) by removing the extra term \(x_2^3x_3\) and considering only the two terms \(x_2x_3,\,x_3^3\). For \(i=1\), we consider the given set U and obtain \(\lambda ^{(1)}_{1}=2,\lambda ^{(1)}_{2}=\lambda ^{(1)}_{3}=0\). Thus,

$$\begin{aligned} {\mathcal {D}}_{1,3}=\{1,\{x_1,x_2\}),\, (x_3,\{x_1,x_2\}),\, (x_3^2,\{x_1,x_2\})\}\;,\\ \begin{aligned} {\mathcal {D}}_{1,2}=\{(1,\{x_1\}),\, (x_3,\{x_1\}),\, (x_3^2,\{x_1\}),\, (x_2,\{x_1\}),\, (x_2x_3,\{x_1\}),\, (x_2x_3^2,\{x_1\}),\\ (x_2^2,\{x_1\}),\, (x_2^2x_3,\{x_1\}),\, (x_2^2x_3^2,\{x_1\}),\, (x_2^3,\{x_1,x_2\})\}\;, \end{aligned}\\ \begin{aligned} {\mathcal {D}}_{1,1}=\Bigl \{(1,\emptyset ),\, (x_3,\emptyset ),\, (x_3^2,\emptyset ),\, (x_2,\emptyset ),\, (x_2x_3,\emptyset ),\, (x_2x_3^2,\emptyset ),\, (x_2^2,\emptyset ),\, (x_2^2x_3,\emptyset ), \\ (x_2^2x_3^2,\emptyset ),\, \bigl (x_2^3,\{x_2\}\bigr ),\, (x_1,\emptyset ),\, (x_1x_3,\emptyset ),\, (x_1x_3^2,\emptyset ),\, (x_1x_2,\emptyset ), \\ (x_1x_2x_3,\emptyset ),\, (x_1x_2x_3^2,\emptyset ),\, (x_1x_2^2,\emptyset ),\, (x_1x_2^2x_3,\emptyset ),\, (x_1x_2^2x_3^2,\emptyset ),\\ \bigl (x_1x_2^3,\{x_2\}\bigr ),\, \bigl (x_1^2,\{x_1\}\bigr ),\, \bigl (x_1^2x_3,\{x_1\}\bigr ),\, \bigl (x_1^2x_3^2,\{x_1\}\bigr ),\, \bigl (x_1^2x_2,\{x_1,x_2\}\bigr ) \Bigr \}\;. \end{aligned} \end{aligned}$$

\({\mathcal {D}}={\mathcal {D}}_{1,1}\) is the constructed complementary decomposition for \({{\,\mathrm{{{\mathcal {I}}}}\,}}\). Finally, we note that since the sequence of the \(x_1\)-degrees in U is 2, 0, we do not need to construct \({\mathcal {D}}_{1,3}\).

4 Complementary decompositions from Janet and Janet-like bases

Janet 22, Sect. 15] presented an algorithm for the construction of a complementary decomposition from a Janet basis. Gerdt [14, Lem. 24] proposed a version that related the form of the cones to the Janet division. However, his proof is not completely correct. Algorithm 3 corresponds to the version appearing in [30, Alg. 5.2] (more precisely, an improved form contained in the errata to [30 obtainable at the web page of the author). It has been formulated in a manner that makes it apparent that this algorithm does nothing but a breadth-first transversal of the Janet tree associated to the given monomial ideal. Thus this algorithm does not need any real computations, but simply writes down a complementary decomposition. All computations have already taken place when the Janet tree was determined as an extended form of the Janet basis.

figure c

Theorem 20

Let the ideal \({{\,\mathrm{{{\mathcal {I}}}}\,}}\) be generated by the terms \(t_1,\ldots ,t_m\). Algorithm 3 terminates in finitely many steps and is correct. Its arithmetic complexity is \(O(nm^2\lambda ^{2n})\) where

$$\begin{aligned} \lambda =\max _{i,j}{\deg _{i}(t_j)}\;. \end{aligned}$$

Proof

It follows from [30, Lem. 3.1.19] that the set

$$\begin{aligned} \{x^\mu t_i \mid i=1,\ldots ,m, x^\mu \mid \mathrm{lcm}(t_1,\ldots ,t_m)/t_i\} \end{aligned}$$

contains a Janet basis of \({{\,\mathrm{{{\mathcal {I}}}}\,}}\). The maximal number of elements in this set is \(m\lambda ^{n}\). On the other hand, the construction of the Janet tree corresponding to the Janet basis of \({{\,\mathrm{{{\mathcal {I}}}}\,}}\) needs \(O(m^2\lambda ^{2n}+mn\lambda ^{n})\) comparisons, see [23, Thm. 4.2]. By the structure of the algorithm, it is seen that the number of constructed cones is at most \(nm\lambda ^{n+1}\). These arguments show that the arithmetic complexity of the algorithm is \(O(nm^2\lambda ^{2n})\).\(\square\)

Remark 21

If we compare the algorithmic complexity of the Algorithms 1 and 2 on the one hand and of Algorithm 3 on the other hand (and in particular the number of constructed cones), then we see that in the algorithms from the last section the cardinality m of the generating set of \({{\,\mathrm{{{\mathcal {I}}}}\,}}\) is the decisive factor, as it appears in the form \(m^{n}\). For the algorithm using a Janet basis, the maximal degree \(\lambda\) in an individual variable is the dominant factor, whereas m plays only a minor role. Thus for ideals with a large number of generators it should be preferable. One should also note that the factor \(m\lambda ^n\) coming from the use of [30, Lem. 3.1.19] is generally much larger than the actual size of the Janet basis.

If the monomial ideal \({{\,\mathrm{{{\mathcal {I}}}}\,}}\trianglelefteq {\mathcal {P}}\) is quasi-stable and H is its Pommaret basis, then H is also the minimal Janet basis of \({{\,\mathrm{{{\mathcal {I}}}}\,}}\) by [16, Thm. 17]. In this situation, for each term \(t\in H\), we have the equality \(M_{{\mathcal {J}}}(t,H)=M_{{\mathcal {P}}}(t)\) of the sets of Janet and Pommaret multiplicative variables. This means that in order to compute a complementary decomposition for a quasi-stable ideal, we can apply Algorithm 3 to the minimal Pommaret basis of \({{\,\mathrm{{{\mathcal {I}}}}\,}}\).

Remark 22

Note that we can apply Algorithm 3 to any Janet basis H, i. e. also to non-minimal bases. Since the minimal Janet basis \(H_{\min }\) is a subset of any other Janet basis H of the same ideal, each Janet class of the minimal basis \(H_{\min }\) is also a Janet class of H. This observation implies that each leftmost child node chosen in Line 5 of Algorithm 3 when applied to \(H_{\min }\) is also chosen when the algorithm is applied to H. Hence, in the complementary decomposition obtained from the basis H, we get at least as many cones as in the decomposition obtained from \(H_{\min }\). Since a term \(t\in H_{\min }\) possesses potentially less Janet-multiplicative variables when considered as element of the non-minimal basis H, some of these cones may be of smaller dimension than their counterparts in the decomposition obtained from \(H_{\min }\). Hence the decomposition obtained from H will contain in general strictly more cones than the decomposition obtained from \(H_{\min }\). So we may speak of the minimal Janet complementary decomposition which is obtained from the minimal Janet basis \(H_{\min }\).

In the remainder of this section, we will describe how we can obtain the Janet complementary decomposition of a monomial ideal \({{\,\mathrm{{{\mathcal {I}}}}\,}}\) already from its minimal Janet-like basis, which is always a subset, and most often a proper subset, of the minimal Janet basis of \({{\,\mathrm{{{\mathcal {I}}}}\,}}\). As a starting point, we recall the following result which explains how the minimal Janet-like basis is related to the minimal Janet basis.

Proposition 23

Given a Janet-like basis \(U\subset {\mathcal {T}}\) of the monomial ideal \({\mathcal {I}}=\langle U\rangle \trianglelefteq {\mathcal {P}}\), a Janet basis \(U^\prime\) of the same ideal is defined by

$$\begin{aligned} U^\prime =\biggl \{ t\cdot x^\mu \mid t\in U\wedge x^\mu \mid \prod _{x_a^{p_a} \in {{\,\mathrm{NMP}\,}}(t,U)} x_a^{p_a-1} \biggr \}\;. \end{aligned}$$

Proof

The assertion follows immediately from elementary properties of the Janet and Janet-like division, respectively. See also [20, Thm. 3], a related, though not identical, statement. \(\square\)

Algorithm 3 traverses the Janet tree of the minimal Janet basis and adds for each node which is the left-most node of its parent certain cones to the complementary decomposition. The Janet-like tree of the same ideal can be regarded as a subtree of this tree. To be able to read off the Janet complementary decomposition already from this subtree, one needs to relate the minimal child nodes of the larger tree to certain nodes of the smaller tree. This is indeed possible with Proposition 23.

Proposition 24

Let \({{\,\mathrm{{{\mathcal {I}}}}\,}}\trianglelefteq {\mathcal {P}}\) be a monomial ideal with Janet basis \(U'\) and Janet-like basis U. We denote by JT and JLT its Janet and Janet-like tree, respectively. Moreover, for any tree S, we denote by \(\mathrm {Left}_i(S)\) the set of nodes at level i which are the minimal children of their respective parent nodes. Then for each i with \(1\le i\le n\) the sets \(\mathrm {Left}_i(JT)\), \(\mathrm {Left}_i(JLT)\) are related by

$$\begin{aligned} \mathrm {Left}_i(JT)= \biggl \{ (t,V)\mid \exists (s,V,M)\in \mathrm {Left}_i(JLT): s\mid t \wedge (t/s)\mid \prod _{\begin{array}{c} x_a^{h_a}\in M,\\ a>i \end{array}}x_a^{h_a-1} \biggr \}\;. \end{aligned}$$
(3)

Proof

Let \((t,V)\in \mathrm {Left}_i(JT)\) be a minimal child node at level i in the Janet tree. The term t is of the form \({\tilde{t}}|_{x_1=\cdots =x_{i-1}=1}\), with \({\tilde{t}}\in U'\). Then, by Proposition 23, there is a term \({\tilde{s}} \in U\) such that \({\tilde{s}}\mid {\tilde{t}}\). We can consider its projection \(s:={\tilde{s}}|_{x_1=\cdots =x_{i-1}=1}\); this term is contained in a node \((s,V,M)\in JLT\). Moreover, again by Proposition 23, we have the degree conditions \(\deg _j(s)\le \deg _j(t)< \deg _j(s)+h_j\), where \(h_j\) is defined by \(x_j^{h_j}\in M\), for all \(j>i\) with \(x_j\notin V\). Now, if \(\deg _i{(s)}<\deg _i{(t)}\) were true, then \({\tilde{s}}\) would induce a term \(x_i^{\deg _i{(s)}}({\tilde{t}}/x_i^{\deg _i{(t)}})\) in the Janet basis \(U^\prime\), a contradiction to \((t,V)\in \mathrm {Left}_i(JT)\). Hence \(\deg _i{(s)}=\deg _i{(t)}\). In addition, if (sVM) were not in \(\mathrm {Left}_i(JLT)\), then there would be a node \((u,W,N)\in \mathrm {Left}_i(JLT)\) with \(\deg _i{(u)}<\deg _i{(s)}\) but with \(\deg _j{(u)}=\deg _j{(s)}\) for all \(j>i\). In particular, we would have \(N\cap K[x_{i+1},\ldots ,x_n]=M\cap K[x_{i+1},\ldots ,x_n]\). Hence it would induce a node \((v,W)\in JT\) with \(\deg _{i}{(v)}=\deg _i{(u)}\) and \(\deg _j{(v)}=\deg _j{(t)}\) for all \(j>i\). This is again a contradiction to \((t,V)\in \mathrm {Left}_i(JT)\). Thus, we have shown the inclusion \(\subseteq\) in equality (3).

Conversely, if \((s,V,M)\in \mathrm {Left}_i(JLT)\) and \((t,V)\in JT\) is a node in the Janet tree derived from it by the rules stated in equality (3), then, using a basic fact about the Janet-like division [20, Prop. 2], it is not hard to see that (tV) is indeed in \(\mathrm {Left}_i(JT)\), proving the inclusion \(\supseteq\) and finishing the proof. \(\square\)

The very technical Proposition 24 has the benefit that the Janet complementary decomposition of a monomial ideal \({{\,\mathrm{{{\mathcal {I}}}}\,}}\) can, with its help, be read off already from its Janet-like tree. Moreover, the cones come in a natural grouping. This grouping helps to write the decomposition down in a much better readable way. The cones of the decompositions are sorted into groups. The cones in each group have the same multiplicative variables and there is one cone in the group whose vertex divides all other cone vertices of the group:

Corollary 25

Let \({{\,\mathrm{{{\mathcal {I}}}}\,}}\trianglelefteq {\mathcal {P}}\) be a monomial ideal and let JLT be its Janet-like tree. Let \(\mathrm {MinNodes}({{\,\mathrm{{{\mathcal {I}}}}\,}})\) denote the set of nodes in JLT which are minimal children of their respective parent nodes. For each such node \((x^\nu ,V,M)\), let k denote its level in the tree. Then, a complementary decomposition of \({{\,\mathrm{{{\mathcal {I}}}}\,}}\) is given by

$$\begin{aligned} {\mathcal {D}}= \bigcup _{\begin{array}{c} (x^\nu ,V,M)\in \mathrm {MinNodes}({{\,\mathrm{{{\mathcal {I}}}}\,}})\\ \text {with parent}\ (x^\rho ,V^\prime ,M^\prime ) \end{array}} \Bigl \{ \bigl (x^\rho \cdot x^\mu , \{x_1,\ldots ,x_{k-1}\}\cup V^\prime \bigr )\mid \ x^\mu \mid x_k^{\nu _k-1}\prod _{x_a^{h_a}\in M^\prime }x_a^{h_a-1} \Bigr \}\;. \end{aligned}$$
(4)

Proof

The assertion is an immediate consequence of Proposition 24 and the correctness of Algorithm 3. \(\square\)

Corollary 25 induces Algorithm 4 computing a complementary decomposition of a monomial ideal from a Janet-like basis of it.

figure d

The following example serves to illustrate how Proposition 24 can be applied.

Example 26

Let \({{\,\mathrm{{{\mathcal {I}}}}\,}}=\langle x_1^n,\ldots ,x_n^n \rangle \subset {\mathcal {P}}\). Its minimal Janet basis has \(1+n+\cdots + n^{n-1}=(n^n -1)/(n-1)\) elements and its Janet tree has, including the root, \((\sum _{k=0}^{n-2} \sum _{\ell =0}^k n^{\ell })+2(n^n -1)/(n-1)=O(n^{n-1})\) nodes. There are \(n^{n-1}\) nodes in the tree which contribute cones to the Janet complementary decomposition. They are all at the lowest level 1 of the tree, and they are of the form (tVM) with \(\deg _{1}{(t)}=n\) and \(V\subseteq \{x_1\}\). This means that each of them contributes exactly n zero-dimensional (one-element) cones to the complementary decomposition of \({{\,\mathrm{{{\mathcal {I}}}}\,}}\).

By contrast, the minimal Janet-like basis of \({{\,\mathrm{{{\mathcal {I}}}}\,}}\) is equal to its minimal generating set, it has n elements and its Janet-like tree has (counting also the root) \(n+(n^2+n)/2\) nodes, of which exactly one contributes cones to the complementary decomposition. It is the node \(\bigl (x_1^n,\emptyset ,\{x_2^{n},\ldots ,x_n^{n}\}\bigr )\) at level 1. It yields the complementary decomposition of \({{\,\mathrm{{{\mathcal {I}}}}\,}}\) without any further computation:

$$\begin{aligned} {\mathcal {D}}=\bigl \{ (x^{\mu } ,\emptyset )\mid \ x^\mu \mid x_1^{n-1}\cdots x_n^{n-1} \bigr \}\;. \end{aligned}$$

If \({{\,\mathrm{{{\mathcal {I}}}}\,}}\subset {{\mathcal {P}}}\) is a monomial ideal, then its complementary decomposition obtained from its Janet-like tree as described in (4) can be used to derive a representation of the Hilbert polynomial and function of \({{\,\mathrm{{{\mathcal {I}}}}\,}}\) as linear combinations of binomial coefficients. By (4), the cones of the Janet complementary decomposition \({\mathcal {D}}\) of \({{\,\mathrm{{{\mathcal {I}}}}\,}}\) can be collected into groups. Each group contains all cones of the form \((t\cdot s,Y_t)\) where (tVM) is a node in the Janet-like tree of \({{\,\mathrm{{{\mathcal {I}}}}\,}}\) and the term s varies in the complement of a zero-dimensional irreducible monomial ideal \({\mathcal {A}}_t= \langle x_{a_1}^{\ell _1},\ldots , x_{a_r}^{\ell _r} \rangle \trianglelefteq {\mathbb {K}}[x_{a_1},\ldots ,x_{a_r}]\subset {\mathcal {P}}\). Note that, according to (4), the generators of \({\mathcal {A}}_t\) are the non-multiplicative powers M of the node (tVM) together with \(x_k^{\nu _k}\), where \((x^\nu ,{\tilde{V}},{\tilde{M}})\) is the minimal child node of (tVM) at level k. The main point here is that all cones in such a group have the same set of multiplicative variables \(Y_t\). Define the compressed decomposition \({\mathcal {D}}^{c}\subseteq {\mathcal {D}}\) which contains for each such group only its minimal representative \((t,Y_t)\) together with the irreducible ideal \({\mathcal {A}}_t\). The Hilbert function of \({\mathcal {A}}_t\) has non-zero values only for integers i in the range \(0\le i\le m_t:=\sum _{j=1}^r(\ell _j-1)\). Additionally, we write again \(q_t=\deg {(t)}\) and \(k_t=|Y_t|\). Summing up, we then obtain:

Proposition 27

With the above notations and assumptions, the Hilbert function of the monomial ideal \({{\,\mathrm{{{\mathcal {I}}}}\,}}\) is

$$\begin{aligned} \begin{aligned} \mathrm{HF}_{{{\,\mathrm{{{\mathcal {I}}}}\,}}}(q)=&\mathop{\sum_{(t,Y_t,{\mathcal {A}}_t)\in {\mathcal{D}}^{c}}}\limits_{k_t>0} \sum _{i=0}^{m_t}\, \bigl [q\ge q_t+i\bigr ]\,\mathrm{HF}_{{\mathcal {A}}_t}(i)\, \left( {\begin{array}{c}q-(q_t+i)+k_t-1\\ k_t-1\end{array}}\right) \;\\ +&\mathop{\sum _{(t,Y_t,{\mathcal {A}}_t)\in {\mathcal{D}}^{c}}}\limits_ {k_t=0}\sum _{i=0}^{m_t}\, \bigl [q= q_t+i\bigr ]\,\mathrm{HF}_{{\mathcal {A}}_t}(i)\;. \end{aligned} \end{aligned}$$
(5)

Moreover, the Hilbert polynomial of \({{\,\mathrm{{{\mathcal {I}}}}\,}}\) is obtained by simply dropping the contributions of zero-dimensional cones and all Kronecker-Iverson symbols:

$$\begin{aligned} \mathrm{HP}_{{{\,\mathrm{{{\mathcal {I}}}}\,}}}(q)= \sum _{\begin{array}{c} (t,Y_t,{\mathcal {A}}_t)\in {\mathcal {D}}^{c}\\ k_t>0 \end{array}}\sum _{i=0}^{m_t}\, \mathrm{HF}_{{\mathcal {A}}_t}(i)\, \left( {\begin{array}{c}q-(q_t+i)+k_t-1\\ k_t-1\end{array}}\right) \; . \end{aligned}$$
(6)

If we compare (5) with the expression obtained by applying (2) to the Janet complementary decomposition, then it will in general have much less summands. However, it is not fully explicit, as the numbers \(\mathrm{HF}_{{\mathcal {A}}_t}(i)\) (the h-vectors of the zero-dimensional ideals \({\mathcal {A}}_t\)) have to be computed for each vertex t. Thus, one may say that Proposition 27 reduces the problem of computing the Hilbert function of an arbitrary monomial ideal to the determination of the Hilbert function of zero-dimensional irreducible ideals. As these are very special ideals, it is not difficult to obtain the required values. For simplicity, we work with \({\mathcal {A}}=\langle x_1^{\ell _1},\ldots ,x_r^{\ell _r} \rangle \trianglelefteq {\mathbb {K}}[x_1,\ldots ,x_r]\). It is easy to see that the Hilbert series of the ideal \({\mathcal {A}}\) is

$$\begin{aligned} \mathrm{HS}_{{\mathcal {A}}}(z)= \prod _{i=1}^r \sum _{j=0}^{\ell _i-1} z^{i} \;. \end{aligned}$$

Hence, the values to be computed are just the coefficients of \(z^{k}\) in \(\mathrm{HS}_{{\mathcal {A}}}(z)\) for all \(0\le k\le \sum _{i=1}^{r}(\ell _i -1)\). One way to proceed is to use known fast algorithms for polynomial multiplication, using fast Fourier transforms and related techniques.

However, irreducible monomial ideals are highly structured and possess a symmetry which can be exploited to achieve a lower complexity. Observe that the map

$$\begin{aligned} f:{\mathcal {T}}\setminus {\mathcal {A}}\rightarrow {\mathcal {T}}\setminus {\mathcal {A}},\quad u\mapsto \Bigl (\prod _{i=1}^r x_i^{\ell _i-1}\Bigr )/u \end{aligned}$$

is a bijection with inverse \(f^{-1}=f\). This implies \(\mathrm{HF}_{{\mathcal {A}}}(k)=\mathrm{HF}_{{\mathcal {A}}}\Bigl (\bigl (\sum _{i=1}^{r}(\ell _i -1)\bigr )-k\Bigr )\) for all integers \(0\le k\le \sum _{i=1}^{r}(\ell _i -1)\). Hence the computation of the first half of the values \(\mathrm{HF}_{{\mathcal {A}}}(k)\) suffices. Assume now that we have already expanded the Hilbert series of the “truncated” ideal \(\tilde{{\mathcal {A}}}=\langle x_1^{\ell _1},\ldots ,x_{r-1}^{\ell _{r-1}} \rangle \trianglelefteq {\mathbb {K}}[x_1,\ldots ,x_{r-1}]\) in one variable in the explicit form \(\mathrm{HS}_{\tilde{{\mathcal {A}}}}(z)=\sum _{j=0}^{{\tilde{d}}} c_{j}z^{j}\) and want to compute now the Hilbert series \(\mathrm{HS}_{{\mathcal {A}}}(z)=\sum _{j=0}^d d_j z^{j}\) of the original ideal \({\mathcal {A}}\). This is then easily achieved by multiplying \(\mathrm{HS}_{\tilde{{\mathcal {A}}}}\) with \((1+z+\cdots +z^{\ell _r-1})\). The coefficients are \(d_j=\sum _{k=0}^j c_k\) for \(0\le j\le \ell _r-1\) and \(d_j= \sum _{k=j-\ell _r+1}^j c_k\) for \(\ell _r-1\le j\le \lceil d/2\rceil\). This implies that all these new coefficients can be obtained by either one single addition or by an addition followed by a subtraction. The number of required additions and subtractions is O(d). Overall, building up the Hilbert series \(\mathrm{HS}_{{\mathcal {A}}}(z)\) step by step, we see that \(O\bigl (r^2\cdot \ell \bigr )\) additions are needed, where \(\ell =\max \{\ell _i\mid i=1,\ldots ,r\}\).

5 Hironaka’s construction

Using ideas of Hironaka [21, §4], one can design an algorithm for the computation of a complementary decomposition of a quasi-stable monomial ideal. Before giving the algorithm, let us first recall Hironaka’s combinatorial definitions, leading to a description of a complementary decomposition via projection operators.

Construction 28

(Hironaka’s construction) Let \({{\,\mathrm{{{\mathcal {I}}}}\,}}\trianglelefteq {\mathcal {P}}={\mathbb {K}}[x_1,\ldots ,x_n]\) be a monomial ideal and let \(k\in \{ 0,1,\ldots ,n \}\). Consider the projection

$$\begin{aligned} {{\,\mathrm{pr}}}_k:{\mathcal {T}}\rightarrow {\mathcal {T}},\;t\mapsto t|_{x_1=\cdots =x_k=1}\;. \end{aligned}$$

For \(t\in {\mathcal {T}}\), define the monomial cone \({\mathcal {C}}_k(t)={\mathcal {C}}_{\{x_1,\ldots ,x_k\}}(t)\). Finally, let \({\overline{N}}_k({{\,\mathrm{{{\mathcal {I}}}}\,}}):= {\mathcal {C}}_{\{x_{k+1}\}}({{\,\mathrm{pr}}}_{k+1}({{\,\mathrm{{{\mathcal {I}}}}\,}})\cap {\mathcal {T}}) \setminus {{\,\mathrm{pr}}}_k({{\,\mathrm{{{\mathcal {I}}}}\,}})\). Then, a complementary decomposition of the ideal \({{\,\mathrm{{{\mathcal {I}}}}\,}}\) is given by \({\mathcal {T}}\setminus {{\,\mathrm{{{\mathcal {I}}}}\,}}=\bigsqcup _{k=0}^{n-1}{\mathcal {C}}_k({\overline{N}}_{k}({{\,\mathrm{{{\mathcal {I}}}}\,}}))\), where \({\mathcal {C}}_k({\overline{N}}_{k}({{\,\mathrm{{{\mathcal {I}}}}\,}}))=\bigcup _{s\in {\overline{N}}_k({{\,\mathrm{{{\mathcal {I}}}}\,}})}{\mathcal {C}}_k(s)\).

Construction 28 works for arbitrary monomial ideals \({{\,\mathrm{{{\mathcal {I}}}}\,}}\), but the decompositions obtained by it can be infinite; more precisely, the set \(\bigcup _{k=0}^{n-1} {\overline{N}}_k({\mathcal {I}})\) can be infinite.

Example 29

Consider first the monomial ideal \({{\,\mathrm{{{\mathcal {I}}}}\,}}:=\langle x_1x_2 \rangle \trianglelefteq {\mathbb {K}}[x_1,x_2]\). Since no multiindex of class 2 is contained in \({{\,\mathrm{{{\mathcal {I}}}}\,}}\), this ideal is not quasi-stable. Observe that \({{\,\mathrm{pr}}}_1({{\,\mathrm{{{\mathcal {I}}}}\,}})\cap {\mathcal {T}}=\{x_2^\ell \mid \ell \ge 1\}\) and \({{\,\mathrm{pr}}}_2({{\,\mathrm{{{\mathcal {I}}}}\,}})\cap {\mathcal {T}}=\{ 1\}\). Hence, Hironaka’s construction yields the two sets

$$\begin{aligned} {\overline{N}}_0({{\,\mathrm{{{\mathcal {I}}}}\,}})={\mathcal {C}}_{x_1}\bigl (\{x_2^\ell \mid \ell \ge 1\}\bigr )\setminus {{\,\mathrm{{{\mathcal {I}}}}\,}}= \bigl \{x_1^k x_2^\ell \mid k\ge 0,\ell \ge 1\bigr \}\setminus {{\,\mathrm{{{\mathcal {I}}}}\,}}= \{x_2^\ell \mid \ell \ge 1\}\;,\\ {\overline{N}}_1({{\,\mathrm{{{\mathcal {I}}}}\,}})={\mathcal {C}}_{x_2}\bigl (\{1\}\bigr )\setminus {{\,\mathrm{pr}}}_1({{\,\mathrm{{{\mathcal {I}}}}\,}})= \bigl \{x_2^\ell \mid \ell \ge 0\bigr \}\setminus \bigl \{x_2^\ell \mid \ell \ge 1\bigr \}=\{1\}. \end{aligned}$$

Thus we obtain the infinite complementary decomposition

$$\begin{aligned} {\mathcal {T}}\setminus {{\,\mathrm{{{\mathcal {I}}}}\,}}=\Bigl (\bigsqcup _{n\in {\mathbb {N}}}{\mathcal {C}}_0(x_2^n)\Bigr ) \sqcup {\mathcal {C}}_1(1)\;. \end{aligned}$$

Consider now the quasi-stable ideal \({\mathcal {J}}=\langle x_1x_2,\,x_2^2 \rangle =\langle {{\,\mathrm{{{\mathcal {I}}}}\,}},\,x_2^2\rangle\). As for \({{\,\mathrm{{{\mathcal {I}}}}\,}}\), we have \({{\,\mathrm{pr}}}_1({\mathcal {J}})\cap {\mathcal {T}}=\{x_2^\ell \mid \ell \ge 1\}\) and \({{\,\mathrm{pr}}}_2({\mathcal {J}})\cap {\mathcal {T}}=\{ 1\}\), but this time Hironaka’s construction yields the two sets

$$\begin{aligned} {\overline{N}}_0({\mathcal {J}})={\mathcal {C}}_{x_1}\bigl (\{x_2^\ell \mid \ell \ge 1\}\bigr )\setminus {\mathcal {J}}=\bigl \{x_1^k x_2^\ell \mid k\ge 0,\ell \ge 1\bigr \}\setminus {\mathcal {J}}=\{x_2\}\;,\\ {\overline{N}}_1({\mathcal {J}})={\mathcal {C}}_{x_2}\bigl (\{1\}\bigr )\setminus {{\,\mathrm{pr}}}_1({\mathcal {J}})=\bigl \{x_2^\ell \mid \ell \ge 0\bigr \}\setminus \bigl \{x_2^\ell \mid \ell \ge 1\bigr \}=\{1\}\;. \end{aligned}$$

This time we obtain the finite complementary decomposition

$$\begin{aligned} {\mathcal {T}}\setminus {\mathcal {J}}={C}_0(x_2) \sqcup {\mathcal {C}}_1(1)\;. \end{aligned}$$

In the remainder of this section, we show show that those monomial ideals for which Hironaka’s construction yields a finite complementary decomposition are exactly the quasi-stable monomial ideals (or equivalently, by Proposition 7, the ideals with finite Pommaret bases).

First, we present Algorithm 5, which computes the complementary decomposition from Construction 28 given a minimal Pommaret basis as input. Recall from Remark 5 the notion of Pommaret autoreduction, which we call as a subroutine in Algorithm 5.

figure e

Proposition 30

Given the minimal Pommaret basis of a quasi-stable monomial ideal as input, Algorithm 5 terminates and its output is exactly the decomposition from Hironaka’s construction.

Proof

The algorithm obviously terminates on its input. Let \(k\in \{ 1,\ldots ,n \}\). We will show iteratively that:

  • At the start of the \(k^{th}\) iteration of the outer for loop, \({\mathcal {H}}\) is the minimal Pommaret basis of \({{\,\mathrm{pr}}}_{k-1}({{\,\mathrm{{{\mathcal {I}}}}\,}})\).

  • During this iteration of the outer for loop, exactly the cones \({\mathcal {C}}_{k-1}\bigl ({\overline{N}}_{k-1}({{\,\mathrm{{{\mathcal {I}}}}\,}})\bigr )\) from Hironaka’s decomposition of \({\overline{{{\,\mathrm{{{\mathcal {I}}}}\,}}}}\) are added to \({\mathcal {D}}\).

  • At the end of this iteration of the outer for loop, \({\mathcal {H}}\) is the minimal Pommaret basis of \({{\,\mathrm{pr}}}_{k}({{\,\mathrm{{{\mathcal {I}}}}\,}})\).

So let \(k=1\). Obviously, \({\mathcal {H}}=H\) is the minimal basis of the input ideal \({{\,\mathrm{{{\mathcal {I}}}}\,}}={{\,\mathrm{pr}}}_0({{\,\mathrm{{{\mathcal {I}}}}\,}})\) at the start of the first iteration of the outer for loop. The elements of class 1 are collected in A and the set \({{\,\mathrm{pr}}}_1(A)\) is assigned to B. Let \(x^\mu \in {{\,\mathrm{pr}}}_1({{\,\mathrm{{{\mathcal {I}}}}\,}})\) be a term in the first projection ideal. Then \(x^\mu\) is divisible by either an element of \(B={{\,\mathrm{pr}}}_1(A)\) or by an element of \({{\,\mathrm{pr}}}_1({\mathcal {H}}\setminus A)\), but not by any element of A, proving that \(({\mathcal {H}}\setminus A)\cup B\) generates \({{\,\mathrm{pr}}}_1({{\,\mathrm{{{\mathcal {I}}}}\,}})\). Let \(x^\nu \in {{\,\mathrm{{{\mathcal {I}}}}\,}}\) with \({{\,\mathrm{pr}}}_1(x^\nu )=x^\mu\); then \(x^\nu\) possesses a Pommaret divisor \(x^\rho \in {\mathcal {H}}\). One can easily show that \({{\,\mathrm{pr}}}_1(x^\rho )\) is a Pommaret divisor of \({{\,\mathrm{pr}}}_1(x^\nu )=x^\mu\). Putting things together, (\({\mathcal {H}}\setminus A)\cup B\) is a Pommaret basis of \({{\,\mathrm{pr}}}_1({{\,\mathrm{{{\mathcal {I}}}}\,}})\) and its autoreduction then yields the minimal Pommaret basis of \({{\,\mathrm{pr}}}_1({{\,\mathrm{{{\mathcal {I}}}}\,}})\). Note that, by these arguments, we have shown that \({{\,\mathrm{pr}}}_1({{\,\mathrm{{{\mathcal {I}}}}\,}})\) is quasi-stable.

Now we consider the cones that are added to \({\mathcal {D}}\) in this iteration of the loop. It is obvious that their vertices are elements of \({\mathcal {C}}_{\{1\}}({{\,\mathrm{pr}}}_1({{\,\mathrm{{{\mathcal {I}}}}\,}}))\), but not of \({{\,\mathrm{pr}}}_0({{\,\mathrm{{{\mathcal {I}}}}\,}})={{\,\mathrm{{{\mathcal {I}}}}\,}}\). So all added cones are of the form \({\mathcal {C}}_0\bigl ({\overline{N}}_0({{\,\mathrm{{{\mathcal {I}}}}\,}})\bigr )\) from Hironaka’s construction. Conversely, let \(x^\zeta \in {\overline{N}}_0({{\,\mathrm{{{\mathcal {I}}}}\,}})\). Then \(x^\zeta \notin {{\,\mathrm{{{\mathcal {I}}}}\,}}\), but there exists an exponent \(\ell >0\) such that \(x_1^\ell \cdot x^\zeta \in {{\,\mathrm{{{\mathcal {I}}}}\,}}\). For the minimal \(\ell\) with this property, we have that \(x_1^\ell x^\zeta\) is an element of the minimal Pommaret basis of the input ideal \({{\,\mathrm{{{\mathcal {I}}}}\,}}\), since otherwise \(x_1^{\ell -1}\cdot x^\zeta \in {{\,\mathrm{{{\mathcal {I}}}}\,}}\), contradicting the minimality of \(\ell\). Now, in order to see that \({\mathcal {C}}_0(x^\zeta )\) is added to \({\mathcal {D}}\) in this iteration of the loop, it only remains to be shown that \({{\,\mathrm{cls}\,}}{(x_1^\ell \cdot x^\zeta )}=1\). But this is clear, since \(\ell >0\). So, this multiindex is of class 1 and an element of the minimal Pommaret basis of the input ideal, proving that \(x^\zeta\) is a (zero-dimensional) cone added to \({\mathcal {D}}\) in this iteration of loop.

If \(k>1\), similar arguments lead to the desired result, since the for loop gets the input \({\mathcal {H}}\), which at this point of the algorithm is the minimal Pommaret basis of the quasi-stable ideal \({{\,\mathrm{pr}}}_{k-1}({{\,\mathrm{{{\mathcal {I}}}}\,}})\). \(\square\)

Example 31

We illustrate how Algorithm 5 works by applying it to the quasi-stable monomial ideal \({{\,\mathrm{{{\mathcal {I}}}}\,}}=\langle H\rangle \trianglelefteq {\mathbb {K}}[x_1,x_2,x_3]\) generated by the minimal Pommaret basis

$$\begin{aligned} H=\bigl \{ x_3^3,\,x_2^3x_3,\,x_2^3x_3^2,\,x_1x_2x_3,\ x_1x_2^2x_3,\,x_1x_2x_3^2,\,x_1x_2^2x_3^2 \bigr \}\;. \end{aligned}$$
  • In the first iteration of the outer for loop, we have

    $$\begin{aligned} A=\bigl \{ x_1x_2x_3,\,x_1x_2^2x_3,\,x_1x_2x_3^2,\,x_1x_2^2x_3^2 \bigr \}\;,\quad B=\bigl \{ x_2x_3,\,x_2^2x_3,\,x_2x_3^2,\,x_2^2x_3^2\bigr \} \end{aligned}$$

    and the cones \({\mathcal {C}}_0\bigl (\{ x_2x_3,\,x_2^2x_3,\,x_2x_3^2,\ x_2^2x_3^2\}\bigr )\) are added to \({\mathcal {D}}\). The set

    $$\begin{aligned} ({\mathcal {H}}\setminus A)\cup B= \bigl \{ x_3^3,\,x_2^3x_3,\,x_2^3x_3^2,\,x_2x_3,\,x_2^2x_3,\,x_2x_3^2,\,x_2^2x_3^2 \bigr \} \end{aligned}$$

    is involutively autoreduced to the minimal Pommaret basis \(\bigl \{ x_3^3,\,x_2x_3,\,x_2x_3^2 \bigr \}\).

  • In the second iteration of the outer for loop, we have \(A=\{ x_2x_3,\,x_2x_3^2 \}\) and \(B=\{ x_3,\,x_3^2\}\) and the cones \({\mathcal {C}}_1\bigl (\{ x_3,x_3^2 \}\bigr )\) are added to \({\mathcal {D}}\). The set \(({\mathcal {H}}\setminus A)\cup B=\{ x_3^3,\,x_3,\,x_3^2 \}\) is involutively autoreduced to the minimal Pommaret basis \(\{ x_3 \}\).

  • In the third iteration of the outer for loop, we have \(A=\{ x_3 \}\) and \(B=\{ 1 \}\). The cone \({\mathcal {C}}_2\bigl (\{ 1 \}\bigr )\) is added to \({\mathcal {D}}\). The set \(({\mathcal {H}}\setminus A)\cup B=\{ 1 \}\) is computed. (This is a general property of the algorithm: In the last instance of the outer for loop, always the set \(\{1\}\) is obtained.)

Since we can apply Algorithm 3 to a Janet basis of an arbitrary monomial ideal, it also works for quasi-stable ideals where any Janet basis is simultaneously a Pommaret basis. Moreover, since the Janet algorithm only performs a traversal of the Janet tree, it has a lower complexity than Algorithm 5 performing Pommaret autoreductions in intermediate steps. Hence, for the computation of a complementary decomposition, it is preferable to apply Algorithm 3 whenever possible. The following result states that in the considered situation the outputs of both algorithms are identical.

Theorem 32

Given the minimal Pommaret basis H of the quasi-stable ideal \({{\,\mathrm{{{\mathcal {I}}}}\,}}\) as input, Algorithms 3 and 5 produce the same output.

Proof

Choose an index \(k\in \{1,\ldots ,n\}\) and let \(x^\mu \in H\) be a term contained in the Janet class \(H_{[\mu _{k+1},\ldots ,\mu _n]}\) with \(\mu _k\) minimal. Algorithm 3 adds all cones of the form

$$\begin{aligned} \bigl (x_k^{i}\cdot (x^\mu |_{x_1=\cdots =x_k=1}),\{ 1,\ldots ,k-1 \}\bigr ) \end{aligned}$$

with \(i\in \{0,\ldots ,\mu _k-1\}\) to \({\mathcal {D}}\). If we can show that Algorithm 5 does the same, then we are done: under this assumption, the algorithm adds at least all cones to the complementary decomposition which are found by Algorithm 3, but then, by the disjointness of such decompositions, it cannot add any additional cones, meaning the decomposition produced by Algorithm 5 is exactly the same as the decomposition found by Algorithm 3. Moreover, we may assume that \(\mu _k>0\), since if \(\mu _k=0\), then \(x^\mu\) does not contribute any monomial cones to \({\mathcal {D}}\) during Algorithm 3.

Define \({{\,\mathrm{{{\mathcal {I}}}}\,}}_q\) as the ideal generated by \({\mathcal {H}}\) at the very end of the \(q^{th}\) iteration of the outer for loop of Algorithm 3. Certainly, \(t_{\mu }:=x^\mu |_{x_1=\cdots =x_{k-1}=1}\in {{\,\mathrm{{{\mathcal {I}}}}\,}}_{k-1}\). We need to show that no strict Pommaret divisor of \(t_{\mu }\) is in \({{\,\mathrm{{{\mathcal {I}}}}\,}}_{k-1}\), since if this is the case, then \(t_{\mu }\) belongs to \({\mathcal {H}}\) also at the beginning of the \(k^{th}\) iteration of the outer for loop of Algorithm 3 (that is, after Pommaret autoreduction) applied to H, and the desired monomial cones are then added to \({\mathcal {D}}\) in this loop iteration.

So let us suppose \(t_\nu :=x_k^{\nu _k}x_{k+1}^{\nu _{k+1}}\cdots x_n^{\nu _n}\in {\mathcal {H}}\) with \(\nu _k<\mu _k\) and \(t_{\nu }\mid _{P}t_{\mu }\). Observe that if \(s>0\), then \(t_{\nu }|_{x_k=1}=t_{\mu }|_{x_k=1}\). Let \(x^\rho \in {\mathbb {K}}[x_1,\ldots ,x_{k-1}]\) be a term such that \(x^\nu :=x^\rho \cdot t_{\nu }\in H\) — such a term must exist, because in order to construct \({{\,\mathrm{{{\mathcal {I}}}}\,}}_{k-1}\) during Algorithm 3, coming from elements of H, one only divides out powers of the first \(k-1\) variables or leaves out some superfluous terms during autoreductions. We must distinguish several cases:

  • \({{\,\mathrm{cls}\,}}(x^\nu )\ge k\): This case cannot occur, since \(x^\nu\) would be a strict Pommaret divisor of \(x^\mu\) in this case: \(x^\rho =1\) and \(x^\nu =t_{\nu }\mid _{P}t_{\mu }\mid _{P}x^\mu\). This is a contradiction to \(x^\mu \in H\).

  • \({{\,\mathrm{cls}\,}}(x^\nu )< k\) and \(\nu _k>0\): Then \(x^\nu\) is in the Janet class \(H_{[\mu _{k+1},\ldots ,\mu _n]}\) and \(\nu _k<\mu _k\), a contradiction to the minimality of \(\mu _k\).

  • \({{\,\mathrm{cls}\,}}(x^\nu )< k\) and \(\nu _k=0\): If also \(t_{\nu }|_{x_k=1}=t_{\mu }|_{x_k=1}\), then \(x^\nu\) is in the Janet class \(H_{[d_{k+1},\ldots ,d_n]}\) and \(\nu _k=0\), which is a contradiction to the minimality of \(\mu _k\) (recall that \(\mu _k>0\)). If \(t_{\nu }|_{x_k=1}\ne t_{\mu }|_{x_k=1}\), then the nontrivial Pommaret-nonmultiplicative prolongation \(x^\rho \cdot (t_{\mu }|_{x_k=1})\) of \(x^\nu\) possesses a unique Pommaret divisor \(x^\tau\) in H. If \({{\,\mathrm{cls}\,}}(x^\tau )<k\), then \(x^\tau\) is in the Janet class \(H_{[\mu _{k+1},\ldots ,\mu _n]}\) and \(\tau _k=0\), again a contradiction to the minimality of \(\mu _k\). And finally, \({{\,\mathrm{cls}\,}}(x^\tau )\ge k\) cannot occur, since then \(x^\tau\) would be a proper Pommaret divisor of \(x^\mu\), impossible because of the Pommaret autoreducedness of H. \(\square\)

\(\square\)

Example 33

Consider, as in Example 31, the quasi-stable ideal \({{\,\mathrm{{{\mathcal {I}}}}\,}}=\langle x_3^3,\,x_2^3x_3\,,x_1x_2x_3\rangle\). We follow the steps of Algorithm 3 for \({{\,\mathrm{{{\mathcal {I}}}}\,}}\) to see that it produces indeed the same output as Algorithm 5. Note that \({{\,\mathrm{{{\mathcal {I}}}}\,}}\) has the minimal Janet (and Pommaret) basis

$$\begin{aligned} H=\bigl \{ x_3^3,\,x_2^3x_3,\,x_2^3x_3^2,\,x_1x_2x_3,\ x_1x_2^2x_3,\,x_1x_2x_3^2,\,x_1x_2^2x_3^2 \}\;. \end{aligned}$$
  • For \(k=3\), we have the non-empty Janet class \(H_{[]}=H\) at level \(k+1=4\). It corresponds to the root of the Janet tree and its leftmost child node is \((x_3,\emptyset )\). We add the cone \(\bigl (1,\{x_1,x_2\}\bigr )\) to \({\mathcal {D}}\).

  • For \(k=2\), we have the non-empty Janet classes \(H_{[3]},\,H_{[2]},\,H_{[1]}\) at level \(k+1=3\) and their left-most child nodes are \(\bigl (x_3^3,\{x_3\}\bigr )\), \((x_2x_3^2,\emptyset )\), and \((x_2x_3,\emptyset )\). For the first node, no cone is added, since the \(x_2\)-degree of its first entry is zero. The two cones that are added are \(\bigl (x_3^2,\{x_1\}\bigr )\) and \(\bigl (x_3,\{x_1\}\bigr )\).

  • For \(k=1\), we have the non-empty Janet classes

    $$\begin{aligned} H_{[0,3]},\,H_{[3,1]},\,H_{[3,2]},\,H_{[1,1]},\,H_{[2,1]},\ H_{[1,2]},\,H_{[2,2]} \end{aligned}$$

    at level \(k+1=2\). Only the last four classes yield leftmost child nodes that contribute cones to \({\mathcal {D}}\), namely \(\bigl (x_1x_2x_3,\{x_1\}\bigr )\), \(\bigl (x_1x_2^2x_3,\{x_1\}\bigr )\), \(\bigl (x_1x_2x_3^2,\{x_1\}\bigr )\) and \(\bigl (x_1x_2^2x_3^2,\{x_1\}\bigr )\). The added cones are, accordingly,

    $$\begin{aligned} (x_2x_3,\emptyset ), (x_2^2x_3,\emptyset ), (x_2x_3^2,\emptyset ), (x_2^2x_3^2,\emptyset )\;. \end{aligned}$$

Remark 34

As just mentioned, Algorithms 3 and 5 produce the same number of cones (see Theorem 20). However, since in the latter algorithm we apply a Pommaret autoreduction procedure, its complexity is not easily determined.

Proposition 35

Let \({{\,\mathrm{{{\mathcal {I}}}}\,}}\) be a monomial ideal. Hironaka’s construction yields a finite complementary decomposition of \({{\,\mathrm{{{\mathcal {I}}}}\,}}\), if and only if \({{\,\mathrm{{{\mathcal {I}}}}\,}}\) possesses a finite Pommaret basis.

Proof

If \({{\,\mathrm{{{\mathcal {I}}}}\,}}\) is quasi-stable, then Hironaka’s construction is realised by Algorithm 5, which obviously yields a finite output. The correctness proof of the algorithm (see Proposition 30) then finishes this direction of the proof.

If Hironaka’s construction applied to \({{\,\mathrm{{{\mathcal {I}}}}\,}}\) yields a finite decomposition, then it is a complementary decomposition of \({{\,\mathrm{{{\mathcal {I}}}}\,}}\) of the form

$$\begin{aligned} {\mathcal {T}}\setminus {{\,\mathrm{{{\mathcal {I}}}}\,}}= \bigsqcup _{k=0}^{n-1}{\mathcal {C}}_k\bigl ({\overline{N}}_{k}({{\,\mathrm{{{\mathcal {I}}}}\,}})\bigr ). \end{aligned}$$
(7)

Define the set \(H:=\bigcup _{k=0}^{n-1} \Bigl (\bigcup _{\ell >k}\bigl ( x_{\ell }\cdot {\overline{N}}_k({{\,\mathrm{{{\mathcal {I}}}}\,}}) \bigr )\Bigr )\cap {{\,\mathrm{{{\mathcal {I}}}}\,}}\subset {{\,\mathrm{{{\mathcal {I}}}}\,}}\). This set is obviously finite. We will now show that it is a Pommaret basis of \({{\,\mathrm{{{\mathcal {I}}}}\,}}\).

Let \(t\in {\mathcal {T}}\cap {{\,\mathrm{{{\mathcal {I}}}}\,}}\) be an arbitrary term in \({{\,\mathrm{{{\mathcal {I}}}}\,}}\) and set \(a:={{\,\mathrm{cls}\,}}{(t)}\). There is a minimal integer \(\ell \in \{a,a +1,\ldots , n\}\) such that \({{\,\mathrm{pr}}}_\ell (t)\notin {{\,\mathrm{{{\mathcal {I}}}}\,}}\) (assume \({{\,\mathrm{{{\mathcal {I}}}}\,}}\ne {\mathcal {P}}\); if \({{\,\mathrm{{{\mathcal {I}}}}\,}}={\mathcal {P}}\), then it is obviously quasi-stable) . Since \({{\,\mathrm{pr}}}_{\ell -1}(t)\in {{\,\mathrm{{{\mathcal {I}}}}\,}}\), there is an integer d with \(0\le d< \deg _{\ell }{(t)}\) such that \(s:=x_{\ell }^{d}{{\,\mathrm{pr}}}_{\ell }(t)\notin {{\,\mathrm{{{\mathcal {I}}}}\,}}\) and \(x_{\ell }\cdot s=x_{\ell }^{d+1}{{\,\mathrm{pr}}}_{\ell }(t)\in {{\,\mathrm{{{\mathcal {I}}}}\,}}\). We claim that there is an integer \(k\le \ell\) such that \(s\in {\overline{N}}_k({{\,\mathrm{{{\mathcal {I}}}}\,}})\).

Since \(s\notin {{\,\mathrm{{{\mathcal {I}}}}\,}}\), there is some integer \(b\in \{0,1,\ldots ,n-1\}\) and a term \(u\in {\overline{N}}_b({{\,\mathrm{{{\mathcal {I}}}}\,}})\) such that \(s\in {\mathcal {C}}_b(u)\) by equality (7). If \(b\le \ell\), then obviously \(u=s\) and \(s\in {\overline{N}}_b({{\,\mathrm{{{\mathcal {I}}}}\,}})\), and setting \(k:=b\) yields the claim. Otherwise, \(b> \ell\). From definition of \({\overline{N}}_b({{\,\mathrm{{{\mathcal {I}}}}\,}})\), we know that \(u\notin {{\,\mathrm{pr}}}_b({{\,\mathrm{{{\mathcal {I}}}}\,}})\), but \(u\in {\mathcal {C}}_{\{b+1\}}({{\,\mathrm{pr}}}_{b+1}({{\,\mathrm{{{\mathcal {I}}}}\,}}))\). In particular, \({{\,\mathrm{cls}\,}}(u)\ge b +1\). By definition of u, we must also have \(\deg _{r}(u)=\deg _r(s)\) for all \(r\ge b+1\). But now it is clear that u is exactly \({{\,\mathrm{pr}}}_{b}(s)\), and since \(s=x_{\ell }^{d}{{\,\mathrm{pr}}}_{\ell }(t)\), we then have \(u={{\,\mathrm{pr}}}_{b}(s)={{\,\mathrm{pr}}}_{b}\bigl (x_{\ell }^{d}{{\,\mathrm{pr}}}_{\ell }(t\bigr ))= {{\,\mathrm{pr}}}_{b}(t)\), contradicting \(u\notin {{\,\mathrm{pr}}}_{b}({{\,\mathrm{{{\mathcal {I}}}}\,}})\). Thus we have proven the claim.

Now, obviously \(x_{\ell }s=x_{\ell }^{d+1}{{\,\mathrm{pr}}}_{\ell }(t)\in H\) is a Pommaret divisor of t. Since t was an arbitrary element of \({{\,\mathrm{{{\mathcal {I}}}}\,}}\), this observation finally proves that H is a finite Pommaret basis of \({{\,\mathrm{{{\mathcal {I}}}}\,}}\) and we are done. \(\square\)

6 Primary and irreducible decompositions

The cone decompositions of the complements of monomial ideals that we have studied so far are not the only way in which one can decompose such a complement. Primary and irreducible decompositions of monomial ideals are representations of such an ideal as the intersection of associated ideals with an easier structure. Dually, they can be interpreted as a representation of the complement of the decomposed ideal as a union of the complements of ideals that are easier to study. In this section, we review the definitions of these different types of decompositions, study how they are related to each other and finally give an algorithm to compute minimal primary decompositions of quasi-stable ideals using Pommaret bases.

Remark 36

A monomial ideal \({{\,\mathrm{{{\mathcal {I}}}}\,}}\trianglelefteq {\mathcal {P}}\) is prime if and only if it can be generated by a set of variables. A monomial ideal \({\mathcal {Q}}\) is primary to \({{\,\mathrm{{{\mathcal {I}}}}\,}}=\langle x_{i_1},\ldots ,x_{i_r}\rangle\), if and only if it has a generating set that only depends on the variables generating \({{\,\mathrm{{{\mathcal {I}}}}\,}}\) and that contains for each \(x_{i_j}\) a pure power \(x_{i_j}^{k_j}\). The associated primes of a monomial ideal are again monomial ideals. A primary decomposition of a monomial ideal \({{\,\mathrm{{{\mathcal {I}}}}\,}}\) is a representation \({\mathcal {I}}={\mathcal {Q}}_1\cap \cdots \cap {\mathcal {Q}}_k\) with each \({\mathcal {Q}}_\ell\) a primary monomial ideal. Such a decomposition is called minimal, if the associated primes \(\sqrt{{\mathcal {Q}}_\ell }\) are pairwise different and none of the \({\mathcal {Q}}_\ell\) can be omitted in the representation.

Definition 37

A monomial ideal \({\mathcal {Q}}\trianglelefteq {\mathcal {P}}\) is called irreducible, if there is a term \(x^\mu \in {\mathcal {T}}\) such that \({\mathcal {Q}}=\langle x_i^{\mu _i}\mid 1\le i\le n,\ \mu _i>0 \rangle\). An irreducible decomposition of a monomial ideal \({{\,\mathrm{{{\mathcal {I}}}}\,}}\trianglelefteq {\mathcal {P}}\) is a decomposition \({{\,\mathrm{{{\mathcal {I}}}}\,}}={\mathcal {Q}}_1\cap \cdots \cap {\mathcal {Q}}_k\) of \({{\,\mathrm{{{\mathcal {I}}}}\,}}\) into irreducible monomial ideals \({\mathcal {Q}}_1,\ldots ,{\mathcal {Q}}_k\). Such a decomposition is called irredundant, if none of the ideals \({\mathcal {Q}}_\ell\) can be omitted in the decomposition.

Remark 38

Since irreducible monomial ideals are obviously primary, it is clear that one can obtain a minimal primary decomposition from an irredundant irreducible decomposition by simply collecting, for each appearing prime, the irreducible components primary to it. Hence, irreducible decompositions can be regarded as being finer than primary ones. In turn, if an irredundant irreducible decomposition \({{\,\mathrm{{{\mathcal {I}}}}\,}}={\mathcal {Q}}_1\cap \cdots \cap {\mathcal {Q}}_k\) of the monomial ideal \({{\,\mathrm{{{\mathcal {I}}}}\,}}\) is known, then obviously \({\mathcal {T}}\setminus {{\,\mathrm{{{\mathcal {I}}}}\,}}=({\mathcal {T}}\setminus {\mathcal {Q}}_1)\cup \cdots \cup ({\mathcal {T}}\setminus {\mathcal {Q}}_k)\) provides a decomposition of the complement of \({{\,\mathrm{{{\mathcal {I}}}}\,}}\) into sets which are easy to describe. A term \(x^\nu\) is in the complement \({\mathcal {T}}\setminus {\mathcal {Q}}\) of a monomial irreducible ideal \({\mathcal {Q}}\), if and only if \(\nu _i<\mu _i\) for each variable \(x_i\) dividing the term \(x^\mu\) describing \({\mathcal {Q}}\). This decomposition is of course not disjoint, unless \({{\,\mathrm{{{\mathcal {I}}}}\,}}\) is itself irreducible. Since cone decompositions are disjoint, they can be regarded as an even finer type of decomposition than the irreducible ones.

We now present a way of obtaining irreducible decompositions from cone decompositions. The key point is the following lemma.

Lemma 39

Let \({{\,\mathrm{{{\mathcal {I}}}}\,}}\trianglelefteq {\mathcal {P}}\) be a monomial ideal and \(\{(t,X_{t})\mid t\in U\}\) a complementary cone decomposition of it, where \(U\subseteq {\mathcal {T}}\setminus {{\,\mathrm{{{\mathcal {I}}}}\,}}\) is some subset. Then a (generally redundant) irreducible decomposition of \({{\,\mathrm{{{\mathcal {I}}}}\,}}\) is given by:

$$\begin{aligned} {{\,\mathrm{{{\mathcal {I}}}}\,}}=\bigcap _{t\in U} \langle x_i^{\mu _i+1}\mid t=x^\mu , x_i\notin X_{t} \rangle \;. \end{aligned}$$
(8)

Proof

We show the equivalent statement

$$\begin{aligned} {\mathcal {T}}\setminus {{\,\mathrm{{{\mathcal {I}}}}\,}}= \bigcup _{t\in U}\bigl ({\mathcal {T}}\setminus \langle x_i^{\mu _i+1}\mid t=x^\mu , x_i\notin X_{t} \rangle \bigr )\;. \end{aligned}$$
(9)

First, let \(x^\nu \notin {{\,\mathrm{{{\mathcal {I}}}}\,}}\) be a term from the complement. Since \(\{(t,X_t)\mid t\in U\}\) decomposes \({\mathcal {T}}\setminus {{\,\mathrm{{{\mathcal {I}}}}\,}}\), there is a term \(t=x^\mu \in U\) and a term \(x^\rho \in {\mathbb {K}}[X_t]\) such that \(x^\nu =x^\mu x^\rho\). This implies, for each variable \(x_i\notin X_t\), \(\nu _i\le \mu _i\), and hence \(x^\nu \notin \langle x_i^{\mu _i+1}\mid x_i\notin X_t \rangle\). Thus, the inclusion \(\subseteq\) in (9) follows.

Now, let \(t=x^\mu \in U\) be a term appearing in the cone decomposition of \({\mathcal {T}}\setminus {{\,\mathrm{{{\mathcal {I}}}}\,}}\) and let \(x^\nu \notin \langle x_i^{\mu _i+1}\mid x_i\notin X_t \rangle\). An immediate consequence are the inequalities \(\nu _i\le \mu _i\) for each index i with \(x_i\notin X_t\). Moreover, multiplying with powers of the variables from \(X_t\), we find a term \(tx^{\rho }\in t{\mathbb {K}}[X_t]\) such that \(x^{\nu }\) divides \(t x^\rho\). Observe that \(t x^\rho \notin {{\,\mathrm{{{\mathcal {I}}}}\,}}\) and hence also \(x^\nu \notin {{\,\mathrm{{{\mathcal {I}}}}\,}}\). This proves the inclusion \(\supseteq\) in (9), finishing the proof. \(\square\)

Once we have obtained an irreducible decomposition, we can always extract an irredundant decomposition by discarding redundant components. Note that, if the irreducible ideals \({\mathcal {Q}}_\mu ,{\mathcal {Q}}_\nu\) with \(\sqrt{{\mathcal {Q}}_\mu }=\sqrt{{\mathcal {Q}}_\nu }\) are described by the terms \(x^\mu ,x^\nu\), then \({\mathcal {Q}}_\mu \subseteq {\mathcal {Q}}_\nu\) if and only if \(x^\nu\) divides \(x^\mu\). In this case we can discard the larger one, \({\mathcal {Q}}_\nu\). This means we have to keep those components \({\mathcal {Q}}_\mu\) with \(x^\mu\) maximal with respect to the partial order of divisibility. This amounts to a form of monomial autoreduction. It is desirable to be able to detect a number of redundant components already from the structure of the cone decomposition. This can be done via Janet-like bases.

Proposition 40

Let \(U\subseteq {\mathcal {T}}\) be the minimal Janet-like basis of the monomial ideal \({{\,\mathrm{{{\mathcal {I}}}}\,}}=\langle U\rangle \trianglelefteq {\mathcal {P}}\). Let the partial multiindex \(M=[\mu _k,\ldots ,\mu _n]\) belong to a minimal node in the Janet-like tree of V induced by the term \(x^\mu \in U\) and contributing cones to the complementary decomposition of \({{\,\mathrm{{{\mathcal {I}}}}\,}}\). Then at most one of the cones belonging to M leads to an irredundant component in the irreducible decomposition of \({{\,\mathrm{{{\mathcal {I}}}}\,}}\). This component is given by the irreducible ideal

$$\begin{aligned} {\mathcal {Q}}=\bigl \langle x_k^{\mu _k} \bigr \rangle + \bigl \langle x_\ell ^{\mu _\ell +b_\ell }\mid \ell >k\wedge x_\ell ^{b_\ell }\in {{\,\mathrm{NMP}\,}}(x^{\mu },U) \bigr \rangle \;. \end{aligned}$$
(10)

Proof

By Corollary 25, the cones contributed to the complementary decomposition by the partial multiindex M all have the same set of multiplicative variables. Moreover, they are supported on terms of the form \(x_k^{i}x_{k+1}^{\mu _{k+1}+a_{k+1}}\cdots x_{n}^{\mu _n+a_n}\) with \(1\le i<\mu _k\) and \(x_{k+1}^{a_{k+1}}\cdots x_n^{a_n}| \prod _{x_\ell ^{b\ell }\in {{\,\mathrm{NMP}\,}}(x^\mu ,U)} x_\ell ^{b_\ell -1}\). Among them, there is only one term which is maximal with respect to divisibility, namely

$$\begin{aligned} x_{k}^{\mu _k-1}x_{k+1}^{\mu _{k+1}}\cdots x_n^{\mu _n}\cdot \prod _{\ell >k, x_{\ell }^{b_\ell }\in {{\,\mathrm{NMP}\,}}(x^\mu ,U)} x_\ell ^{b_{\ell }-1}\;. \end{aligned}$$

Hence, applying Lemma 39, we are done.\(\square\)

Remark 41

The algorithm for the computation of irreducible decompositions implied by Proposition 40 can be seen to be largely equivalent to an algorithm developed by Gao and Zhu [13, Alg. 1]. There, also tree structures of monomial bases are exploited. While the authors report good performance for highly non-generic monomial ideals [13, Sect. 7], their algorithm is not the fastest available. Roune’s slice algorithm [27, 28] shows overall better performance. However, his algorithm contains Gao and Zhu’s approach as a special case for some choices of splitting strategies [27, Sect. 5.2]. For another approach to the computation of irreducible decompositions via corner sets see [5].

With the results of the present paper in mind, it is not surprising that algorithms specialised to computing the irreducible decomposition will show better performance than algorithms based on tree structures or Janet-like bases, because these give not only irreducible decompositions but also the finer disjoint complementary decompositions and hence compute more information.

Example 42

Let us revisit the ideal of Examples 31 and 33 and compute an irredundant irreducible decomposition for it. One can easily check that \(U=\{x_1^2 x_2 x_3,\,x_2^3 x_3,\,x_3^3\}\) is already the minimal Janet-like basis of the ideal \({{\,\mathrm{{{\mathcal {I}}}}\,}}=\langle U\rangle\). The minimal nodes in the Janet tree are given by the partial multiindices [1], [1, 1], and [2, 1, 1]. These are all induced by \(x^\mu =x_1^2 x_2 x_3\in U\) with \({{\,\mathrm{NMP}\,}}(x^{\mu },U)=\{x_2^2,\,x_3^2\}\). Applying Proposition 40, we get the candidates \({\mathcal {J}}_1=\langle x_3 \rangle\), \({\mathcal {J}}_2=\langle x_2,\,x_3^3 \rangle\), and \({\mathcal {J}}_3=\langle x_1^2,\,x_2^3,\,x_3^3 \rangle\) for components of the irreducible decomposition. Their associated primes are pairwise different, so the decomposition cannot be reduced any further and we are done: \({{\,\mathrm{{{\mathcal {I}}}}\,}}= {\mathcal {J}}_1 \cap {\mathcal {J}}_2 \cap {\mathcal {J}}_3\) is the desired irredundant irreducible decomposition.

We now specialise to quasi-stable monomial ideals. If we want to compute minimal primary decompositions for them, we can apply an extended version of Algorithm 5, which not only gives such a decomposition, but also Pommaret bases for each component, thus also proving that the components are quasi-stable, too.

Remark 43

From the operations performed during the first iteration of the for loop in Algorithm 5, it is immediately clear that after it, \({\mathcal {H}}\) is the minimal Pommaret basis of the saturation \({{\,\mathrm{{{\mathcal {I}}}}\,}}:\langle x_1\rangle ^\infty\). By one of the many equivalent characterisations of quasi-stable ideals, see e.g. [30, Prop.  5.3.4(iii)], we know that for \({{\,\mathrm{{{\mathcal {I}}}}\,}}\) the chain of inclusions

$$\begin{aligned} {{\,\mathrm{{{\mathcal {I}}}}\,}}:\langle x_1\rangle ^\infty \subseteq {{\,\mathrm{{{\mathcal {I}}}}\,}}:\langle x_2\rangle ^\infty \subseteq \cdots \subseteq {{\,\mathrm{{{\mathcal {I}}}}\,}}:\langle x_n\rangle ^\infty \end{aligned}$$
(11)

holds. From it and by a well-known property of ideal quotients, we get for any \(1\le i<n\) the inclusions \(({{\,\mathrm{{{\mathcal {I}}}}\,}}:\langle x_i\rangle ^\infty ):\langle x_{i+1}\rangle ^\infty \subseteq {{\,\mathrm{{{\mathcal {I}}}}\,}}:\langle x_{i+1}\rangle ^\infty\). Since the saturations on the left hand side commute, we even get an equality. Hence Algorithm 5 computes in the kth iteration of its for loop a Pommaret basis of the saturation \({{\,\mathrm{{{\mathcal {I}}}}\,}}:\langle x_k\rangle ^\infty\).

Now, let d be the smallest class of a term in the Pommaret basis H of \({{\,\mathrm{{{\mathcal {I}}}}\,}}\) and let D be maximal among the indices j such that no pure power \(x_j^{p_j}\) appears in H and for \(d\le j \le D\) let \(s_j\) be the maximal exponent of the variable \(x_j\) appearing in any term of H. Then, by [30, Prop. 5.3.9], a minimal primary decomposition of \({{\,\mathrm{{{\mathcal {I}}}}\,}}\) is given by

$$\begin{aligned} \bigcap _{\begin{array}{c} d\le j\le D\\ j\in Q \end{array}} {\mathcal {Q}}_j\;, \end{aligned}$$

where \(Q\subseteq \{d,d+1,\ldots ,D\}\) is the subset of those indices \(1\le j\le n\) for which we have a proper inclusion \({{\,\mathrm{{{\mathcal {I}}}}\,}}:\langle x_j\rangle ^\infty \subsetneq {{\,\mathrm{{{\mathcal {I}}}}\,}}:\langle x_{j+1}\rangle ^\infty\) and where \({\mathcal {Q}}_j={{\,\mathrm{{{\mathcal {I}}}}\,}}:\langle x_j\rangle ^\infty + \langle x_{j+1}^{s_{j+1}},\,x_{j+2}^{s_{j+2}},\ldots ,\, x_D^{s_D} \rangle\). Note that \({\mathcal {Q}}_j\) is a \(\langle x_{j+1},x_{j+2},\ldots ,x_n \rangle\)-primary ideal.

To test the condition \({{\,\mathrm{{{\mathcal {I}}}}\,}}:\langle x_{j-1}\rangle ^\infty \subsetneq {{\,\mathrm{{{\mathcal {I}}}}\,}}:\langle x_{j}\rangle ^\infty\) in Algorithm 5, we note that it is equivalent to the condition that at least one term of class j appears in the Pommaret basis of \({{\,\mathrm{{{\mathcal {I}}}}\,}}:\langle x_{j-1}\rangle ^\infty\). This means that in the current iteration the set \(C\ne \emptyset\) is not empty. Whenever this condition is satisfied, we can add the primary ideal \(\langle {\mathcal {H}}, x_j^{s_j},\,x_{j+1}^{s_{j+1}},\ldots ,\,x_D^{s_D} \rangle\) to the primary decomposition to be computed. For a concrete computation, see Example 44.

From Remark 43, we get Algorithm 6, an adapted version of Algorithm 5, which computes a minimal primary decomposition for a quasi-stable monomial ideal, instead of a complementary decomposition.

figure f

Example 44

Consider, as in Example 31, the quasi-stable ideal \({{\,\mathrm{{{\mathcal {I}}}}\,}}=\langle x_3^3,\, x_2^3x_3,\, x_1x_2x_3\rangle\). Note that \({{\,\mathrm{{{\mathcal {I}}}}\,}}\) has the minimal Pommaret basis

$$\begin{aligned} H=\{ x_3^3,\, x_2^3x_3,\, x_2^3x_3^2,\, x_1x_2x_3,\, x_1x_2^2x_3,\, x_1x_2x_3^2,\, x_1x_2^2x_3^2 \}\;. \end{aligned}$$

We show how to obtain a minimal primary decomposition of this ideal using the computations performed in Algorithm 5. We use the arguments described in Remark 43. First, note that 1 is the least class of an element of H and 2 is the maximal index such that no pure power of its corresponding variable appears in H. We have the maximal exponents \(s_1=1\) and \(s_2=3\). Since there is a term of class 1 in H, already in the first loop iteration we need to add \(\langle H,\,x_1,\,x_2^3\rangle =\langle x_1,\,x_2^3,\,x_3^3\rangle\) to the minimal primary decomposition. The minimal Pommaret basis of the saturation \({{\,\mathrm{{{\mathcal {I}}}}\,}}:\langle x_1\rangle ^{\infty }\) is computed as \(H_1=\{ x_3^3,\,x_2x_3,\,x_2x_3^2 \}\) (cf. Example 31). It has a term of class 2. Hence, we need to add \(\langle H_1,\,x_2^3\rangle =\langle x_2^3,\,x_2x_3,\,x_2x_3^2,\,x_3^3 \rangle\) to the minimal primary decomposition as a new component. The minimal Pommaret basis of the saturation \({{\,\mathrm{{{\mathcal {I}}}}\,}}:\langle x_2\rangle ^\infty\) is computed as \(H_2=\{ x_3 \}\) (cf. again Example 31). It has a term of class 3 and hence we must add \(\langle H_2\rangle =\langle x_3\rangle\) as a third component to the minimal primary decomposition. The algorithm stops after this loop iteration. Hence, all in all, we obtain the minimal primary decomposition \({{\,\mathrm{{{\mathcal {I}}}}\,}}=\langle x_1,\,x_2^3,\,x_3^3 \rangle \cap \langle x_2^3,\,x_2x_3,\,x_2x_3^2,\,x_3^3 \rangle \cap \langle x_3 \rangle\).

Example 45

Consider the quasi-stable ideal \({{\,\mathrm{{{\mathcal {I}}}}\,}}=\langle x_1x_3,\,x_2x_3,\,x_3^2 \rangle \trianglelefteq {\mathbb {K}}[x_1,x_2,x_3]\). We compute a minimal primary decomposition of \({{\,\mathrm{{{\mathcal {I}}}}\,}}\) using Algorithm 5 and Remark 43. Note first that \({{\,\mathrm{{{\mathcal {I}}}}\,}}\) is already given by its minimal Pommaret basis \(H=\{x_1x_3,\,x_2x_3,\,x_3^2 \}\). There is a term of class 1 in H, so \(d=1\), and the maximal index j such that no pure \(x_j\)-power appears in H is \(D=2\). Moreover, we have the maximal degrees \(s_1=1\) for \(x_1\) and \(s_2=1\) for \(x_2\). Since there is a term of class 1, we must immediately add the primary ideal \(\langle H,\,x_1^{s_1},\,x_2^{s_2} \rangle =\langle x_1,\,x_2,\,x_3^2 \rangle\) as a first component to the primary decomposition. Algorithm 5 now computes the minimal Pommaret basis \(H_1=\{ x_3 \}\) of \({{\,\mathrm{{{\mathcal {I}}}}\,}}:\langle x_1\rangle ^\infty\). There is no term of class 2 in \(H_1\), so no component is added to the primary decomposition in this loop iteration. In the next iteration, simply \(\langle x_3\rangle\) is added and the algorithm terminates. Thus, we get the minimal primary decomposition \({{\,\mathrm{{{\mathcal {I}}}}\,}}=\langle x_1,\,x_2,\,x_3^2 \rangle \cap \langle x_3\rangle\), in which no \(\langle x_2,\,x_3\rangle\)-primary ideal appears.

7 Conclusions

In [34, pp. 23], Vasconcelos called complementary decomposition an approach that is not greatly useful computationally but it is often nice theoretically. We believe that the first part of his assessment is not really correct. Involutive bases have proven to be a very useful computational tool for many purposes and the key idea underlying both their theory and their algorithmics are combinatorial decompositions. The simplest application is that because of these induced decompositions one can straightforwardly read off Hilbert function and polynomial of the ideal generated by an involutive basis. But also deeper applications like the existence of an induced free resolution with a special structure (see e.g. [1,2,3] and references therein) rely strongly on these disjoint decompositions.

In this work, we discussed and compared different approaches to complementary decompositions proposed in the literature, in particular with respect to their complexity. It turned out that the oldest approach, namely the one presented by Janet almost 100 years ago, is the most efficient one, in particular in the novel optimised form based on Janet-like bases presented here. As already remarked above, the presented complexity of the algorithms using Janet(-like) bases includes and is dominated by the cost for computing the basis; the decomposition itself requires essentially only the operations needed to write it down. We considered here only monomial ideals. In actual applications, these typically arise as the leading ideals of polynomial ideals and either a Gröbner or a Janet(-like) basis is used to determine them. In this case, the advantage of Janet’s approach is even more pronounced.

When Gerdt and Blinkov [19, 20] introduced Janet-like bases, they were mainly concerned with the algorithmic advantages of this “condensed” form of Janet bases. But they also noted that it is possible to read off Hilbert function and polynomial directly from a Janet-like basis. However, they did not use a complementary decomposition, but instead computed the Hilbert function as the difference of the volume functions of the full polynomial ring and the ideal, respectively (this approach is applicable for any involutive basis, as one needs only a cone decomposition of the ideal itself). Furthermore, they did not use any compressed form, but provided for the volume function of the ideal a sum containing as many summands as the Janet basis obtained by expanding the Janet-like basis contains elements. Thus strictly speaking, they did not really use the Janet-like basis, but derived exactly the same expression one obtains from the Janet basis. By contrast, our Proposition 27 is based on a compressed complementary decomposition and the expression for the Hilbert function given there contains generally much less summands than the one by Gerdt and Blinkov. Although it is not completely explicit, we have shown that it can be evaluated very efficiently.

We did not consider specifically Rees decompositions [24], i. e. decompositions where the sets of the multiplicative variables are always of the form \(\{x_{1},x_{2},\ldots ,x_{k}\}\) for some index k depending on the vertex of the cone, which are of interest for some theoretical applications. Their construction requires some generic choices and an expensive algorithm was presented by Sturmfels and White [33]. Bayer [6] studied already earlier complementary Rees decompositions for the special case of Borel ideals under the name wild card partition. It is much simpler to obtain such decompositions directly from a Pommaret basis using Janet’s algorithm (the generic choices appear then in the construction of the Pommaret basis); a direct comparison with the algorithm of Sturmfels and White can be found in an appendix of [29]. We also mention that a rather redundant Rees decomposition can be immediately written down in closed form from any Pommaret basis [30, Prop. 5.1.6]. However, the decompositions obtained by Janet’s algorithm contain usually much less cones.

Our results on Hironaka’s construction are mainly of theoretical interest. First of all, they clarify the meaning of his genericity condition (called Hironaka’s box condition in [4] where it plays an important role). By Proposition 35, the construction yields a finite decomposition only for ideals from a well-known class, namely for quasi-stable ideals. This observation shows again that Hironaka worked implicitly frequently with Pommaret bases. Then Theorem 32 shows that Janet’s algorithm produces for such ideals the same result as Hironaka’s construction, but typically much more efficiently. However, as we discussed in the last section, Hironaka’s construction actually provides more than just a complementary decomposition. Using Algorithm 6, a slight extension of Hironaka’s construction, it determines as “by-product” Pommaret bases of the chain of saturations associated with any quasi-stable ideal and this chain contains all information required to write down an irreducible primary decomposition of the ideal.