Complementary decompositions of monomial ideals and involutive bases

Complementary decompositions of monomial ideals—also known as Stanley decompositions—play an important role in many places in commutative algebra. In this article, we discuss and compare several algorithms for their computation. This includes a classical recursive one, an algorithm already proposed by Janet and a construction proposed by Hironaka in his work on idealistic exponents. We relate Janet’s algorithm to the Janet tree of the Janet basis and extend this idea to Janet-like bases to obtain an optimised algorithm. We show that Hironaka’s construction terminates, if and only if the monomial ideal is quasi-stable. Furthermore, we show that in this case the algorithm of Janet determines the same decomposition more efficiently. Finally, we briefly discuss how these results can be used for the computation of primary and irreducible decompositions.


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.

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 P = [X] = [x 1 , … , x n ] over a field . Let f 1 , … , f k ∈ P be some polynomials and I = ⟨f 1 , … , f k ⟩ the ideal generated by them. We denote the total degree and the degree with respect to the variable x i of a polynomial f ∈ P by deg(f ) and deg i (f ) , respectively. If Y = {y 1 , … , y k } ⊆ X is a subset of variables, then we denote by T Y = {y 1 1 ⋯ y k k | i ∈ ℕ 0 , 1 ≤ i ≤ k} the monoid of all terms in P depending only on the variables in Y. We write shortly T = T X , if all variables are considered. A term ordering on T is denoted by ≺ . The leading term of a given polynomial f ∈ P with respect to ≺ is denoted by lt(f ) . If F ⊂ P is a finite set of polynomials, we denote by lt(F) the set {lt(f ) | f ∈ F}.
A finite set G ⊂ P is called a Gröbner basis for I with respect to ≺ , if it satisfies lt( I ) ∶= ⟨lt(f ) | f ∈ I ⟩ = ⟨lt(G)⟩ . 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 I ⊲ P . Then, the factor ring P∕ I is isomorphic as a -linear space to the space generated by all terms t ∉ ⟨lt(G)⟩.
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 L on T associates to any finite set U ⊂ T of terms and any term u ∈ U a set of L-non-multipliers 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 NM L (u, U) ⊆ X of u ∈ U . The set of L-multipliers L(u, U) is given by the order ideal T ⧵L(u, U) ; defining the set of multiplicative variables M L (u, U) = X ⧵ NM L (u, U) , we have T ⧵L(u, U) = T M L (u,U) . For any term u ∈ U , its involutive cone is defined as C L (u, U) = u ⋅ L(u, U) . Finally, L must satisfy the following conditions: We write u | L w for a term u ∈ U and an arbitrary term w ∈ T , if w ∈ C L (u, U) . In this case, u is called an L-involutive divisor of w and w an L-involutive multiple of u. Definition 3 For a finite set of terms U ⊂ T and an involutive division L on T , the involutive span of U is the union C L (U) = ⋃ u∈U C L (u, U) . The set U is involutively complete or a weak involutive basis of the ideal generated by U, if C L (U) = T ⋅ U . For a (strong) involutive basis the union must be disjoint, i. e. every term in C L (U) has a unique involutive divisor. An involutive division is Noetherian, if every monomial ideal in P possesses an involutive basis.
One of the simplest involutive divisions is the Pommaret division:

