NON-COMMUTATIVE POLYNOMIAL COMPUTATIONS

Similar documents
Gröbner Bases for Noncommutative Polynomials

Lecture 1. (i,j) N 2 kx i y j, and this makes k[x, y]

Rota-Baxter Type Operators, Rewriting Systems, and Gröbner-Shirshov Bases, Part II

(1) A frac = b : a, b A, b 0. We can define addition and multiplication of fractions as we normally would. a b + c d

Non-commutative reduction rings

FILTERED RINGS AND MODULES. GRADINGS AND COMPLETIONS.

ABSTRACT. Department of Mathematics. interesting results. A graph on n vertices is represented by a polynomial in n

To hand in: (a) Prove that a group G is abelian (= commutative) if and only if (xy) 2 = x 2 y 2 for all x, y G.

THE DIAMOND LEMMA FOR RING THEORY

Kiddie Talk - The Diamond Lemma and its applications

Polynomials, Ideals, and Gröbner Bases

2. Prime and Maximal Ideals

Math 615: Lecture of January 10, 2007

Course 311: Michaelmas Term 2005 Part III: Topics in Commutative Algebra

Monomial orderings, rewriting systems, and Gröbner bases for the commutator ideal of a free algebra

LINEAR EQUATIONS WITH UNKNOWNS FROM A MULTIPLICATIVE GROUP IN A FUNCTION FIELD. To Professor Wolfgang Schmidt on his 75th birthday

Math 210B. Artin Rees and completions

Definitions. Notations. Injective, Surjective and Bijective. Divides. Cartesian Product. Relations. Equivalence Relations

A finite universal SAGBI basis for the kernel of a derivation. Osaka Journal of Mathematics. 41(4) P.759-P.792

0.2 Vector spaces. J.A.Beachy 1

THE CLOSED-POINT ZARISKI TOPOLOGY FOR IRREDUCIBLE REPRESENTATIONS. K. R. Goodearl and E. S. Letzter

8 Appendix: Polynomial Rings

Formal power series rings, inverse limits, and I-adic completions of rings

4.4 Noetherian Rings

CHAPTER 0 PRELIMINARY MATERIAL. Paul Vojta. University of California, Berkeley. 18 February 1998

4 Hilbert s Basis Theorem and Gröbner basis

4. Images of Varieties Given a morphism f : X Y of quasi-projective varieties, a basic question might be to ask what is the image of a closed subset

1 Absolute values and discrete valuations

A NOTE ON SIMPLE DOMAINS OF GK DIMENSION TWO

Criteria for existence of semigroup homomorphisms and projective rank functions. George M. Bergman

Chapter 1. Sets and Numbers

9. Integral Ring Extensions

COMMUTATIVE/NONCOMMUTATIVE RANK OF LINEAR MATRICES AND SUBSPACES OF MATRICES OF LOW RANK

ON RIGHT S-NOETHERIAN RINGS AND S-NOETHERIAN MODULES

The 4-periodic spiral determinant

ABSTRACT NONSINGULAR CURVES

6 Lecture 6: More constructions with Huber rings

A Combinatorial Approach to Involution and δ-regularity I: Involutive Bases in Polynomial Algebras of Solvable Type

arxiv: v1 [math.rt] 4 Jan 2016

Elementary linear algebra

Handout #6 INTRODUCTION TO ALGEBRAIC STRUCTURES: Prof. Moseley AN ALGEBRAIC FIELD

Multiplicative Bases, Gröbner Bases, and Right Gröbner Bases

Math 145. Codimension

Introduction to Arithmetic Geometry Fall 2013 Lecture #18 11/07/2013

4. Noether normalisation

Lecture 7. This set is the set of equivalence classes of the equivalence relation on M S defined by

arxiv: v2 [math.gr] 22 Aug 2016

Algebra 2. Rings and fields. Rings. A.M. Cohen, H. Cuypers, H. Sterk

5 Dedekind extensions

Mathematics Course 111: Algebra I Part I: Algebraic Structures, Sets and Permutations

Rewriting Polynomials

GROUPS. Chapter-1 EXAMPLES 1.1. INTRODUCTION 1.2. BINARY OPERATION

ALGEBRA II: RINGS AND MODULES OVER LITTLE RINGS.

Gröbner bases for the polynomial ring with infinite variables and their applications

Collected trivialities on algebra derivations

Pacific Journal of Mathematics

NUMBER SYSTEMS. Number theory is the study of the integers. We denote the set of integers by Z:

Lesson 14 Properties of Groebner Bases

Factorization in Polynomial Rings

NOTES ON LINEAR ALGEBRA OVER INTEGRAL DOMAINS. Contents. 1. Introduction 1 2. Rank and basis 1 3. The set of linear maps 4. 1.

Pacific Journal of Mathematics

CHAPTER 4. βs as a semigroup

Primitivity of finitely presented monomial algebras

