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 = "example20.g" gap> ### author Knopper gap> ### amc last edited 25 May 2007 problem with GBNP(y[1]+y[2]) gap> ### $Id: example20.g,v 1.7 2004/04/16 14:37:38 jwk Exp $

<#GAPDoc Label="Example20">
The dihedral group on a non-cyclic module
In this example (Example 3 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. The module under construction is a non-cyclic module, obtained by taking two copies of the representation of Example and fusing their one-dimensional submodules.

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

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

Create the free associative algebra to enter the relations in:

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> D:=A^2;; gap> y:=GeneratorsOfLeftModule(D);; gap> modrels:=[y[1]*b-y[1], y[2]*b-y[2], y[1]+y[1]*a*(e+a+b) -y[2]-y[2]*a*(e+a+b)];;

First the relations are converted into NP format (see ) with the function . They are printed in raw form and subsequently in a more legible format.

gap> modrelsNP:=GP2NPList(modrels); [ [ [ [ -1, 2 ], [ -1 ] ], [ 1, -1 ] ], [ [ [ -2, 2 ], [ -2 ] ], [ 1, -1 ] ], [ [ [ -1, 1, 2 ], [ -1, 1, 1 ], [ -2, 1, 2 ], [ -2, 1, 1 ], [ -1, 1 ], [ -2, 1 ], [ -1 ], [ -2 ] ], [ 1, 1, -1, -1, 1, -1, 1, -1 ] ] ] gap> PrintNPList(modrelsNP); [ b - 1 , 0] [ 0, b - 1 ] [ ab + a^2 + a + 1 , - ab - a^2 - a - 1 ]

Next the function is called to calculate a Gröbner basis record (see ).

gap> GBR:=SGrobnerModule(modrelsNP,GP2NPList(twosidrels));; #I number of entered polynomials is 3 #I number of polynomials after reduction is 3 #I End of phase I #I End of phase II #I End of phase III #I End of phase IV #I The computation took 0 msecs. #I number of entered polynomials is 9 #I number of polynomials after reduction is 9 #I End of phase I #I End of phase II #I End of phase III #I End of phase IV #I The computation took 0 msecs.

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); [ 0, b - 1 ] [ b - 1 , 0] [ ab + a^2 + a + 1 , - ab - a^2 - a - 1 ] [ 0, a^3 - ab ] [ 0, a^2b - a^2 ] [ a^3 + a^2 + a + 1 , - ab - a^2 - a - 1 ] [ a^2b - a^2 , 0]

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 (in this case 2), the number of generators of the module (in this case 2), and a variable maxno for returning partial bases (0 means full basis).

gap> B:=BaseQM(GBR,2,2,0);; gap> PrintNPList(B); [ 0, 1 ] [ 1 , 0] [ 0, a ] [ a , 0] [ 0, a^2 ] [ 0, ab ] [ a^2 , 0]

It is also possible to convert each member of the list B of polynomials in NP form to GAP polynomials to do further calculations within the algebra or module. This can be done with the function .

gap> NP2GPList(B,D); [ [ <zero> of ..., (1)*<identity ...> ], [ (1)*<identity ...>, <zero> of ... ] , [ <zero> of ..., (1)*a ], [ (1)*a, <zero> of ... ], [ <zero> of ..., (1)*a^2 ], [ <zero> of ..., (1)*a*b ], [ (1)*a^2, <zero> of ... ] ]

Individual GAP polynomials can be obtained from polynomials in NP form with the function . This also holds for elements of the free module D in NP form.

gap> Display(NP2GP(B[Length(B)],D)); [ (1)*a^2, <zero> of ... ]

Next we write down the matrices for the right action of the generators on the module by means of .

gap> Display(MatrixQA(1,B,GBR)); [ [ 0, 0, 1, 0, 0, 0, 0 ], [ 0, 0, 0, 1, 0, 0, 0 ], [ 0, 0, 0, 0, 1, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 1 ], [ 0, 0, 0, 0, 0, 1, 0 ], [ 1, 0, 0, 0, 0, 0, 0 ], [ 1, -1, 1, -1, 1, 1, -1 ] ] gap> Display(MatrixQA(2,B,GBR)); [ [ 1, 0, 0, 0, 0, 0, 0 ], [ 0, 1, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 1, 0 ], [ 1, -1, 1, -1, 1, 1, -1 ], [ 0, 0, 0, 0, 1, 0, 0 ], [ 0, 0, 1, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 1 ] ]

In order to compute the image of the vector 2y[1]+3y[2] of the two standard generators of the module under the action of the element aab, we use . Its first argument will be the vector and its second the Gröbner basis. The transformation to the NP format needs to be applied to the vector before it can be used as an argument. gap> v:=StrongNormalFormNPM(GP2NP((y[1]*2+y[2]*3)*a*a*b), GBR);; gap> PrintNP(v); [ 2a^2 , 3a^2 ]

<#/GAPDoc>