gap> ######################### BEGIN COPYRIGHT MESSAGE ######################### GBNP - computing Gröbner bases of noncommutative polynomials Copyright 2001-2010 by Arjeh M. Cohen, Dié A.H. Gijsbers, Jan Willem Knopper, Chris Krook. Address: Discrete Algebra and Geometry (DAM) group at the Department of Mathematics and Computer Science of Eindhoven University of Technology.

For acknowledgements see the manual. The manual can be found in several formats in the doc subdirectory of the GBNP distribution. The acknowledgements formatted as text can be found in the file chap0.txt.

GBNP is free software; you can redistribute it and/or modify it under the terms of the Lesser GNU General Public License as published by the Free Software Foundation (FSF); either version 2.1 of the License, or (at your option) any later version. For details, see the file 'LGPL' in the doc subdirectory of the GBNP distribution or see the FSF's own site: http://www.gnu.org/licenses/lgpl.html gap> ########################## END COPYRIGHT MESSAGE ##########################

gap> ### filename = "example09.g" gap> ### authors Cohen & Gijsbers gap> ### vs 0.8.1

gap> ### THIS IS A GAP PACKAGE FOR COMPUTING NON-COMMUTATIVE GROBNER BASES gap> gap> ### Last change: amc May 24 2007. gap> ### dahg

<#GAPDoc Label="Example09">
Tracing an example by Mora
This example of a non-commutative Gröbner basis computation is from page 18 of An introduction to commutative and non-commutative Gröbner Bases, by Teo Mora . The traced version of the algorithm will be used. The input is \{xyx-y,yxy-y\}. The answer should be \{yy-xy,yx-xy,xxy-y\}.

First load the package and set the standard infolevel to 2 and the time infolevel to 1 (for more information about the info level, see Chapter ).

gap> LoadPackage("GBNP","0",false);; gap> SetInfoLevel(InfoGBNP,2); gap> SetInfoLevel(InfoGBNPTime,1);

Let the variables be printed as x and y instead of a and b by means of gap> GBNP.ConfigPrint("x","y");

Next we input the relations in NP format (see Section ). They will be assigned to KI.

gap> xyx := [[[1,2,1],[2]],[1,-1]];; gap> yxy := [[[2,1,2],[2]],[1,-1]];; gap> KI:=[xyx,yxy];;

The relations can be shown with :

gap> PrintNPList(KI); xyx - y yxy - y

The Gröbner basis with trace can now be calculated with :

gap> GB := SGrobnerTrace(KI); #I number of entered polynomials is 2 #I number of polynomials after reduction is 2 #I End of phase I #I End of phase II #I j =2 #I Current number of elements in todo is 1 #I j =3 #I Current number of elements in todo is 0 #I List of todo lengths is [ 2, 1, 0 ] #I End of phase III #I End of phase IV #I The computation took 4 msecs. [ rec( pol := [ [ [ 2, 1 ], [ 1, 2 ] ], [ 1, -1 ] ], trace := [ [ [ ], 1, [ 2 ], -1 ], [ [ 2 ], 1, [ ], 1 ], [ [ 1 ], 2, [ ], 1 ], [ [ ], 2, [ 1 ], -1 ] ] ), rec( pol := [ [ [ 2, 2 ], [ 1, 2 ] ], [ 1, -1 ] ], trace := [ [ [ 2 ], 1, [ ], -1 ], [ [ ], 1, [ 2 ], -1 ], [ [ 2 ], 1, [ ], 1 ], [ [ ], 2, [ 1 ], 1 ], [ [ 1 ], 2, [ ], 1 ], [ [ ], 2, [ 1 ], -1 ] ] ), rec( pol := [ [ [ 1, 1, 2 ], [ 2 ] ], [ 1, -1 ] ], trace := [ [ [ ], 1, [ ], 1 ], [ [ 1 ], 1, [ 2 ], 1 ], [ [ 1, 2 ], 1, [ ], -1 ], [ [ 1, 1 ], 2, [ ], -1 ], [ [ 1 ], 2, [ 1 ], 1 ] ] ) ]

The Gröbner basis can be printed with :

gap> PrintNPListTrace(GB); yx - xy y^2 - xy x^2y - y

The trace of the Gröbner basis can be printed with :

gap> PrintTraceList(GB); - G(1)y + yG(1) - G(2)x + xG(2)

- G(1)y + xG(2)

G(1) + xG(1)y - xyG(1) + xG(2)x - x^2G(2)
<#/GAPDoc>