ALGEBRA. 1. Some elementary number theory 1.1. Primes and divisibility. We denote the collection of integers

CHAPTER 10: POLYNOMIALS (DRAFT)

Honors Algebra 4, MATH 371 Winter 2010 Assignment 4 Due Wednesday, February 17 at 08:35

IDEAL CLASSES AND RELATIVE INTEGERS

HASSE-MINKOWSKI THEOREM

Reid 5.2. Describe the irreducible components of V (J) for J = (y 2 x 4, x 2 2x 3 x 2 y + 2xy + y 2 y) in k[x, y, z]. Here k is algebraically closed.

RINGS ISOMORPHIC TO THEIR NONTRIVIAL SUBRINGS

Infinite-Dimensional Triangularization

SYMMETRIC ALGEBRAS OVER RINGS AND FIELDS

MINIMAL GENERATING SETS OF GROUPS, RINGS, AND FIELDS

Computing syzygies with Gröbner bases

Decomposition Orders. another generalisation of the fundamental theorem of arithmetic

Chapter 1. Sets and Mappings

Theorem 5.3. Let E/F, E = F (u), be a simple field extension. Then u is algebraic if and only if E/F is finite. In this case, [E : F ] = deg f u.

NONCOMMUTATIVE POLYNOMIAL EQUATIONS. Edward S. Letzter. Introduction

Axioms of Kleene Algebra

Note that a unit is unique: 1 = 11 = 1. Examples: Nonnegative integers under addition; all integers under multiplication.

Krull Dimension and Going-Down in Fixed Rings

Cohomology and Base Change

Continued fractions for complex numbers and values of binary quadratic forms

ON THE RESIDUALITY A FINITE p-group OF HN N-EXTENSIONS

MINIMAL POLYNOMIALS AND CHARACTERISTIC POLYNOMIALS OVER RINGS

Math 711: Lecture of September 7, Symbolic powers

1 Hilbert function. 1.1 Graded rings. 1.2 Graded modules. 1.3 Hilbert function

Rings If R is a commutative ring, a zero divisor is a nonzero element x such that xy = 0 for some nonzero element y R.

Topics in linear algebra

On some properties of elementary derivations in dimension six

AN ALGEBRAIC APPROACH TO GENERALIZED MEASURES OF INFORMATION

Rings With Topologies Induced by Spaces of Functions

x y B =. v u Note that the determinant of B is xu + yv = 1. Thus B is invertible, with inverse u y v x On the other hand, d BA = va + ub 2

Hilbert Polynomials. dimension and counting monomials. a Gröbner basis for I reduces to in > (I)

Leapfrog Constructions: From Continuant Polynomials to Permanents of Matrices

TIGHT CLOSURE CONTENTS

Representations of quivers

LANGUAGE CLASSES ASSOCIATED WITH AUTOMATA OVER MATRIX GROUPS. Özlem Salehi (A) Flavio D Alessandro (B,C) Ahmet Celal Cem Say (A)

POL502: Foundations. Kosuke Imai Department of Politics, Princeton University. October 10, 2005

Journal of Algebra 226, (2000) doi: /jabr , available online at on. Artin Level Modules.

Transcription:

NON-COMMUTATIVE POLYNOMIAL COMPUTATIONS ARJEH M. COHEN These notes describe some of the key algorithms for non-commutative polynomial rings. They are intended for the Masterclass Computer algebra, Spring 2007. Together with a paper on Knuth-Bendix, they provide the reading material for the eleventh lecture. 1. Gröbner bases In [6] Mora described an algorithm which, if it terminates, returns a noncommutative Gröbner basis. Here we follow that paper to prove the correctness of the algorithm as implemented by Dié Gijsbers and the author in GAP, cf. [1]. The algorithm is the core algorithm of the GAP package GBNP for computing with non-commutative polynomials. Earlier versions of this section were written with the help of Dié Gijsbers. 1.1. Basic notions. We start with some definitions and lemmas inspired by [6]. We work with finitely presented algebras with a unit element 1 over a field k. Let T be the free monoid on n generators, which will be denoted by x 1,..., x n. Here n is a natural number. We consider the monoid ring k T, which has an obvious k-vector space structure with basis T. The multiplication of the monoid ring is a bilinear extension of the multiplication in T, so T is a monomial basis. The elements of T are also called the monomials of k T. The elements of k T are called non-commutative polynomials, and often just polynomials. As usual in Gröbner basis theory, we need an appropriate ordering < on the set T of monomials. Definition 1. An ordering < on T is called a reduction ordering if for all t 1, t 2, l, r T with t 1 < t 2 we have 1 lt 1 r < lt 2 r. An example of a reduction ordering is the total degree first, then lexicographic ordering. A very useful property of a reduction ordering is that if a, b T are such that a divides b, denoted by a b (that is, there are l, r T with b = lar), then a b (for, 1 l and 1 r imply a = 1 a l a = l a 1 l a r). Definition 2. Given an ordering on T we can write each polynomial f k T in a unique way as a linear combination of monomials t i : f = s c i t i with c i k \ {0} and t i T, such that t 1 > > t s. i=1 We call this decomposition the ordered form of f. The polynomial f is called monic if c 1 = 1. Date: 3 May 2007. With contributions by Dié Gijsbers, Chris Krook, and Jan Willem Knopper. 1

