Polynomials and Gröbner Bases
Alice Feldmann January 13, 2015
Abstract This report is intended to elaborate the topics covered in the presentation on December 16, 2014 about polynomials and Gröbner basis held by Alice Feldmann in the student seminar in com- binatorics on mathematical software in the autumn semester 2014 at ETH Zurich. The concept of polynomials and Gröbner bases is a typical subject in computational algebra. First of all, this report gives a short introduction into computational algebra. Then, after providing the math- ematical background and explaining related notions, it explains Buchberger’s algorithm for the construction of Gröbner bases. Finally some mathematical software tools are presented, which are widely used for problems in computational algebra, whereby a focus lays on the software Singular.
1 Introduction: Computational Algebra
Computational algebra has developed a lot during the second half of the 20th century. It describes the process of tackling and studying algebraic problems with algorithmic methods using computational help of appropriate software tools. An easy example students get to know very early is solving an inhomogenous system of linear equations. There are many efficient implementations of the famous Gauss algorithm. Using matrices as the underlying algebraic notion, the system can be transformed into an equation of the form Ax = b n n n with A F ⇥ and b F 0 for a field F .Oneexperiencesthatacomputerhelpsalotinthis 2 2 \{ } case due to an efficient implementation of the computation of the determinant: there exists a unique solution for an inhomogenous system, if and only if det(A) =0. 6 A widely spread topic in computational algebra is the effient calculation of Gröbner bases, which can be used in various applications. They provide solutions to basic problems in ring theory like the membership problem: “Let R be a ring and I an ideal of R.Givenr R,isr I?”. Furthermore they 2 2 come up with an approach for solving systems of non-linear equations by the reduction of the number of variables.
2 Polynomials and Gröbner Bases 2.1 Mathematical Background: Algebraic Construction First of all, we want to repeat some basic algebraic definitions and concepts.
Basic definitions:
A monomial over a collection of variables x1,x2,...,xn is defined as the product of powers ↵i • ↵1 ↵2 ↵n ↵ (for i =1,...,n) of these variables: x1 x2 xn =: x .Wecandeterminethetotaldegreeof n ··· the monomial x↵:deg(x↵)= ↵ =: ↵ . i=1 i | | P
1 A term is a product of a non-zero element c of a field F and a monomial. Hence, a polynomial p • can be written as a finite sum of terms with coefficients in F ,suchasp = c x↵ for c F ↵. ↵ ↵ ↵ 2 8 Let F [x ,...,x ] denote the polynomial ring, which is the set of all polynomialsP in n variables • 1 n x1,...,xn with coefficients in F .NotethatF [x1,...,xn] is a commutative ring with addition and multiplication of polynomials defined as usual. Furthermore, define the field of rational functions as F (x ,...,x ):= f f,g F [x ,...,x ] and g=0 . 1 n g | 2 1 n 6 n o An ideal I F [x ,...,x ] of a polynomial ring is a non-empty subset such that f + g I for • ⇢ 1 n 2 f,g I and furthermore pf I for an arbitraty polynomial p F [x ,...,x ]. Ideals can be gen- 2 2 2 1 n erated by a set of s polynomials, say f ,...,f F [x ,...,x ].Denotetheidealgeneratedby { 1 s}⇢ 1 n this set of functions by f ,...,f := p f + ...+ p f p F [x ,...,x ] for i = 1,...,s . h 1 si { 1 1 s s | i 2 1 n { }} We remark that f ,...,f is the smallest ideal which contains all the polynomials f ,...,f . h 1 si 1 s Example: Consider the polynomials f := x2 + z2 1,f:= x2 + y2 +(z 1)2 4 and p := x2 + 1 y2z z 1. 1 2 2 Note that f1,f2,p R [x, y, z]. We want to check whether p lies in the ideal f1,f2 generated by 2 h i f1 and f2.Observethatp can be written as a sum of terms as follows: 1 1 1 p = x2 + y2z z 1= z +1 x2 + z2 1 + z x2 + y2 +(z 1)2 4 2 2 2 ✓ ◆ ✓ ◆ ⇣ ⌘ 1 1 = z +1 f + z f = ↵ f + ↵ f 2 1 2 2 1 1 2 2 ✓ ◆ ✓ ◆ 1 1 with ↵1 = z +1and ↵2 = z, both in R [x, y, z].Weconcludethatp f1,f2 . 2 2 2h i
The Hilbert basis theorem and the division algorithm We want to remind the reader of the famous Hilbert basis theorem at this point: it states that every ideal I in F [x1,...,xn] has a finite generating set. This means that for any given ideal I,thereexists afinitesetofpolynomials f ,...,f F [x ,...,x ] such that I = f ,...,f . We will see later { 1 s}⇢ 1 n h 1 si that this theorem is of quite a big importance.
The division algorithm in F [x] Furthermore, we know a division algorithm in the polynomial ring F [x] in one variable x which works in the following way: assume that we are given two polynomials f,g F [x].Wecandividef by g 2 producing a unique quotient q F [x] and a unique remainder r F [x] such that f = qg + r,andit 2 2 is either r =0,orr has a degree strictly smaller than the degree of g. Since we often have to operate with functions in more than one variable the question arises, if there exists an equivalent division algorithm for polynomials in many variables? To answer this question, we first have to introduce the notion of monomial orders.
Definition: monomial orders ↵ AmonomialorderonF [x1,...,xn] is any relation > on the set of monomials x in F [x1,...,xn] satisfying:
2 1. > is a total (linear) ordering relation,i.e.itisantisymmetric(a b and b a a = b), ) transitive (a b and b c a c)andtotal(weeitherhavea b or b a for two distinc ) elements a, b F [x ,...,x ]). 2 1 n 2. > is compatible with multiplication in F [x1,...,xn],i.e.ifa
The two most common monomial orders are the lexicographic order and the graded reverse lexico- graphic order, which are defined as follows:
Lexicographic order ↵ ↵ Let x and x be monomials in F [x1,...,xn].Wesayx >lex x ,iftheleft-mostentryinthe difference ↵ Zn is positive. 2 Graded reverse lexicographic order ↵ ↵ n n Let x and x be monomials in F [x1,...,xn].Wesayx >grevlex x ,ifeither i=1 ↵i > i=1 i, or in case the sums are equal, the right-most entry in the difference ↵ Zn is negative. 2 P P We want to illustrate these monomial orders with some easy examples. We naturally always assume that x>y>z.
We have that x3y2z> x2y6z12.Lookingatthedifferencevector(3, 2, 1) (2, 6, 12) = • lex (1, 4, 11) shows that the left-most entry is positive. Hence the term x3y2z is greater than x2y6z12 in the lexicographic order. It is also true that x2y2z2 > xy4z,becausewehave(2, 2, 2) (1, 4, 1) = (1, 2, 1). • lex However, we get x2y6z12 > x3y2z in this case, because the total degree (equal to 20)of • grevlex the term x2y6z12 is greater than the total degree (equal to 6)oftheotherterm. Furthermore, looking at the terms from the second example using the graded reverse lexicographic • 4 2 2 2 order, we obtain xy z>grevlex x y z ,becausethemonomialshaveequaltotaldegrees,butthe difference vector is equal to (1, 4, 1) (2, 2, 2) = ( 1, 2, 1) and we need the right-most entry to be negative. The examples show that two polynomials can be ordered in several ways depending on how one defines the monomial ordering. This is a very important aspect, because different orderings yield different results.
Definition: leading term of a polynomial
Before we finally get to explain the division algorithm in the polynomial ring F [x1,...,xn],weneedto ↵ define what the leading term of a polynomial is. Let f := ↵ c↵x be a polynomial in F [x1,...,xn]. ↵ Fix an arbitrary monomial order >. The leading term of f with respect to > is the product c↵x , P where x↵ is the largest monomial appearing in the ordering >.Denotetheleadingtermofpolynomial f by LT>(f).
3 Example: Consider the polynomial f =3x3y2 + x2yz3 Q [x, y, z].Observethatwehavedifferentleadingterms 2 3 2 depending on the choice of the monomial order. We get LT>lex (f)=3x y for the lexicographic order, 2 3 whereas LT>grevlex (f)=x yz for the graded reverse lexicographic order.
The division algorithm in F [x1,...,xn]
Fix any monomial order > in F [x1,...,xn] and let P := (p1,...,ps) be an ordered s-tuple of polyno- mials in F [x ,...,x ]. Then every f F [x ,...,x ] can be written as 1 n 2 1 n
f = a1p1 + ...+ asps + r, where a ,r F [x ,...,x ],andeitherr =0,orr is a linear combination of monomials, of which none i 2 1 n is divisible by any of the leading terms LT>(p1),...,LT>(ps) of the polynomials in P . We want to point out, that - analogously to the division algorithm in the polynomial ring F [x] - r is called the remainder of f on division by P .Wesometimesusethenotationr = f¯P . Furthermore, note that the division algorithm allows us to divide f by an s-tuple of polynomials. This is due to the fact that if we regard f as a polynomial generated by the polynomials in P ,wewant to divide it by more than one polynomial to see whether it can be written as a linear combination of exactly those s polynomials. As a last remark, we again want to bring the reader’s attention to the fact that the outcome of the division depends on the choice of the monomial order.
2.2 Gröbner Bases Motivation By applying the division algorithm, one can decide whether a given polynomial f F [x ,...,x ] is a 2 1 n member of a given ideal I = f ,...,f .Iftheremainderr = f¯P of f on division by P := (p ,...,p ) h 1 si 1 s is zero, i.e. f¯P =0,thenwehavef = a p +...+a p ,andbydefinitionitistruethatf p ,...,p . 1 1 s s 2h 1 si Now, recall one of our previous examples: define p := x2 + 1 y2z z 1 and I = f ,f = 2 h 1 2i x2 + y2 1,x2 + y2 +(z 1)2 4 .Wehavealreadyshowedthatp I.However,ifwedividep 2 Dby P =(f1,f2) using our division algorithmE (assume we have fixed the lexicographic order), we obtain P 1 2 2 anon-zeroremainderp¯ = 2 y z z z .Thereasonisthatnoneoftheleadingtermsoff1 or f2 2 P 1 2 (LT(f1)=LT(f2)=x )dividestheleadingtermoftherestofp (LT p¯ = 2 y z)afterthefirststep (which is the division of p by f ). 1 Gröbner bases will help us to solve this problem by gernerating a new basis for the same ideal. Then it is guaranteed that the division algorithm works when dividing by the corresponding Gröbner basis.
Definition: Gröber basis Fix a monomial order > on F [x ,...,x ] and let I F [x ,...,x ] be an ideal. A Gröbner basis for 1 n ⇢ 1 n I with respect to > is a finite collection of polynomials G = g ,...,g I with the property that { 1 t}⇢ for every non-zero polynomial f I,theleadingtermLT (f) of f is divisible by the leading term 2 > LT>(gi) of some gi for some i. We call a Gröbner Basis G for an ideal I ... reduced,ifnomonomialappearinginp G is a multiple of the leading term LT (q) of any other • 2 > monomial q G. 2
4 monic,ifitisreducedandiftheleadingcoefficientofallpolynomialsis1. • Note that a Gröbner basis G is indeed a basis for I,i.e.I = g ,...,g as we will see later. Moreover, h 1 ti if G is a Gröbner basis for I and we have a polynomial f I,thentheremainderoff on division 2 by G is zero due to the construction of the Gröbner basis, i.e. f I f¯G =0.Beforecomingto 2 , Buchberger’s algorithm, one last remark should be that the remainder obtained through division by polynoimals of a Gröbner basis for an ideal is unique.
2.3 Buchberger’s Algorithm Motivation We have seen before that Gröbner bases promise better results when it comes to various problems, for example the ideal membership problem. Hence it is desirable to work with Gröbner bases instead of arbitrary bases. Buchberger’s algorithm takes an arbitrary generating set f ,...,f of an ideal { 1 s} I = f ,...,f as input and produces a Gröbner basis G for I from it. Buchberger developed his h 1 si algorithm in the 1970s and by now it has become one of the most powerful tools in computational algebra.
How it works... Let f,g F [x ,...,x ] be non-zero polynomials. Fix a monomial order and let LT (f)=cx↵ and 2 1 n LT (g)=dx be the leading terms of f and g, respectively, where c, d F. Furthermore, define 2 x := lcm x↵,x as the least common multiple of the monomials in the leading terms. Now, define the S-polynomial of f and g as follows: x x S (f,g):= f g LT (f) · LT (g) · and observe that S (f,g) f,g . 2h i Now, apply Buchberger’s criterion: G AfinitesetG = g ,...,g I is a Gröbner basis of I if and only if S (g ,g ) =0for all pairs i and { 1 t}⇢ i j j with i = j. 6 Buchberger’s Algorithm Input: F = f ,...,f { 1 s} Output: a Gröbner basis G = g ,...,g for the ideal I = F with F G { 1 t} h i ⇢ G := F REPEAT G0 := G FOR each pair p = q in G0 DO 6 G0 S := S (p, q) IF S=0 THEN G := G S 6 [{ } UNTIL G = G0
Analysis of the Algorithm We now want to explain that the algorithm is correct: first of all, G is indeed a basis for I,because the algorithm simply adjoins polynomials lying in the ideal I to our set G. This means that the core of the basis, i.e. F = f ,...,f , is still kept and no new generators are added. Hence G is a basis { 1 s} for I as well.
5 Further, we observe that only polynomials with leading terms different from the leading terms of the current basis are added to the set. These leading terms have a smaller total degree than any of the other terms by construction of the division algorithm and since we just look at polynomials of finite degree, one eventually reaches the point when the leading term of every polynomial occuring in the ideal can be divided by the leading term of a polynomial in the set. Then, the set forms a Gröbner basis by definition and we have reached our goal. It follows that the algorithm terminates at some point and hence the running time is finite. Note that in this version of Buchberger’s algorithm, the resulting Gröbner bases are not reduced. However, this can be implemented as well with some effort.
Example We want to apply Buchberger’s Algorithm to an easy example. Consider the polynomials f = x3y 2x2y2 + x and g =3x4 y.Fixthemonomialordertobethelexicographicorder> .Firstof lex all, note that we have LT (f)=x3y and LT (g)=3x4 in the lexicographic order. Hence, we get by definition x = lcm x3y, x4 = x4y.NowcomputetheS-polynomial: