Eidgeno¨ssische Technische Hochschule Zu¨rich Computational Theory of Polynomial Ideals a Bachelor Thesis written by supervised by Paul Steinmann Prof. Dr. Richard Pink Abstract We provide methods to do explicit calculations in a polynomial ring in finitely many variables over a field. We develop algorithms to compute quotients of ideals, the radical of an ideal and a primary decomposition of an ideal. We also present methods to solve explicit tasks such as testing for prime ideals or identical ideals. February 2015 Contents 1 Introduction 3 2 Notation 4 3 Gr¨obner Bases 5 3.1 Basic definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 3.2 Computing Gr¨obner Bases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 4 Quotients of Ideals 14 5 Radicals 16 5.1 Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 5.2 Ideals of finite codimension . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 5.3 The general case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 6 Primary Decomposition 24 6.1 Ideals of finite codimension . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 6.2 The general case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 7 Complexity 34 8 Conclusion 35 References 36 1 Introduction Polynomial rings over fields arise in many areas of mathematics, for instance in algebraic geometry. It is natural to ask to which extent explicit computation in such polynomial rings are possible. Today, computer algebra systems like MAPLE or MATHEMATICA are very useful tools to test conjectures in special cases before trying to prove them. There is a lot of computational theory for algorithms used to compute even the simplest objects in a polynomial ring. Computations in one variable are fairly simple, due to the fact that a polynomial ring in one variable over a field is a principal ideal domain and hence the very powerful Euclidean algorithm can be used. However, computations become more complicated when dealing with multivariate polynomial rings. Some of the computational theory will be presented and explained in this thesis. Certain objects, for example the radical of an ideal, can be computed using different characterisations, which result in different algorithms. There will be a short discussion of this fact and a comparison between algorithms at the end. A key concept in this setting of computational algebra is the one of Gr¨obner bases. Presented in section 3, this concept will be used throughout the whole thesis. We lay our focus on three objects associated to polynomial ideals: quotients of ideals, the radical of an ideal and a primary decomposition of an ideal. We develop algorithms to compute these objects. There are also several other tasks that we will be able to do computationally. The main algorithms are marked as “Algorithm” and are written in pseudo-code, whereas the simpler tasks such as testing for prime ideals are marked as “Task” and have no special syntactical structure. In the end we will be able to do almost every computation that a standard computer algebra system can do in the area of polynomial ideals. The prerequisites for this thesis are a standard algebra course and some basic knowledge of commutative algebra, mainly radical ideals and primary decompositions. Everything needed can be found in the first few chapters of Atiyah and Macdonald’s standard introduction [1]. 3 2 Notation We will always consider a field K and denote by K its algebraic closure. Let X ,...,X be 1 n n independent variables and define X := {X ,...,X }. We denote the polynomial ring in n 1 n variables over K by K[X]. Later on, we will invert some of the variables to form a rational function field. In doing so, we will write X = Y (cid:116)Z and mean that Y and Z are disjoint subsets of X and their union is X. We can then, for instance, form the ring K(Y)[Z] of polynomials in Z over the rational function field K(Y). The integer n > 0 is arbitrary but will always denote the total number of variables. For computations with an ideal, we need a finite generating set of the ideal. Thus, in the algorithms and tasks we tacitly assume that a finite generating set of I is given. For a finite subset F ⊂ K[X] we denote by (cid:104)F(cid:105) ⊂ K[X] the ideal generated by F. If the ring in which the ideal is generated is not clear from the context, we indicate the ring as a subscript. For instance, we will write (cid:104)F(cid:105) . For elements f ,...,f ∈ K[X] we write (cid:104)f ,...,f (cid:105) K(Y)[Z] 1 m 1 m instead of (cid:104){f ,...,f }(cid:105). 1 m Let R and S be two rings and ϕ : R → S be a ring homomorphism. Let I ⊂ R and J ⊂ S be ideals. We use Atiyah and Macdonald’s ([1]) notation and write Ie := (cid:104)ϕ(I)(cid:105) for the extension ideal of I and Jc := ϕ−1(J) for the contraction ideal of J. We will not state the homomorphism explicitly if it is clear from the context. We also use the notation Iec := (Ie)c and Jce := (Ic)e. 4 3 Gro¨bner Bases This section follows the book of Cox, Little and O’Shea [3]. 3.1 Basic definitions We will generalize the concept of degree and the Euclidean algorithm for polynomial rings in one variable to an algorithm for a ring of multivariate polynomials K[X]. Definition 3.1. A monomial ordering (cid:23) on K[X] is a binary relation (cid:23) on Zn with the ≥0 following properties: (i) The relation (cid:23) is a total ordering on Zn . ≥0 (ii) For all α,β,γ ∈ Zn such that α (cid:23) β it follows that α+γ (cid:23) β+γ. ≥0 (iii) Every non-empty subset has a smallest element, i.e. (cid:23) is a well-ordering on Zn . ≥0 Example 3.2. The standard ordering relation ≥ on Z is a total ordering and a well- ≥0 ordering. Furthermore, for all α,β,γ ∈ Z such that α ≥ β we have α + γ ≥ β + γ. ≥0 Therefore ≥ is a monomial ordering on K[X ]. 1 Example 3.3. We define the monomial ordering (cid:23) on K[X] such that for all α := lex (α ,...,α ), β := (β ,...,β ) ∈ Zn we have α (cid:23) β if and only if the leftmost non- 1 n 1 n ≥0 lex zero entry in (α −β ,...,α −β ) is positive. This is called the lexicographical order- 1 1 n n ing. For instance, in the lexicographical ordering we have (0,1,5,2) (cid:23) (0,1,2,4) since lex (0,1,5,2)−(0,1,2,4) = (0,0,3,−2) and the leftmost non-zero entry 3 is positive. Using the result of Example 3.2 we deduce that (cid:23) is a monomial ordering. lex Definition 3.4. Let f = (cid:80) a Xα ∈ K[X] with multi-index notation and let (cid:23) be a α α monomial ordering on K[X]. (i) The degree of f with respect to (cid:23) is deg(f) := max{α ∈ Zn | a (cid:54)= 0} if f is non-zero ≥0 α and deg(0) := −∞. Here, the maximum is taken with respect to (cid:23). (ii) The leading coefficient of f is LC(f) := a ∈ K if f is non-zero, and LC(0) := 0. deg(f) (iii) The leading monomial of f is LM(f) := Xdeg(f) if f is non-zero, and LM(0) := 1. (iv) The leading term of f is LT(f) := LC(f)·LM(f). Remark 3.5. Later on, we will need to distinguish leading terms in different rings. For this purpose, if X = Y (cid:116)Z and f ∈ K[X] we write LT (f) for the leading term of f in the ring Z K(Y)[Z] and LT (f) for the leading term in K[X]. We denote LC(f) analogously. X Definition 3.6. For any subset F ⊂ K[X] we define the set of leading terms LT(F) := {LT(f) | f ∈ F} and the set of leading monomials LM(F) := {LM(f) | f ∈ F}. Now we can define Gr¨obner bases. There are several equivalent definitions and the one below is not the most intuitive one. However, this technical property is easier to use: 5 Section 3 3.1 Basic definitions Definition 3.7. Let (cid:23) be a monomial ordering on K[X] and let I ⊂ K[X] be an ideal. A Gr¨obner basis of I is a finite subset G ⊂ I such that (cid:104)LT(G)(cid:105) = (cid:104)LT(I)(cid:105). Remark 3.8. From now on, we will always assume that some monomial ordering (cid:23) has been chosen and that all Gr¨obner bases and leading terms are taken with respect to this ordering unless stated otherwise. In order to use Gr¨obner bases we need some basic statements. Lemma 3.9. Let I ⊂ K[X] be an ideal and let f,g ,...,g ∈ I. If LT(f) lies in the ideal 1 m (cid:104)LT(g ),...,LT(g )(cid:105), then f = 0 or there is some 1 ≤ k ≤ m such that LT(g ) divides LT(f). 1 m k Proof. By assumption, there exist h ,...,h ∈ K[X] such that LT(f) = (cid:80)m h LT(g ). 1 m i=1 i i For each 1 ≤ i ≤ m write h = (cid:80) ai Xα with ai ∈ K for all α. Then LT(f) = i α α α (cid:80)m (cid:80) ai XαLT(g ). If f is non-zero, then LT(f) is a non-zero monomial. It follows i=1 α α i that, on the right hand side, there is only one non-zero monomial. Thus there is a constant β ∈ K such that LT(f) = βakXαLT(g ) for some 1 ≤ k ≤ m and some α. Hence LT(f) is α k divisible by LT(g ) or f = 0. k Proposition 3.10. Every ideal I ⊂ K[X] has a Gr¨obner basis. Furthermore, every Gr¨obner basis of I is a generating set of I. Proof. (i) Let M := {(cid:104)LT(F)(cid:105) | F ⊂ I is a finite subset}. Since K[X] is a Noetherian ring, the ideal (cid:104)LT(I)(cid:105) is Noetherian as a module over K[X]. Therefore M has a maximal element (cid:104)LT(G)(cid:105) ∈ M, where G ⊂ I is a finite subset. Let f ∈ I. Since (cid:104)LT(G)(cid:105) is a maximal element of M, we have that (cid:104)LT(G)(cid:105) = (cid:104)LT(G∪{f})(cid:105). Hence LT(f) ∈ (cid:104)LT(G)(cid:105) and G is thus a Gr¨obner basis of I. (ii) If I = (cid:104)0(cid:105), the only possible Gr¨obner bases are ∅ and {0}. Both of them generate I. Let G be a Gr¨obner basis of I (cid:54)= (cid:104)0(cid:105). We prove that I = (cid:104)G(cid:105) by transfinite induction on thedegreeofelementsinI. Iff = 0 ∈ I thenf ∈ (cid:104)G(cid:105). Soletf ∈ I benon-zero. Assume that for all f(cid:48) ∈ I the condition deg(f) (cid:31) deg(f(cid:48)) implies that f(cid:48) ∈ (cid:104)G(cid:105). By definition of a Gr¨obner basis, we have LT(f) ∈ (cid:104)LT(G)(cid:105). By Lemma 3.9 there exists an element g ∈ G such that LT(g) divides LT(f). Thus LT(f) = hLT(g) for some h ∈ K[X]. Since LT(f) and LT(g) consist of only one term and are both non-zero, the polynomial h has the same property. Hence h = LT(h) and LT(f) = LT(h)LT(g) = LT(hg). We have deg(f) (cid:31) deg(f −hg) by definition of the leading term. By induction hypothesis f −hg ∈ (cid:104)G(cid:105) and hence f ∈ (cid:104)G(cid:105). The claim follows with transfinite induction. We turn to the generalization of the Euclidean algorithm. Definition 3.11. Let f ,...,f ∈ K[X] and define F := {f ,...,f }. Let f ∈ K[X]. A 1 m 1 m F remainder on division of f with respect to F is an element f ∈ K[X] such that there exist h ,...,h ∈ K[X] with the following properties: 1 m (i) The polynomial f can be written as f = (cid:80)m h f +fF. i=1 i i (ii) No term of fF is divisible by any of (LT(f ))m . i i=1 6 Section 3 3.1 Basic definitions (iii) For all 1 ≤ i ≤ m we have deg(h f ) (cid:22) deg(f). i i Algorithm 3.12. Letf ,...,f ∈ K[X]anddefineF := {f ,...,f }. Letf ∈ K[X]. The 1 m 1 m F following algorithm computes a remainder on division f and elements h ,...,h ∈ K[X] 1 m as in Definition 3.11. Input: F = (f ,...,f ), f ∈ K[X] 1 m F Output: r = f , some remainder on division; h ,...,h 1 m begin h := 0 for all 1 ≤ i ≤ m i r := 0 p := f while p (cid:54)= 0 do i := 1 divisionoccured := false while i ≤ m and divisionoccured = false do if LT(f ) divides LT(p) then i h := h +LT(p)/LT(f ) i i i p := p−(LT(p)/LT(f ))f i i divisionoccured := true else i := i+1 end end if divisionoccured = false then r := r+LT(p) p := p−LT(p) end end end Proof. We first show that the algorithm terminates after finitely many steps. Note that the inner while-loop has at most m steps and thus terminates in every step of the outer while- loop. So the only possibility that the algorithm does not terminate is if p is non-zero at all times. If LT(f ) divides LT(p) for some 1 ≤ i ≤ m, then in the next step p is reduced to i p−(LT(p)/LT(f ))f . Then deg(p−(LT(p)/LT(f ))f ) ≺ deg(p). If on the other hand no i i i i LT(f ) divides LT(p), then the inner while-loop terminates with divisionoccured = false. i This implies that p is reduced to p − LT(p) for the next step, due to the if-statement at the bottom. Then deg(p − LT(p)) ≺ deg(p). So in each step of the outer while-loop, the degree of p strictly decreases. If the loop did not terminate, we would have an infinitely decreasing sequence. This cannot exist because of the well-ordering condition of monomial orderings. Thus the algorithm terminates after finitely many steps. For later use, note that deg(p) (cid:22) deg(f) during the whole algorithm. We now show that after every step of the outer while-loop we have f = (cid:80)m h f +r +p i=1 i i with deg(h f ) (cid:22) deg(f) for all 1 ≤ i ≤ m. This is true before the first step. Now fix a i i 7 Section 3 3.2 Computing Gr¨obner Bases step of the outer while-loop. Let r,p,(h )m denote the elements before the step which have i i=1 the desired property and let r(cid:48),p(cid:48),(h(cid:48))m denote the elements after the step. If no LT(f ) i i=1 i divides LT(p) then h(cid:48) = h for all 1 ≤ i ≤ m. Also r(cid:48) = r +LT(p) and p(cid:48) = p−LT(p). It i i follows that f = (cid:80)m h(cid:48)f +r(cid:48) +p(cid:48) and deg(h(cid:48)f ) (cid:22) deg(f) for all 1 ≤ i ≤ m. If, on the i=1 i i i i other hand, some LT(f ) divides LT(p), then h(cid:48) = h for all j (cid:54)= i and r(cid:48) = r. Furthermore i j j h(cid:48) = h + LT(p)/LT(f ) and p(cid:48) = p − (LT(p)/LT(f ))f , so h(cid:48)f + p(cid:48) = h f + p. Thus i i i i i i i i i f = (cid:80)m h(cid:48)f +r(cid:48) +p(cid:48) and deg(h(cid:48)f ) (cid:22) max{deg(h f ),deg(p)} (cid:22) deg(f) for all 1 ≤ i ≤ m. i=1 i i i i i i Because the property holds after each step, it also holds for the output. It remains to show that the output r is not divisible by any of (LT(f ))m . At the beginning i i=1 r = 0, and the only place where a term is added to r is in the if-statement at the bottom. But the term is only added if it was not divisible by any of (LT(f ))m . So r has the desired i i=1 property and is thus a remainder on division. Remark 3.13. Algorithm 3.12 shows that for all finite subsets F ⊂ K[X] and elements f ∈ K[X] there is a remainder on division of f with respect to F. However, in general F it need not be unique. Whenever we use a remainder on division f , we assume that some choicehasbeenmade. Thischoicewillonlyaffecttheexplicitcalculationsandnotthegeneral statements. Proposition 3.14. Let G = {g ,...,g } be a Gr¨obner basis of an ideal I ⊂ K[X]. For all 1 m f ∈ K[X], there is a unique remainder on division of f with respect to G. Proof. Letf ∈ K[X]andletr,r(cid:48) ∈ K[X]betwopolynomialsbothsatisfyingtheproperties of a remainder on division of f with respect to G. Then we have r−r(cid:48) = (f−r(cid:48))−(f−r) ∈ I. Assume that r −r(cid:48) (cid:54)= 0. By Lemma 3.9, there exists an element g ∈ G such that LT(g ) i i divides LT(r−r(cid:48)). Since r−r(cid:48) (cid:54)= 0, this implies that some term of r or of r(cid:48) must be divisible by LT(g ), which is not true. So r−r(cid:48) = 0. i The following proposition was, historically, the motivation to introduce Gr¨obner bases. In fact, it is one of the equivalent definitions of a Gr¨obner basis. Proposition 3.15. Let I ⊂ K[X] be an ideal and G = {g ,...,g } ⊂ I a Gr¨obner basis of 1 m G I. Then a polynomial f ∈ K[X] lies in I if and only if f = 0. G G Proof. Letf ∈ I. Thenf ∈ I bydefinitionofaremainderondivision, andnotermoff is G divisiblebyanyelementofLT(G). ButGisaGr¨obnerbasis,soLT(f ) ∈ (cid:104)LT(I)(cid:105) = (cid:104)LT(G)(cid:105). G It follows by Lemma 3.9 that f = 0. G Conversely, if f = 0, then f is a linear combination of elements of G, so f ∈ I. 3.2 Computing Gro¨bner Bases The key to an algorithm which computes a Gr¨obner basis is a technical criterion for Gr¨obner bases developed by Buchberger. 8 Section 3 3.2 Computing Gr¨obner Bases Definition 3.16. Let f,g ∈ K[X] be non-zero and let α := deg(f) and β := deg(g). Set γ := (γ ,...,γ ) where γ := max(α ,β ) for each 1 ≤ i ≤ n. The S-polynomial of f and g 1 n i i i is defined by Xγ Xγ S(f,g) := f − g, LT(f) LT(g) using multi-index notation. Lemma 3.17. Let f ,...,f ∈ K[X] be all non-zero with δ := deg(f ) = ··· = deg(f ). 1 s 1 s For all i (cid:54)= j we have deg(S(f ,f )) ≺ deg(f ). Let c ,...,c ∈ K satisfy deg((cid:80)s c f ) ≺ δ. i j i 1 s i=1 i i Then there are coefficients d ∈ K for all 1 ≤ i,j ≤ s such that (cid:80)s c f = (cid:80) d S(f ,f ). ij i=1 i i i(cid:54)=j ij i j Proof. For all 1 ≤ i ≤ s define p := fi and d := c LC(f ). Then for all i (cid:54)= j we have i LC(fi) i i i S(f ,f ) = Xδ f − Xδ f = p − p . Since every p has leading coefficient 1 and they i j LT(fi) i LT(fj) j i j i all have the same degree we find that deg(p − p ) ≺ deg(p ) = deg(f ), proving the first i j i i statement of the lemma. Now consider the following sum: s s s (cid:32) s (cid:33) (cid:88) (cid:88) (cid:88) (cid:88) (1) c f = d p = d (p −p )+ d p i i i i i i 1 i 1 i=1 i=1 i=1 i=1 Since deg((cid:80)s c f ) ≺ δ we know that (cid:80)s d = 0, so the second sum of the right hand i=1 i i j=1 j side of equation (1) vanishes. Thus (cid:80)s c f = (cid:80)s d S(f ,f ). i=1 i i i=1 i i 1 Theorem 3.18 (Buchberger’s Criterion). Let I ⊂ K[X] be an ideal and let G = {g ,...,g } ⊂ I be a generating set of I not containing 1 m G 0. Then G is a Gr¨obner basis of I if and only if ∀i (cid:54)= j : S(g ,g ) = 0. i j Proof. Assume that G is a Gr¨obner basis. Then by definition of the S-polynomial, we have G S(g ,g ) ∈ I for all i (cid:54)= j. Thus S(g ,g ) = 0 by Proposition 3.15. This proves one direction i j i j of the equivalence. G Conversely, assume that S(g ,g ) = 0 for all i (cid:54)= j. Using Definition 3.7 of a Gr¨obner i j basis, we need to show that LT(f) ∈ (cid:104)LT(G)(cid:105) for all f ∈ I. If f is zero, this is true, so let f ∈ I be non-zero. Since G generates I, there exist h ,...,h ∈ K[X] such that 1 m f = (cid:80)m h g . Since a monomial ordering is a well-ordering, we can choose the h such that i=1 i i i δ := max{deg(h g ),...,deg(h g )} is minimal. Set d(i) := deg(h g ) for all 1 ≤ i ≤ m and 1 1 m m i i write (cid:88) (cid:88) (cid:88) (2) f = LT(h )g + (h −LT(h ))g + h g i i i i i i i d(i)=δ d(i)=δ d(i)≺δ Note that only the first sum has terms of degree equal to δ. We claim that deg(f) = δ. Suppose deg(f) ≺ δ. By Lemma 3.17, there exist coefficients c ∈ K for i (cid:54)= j such ij (cid:80) (cid:80) that LT(h )g = c S(LT(h )g ,LT(h )g ), where c = 0 whenever d(i) ≺ δ d(i)=δ i i i(cid:54)=j ij i i j j ij 9 Section 3 3.2 Computing Gr¨obner Bases or d(j) ≺ δ. For all i (cid:54)= j with d(i) = d(j) = δ we have Xδ Xδ S(LT(h )g ,LT(h )g ) = LT(h )g − LT(h )g = Xδ−γijS(g ,g ) i i j j i i j j i j LT(h g ) LT(h g ) i i j j for some γ ∈ Zn . By assumption S(g ,g )G = 0 for all i (cid:54)= j. Hence there exist rij ∈ K[X] ij ≥0 i j (cid:96) for all 1 ≤ (cid:96) ≤ m and i (cid:54)= j such that deg(rijg ) (cid:22) deg(S(g ,g )) and S(g ,g ) = (cid:80)m rijg . (cid:96) (cid:96) i j i j (cid:96)=1 (cid:96) (cid:96) We thus find: m (3) (cid:88) LT(h )g = (cid:88)c S(LT(h )g ,LT(h )g ) = (cid:88)(cid:88)c Xδ−γijrijg i i ij i i j j ij (cid:96) (cid:96) d(i)=δ i(cid:54)=j i(cid:54)=j (cid:96)=1 Furthermore, for all 1 ≤ (cid:96) ≤ m and i (cid:54)= j we have deg(Xδ−γijrijg ) (cid:22) deg(Xδ−γijS(g ,g )) = deg(S(LT(h )g ,LT(h )g )) ≺ deg(h g ) (cid:96) (cid:96) i j i i j j i i where the last inequality follows from Lemma 3.17. Combining equation (2) and (3) yields f as a linear combination of (g )m such that every term has degree strictly less than δ. This i i=1 contradicts the minimality of δ, and thus the degree of f must equal δ. So LT(g ) divides k LT(f) for some 1 ≤ k ≤ m and therefore LT(f) ∈ (cid:104)LT(G)(cid:105). Using Buchberger’s criterion, we can now check whether a given generating set of an ideal is a Gr¨obner basis. More importantly, we have an algorithm which computes a Gr¨obner basis of a given ideal. Algorithm 3.19 (Buchberger). Let I ⊂ K[X] be an ideal and (cid:23) a monomial ordering on K[X]. The following algorithm computes a Gr¨obner basis of I with respect to (cid:23). Input: F = (f ,...,f ), a generating set of I 1 m Output: G = a Gr¨obner basis of I w.r.t. (cid:23) begin G := F repeat G(cid:48) := G foreach pair p,q ∈ G(cid:48) with p (cid:54)= q do G(cid:48) S := S(p,q) with respect to (cid:23) (Algorithm 3.12) if S (cid:54)= 0 then G := G(cid:48)∪{S} end end until G = G(cid:48) end Proof. Assume that the algorithm never terminates. This is only possible if G and G(cid:48) G(cid:48) never coincide in the outer loop. This implies S = S(p,q) (cid:54)= 0 for some p,q ∈ G(cid:48) with 10