2 ARJEH M. COHEN For such an ordered form of f, we denote t 1, the largest monomial with non-zero coefficient of f, by L(f). By lc(f) we denote the leading coefficient c 1 of the ordered form of f. Gröbner bases deal with finitely generated (two-sided) ideals in k T. A generating set of an ideal is called a basis of that ideal. The best approximation of the remainder of a division of a polynomial f by elements of a finite set G of elements of k T is a crucial notion, usually referred to as a normal form of f with respect to G. Definition 3. Let G k T, and denote by I the ideal generated by G. A normal form of f k T with respect to G is an element h k T such that f h I and either h = 0 or L(g) L(h) for all g G. Moreover, G is a Gröbner basis of I if G is a basis of I and if the leading monomial of each nonzero element of I is a multiple of the leading monomial of an element of G. Notice that the Gröbner basis depends on the choice of a reduction ordering. Taking the reduction ordering on T to be deglex, we have a well-founded ordering and hence a guarantee of termination of the normal form computation. We can think of NormalForm(f,G) as a deterministic algorithm if we view G as a list and, at every step, take the first element from the list whose leading monomial divides L(f). In the commutative case, S-polynomials are used for the Gröbner basis computation. In order to define their non-commutative analogues, we use obstructions. Definition 4. Let G = (g i ) 1 i q be a list of monic polynomials. An obstruction of G is a six-tuple (l, i, r; λ, j, ρ) with i, j {1,..., q} and l, λ, r, ρ T such that L(g i ) L(g j ) and ll(g i )r = λl(g j )ρ. Given an obstruction we define the corresponding S-polynomial as s(l, i, r; λ, j, ρ) = lg i r λg j ρ. Our notation of an obstruction differs slightly from Mora s. The symbols for the six parameters are equal though. Gröbner basis computations consist mainly of adding to G normal forms of S- polynomials of elements from a basis. The next notion is needed to weed out obstructions whose S-polynomials are not going to contribute to the computation. Definition 5. Given a list G = (g i ) 1 i q of monic polynomials we call a polynomial f weak with respect to G if there are c h k and l h, r h T such that, for each h l h L(g h )r h L(f) and f = c h l h g h r h. h We call an obstruction (l, i, r; λ, j, ρ) of G weak if its S-polynomial s(l, i, r; λ, j, ρ) is weak with respect to G. The S-polynomial of a weak obstruction (l, i, r; λ, j, ρ) can be written as follows with c h k and l h, r h T. s = lg i r λg j ρ = c h l h g h r h with l h L(g h )r h L(s) < ll(g i )r. h Weakness can be tested effectively by solving a finite number of linear equations. If the normal form of f with respect to G is equal to 0, then f is weak with respect to G. The converse is not necessarily true, but see Theorem 1.4.

