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 = "example21.g" gap> ### author Knoppe21 gap> ### $Id: example21.g,v 1.7 2004/04/16 14:37:38 jwk Exp $

gap> ### THIS IS A GAP PACKAGE FOR COMPUTING NON-COMMUTATIVE GROBNER BASES

<#GAPDoc Label="Example21">
The symmetric inverse monoid for a set of size four
The algebra we will consider is from Example 4 from Linton . Its monomials form the symmetric inverse monoid, that is, the monoid of all partial bijections on a given set, for a set of size four. The presentation is \langle s_1,s_2,s_3,e\mid s_i^2=(s_1s_2)^3=(s_2s_3)^3=(s_1s_3)^2=1, e^2=e, s_1e=es_1,s_2e=es_2,es_3e=(es_3)^2=(s_3e)^2\rangle. The dimension of the monoid algebra is 209. The monoid has a natural representation of degree 4 by means of partial permutation matrices, which can be obtained by taking prefix relations \{e,s_1-1, s_2-1, s_3e-s_3\}.

First 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);

Now enter the relations as GAP polynomials. The module is one dimensional so it is possible to enter it with and without a module. In Example 18 () both ways are shown. Here the relations will be entered without a module, with a free associative algebra with one over the field (the rational numbers) (see also ). For convenience we use the variables s1, s2, s3, and e for the generators of the algebra, and o for the identity element of the algebra.

gap> A:=FreeAssociativeAlgebraWithOne(Rationals, "s1", "s2", "s3", "e"); <algebra-with-one over Rationals, with 4 generators> gap> g:=GeneratorsOfAlgebra(A);; gap> s1:=g[2];;s2:=g[3];;s3:=g[4];;e:=g[5];;o:=g[1];;

It is possible to print symbols like they are printed in the algebra A with the function :

gap> GBNP.ConfigPrint(A);

Now the relations are entered:

gap> twosidrels:=[s1^2-o,s2^2-o,s3^2-o,(s1*s2)^3-o,(s2*s3)^3-o,(s1*s3)^2-o, > e^2-e,s1*e-e*s1,s2*e-e*s2,e*s3*e-(e*s3)^2,e*s3*e-(s3*e)^2]; [ (-1)*<identity ...>+(1)*s1^2, (-1)*<identity ...>+(1)*s2^2, (-1)*<identity ...>+(1)*s3^2, (-1)*<identity ...>+(1)*(s1*s2)^3, (-1)*<identity ...>+(1)*(s2*s3)^3, (-1)*<identity ...>+(1)*(s1*s3)^2, (-1)*e+(1)*e^2, (1)*s1*e+(-1)*e*s1, (1)*s2*e+(-1)*e*s2, (1)*e*s3*e+(-1)*(e*s3)^2, (1)*e*s3*e+(-1)*(s3*e)^2 ] gap> prefixrels:=[e,s1-o,s2-o,s3*e-s3]; [ (1)*e, (-1)*<identity ...>+(1)*s1, (-1)*<identity ...>+(1)*s2, (-1)*s3+(1)*s3*e ]

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

gap> GBR:=SGrobnerModule(GP2NPList(prefixrels),GP2NPList(twosidrels));; #I number of entered polynomials is 11 #I number of polynomials after reduction is 11 #I End of phase I #I End of phase II #I End of phase III #I End of phase IV #I The computation took 24 msecs. #I number of entered polynomials is 42 #I number of polynomials after reduction is 42 #I End of phase I #I End of phase II #I End of phase III #I End of phase IV #I The computation took 20 msecs.

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

gap> PrintNPList(GBR.ts); s1^2 - 1 s2^2 - 1 s3s1 - s1s3 s3^2 - 1 es1 - s1e es2 - s2e e^2 - e s2s1s2 - s1s2s1 s3s2s3 - s2s3s2 s3s2s1s3 - s2s3s2s1 s3es3e - es3e es3es3 - es3e s3es3s2e - es3s2e s2s3s2es3e - s3s2es3e s3es3s2s1e - es3s2s1e es3s2es3s2 - es3s2es3 s2s3s2s1es3e - s3s2s1es3e s2s3s2es3s2e - s3s2es3s2e s2es3s2es3e - es3s2es3e s1s2s1s3s2es3e - s2s1s3s2es3e s2s3s2s1es3s2e - s3s2s1es3s2e s2s3s2es3s2s1e - s3s2es3s2s1e s2es3s2s1es3e - es3s2s1es3e es3s2s1es3s2s1 - es3s2s1es3s2 s1s2s1s3s2s1es3e - s2s1s3s2s1es3e s1s2s1s3s2es3s2e - s2s1s3s2es3s2e s1s2s1es3s2es3e - s2s1es3s2es3e s2s3s2s1es3s2s1e - s3s2s1es3s2s1e s2es3s2s1es3s2e - es3s2s1es3s2e s1s2s1s3s2s1es3s2e - s2s1s3s2s1es3s2e s1s2s1s3s2es3s2s1e - s2s1s3s2es3s2s1e s1s2s1es3s2s1es3e - s2s1es3s2s1es3e s1s3s2s1es3s2es3e - s3s2s1es3s2es3e s1s2s1s3s2s1es3s2s1e - s2s1s3s2s1es3s2s1e s1s2s1es3s2s1es3s2e - s2s1es3s2s1es3s2e s1s3s2s1es3s2s1es3e - s3s2s1es3s2s1es3e s1es3s2s1es3s2es3e - es3s2s1es3s2es3e s1s3s2s1es3s2s1es3s2e - s3s2s1es3s2s1es3s2e gap> PrintNPList(GBR.p); [ s1 - 1 ] [ s2 - 1 ] [ e ] [ s3e - s3 ] [ s3s2e - s3s2 ] [ s3s2s1e - s3s2s1 ]

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

gap> B:=BaseQM(GBR,4,1,0);; gap> PrintNPList(B); [ 1 ] [ s3 ] [ s3s2 ] [ s3s2s1 ]

Next we write down the matrices for the right action of the generators on the module. First by means of the list command , next one by one by means of within a loop.

gap> MatricesQA(4,B,GBR); [ [ [ 1, 0, 0, 0 ], [ 0, 1, 0, 0 ], [ 0, 0, 0, 1 ], [ 0, 0, 1, 0 ] ], [ [ 1, 0, 0, 0 ], [ 0, 0, 1, 0 ], [ 0, 1, 0, 0 ], [ 0, 0, 0, 1 ] ], [ [ 0, 1, 0, 0 ], [ 1, 0, 0, 0 ], [ 0, 0, 1, 0 ], [ 0, 0, 0, 1 ] ], [ [ 0, 0, 0, 0 ], [ 0, 1, 0, 0 ], [ 0, 0, 1, 0 ], [ 0, 0, 0, 1 ] ] ] gap> for i in [1..4] do > Display(MatrixQA(i,B,GBR)); Print("\n"); > od; [ [ 1, 0, 0, 0 ], [ 0, 1, 0, 0 ], [ 0, 0, 0, 1 ], [ 0, 0, 1, 0 ] ]

[ [ 1, 0, 0, 0 ], [ 0, 0, 1, 0 ], [ 0, 1, 0, 0 ], [ 0, 0, 0, 1 ] ]

[ [ 0, 1, 0, 0 ], [ 1, 0, 0, 0 ], [ 0, 0, 1, 0 ], [ 0, 0, 0, 1 ] ]

[ [ 0, 0, 0, 0 ], [ 0, 1, 0, 0 ], [ 0, 0, 1, 0 ], [ 0, 0, 0, 1 ] ]

<#/GAPDoc>