Remark 5
The Pommaret division P is a global division, i. e. the assignment of multiplicative variables to a term x is independent of any ambient set x ∈ U ⊂ T . The Pommaret division is not Noetherian, as e.g. the ideal I = ⟨x 1 x 2 ⟩ does not possess a finite Pommaret basis, as it does not contain any element of class 2.
Each finite set U ⊂ T contains a unique minimal subset A ⊆ U such that ⟨A⟩ = ⟨U⟩ as monomial ideals, but no term a ∈ A is Pommaret divisible by any other term b ∈ A ⧵ {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 I ⊂ P is called quasi-stable, if for any term x ∈ I and for any index k = cls (x ) < i ≤ n an exponent s ≥ 0 exists such that x s i x ∕x k ∈ I.
has the one-element set {x 1 x 2 } as Janet basis.
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 ⊂ T be a finite set of terms. For any term u ∈ U and any index 1 ≤ i ≤ n , we set is called a non-multiplicative power of u for the Janet-like division. The set of all non-multiplicative powers of u ∈ U is denoted by NMP (u, U) . The elements of the set are called the J-non-multipliers for u ∈ U . The terms outside of it are the J-multipliers for u. An element u ∈ U will be called a Janet-like divisor of w ∈ T , if w = u ⋅ v with v a J-multiplier for u.
We can determine the Janet-like non-multiplicative powers of the elements of U as follows: 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, Looking at the Janet class U [1] . Now, noting that U [1,1] 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].

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 ⊂ 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 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 , V) consisting of a term and a subset of the variables X.
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 ≤ d n ≤ mn and each contains the term x d n n and the empty set except for d n = mn which contains the set {x n } , as x n is multiplicative for all terms in this Janet class. Then we continue recursively. Assume

3
Complementary decompositions of monomial ideals and involutive… that we have a node (x , V) at level i + 1 with i < n , i. e. cls x ≥ i + 1 . Then its children correspond to the non-empty Janet classes represented by terms of the form x a i x 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

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 , V, M) and that it has children represented by the terms x a j i x where a 1 < a 2 < ⋯ < a . Then the first − 1 children are given by the nodes (x . 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 (1, ∅)

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 C Y (t) = T Y ⋅ t for some term t ∈ T , its vertex, and some set of multiplicative variables Y ⊆ X . A cone decomposition of an arbitrary subset S ⊆ T is a representation as a disjoint finite union of cones: In the above definition, we consider arbitrary subsets S ⊆ T . In practice, two cases are particularly relevant: S = I ∩ T consists of the terms contained in a monomial ideal I or S is the complement of such a set, i. e. 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 I . By Proposition 1, a complementary decomposition corresponds to a decomposition of the factor ring P∕ I as a -linear space. Complementary decompositions are often called Stanley decomposition, as Stanley [31] used them for computing the Hilbert function of an ideal 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 , … , x n } for some index i; one then speaks of a Rees decomposition.
Given any finite complementary decomposition D of an ideal I , it is indeed straightforward to read off the Hilbert series and the Hilbert polynomial of I . Given a cone induced by the pair (t, Y) ∈ D , we write q t = deg (t) for the degree of its vertex and k t = |Y| for its dimension. The Hilbert series of I is then given by and the Hilbert polynomial by 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 (t, Y) (for degrees q ≥ q t ). For the Hilbert function, one must enforce that the cone (t, Y) contributes nothing for any degree q ≤ q t . Hence, using the Kronecker-Iverson symbol [⋅] which yields 1 if the condition in the bracket is satisfied and 0 otherwise, we can write 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 I induces a cone decomposition of I . As we will discuss in more details in the subsequent sections, 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 , … , x n , however, we can impose any order of the variables that we might want to use. (2)