NON-COMMUTATIVE POLYNOMIAL COMPUTATIONS 3 Observe that infinitely many obstructions can be found. The next lemma makes a lot of them superfluous. Lemma 1.1. Let G = (g h ) h=1,...,q be a list of monic polynomials in k T and (l, i, r; λ, j, ρ) a weak obstruction of G. Then all obstructions (l, i, r ; λ, j, ρ ) with l = ω 1 l, r = rω 2, λ = ω 1 λ, ρ = ρω 2 and ω 1, ω 2 monomials, are also weak. Proof. Denote by s the S-polynomial of (l, i, r; λ, j, ρ). By the weak obstruction hypothesis we can write s = lg i r λg j ρ = h c hl h g h r h with l h L(g h )r h L(s). Now assume (l, i, r ; λ, j, ρ ) is an obstruction as in the hypotheses and denote by s its S-polynomial. Then s = l g i r λ g j ρ = ω 1 (lg i r λg j ρ)ω 2 = ω 1 c h l h g h r h ω 2 = ω 1 sω 2. Now s = h c hl h g hr h with l h = ω 1l h and r h = r hω 2. From l h L(g h )r h L(s) we obtain l h L(g h)r h = ω 1l h L(g h )r h ω 2 ω 1 L(s)ω 2 = L(s ) and so the obstruction is weak with respect to G. Definition 6. Let G be a list of monic polynomials in k T and H a set of polynomials. An S-polynomial s is called reducible from H with respect to G if weakness with respect to G of all elements of H implies weakness of s with respect to G. In particular, if s is weak then it is reducible from. If we have obstructions (l, i, r; λ, j, ρ) and (l, i, r ; λ, j, ρ ) as in Lemma 1.1, then s(l, i, r ; λ, j, ρ ) is reducible from {s(l, i, r; λ, j, ρ)}. We now state our version of a Gröbner basis theorem for I. It is based on the result, known by [6, 2], that G is a Gröbner basis of I if and only if each leading monomial of a member of I is a multiple of L(g) for some g G. Observe that an obstruction (l, i, r; λ, j, ρ) is weak if L(g i ) and L(g j ) have no overlap. This is our next focus (see [6, Lemma 5.4]). Definition 7. For b T, two monomials t 1 t 2 in T are said to have overlap b if there are a, c T such that t 1 = ab and t 2 = bc or t 1 = ba and t 2 = cb or t 1 = b and t 2 = abc. If 1 is the only overlap between t 1 and t 2, the two monomials t 1 and t 2 are said to have no overlap. An obstruction (l, i, r; λ, j, ρ) is said to have no overlap if L(g i ) and L(g j ) do not overlap in ll(g i )r, in the sense that there is a w T such that ll(g i )r = ll(g i )wl(g j )ρ or ll(g i )r = λl(g j )wl(g i )r. Clearly, if L(g i ) and L(g j ) have no overlap, then every obstruction (l, i, r; λ, j, ρ) with l, r, ρ, λ T has no overlap. The converse is not true: if L(g i ) = x 1 x 2 and L(g j ) = x 2 x 3, then the overlap between these monomials is x 2 whereas the obstruction (1, i, x a 2x 3 ; x 1 x a 2, j, 1) has no overlap for each a > 0. Lemma 1.2. Suppose u, v, and w are monomials in T. If uw = wv, then there exist x, y T and a N with u = xy, v = yx and w = (xy) a x. Proof. Induction on the length of w. 1.2. Reducibility. Throughout this section we take G to be a list (g h ) h=1,...,q of monic polynomials in k T. Lemma 1.3. Every obstruction without overlap is reducible from an S-polynomial with overlap with respect to G. h

4 ARJEH M. COHEN Proof. Let b = (l, i, r; λ, j, ρ) be an obstruction and denote by s its S-polynomial. Then ll(g i )r = λl(g j )ρ. Suppose that b has no overlap. Then there exists w T such that either r = wl(g j )ρ or l = λl(g j )w. Assume the former (the proof for l = λl(g j )w being quite similar). Then also λ = ll(g i )w and by Lemma 1.1 b = (l, i, wl(g j )ρ; ll(g i )w, j, ρ) is reducible from (1, i, wl(g j ); L(g i )w, j, 1). Therefore, we may and shall assume l = ρ = 1. In the ordered form, the two polynomials g i, g j can be written as g i = h c ht h and g j = p d pu p for h = 1,..., m i and p = 1,..., with t h, u p T and c h, d p k\{0} such that t h > t h+1 and u p > u p+1. Thus L(g i ) = t 1 and L(g j ) = u 1. Now s = g i r λg j = g i wl(g j ) L(g i )wg j m j m i = g i w(g j d p u p ) (g i c h t h )wg j = m i p=2 h=2 c h t h wg j d p g i wu p h=2 p=2 To prove that s is weak, it remains to verify that all monomials occurring on the right hand side are less than or equal to L(s). This can only go wrong when the leading monomials, say t 2 wl(g j ) and L(g i )wu 2 of the two summations on the right hand side cancel each other: c 2 t 2 wu 1 = d 2 t 1 wu 2 Since t 2 < t 1 and u 2 < u 1 this only occurs if c 2 = d 2 and there are v 1, v 2 T such that t 1 = t 2 v 1 and u 1 = v 2 u 2 with v 1 w = wv 2. By Lemma 1.2 the only non-trivial solutions are those with v 1 = xy, v 2 = yx and w = (xy) a x for some monomials x and y and a N. Without loss of generality we may assume that y 1 (for otherwise the leading monomials will have overlap x). For brevity we denote the obstruction with w = (xy) a x by o(a). We expand g i and g j and find m i m i g i = t 1 + c h t h = t 2 xy + c 2 t 2 + c h t h h=2 h=3 m i g j = u 1 + d p u p = yx u 2 + d 2 u 2 + d p u p p=2 p=3

