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 = "example19.g" gap> ### author Knopper gap> ### amc edited 22 March 2007 gap> ### $Id: example19.g,v 1.8 2004/04/16 14:37:38 jwk Exp $

gap> ### THIS IS A GAP PACKAGE FOR COMPUTING NON-COMMUTATIVE GROBNER BASES gap> ### Last change: September 25 2003 gap> ### jwk

<#GAPDoc Label="Example19">
The dihedral group of order 8 on another module
In this example (Example 2 from Linton ) the two-sided relations give the group algebra of the group with presentation \langle a,b\mid a^4=b^2=(ab)^2=1\rangle, the dihedral group of order 8. This module relation fixes the all-one vector of Example : 1 + a(1+a+b).

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

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

We will enter the relations as GAP polynomials. It is possible to enter these with and without a module. How to do this is shown in . The relations here are entered without a module, since the module is only one-dimensional. It is possible to enter them using a free associative algebra with one over the field (the rational numbers) (see also ). For convenience we use the variables a and b for the generators of the algebra and e for the one of the algebra.

gap> A:=FreeAssociativeAlgebraWithOne(Rationals, "a", "b"); <algebra-with-one over Rationals, with 2 generators> gap> g:=GeneratorsOfAlgebra(A);; gap> a:=g[2];;b:=g[3];;e:=g[1];;

Now the relations are entered:

gap> twosidrels:=[a^4-e,b^2-e,(a*b)^2-e];; gap> prefrels:=[ b-e, e + a * (e + a + b) ];;

First the relations are converted into NP format (see ) after which the function is called to calculate a Gröbner basis record.

gap> GBR:=SGrobnerModule(GP2NPList(prefrels),GP2NPList(twosidrels));;

The record GBR has two members: the two-sided relations GBR.ts and the prefix relations GBR.p. It is possible to print these using the function :

gap> PrintNPList(GBR.ts); b^2 - 1 aba - b ba^2 - a^2b bab - a^3 a^4 - 1 a^3b - ba gap> PrintNPList(GBR.p); [ b - 1 ] [ ab + a^2 + a + 1 ] [ a^3 + a^2 + a + 1 ] [ a^2b - a^2 ]

It is now possible to calculate the standard basis of the quotient module with the function . This function has as arguments the Gröbner basis record GBR, the number of generators of the algebra (here it is 2), the number of generators of the mdoule (here it is 1), and a variable maxno for returning partial bases (0 means full basis).

gap> B:=BaseQM(GBR,2,1,0);; gap> PrintNPList(B); [ 1 ] [ a ] [ a^2 ]
<#/GAPDoc>