Theorem 15 Algorithm 1 terminates in finitely many steps and is correct. Its arithmetic complexity is
the sequence of the x i -degrees of the terms t j used to generate the ideal 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 D is O ( m) n . 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 ′ i contains m∕( + 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 + 1 times and in each iteration the set Thus, by the lines 16 and 18, the number of cones in D is It follows from the fact that + 1 ≤ m that the total number of elements added to D is O ( m) n . Finally, we may assume that , m, n ≥ 2 and therefore ( m) n is the dominant factor in the complexity O ( m) n + m 2 + nm and this ends the proof. ◻

Example 16
Let us consider the ideal By considering x 1 as the first variable, we have 0 = 0 , 1 = 2 , By applying the algorithm to U ′ 0 , we get Thus, by multiplying the first component of the elements of this set by both 1 and x 1 , we obtain the first version of D . Now, we continue with 1 . Here, one observes that and the ideal generated by this set is ⟨x 2 x 3 , x 3 3 ⟩ . Applying the algorithm to it, on obtains its complementary decomposition (1, �), (x 3 , �), (x 2 3 , �), (x 2 , {x 2 }) and finally defines a complementary decomposition for 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 D i,j , where-with the notations used in the algorithm-D i,j provides a complementary decomposition for the ideal ⟨t j , … , t m ⟩� x 1 =⋯=x i−1 =1 . Thus, D 1,1 defines the desired complementary decomposition for the given ideal I.

Theorem 17 Algorithm 2 terminates for any input and is correct. Its arithmetic complexity is
being the sequence of the x i -degrees of the generators t j and = (n) .
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 ∪ m j=1 D i,j for each index i = n, … , 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( m) . It follows from line 11 by applying a simple induction, that the number of cones in D i,j is O ( m) n−i . Thus, the total number of constructed cones is m + m( m) + ⋯ m( m) n−1 . We may assume that m ≥ 2 and this shows the claim. ◻

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 ⟨t j , … , t m ⟩� x 1 =⋯=x i−1 =1 which provide additional information about the input ideal. More precisely, for each 1 ≤ i ≤ n and 1 ≤ j ≤ m , the set 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 I = ⟨U⟩ in the polynomial ring Entering into the main for-loop, we must consider in the iteration with i = 2 the three terms

The algorithm then yields
It is worth noting that we may simplify the construction of D 2,1 by removing the extra term x 3 2 x 3 and considering only the two terms x 2 x 3 , x 3 3 . For i = 1 , we consider the given set U and obtain (1) is the constructed complementary decomposition for I . Finally, we note that since the sequence of the x 1 -degrees in U is 2, 0, we do not need to construct D 1,3 .

3
Complementary decompositions of monomial ideals and involutive… 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. . By the structure of the algorithm, it is seen that the number of constructed cones is at most nm n+1 . These arguments show that the arithmetic complexity of the algorithm is O(nm 2 2n ). ◻

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 I is the decisive factor, as it appears in the form m n . For the algorithm using a Janet basis, the maximal degree 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 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 I ⊴ P is quasi-stable and H is its Pommaret basis, then H is also the minimal Janet basis of I by [16,Thm. 17]. In this situation, for each term t ∈ H , we have the equality M J (t, H) = M 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 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 ∈ 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 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 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. ◻ 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 I ⊴ 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 Lef t 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 ≤ i ≤ n the sets Lef t i (JT) , Lef t i (JLT) are related by Proof Let (t, V) ∈ Lef t i (JT) be a minimal child node at level i in the Janet tree. The term t is of the form t| x 1 =⋯=x i−1 =1 , with t ∈ U � . Then, by Proposition 23, there is a term s ∈ U such that s |t . We can consider its projection s ∶=s| x 1 =⋯=x i−1 =1 ; this term is contained in a node (s, V, M) ∈ JLT . Moreover, again by Proposition 23, we have the degree conditions The very technical Proposition 24 has the benefit that the Janet complementary decomposition of a monomial ideal 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 I ⊴ P be a monomial ideal and let JLT be its Janet-like tree. Let MinNodes( I ) denote the set of nodes in JLT which are minimal children of their respective parent nodes. For each such node (x , V, M) , let k denote its level in the tree. Then, a complementary decomposition of I is given by
Proof The assertion is an immediate consequence of Proposition 24 and the correctness of Algorithm 3. ◻ Corollary 25 induces Algorithm 4 computing a complementary decomposition of a monomial ideal from a Janet-like basis of it.
The following example serves to illustrate how Proposition 24 can be applied.

Example 26
Let I = ⟨x n 1 , … , x n n ⟩ ⊂ P . Its minimal Janet basis has 1 + n + ⋯ + n n−1 = (n n − 1)∕(n − 1) elements and its Janet tree has, including the root, ( ∑ n−2 k=0 ∑ k =0 n ) + 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 (t, V, M) with deg 1 (t) = n and V ⊆ {x 1 } . This means that each of them contributes exactly n zerodimensional (one-element) cones to the complementary decomposition of I.
By contrast, the minimal Janet-like basis of 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 x n 1 , �, {x n 2 , … , x n n } at level 1. It yields the complementary decomposition of I without any further computation:

Complementary decompositions of monomial ideals and involutive…
If I ⊂ 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 I as linear combinations of binomial coefficients. By (4), the cones of the Janet complementary decomposition D of I can be collected into groups. Each group contains all cones of the form (t ⋅ s, Y t ) where (t, V, M) is a node in the Janet-like tree of I and the term s varies in the complement of a zero-dimensional irreducible monomial ideal A t = ⟨x 1 a 1 , … , x r a r ⟩ ⊴ [x a 1 , … , x a r ] ⊂ P . Note that, according to (4), the generators of A t are the non-multiplicative powers M of the node (t, V, M) together with x k k , where (x ,Ṽ,M) is the minimal child node of (t, V, M) 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 D c ⊆ D which contains for each such group only its minimal representative (t, Y t ) together with the irreducible ideal A t . The Hilbert function of A t has non-zero values only for integers i in the range 0 ≤ i ≤ m t ∶= ∑ r j=1 ( j − 1) . Additionally, we write again q t = deg (t) and k t = |Y t | . Summing up, we then obtain:

Moreover, the Hilbert polynomial of I is obtained by simply dropping the contributions of zero-dimensional cones and all Kronecker-Iverson symbols:
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 HF A t (i) (the h-vectors of the zero-dimensional ideals 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 A = ⟨x 1 1 , … , x r r ⟩ ⊴ [x 1 , … , x r ] . It is easy to see that the Hilbert series of the ideal A is

Hence, the values to be computed are just the coefficients of z k in HS
. 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 is a bijection with inverse . Hence the computation of the first half of the values HF A (k) suffices. Assume now that we have already expanded the Hilbert series of the "truncated" ideal Ã = ⟨x 1 in one variable in the explicit form HSÃ(z) = ∑d j=0 c j z j and want to compute now the Hilbert series HS A (z) = ∑ d j=0 d j z j of the original ideal A . This is then easily achieved by multiply- 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 HS A (z) step by step, we see that O r 2 ⋅ additions are needed, where = max{ i | i = 1, … , r}.

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 works for arbitrary monomial ideals I , but the decompositions obtained by it can be infinite; more precisely, the set ⋃ n−1 k=0 N k (I) can be infinite.

3
Complementary decompositions of monomial ideals and involutive… 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.

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 ∈ {1, … , n} . We will show iteratively that: Putting things together, ( H ⧵ A) ∪ B is a Pommaret basis of pr 1 ( I ) and its autoreduction then yields the minimal Pommaret basis of pr 1 ( I ) . Note that, by these arguments, we have shown that pr 1 ( I ) is quasi-stable. Now we consider the cones that are added to D in this iteration of the loop. It is obvious that their vertices are elements of C {1} ( pr 1 ( I )) , but not of pr 0 ( I ) = I . So all added cones are of the form C 0 N 0 ( I ) from Hironaka's construction. Conversely, let x ∈ N 0 ( I ) . Then x ∉ I , but there exists an exponent > 0 such that x 1 ⋅ x ∈ I . For the minimal with this property, we have that x 1 x is an element of the minimal Pommaret basis of the input ideal I , since otherwise x −1 1 ⋅ x ∈ I , contradicting the minimality of . Now, in order to see that C 0 (x ) is added to D in this iteration of the loop, it only remains to be shown that cls (x 1 ⋅ x ) = 1 . But this is clear, since > 0 . So, this multiindex is of class 1 and an element of the minimal Pommaret basis of the input ideal, proving that x is a (zero-dimensional) cone added to D in this iteration of loop.
If k > 1 , similar arguments lead to the desired result, since the for loop gets the input H , which at this point of the algorithm is the minimal Pommaret basis of the quasi-stable ideal pr k−1 ( I ) . ◻

Example 31
We illustrate how Algorithm 5 works by applying it to the quasi-stable monomial ideal I = ⟨H⟩ ⊴ [x 1 , x 2 , x 3 ] generated by the minimal Pommaret basis -In the first iteration of the outer for loop, we have 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 I as input, Algorithms 3 and 5 produce the same output.
Proof Choose an index k ∈ {1, … , n} and let x ∈ H be a term contained in the Janet class H [ k+1 ,…, n ] with k minimal. Algorithm 3 adds all cones of the form with i ∈ {0, … , k − 1} to 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 k > 0 , since if k = 0 , then x does not contribute any monomial cones to D during Algorithm 3.
Define I q as the ideal generated by H at the very end of the q th iteration of the outer for loop of Algorithm 3. Certainly, t ∶= x | x 1 =⋯=x k−1 =1 ∈ I k−1 . We need to show that no strict Pommaret divisor of t is in I k−1 , since if this is the case, then t belongs to 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 D in this loop iteration.
be a term such that x ∶= x ⋅ t ∈ H -such a term must exist, because in order to construct 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: cls (x ) ≥ k : This case cannot occur, since x would be a strict Pommaret divisor of x in this case: x = 1 and x = t | P t | P x . This is a contradiction to x ∈ H. -cls (x ) < k and k > 0 : Then x is in the Janet class H [ k+1 ,…, n ] and k < k , a contradiction to the minimality of k . -cls (x ) < k and k = 0 : If also t | x k =1 = t | x k =1 , then x is in the Janet class H [d k+1 ,…,d n ] and k = 0 , which is a contradiction to the minimality of k (recall

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 I be a monomial ideal. Hironaka's construction yields a finite complementary decomposition of I , if and only if I possesses a finite Pommaret basis.
Proof If 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 I yields a finite decomposition, then it is a complementary decomposition of I of the form This set is obviously finite. We will now show that it is a Pommaret basis of I. Let t ∈ T ∩ I be an arbitrary term in I and set a ∶= cls (t) . There is a minimal integer ∈ {a, a + 1, … , n} such that pr (t) ∉ I (assume I ≠ P ; if I = P , then it is obviously quasi-stable) . Since pr −1 (t) ∈ I , there is an integer d with 0 ≤ d < deg (t) such that s ∶= x d pr (t) ∉ I and x ⋅ s = x d+1 pr (t) ∈ I . We claim that there is an integer k ≤ such that s ∈ N k ( I ).
Since s ∉ I , there is some integer b ∈ {0, 1, … , n − 1} and a term u ∈ N b ( I ) such that s ∈ C b (u) by equality (7). If b ≤ , then obviously u = s and s ∈ N b ( I ) , and setting k ∶= b yields the claim. Otherwise, b > . From definition of N b ( I ) , we know that u ∉ pr b ( I ) , but u ∈ C {b+1} ( pr b+1 ( I )) . In particular, cls (u) ≥ b + 1 . By definition of u, we must also have deg r (u) = deg r (s) for all r ≥ b + 1 . But now it is clear that u is exactly pr b (s) , and since s = x d pr (t) , we then have u = pr b (s) = pr b x d pr (t ) = pr b (t) , contradicting u ∉ pr b ( I ) . Thus we have proven the claim. Now, obviously x s = x d+1 pr (t) ∈ H is a Pommaret divisor of t. Since t was an arbitrary element of I , this observation finally proves that H is a finite Pommaret basis of I and we are done. ◻

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 I ⊴ P is prime if and only if it can be generated by a set of variables. A monomial ideal Q is primary to I = ⟨x i 1 , … , x i r ⟩ , if and only if it has a generating set that only depends on the variables generating I and that contains for each x i j a pure power x k j i j . The associated primes of a monomial ideal are again monomial ideals. A primary decomposition of a monomial ideal I is a representation I = Q 1 ∩ ⋯ ∩ Q k with each Q a primary monomial ideal. Such a decomposition is called minimal, if the associated primes √ Q are pairwise different and none of the Q can be omitted in the representation.
Such a decomposition is called irredundant, if none of the ideals Q 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 I = Q 1 ∩ ⋯ ∩ Q k of the monomial ideal I is known, then obviously T ⧵ I = (T ⧵ Q 1 ) ∪ ⋯ ∪ (T ⧵ Q k ) provides a decomposition of the complement of I into sets which are easy to describe. A term x is in the complement T ⧵ Q of a monomial irreducible ideal Q , if and only if i < i for each variable x i dividing the term x describing Q . This decomposition is of course not disjoint, unless 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 I ⊴ P be a monomial ideal and {(t, X t ) | t ∈ U} a complementary cone decomposition of it, where U ⊆ T ⧵ I is some subset. Then a (generally redundant) irreducible decomposition of I is given by: Proof We show the equivalent statement 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 3 3 } is already the minimal Janet-like basis of the ideal I = ⟨U⟩ . 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 Applying Proposition 40, we get the candidates J 1 = ⟨x 3 ⟩ , J 2 = ⟨x 2 , x 3 3 ⟩ , and J 3 = ⟨x 2 1 , x 3 2 , x 3 3 ⟩ for components of the irreducible decomposition. Their associated primes are pairwise different, so the decomposition cannot be reduced any further and we are done: 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, H is the minimal Pommaret basis of the saturation I ∶ ⟨x 1 ⟩ ∞ . By one of the many equivalent characterisations of quasi-stable ideals, see e.g. [30,Prop. 5.3.4(iii)], we know that for I the chain of inclusions holds. From it and by a well-known property of ideal quotients, we get for any 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 I ∶ ⟨x k ⟩ ∞ . Now, let d be the smallest class of a term in the Pommaret basis H of I and let D be maximal among the indices j such that no pure power x p j j appears in H and for d ≤ j ≤ 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 I is given by

Complementary decompositions of monomial ideals and involutive…
where Q ⊆ {d, d + 1, … , D} is the subset of those indices 1 ≤ j ≤ n for which we have a proper inclusion To test the condition I ∶ ⟨x j−1 ⟩ ∞ ⊊ I ∶ ⟨x j ⟩ ∞ 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 I ∶ ⟨x j−1 ⟩ ∞ . This means that in the current iteration the set C ≠ ∅ is not empty. Whenever this condition is satisfied, we can add the primary ideal ⟨H, 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.
Example 44 Consider, as in Example 31, the quasi-stable ideal I = ⟨x 3 3 , x 3 2 x 3 , x 1 x 2 x 3 ⟩ . Note that I has the minimal Pommaret basis 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 ⟨H, x 1 , x 3 2 ⟩ = ⟨x 1 , x 3 2 , x 3 3 ⟩ to the minimal primary decomposition. The minimal Pommaret basis of the saturation I ∶ ⟨x 1 ⟩ ∞ is computed as H 1 = {x 3 3 , x 2 x 3 , x 2 x 2 3 } (cf. Example 31). It has a term of class 2. Hence, we need to add ⟨H 1 , x 3 2 ⟩ = ⟨x 3 2 , x 2 x 3 , x 2 x 2 3 , x 3 3 ⟩ to the minimal primary decomposition as a new component. The minimal Pommaret basis of the saturation I ∶ ⟨x 2 ⟩ ∞ is computed as H 2 = {x 3 } (cf. again Example 31). It has a term of class 3 and hence we must add ⟨H 2 ⟩ = ⟨x 3 ⟩ 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 I = ⟨x 1 , Example 45 Consider the quasi-stable ideal We compute a minimal primary decomposition of I using Algorithm 5 and Remark 43. Note first that I is already given by its minimal Pommaret basis 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 ⟨H, x s 1 1 , x s 2 2 ⟩ = ⟨x 1 , x 2 , x 2 3 ⟩ as a first component to the primary decomposition. Algorithm 5 now computes the minimal Pommaret basis H 1 = {x 3 } of I ∶ ⟨x 1 ⟩ ∞ . 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 ⟨x 3 ⟩ is added and the algorithm terminates. Thus, we get the minimal primary decomposition I = ⟨x 1 , x 2 , x 2 3 ⟩ ∩ ⟨x 3 ⟩ , in which no ⟨x 2 , x 3 ⟩-primary ideal appears.

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 , … , 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 quasistable ideal and this chain contains all information required to write down an irreducible primary decomposition of the ideal.