NON-COMMUTATIVE POLYNOMIAL COMPUTATIONS 5 Expansion of the summations on the right hand side in the previous expansion of s gives s = m i h=2 c h t h wg j d p g i wu p p=2 m i = c 2 t 2 wg j d 2 g i wu 2 + c h t h wg j d p g i wu p h=3 m i = c 2 (t 1 (xy) a 1 xg j g i (xy) a 1 xu 1 ) + c h t h wg j d p g i wu p p=3 h=3 so, writing s(a 1) for the S-polynomial of o(a 1), we have m i s = c 2 s(a 1) + c h t h wg j d p g i wu p. h=3 If again the leading terms t 3 wu 1 and t 1 wu 3 of the summations cancel each other then t 1 and u 1 are not only multiples of t 2 and u 2 but also multiples of t 3 and u 3. Then their corresponding polynomials can be extracted in the same way as done for t 2 and u 2. After a finite number m of these extractions we find s = c 2 s(a 1) + c 3 s(a 2) +... + m i h=m+2 p=3 c h t h wg j p=3 p=m+2 d p g i wu p. Now t m+2 wl(g j ) or L(g i )wu m+2 with c m+2 0 or d m+2 0 respectively, is the leading term of the two summations on the right. Assume that all s(a b) are weak for 1 b a. Then we can express every s(a b) as a sum of polynomials lg h r with leading term ll(g h )r less than or equal to L(s(a b)). By the shape of s(a b) we know that t h (xy) a b xl(g j ) = L(g i )(xy) a b xu p for all t h and t p that cancelled in the previous summations. So L(s(a b)) is at most t m+2 (xy) a b xl(g j ) or L(g i )(xy) a b xu m+2. This means that if all s(a b) are weak then t m+2 wl(g j ) or L(g i )wu m+2 is the leading term of s = s(a) and all monomials on the right hand side are less than or equal to L(s), proving that s(a) is weak. So s(a) is reducible from {s(a b) 1 b a}. By recursion now all s(a) are reducible from s(0). Since reducibility is a transitive relation, it remains to show that s(0) is reducible from an S-polynomial with overlap. Using the same substitution as before we find s(0) = g i xu 2 t 2 xg j. But t 1 = t 2 xy and u 1 = yx u 2, so the obstruction o(0) has an overlap because y 1. As a consequence, if an S-polynomial s(l, i, r; λ, j, ρ) is not weak with respect to G, then the leading monomials of the two polynomials involved have an overlap. Next we show that, although the set of all S-polynomials of G can be infinite, we can restrict our analysis of obstructions to a finite set. Definition 8. A set H of polynomials is called basic for G if every S-polynomial of G is reducible from H with respect to G. Theorem 1.4. For a finite list G of polynomials generating an ideal I of k T, the following statements are equivalent.

6 ARJEH M. COHEN (i) G is a Gröbner basis. (ii) The normal form of each polynomial of G is equal to 0. (iii) Each S-polynomial of G is weak with respect to G. (iv) The empty set is a basic set for G. Proof. Write G = (g i ) 1 i q. (i) = (ii). Suppose G is a Gröbner basis and f I. If f = 0 we are done. Otherwise, let i be the first index {1,..., q} for which L(g i ) divides L(f). Then there are a, b T such that al(g i )b = L(f). Now f ag i b I. By induction with respect to the reduction ordering <, we have NormalForm(f ag i b, G) = 0. As f ag i b is the first step of the NormalForm algorithm for f, this implies NormalForm(f, G) = 0, as required. (ii) = (iii). Suppose s = s(li, r; λ, j, ρ). By (ii), NormalForm(s, G) = 0, so s is weak. (iii) (iv). This is immediate from the definition of basic set. (iii) = (i). Suppose f I and L(f) is not contained in the ideal generated by all L(g i ). Without loss of generality, we may take L(f) to be minimal with these properties as well as the maximum t over all leading monomials in an expression of f as a linear combination of summands a h g h b h with a h, b h k T and g h G. By an argument as in Lemma 1.3, there are at least two indices i and j such that a i g i b i and a j g j b j are distinct and occur in an expression of f as a linear combination of multiples of the elements of G and satisfy t = L(a i g i b i ) = L(a j g j b j ) > L(f). Consider the S-polynomial s = s(l(a i ), i, L(b i ); L(a j ), j, L(b j )). By (iii), s is weak. Let w be an expression of s as a sum of multiples of g h whose leading terms are smaller than t and consider the following expression f = lc(a i b i )lc(a j b j ) 1 a j g j b j + lc(a i b i )w + a h g h b h. h i,j This expression for f has fewer summands with leading term equal to t. Continue this way until this number is at most 1. Then we reach a contradiction. We conclude that G is a Gröbner basis. Lemma 1.5. There is a finite basic set H of S-polynomials of G. Moreover, H can be chosen so that every S-polynomial of G in H corresponds to an obstruction (l, i, r; λ, j, ρ) with overlap and with either at least one of the two parameters {l, λ} and one of {r, ρ} equal to 1 or λ = ρ = 1. In fact, such an H can be found from the knowledge of the leading monomials of elements of G only. Proof. Let (l, i, r; λ, j, ρ) be an obstruction and write s = s(l, i, r; λ, j, ρ) for its corresponding S-polynomial. Write L(g i ) = m 1 m p and L(g j ) = n 1 n q with m u and n v monomials in T of degree 1 (that is, of the form x l for some l {1,..., n}). Recall that L(g i ) L(g j ) so p q. From Lemma 1.3 we know that if s is not weak, then it must have some overlap. In particular, L(g i ) and L(g j ) must have overlap. This can occur in three ways: m 1 m h = n q h+1 n q 1 h < p, n 1 n h = m p h+1 m p 1 h < p, or m 1 m p = n h+1 n h+p 1 h < q p.

NON-COMMUTATIVE POLYNOMIAL COMPUTATIONS 7 In particular, for every two polynomials the number of possible overlaps is finite. We show that H needs to contain at most one S-polynomial for every overlap. This suffices to prove the lemma. Assume that L(g i ) and L(g j ) have a nontrivial overlap. To satisfy the equation ll(g i )r = λl(g j )ρ, the factors of L(g i ) that are not in the overlap have to be in λ or ρ and, similarly, the parts of L(g j ) that are not in the overlap have to be in l or r. So for every obstruction corresponding to some overlap the monomials ll(g i )r and λl(g j )ρ have to be equal to l ωr and λ ωρ, respectively, with ω equal to ω = n 1 n q h L(g i ) = L(g j )m h+1 m p ω = L(g i )n h+1 n q = m 1 m p h L(g j ) ω = n 1 n h L(g i )n h+p+1 n q = L(g j ) in the respective cases. Now by Lemma 1.1 these obstructions are weak except when l = r = λ = ρ = 1. So for every possible overlap there exists a single S-polynomial such that all other obstructions are reducible from it with respect to {g i, g j }; in the respective cases, the corresponding obstruction is (n 1 n q h, i, 1; 1, j, m h+1 m p ) (1, i, n h+1 n q ; m 1 m p h, j, 1) (n 1 n h, i, n h+p+1 n q ; 1, j, 1) This means that s need only be in H if at least one of the two parameters l and λ is equal to 1 and at least one of the two parameters r and ρ is equal to 1. We distinguish between three kinds of obstruction. Definition 9. Let s = (l, i, r; λ, j, ρ) be an obstruction of the list G = (g i ) 1 i q of monic polynomials in k T. If l = 1 then we call s a right obstruction. If r = 1 and l 1 then s is called a left obstruction. The remaining obstructions with λ = ρ = 1 (so s = (l, i, r; 1, j, 1)) are called central obstructions. Proposition 1.6. Let G be a set of polynomialsin k T and let H be the set of all non-zero normal forms of S-polynomials with respect to G corresponding to all left, right, and central obstructions of G. Then H is a basic set for G. Proof. Follows directly from Lemma 1.5. The set of basic obstructions can be trimmed further. Lemma 1.7. Let (l 1, i, 1; 1, j, ρ 1 ) and (ωl 1, i, 1; 1, q, ρ 2 ) be two obstructions with respective S-polynomials s 1 and s 2. If ω 1, then there exists an S-polynomial s 3 = s(ω, j, r 3 ; 1, q, ρ 3 ) with r 3 = 1 or ρ 3 = 1, such that s 2 is reducible from the union of the S-polynomials {s 1, s 3 } and S-polynomials s p with L(s p ) < L(s 2 ). Proof. We know that l 1 L(g i ) = L(g j )ρ 1 and ωl 1 L(g i ) = L(g q )ρ 2. Substitution gives ωl(g j )ρ 1 = L(g q )ρ 2. This means that there exist obstructions of the form (ω, j, ρ 1 ; 1, q, ρ 2 ). By Lemma 1.5 we can find one obstruction o 3 by reducing ρ 1 and ρ 2 to 1 and some ρ 3. Here ρ q1 = ρ 3 ρ q2, resulting in a left obstruction if q 1 = 2 and q 2 = 1 and in a central obstruction if q 1 = 1 and q 2 = 2.

8 ARJEH M. COHEN Now we have two polynomials s 1 and s 3. Suppose that they are weak. We have to consider two cases. First assume ρ 2 = ρ 3 ρ 1 and s 3 = s(ω, j, 1; 1, q, ρ 3 ). Now s 2 = ωl 1 g i g q ρ 3 ρ 1 = ω(l 1 g i g j ρ 1 ) + (ωg j g q ρ 3 )ρ 1 = ωs 1 + s 3 ρ 1 The monomials on the right hand side are less than or equal to L(s 2 ) except possibly when the leading monomials of the weak representations of ωs 1 and s 3 ρ 3 cancel each other. In the exceptional case we can write s 1 = h c hl h g h r h with l h L(g h )r h L(s 1 ) and s 3 = q c ql q g q r q with l q L(g q )r q L(s 3 ). Then there are indices h 0 and q 0 with l h0 L(g h0 )r h0 = L(s 1 ) and l q0 L(g q0 )r q0 = L(s 3 ). This leads to a set of central obstructions o p = (l hp, h p, r hp ; l fp, f p, r fp ). If all of these obstructions are weak then we can rewrite the right hand side of the equation for s 2 and satisfy the condition that all monomials on the right are less than or equal to L(s 2 ). Thus s 2 is reducible from a set of S-polynomials containing s 1, s 3 and all S-polynomials corresponding to the o p and the latter have a leading monomial less than L(s 2 ). Finally assume ρ 1 = ρ 3 ρ 2 and s 3 = s(ω, j, ρ 3 ; 1, q, 1). Now s 2 = ωl 1 g i g q ρ 2 = ω(l 1 g i g j ρ 1 ) + (ωg j ρ 3 g q )ρ 2 = ωs 1 + s 3 ρ 2 and we can finish by a similar argument. 1.3. The algorithm. For our non-commutative Gröbner basis computation we use two sets of polynomials with properties specified in the following definition. Observe that a normal form of a polynomial f with respect to a finite subset of k T can be computed in much the same way as for the commutative case, so that we may assume the presence of a (terminating) normal form algorithm. Definition 10. Let I be a two sided ideal of k T and let G, D be finite subsets of k T. We say that (G, D) is a partial Gröbner pair for I if the following properties are satisfied. (i) All polynomials in G D are monic. (ii) G is a basis of I. (iii) Every element of D belongs to I and is in normal form with respect to the polynomials in G. (iv) The set D is basic for G. (v) For every f G the normal form with respect to G D of the normal form with respect to G \ {f} equals zero. Corollary 1.8. Let I be a two-sided ideal of k T and let (G, D) be a partial Gröbner pair for I. If D is the empty set, then G is a Gröbner Basis for I. Proof. Direct from Definition 10 and Theorem 1.4(iv). The Gröbner basis algorithm will start with a finite set G forming a basis of I and with D the basic set determined by Proposition 1.6. The last condition is taken care of by cleaning operations. Observe that (G, D) is indeed a partial Gröbner pair. The main ingredient of the algorithm is an iteration step that changes the pair (G, D) to another partial Gröbner pair (G, D ) such that the ideal generated by the leading monomials of G strictly contains the ideal generated by the leading

NON-COMMUTATIVE POLYNOMIAL COMPUTATIONS 9 monomials of G. As the non-commutative polynomial ring k T is not Noetherian, we cannot expect the algorithm to terminate in all cases. Termination occurs when D = so that G is a Gröbner basis of I, by Corollary 1.8. In the iteration step one element from D is moved to G and care is taken to let the new pair become partial Gröbner again. In the next theorem we discuss the algorithm. Theorem 1.9. Let I be an ideal of k T and let (G, D) be a partial Gröbner pair for I. The next routine of four steps computes a new partial Gröbner pair (G, D ) for I with the property that the leading monomials of G generate an ideal strictly contained in the ideal generated by the leading monomials of G. If D = the routine leads to a halt and G is a Gröbner basis for I. (1) Move one polynomial f from D to G. Write G = {g 1,..., g N 1, g N = f}. (2) Compute the left, right, and central obstructions of G involving N (so that it is of the form (l, i, r; λ, N, ρ) or (l, N, r; λ, j, ρ) for certain i, j {1,..., N 1} and l, r, λ, ρ T ). Use the non-zero normal forms of their S-polynomials with respect to G D to update D such that D becomes the basic set for the new G. (3) For each i {1,..., N 1} compute the normal form g i with respect to G \ {g i } of g i. If g i = 0 remove g i from G. Otherwise, if g i is distinct from g i, (a) replace g i by g i ; (b) compute the left, right, and central obstructions of the new G involving g i ; (c) if the normal form with respect to G D of an S-polynomial of such an obstruction is non-zero then add its normal form to D. (4) Replace each d D by its normal form with respect to (G D) \ {d}. Proof. We have to show that the five conditions of Definition 10 hold for the new pair (G, D) obtained at the end of the routine of the theorem. Since all new polynomials in G and D are normal forms, they are monic, so condition (i) of Definition 10 is satisfied. If g i is a polynomial of G adjusted as in (4), then the ideal generated by {g i } (G \ {g}) coincides with I. This establishes (ii). Clearly, all elements of D belong to I. They are changed in (3), (4c), and (5). In each of these cases, by construction, the new elements of D are in normal form with respect to G. Hence (iii). Both changes of G, at (1) and (4a), are followed by an update of the obstructions, at (2) and at (4b) and subsequent additions to D of normal forms of S-polynomials, at (3) and (4c), to take care that (iv) is satisfied by Proposition 1.6. For a newly added element g of G, the normal forms of the newly computed central obstructions of G involving g take care of (v). The final assertion is a consequence of Corollary 1.8. As for condition (v) of Definition 10, observe that the normal form of g i G with respect to G \ {g i } can change as a result of a replacement of g i by an element with smaller leading monomial. To avoid entering a recursive procedure of unknown depth, we observe that if the normal form of g i alters by changing an element g j, this happens via the construction of a central obstruction between g i and g j. The normal form of the S-polynomial corresponding to this obstruction is in fact the

10 ARJEH M. COHEN new form for g i. By adding this S-polynomial to D we satisfy the definitions of G and D and make sure that the normal form of g i will eventually belong to G. 2. Vector enumeration in GBNP This section describes the background of work carried out by Jan Willem Knopper during his stay at St. Andrews with Steve Linton. 2.1. Introduction. Steve Linton has written two articles about vector enumeration. The first is called Constructing Matrix Representations of Finitely Presented Groups [4] and the second is called On vector enumeration [5]. Here we outline an interpretation of it in GBNP. Throughout these notes, let k be a field and A be the algebra k X, where X = {x 1,..., x n }. Let M = {m 1,..., m s } be a set of generators of a free A-module. Let G ts be a set of generators of an ideal I (ideals are twosided unless explicitly mentioned otherwise) of A. Put A = A/I. Let A s be the free right-module of rank s over A and let G p be a finite subset of A s. The elements of G p are A-module relations. Here the suffix p refers to prefix rules for the module and ts to two-sided ideal rules. Denote by G p A the image in A s of the submodule of A s spanned by G p We describe a way to compute A s /G p A, if possible at all, by use of the Gröbner basis method. In order to embed the data into a single ring of noncommutative polynomials, we introduce a new indeterminate e (for the identity) and view m 1,..., m s as indeterminates over k X. Let W e = {x e x x X M {e}} {e t t t X}. Let W M = {x m i x X M {e}, m i M}. Note that W e contains the relation e 2 e, so e is an idempotent. Theorem 2.1. k X M {e} /(W e W M ) = (A + ek) m 1 A m s A as A-algebras where A + ek is the A-module spanned by a free submodule A and an additional generator e satisfying e 1 = e and e t = t for t X. Proof. Let x be a monomial in k X M {e}. If x = 1 or x = e, then x A + ek. Suppose x 1, e. If x contains a factor m i but does not begin with it, it can be reduced to 0 modulo W M. If x contains e as a factor, but not the first, it can be reduced by a rule in W e so that it starts with e. In particular it does not start with an m i and so we may assume that it does not contain a factor m i. As x e, there is another indeterminate y X {e} \ M such that x begins with ey, say x = eyz. But then it can be reduced to yz. Continuing this way, we may suppose that x does not contain e. Thus, a monomial x falls into one of two categories: x does not contain any m M. Then x A + ek. x contains a single m M, and begins with m, in other words x ma. In both cases, x (A + ek) m 1 A m s A. It is easily seen that no further collapse of monomials occurs modulo W e W M, and so k X M {e} /(W e W M ) = (A + ek) m 1 A m s A as k-modules. Right multiplication by elements of A on the quotient algebra of k X M {e} by (W e W M ) coincides with the right multiplication specified for (A+ke) m 1 A m s A. Hence the isomorphism is an isomorphism of A-modules. Corollary 2.2. If F is a Gröbner basis in k X M {e} of W G W e W M, where G A and W A s, then F k X is a Gröbner basis for (G) in k X. Moreover, for x m 1 A m s A and a A, the normal form of xa with

NON-COMMUTATIVE POLYNOMIAL COMPUTATIONS 11 respect to F belongs to m 1 A m s A and gives a unique representative for xa in (m 1 A m s A)/(A s F ). In our implementation we do not add W M and W e explicitly and work with W as a set of prefix relations, kept separate from G. Since the whole Gröbner basis for the relations in G is needed, it might as well be calculated at the start and indeed doing so will make the algorithm faster in practice. References [1] A.M. Cohen & D.A.H. Gijsbers, GBNP, http://www.win.tue.nl/~amc/pub/grobner/doc.html. [2] Edward L. Green, Noncommutative Grobner bases, and projective resolutions, pp. 29-60 in Computational Methods for Representations of groups and algebras (Essen 1997), Birkhauser, Basel 1999. [3] Donald E. Knuth, The Art of Computer Programming, Vol. 3: Sorting and Searching, second edition, Addison Wesley Longman, 1998. [4] S. A. Linton, Constructing matrix representations of finitely presented groups, Computational group theory, Part 2, J. Symbolic Comput., 12 (1991)427 438. [5] S. A. Linton, Computational linear algebra in algebraic and related problems (Essen, 1992), Linear Algebra Appl., 192 (1993)235 248. [6] T. Mora, An introduction to commutative and non-commutative Gröbner Bases, Journal of Theoretical Computer Science 134 (1994) 131 173. Arjeh M. Cohen, Department of Mathematics and Computer Science, Eindhoven University of Technology, POBox 513, 5600 MB Eindhoven, The Netherlands E-mail address: A.M.Cohen@tue.nl