In this chapter all available commented examples can be found. Those without comments are in the directory gbnp/examples. Timing results are obtained on an Athlon MP 2000+ processor running FreeBSD.
The truncated variant on two weighted homogeneous polynomials (A.4) A.4
More details on a truncated version for Leonard pairs (A.5) A.5
Finiteness of the Weyl group of type E_6 (A.13) A.13
This extends Example A.6.
A commutative quotient algebra of polynomial growth (A.16) A.16
This extends Example A.8.
The dihedral group of order 8 on another module (A.19) A.19
This extends Example A.18.
The dihedral group on a non-cyclic module (A.20) A.20
This example also extends Example A.18.
The symmetric inverse monoid for a set of size four (A.22) A.22
A module of the Hecke Algebra of type A_3 over GF(3) (A.23) A.23
In this commutative example the relations are x^2y-1, xy^2-1 in addition to xy-yx. The answer should be x^3-1, x-y, xy-yx, as the reduction ordering is total degree first and then lexicographic with x smaller than y.
First load the package and set the standard infolevel InfoGBNP (4.2-1) to 2 and the time infolevel InfoGBNPTime (4.3-1) to 1 (for more information about the info level, see chapter 4.).
gap> LoadPackage("GBNP","0",false);;
gap> SetInfoLevel(InfoGBNP,2);
gap> SetInfoLevel(InfoGBNPTime,1);
|
Then input the relations in NP format (see 2.1). They will be assigned to in KI. The first relation is to force commutativity
gap> KI := [ [[[1,2],[2,1]],[1,-1]] ]; [ [ [ [ 1, 2 ], [ 2, 1 ] ], [ 1, -1 ] ] ] gap> x2y := [[[1,1,2],[]],[1,-1]]; [ [ [ 1, 1, 2 ], [ ] ], [ 1, -1 ] ] gap> AddSet(KI,x2y); gap> xy2 := [[[1,2,2],[]],[1,-1]]; [ [ [ 1, 2, 2 ], [ ] ], [ 1, -1 ] ] gap> AddSet(KI,xy2); |
The relations can be exhibited with PrintNPList (3.2-3):
gap> PrintNPList(KI); a^2b - 1 ab - ba ab^2 - 1 |
Let the variables be printed as x and y instead of a and b by means of GBNP.ConfigPrint (3.2-1)
gap> GBNP.ConfigPrint("x","y");
|
The Gröbner basis can now be calculated with SGrobner (3.4-2):
gap> GB := SGrobner(KI); #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 length of G =1 #I length of todo is 1 #I length of G =2 #I length of todo is 0 #I List of todo lengths is [ 1, 1, 0 ] #I End of phase III #I G: Cleaning finished, 0 polynomials reduced #I End of phase IV #I The computation took 30 msecs. [ [ [ [ 2 ], [ 1 ] ], [ 1, -1 ] ], [ [ [ 1, 1, 1 ], [ ] ], [ 1, -1 ] ] ] |
When printed, it looks like:
gap> PrintNPList(GB); y - x x^3 - 1 |
The dimension of the quotient algebra can be calculated with DimQA (3.5-2). The arguments are the Gröbner basis GB and the number of variables is 2:
gap> DimQA(GB,2); 3 |
A basis of this quotient algebra can be calculated with BaseQA (3.5-1). The arguments are a Gröbner basis GB, the number of variables t (=2) and a variable maxno for returning partial quotient algebras (0 means full basis). The calculated basis will be printed as well.
gap> B:=BaseQA(GB,2,0); [ [ [ [ ] ], [ 1 ] ], [ [ [ 1 ] ], [ 1 ] ], [ [ [ 1, 1 ] ], [ 1 ] ] ] gap> PrintNPList(B); 1 x x^2 |
The strong normal form of the element xyxyxyx can be found by use of StrongNormalFormNP (3.5-8). The arguments are this element and the Gröbner basis GB.
gap> f:=[[[1,2,1,2,1,2,1]],[1]];; gap> PrintNP(f); xyxyxyx gap> p:=StrongNormalFormNP(f,GB);; gap> PrintNP(p); x |
To provide Terwilliger with experimental dimension information in low degrees for his theory of Leonard pairs a truncated Gröbner basis computation was carried out as follows.
First load the package and set the standard infolevel InfoGBNP (4.2-1) to 1 and the time infolevel InfoGBNPTime (4.3-1) to 2 (for more information about the info level, see chapter 4.).
gap> LoadPackage("GBNP","0",false);;
gap> SetInfoLevel(InfoGBNP,1);
gap> SetInfoLevel(InfoGBNPTime,2);
|
We truncate the example by putting all monomials of degree n in the ideal by means of the function MkTrLst; a better way to compute the result is by means of the truncated GB algorithms (See A.5).
We want to truncate at degree 7 so we have fixed n = 8.
gap> n := 8;; |
Now enter the relations in NP form (see 2.1). The function MkTrLst will be entered, which will return all polynomials of degree n.
gap> sqbr := function(n,q) ; return (q^3-q^-3)/(q-q^(-1)); end; function( n, q ) ... end gap> c := sqbr(3,5); 651/25 gap> s1 :=[[[1,1,1,2],[1,1,2,1],[1,2,1,1],[2,1,1,1]],[1,-c,c,-1]];; gap> s2 :=[[[2,2,2,1],[2,2,1,2],[2,1,2,2],[1,2,2,2]],[1,-c,c,-1]];; gap> MkTrLst := function(l) local ans, h1, h2, a, i; > ans := [[1],[2]]; > for i in [2..l] do > h1 := []; > h2 := []; > for a in ans do > Add(h1,Concatenation([1],a)); > Add(h2,Concatenation([2],a)); > od; > ans := Concatenation(h1,h2); > od; > return List(ans, a -> [[a],[1]]); > end; function( l ) ... end gap> I := Concatenation([s1,s2],MkTrLst(n));; |
Now calculate the Gröbner basis with SGrobner (3.4-2):
gap> GB := SGrobner(I);; #I number of entered polynomials is 258 #I number of polynomials after reduction is 114 #I End of phase I #I End of phase II #I End of phase III #I Time needed to clean G :0 #I End of phase IV #I The computation took 660 msecs. |
Now print the first part of the Gröbner basis with PrintNPList (3.2-3) (only the first 20 polynomials are printed here, the full Gröbner basis can be printed with PrintNPList(GB)):
gap> PrintNPList(GB{[1..20]});
ba^3 - 651/25aba^2 + 651/25a^2ba - a^3b
b^3a - 651/25b^2ab + 651/25bab^2 - ab^3
b^2a^2ba - bab^2a^2 - baba^2b + ba^2bab + ab^2aba - abab^2a - aba^2b^2 + a^2b\
^2ab
b^2ab^2a^2 - 651/25b^2ababa + b^2aba^2b + 626/25bab^2aba - bab^2a^2b + babab^\
2a - ba^2b^2ab + ba^2bab^2 - 651/25ab^2ab^2a + ab^2abab + 423176/625abab^2ab -\
423801/625ababab^2 + 626/25aba^2b^3 - 406901/625a^2b^2ab^2 + 423176/625a^2bab\
^3 - 651/25a^3b^4
a^8
a^7b
a^6ba
a^6b^2
a^5ba^2
a^5bab
a^5b^2a
a^5b^3
a^4ba^2b
a^4baba
a^4bab^2
a^4b^2a^2
a^4b^2ab
a^4b^4
a^3ba^2ba
a^3ba^2b^2
|
The dimension of the truncated quotient algebra can be calculated with DimQA (3.5-2):
gap> DimQA(GB,2); #I The computation took 0 msecs. 157 |
Here is what Paul Terwilliger wrote in reaction to the computation carried out by this example:
I just wanted to thank you again for the dimension data that you gave me after the Durham meeting. It ended up having a large impact. See the attached paper; joint with Tatsuro Ito.
I spent several weeks in Japan this past January, working with Tatsuro and trying to find a good basis for the algebra on two symbols subject to the q-Serre relations. After much frustration, we thought of feeding your data into Sloane's online handbook of integer sequences. We did it out of curiosity more than anything; we did not expect the handbook data to be particularly useful. But it was.
The handbook told us that the graded dimension generating function, using your data for the coefficients, matched the q-series for the inverse of the Jacobi theta function vartheta_4; armed with this overwhelming hint we were able to prove that the graded dimension generating function was indeed given by the inverse of vartheta_4. With that info we were able to get a nice result about td pairs.
Paul
Here we exhibit a truncated non-commutative homogeneous weighted Gröbner basis computation. This example uses the functions from 3.8, the truncation variant (see also Section 2.6).
The input is a set of homogeneous polynomials in x and y, which are homogeneous when the weight of x is 2 and of y is 3. The input is x^3y^2-x^6+y^4,y^2x^3+xyxyx+x^2yxy. We truncate the computation at degree 16. The truncated Grobner basis is y^2x^3+xyxyx+x^2yxy,x^6-x^3y^2-y^4,x^3y^2x-x^4y^2-xy^4 and the dimension of the quotient algebra is 134.
First load the package and set the standard infolevel InfoGBNP (4.2-1) to 1 and the time infolevel InfoGBNPTime (4.3-1) to 1 (for more information about the info level, see chapter 4.).
gap> LoadPackage("GBNP","0",false);;
gap> SetInfoLevel(InfoGBNP,1);
gap> SetInfoLevel(InfoGBNPTime,1);
|
The variables will be printed as x and y.
gap> GBNP.ConfigPrint("x","y");
|
The level to truncate at is assigned to n.
gap> n := 16;; |
Now enter the relations in NP form (see Section 2.1) and the weights.
gap> s1 :=[[[1,1,1,2,2],[1,1,1,1,1,1],[2,2,2,2]],[1,-1,1]];;
gap> s2 :=[[[2,2,1,1,1],[1,2,1,2,1],[1,1,2,1,2]],[1,1,1]];;
gap> KI := [s1,s2];
[ [ [ [ 1, 1, 1, 2, 2 ], [ 1, 1, 1, 1, 1, 1 ], [ 2, 2, 2, 2 ] ], [ 1, -1, 1 ]
],
[ [ [ 2, 2, 1, 1, 1 ], [ 1, 2, 1, 2, 1 ], [ 1, 1, 2, 1, 2 ] ], [ 1, 1, 1 ]
] ]
gap> weights:=[2,3];;
|
The input can be printed with PrintNPList (3.2-3)
gap> PrintNPList(KI); x^3y^2 - x^6 + y^4 y^2x^3 + xyxyx + x^2yxy |
Now calculate the truncated Gröbner basis with SGrobnerTrunc (3.8-2). The basis will return only elements with weight less than n.
gap> G := SGrobnerTrunc(KI,n,weights,0);; #I number of entered polynomials is 2 #I number of polynomials after reduction is 2 #I End of fase I #I Reached level 16 #I end of the algorithm #I The computation took 10 msecs. |
The Grobner basis of the truncated quotient algebra can be printed with PrintNPList (3.2-3):
gap> PrintNPList(G[1]); y^2x^3 + xyxyx + x^2yxy x^6 - x^3y^2 - y^4 x^3y^2x - x^4y^2 + y^4x - xy^4 |
It is possible to get the list of weights of the polynomials with MakeArgumentList (3.8-3):
gap> MakeArgumentList(G[2],G[3][1],weights); List of occurring arguments Number of arguments is 2 The weights of the arguments are [ 2, 3 ] Level 0 Number of monomials this level is 1 Set [ ] occurs 1 times Level 1 Number of monomials this level is 0 No monomials of this degree occur Level 2 Number of monomials this level is 1 Set [ 1, 0 ] occurs 1 times Level 3 Number of monomials this level is 1 Set [ 0, 1 ] occurs 1 times Level 4 Number of monomials this level is 1 Set [ 2, 0 ] occurs 1 times Level 5 Number of monomials this level is 2 Set [ 1, 1 ] occurs 2 times Level 6 Number of monomials this level is 2 Set [ 3, 0 ] occurs 1 times Set [ 0, 2 ] occurs 1 times Level 7 Number of monomials this level is 3 Set [ 2, 1 ] occurs 3 times Level 8 Number of monomials this level is 4 Set [ 4, 0 ] occurs 1 times Set [ 1, 2 ] occurs 3 times Level 9 Number of monomials this level is 5 Set [ 3, 1 ] occurs 4 times Set [ 0, 3 ] occurs 1 times Level 10 Number of monomials this level is 7 Set [ 5, 0 ] occurs 1 times Set [ 2, 2 ] occurs 6 times Level 11 Number of monomials this level is 9 Set [ 4, 1 ] occurs 5 times Set [ 1, 3 ] occurs 4 times Level 12 Number of monomials this level is 10 Set [ 3, 2 ] occurs 9 times Set [ 0, 4 ] occurs 1 times Level 13 Number of monomials this level is 16 Set [ 5, 1 ] occurs 6 times Set [ 2, 3 ] occurs 10 times Level 14 Number of monomials this level is 17 Set [ 4, 2 ] occurs 12 times Set [ 1, 4 ] occurs 5 times Level 15 Number of monomials this level is 24 Set [ 6, 1 ] occurs 5 times Set [ 3, 3 ] occurs 18 times Set [ 0, 5 ] occurs 1 times Level 16 Number of monomials this level is 31 Set [ 5, 2 ] occurs 16 times Set [ 2, 4 ] occurs 15 times |
This is yet another example from Terwilliger's theory of Leonard pairs. The problem is over the rationals and there are two variables. We find more elaborate information about the dimensions of graded parts of the quotient algebra than in Example 2 (Section A.3).
We use the truncated version of the algorithm (see 2.6 and 3.8). The truncated version requires weights for the letters in the alphabet. Here we take both weights equal to 1.
First load the package and set the standard infolevel InfoGBNP (4.2-1) to 1 and the time infolevel InfoGBNPTime (4.3-1) to 1 (for more information about the info level, see chapter 4.).
gap> LoadPackage("GBNP","0",false);;
gap> SetInfoLevel(InfoGBNP,1);
gap> SetInfoLevel(InfoGBNPTime,1);
|
The level to truncate at is assigned to n.
gap> n := 7;; |
Now enter the relations in NP form 2.1 and the weights.
gap> sqbr := function(n,q) ; return (q^3-q^-3)/(q-q^(-1)); end;;
gap> c := sqbr(3,5);;
gap> s1 :=[[[1,1,1,2],[1,1,2,1],[1,2,1,1],[2,1,1,1]],[1,-c,c,-1]];;
gap> s2 :=[[[2,2,2,1],[2,2,1,2],[2,1,2,2],[1,2,2,2]],[1,-c,c,-1]];;
gap> KI := [s1,s2];
[ [ [ [ 1, 1, 1, 2 ], [ 1, 1, 2, 1 ], [ 1, 2, 1, 1 ], [ 2, 1, 1, 1 ] ],
[ 1, -651/25, 651/25, -1 ] ],
[ [ [ 2, 2, 2, 1 ], [ 2, 2, 1, 2 ], [ 2, 1, 2, 2 ], [ 1, 2, 2, 2 ] ],
[ 1, -651/25, 651/25, -1 ] ] ]
gap> weights:=[1,1];;
|
The input can be printed with PrintNPList (3.2-3)
gap> PrintNPList(KI); a^3b - 651/25a^2ba + 651/25aba^2 - ba^3 b^3a - 651/25b^2ab + 651/25bab^2 - ab^3 |
Now calculate the truncated Gröbner basis with SGrobnerTrunc (3.8-2). The basis will return only elements with weight less than n.
gap> G := SGrobnerTrunc(KI,n,weights,0);; #I number of entered polynomials is 2 #I number of polynomials after reduction is 2 #I End of fase I #I Reached level 7 #I end of the algorithm #I The computation took 20 msecs. |
The Gröbner basis of the truncated quotient algebra can be printed with PrintNPList (3.2-3):
gap> PrintNPList(G[1]); ba^3 - 651/25aba^2 + 651/25a^2ba - a^3b b^3a - 651/25b^2ab + 651/25bab^2 - ab^3 b^2a^2ba - bab^2a^2 - baba^2b + ba^2bab + ab^2aba - abab^2a - aba^2b^2 + a^2b\ ^2ab b^2ab^2a^2 - 651/25b^2ababa + b^2aba^2b + 626/25bab^2aba - bab^2a^2b + babab^\ 2a - ba^2b^2ab + ba^2bab^2 - 651/25ab^2ab^2a + ab^2abab + 423176/625abab^2ab -\ 423801/625ababab^2 + 626/25aba^2b^3 - 406901/625a^2b^2ab^2 + 423176/625a^2bab\ ^3 - 651/25a^3b^4 |
The list of weights of the polynomials can be obtained with MakeArgumentList (3.8-3):
gap> MakeArgumentList(G[2],G[3][1],weights); List of occurring arguments Number of arguments is 2 The weights of the arguments are [ 1, 1 ] Level 0 Number of monomials this level is 1 Set [ ] occurs 1 times Level 1 Number of monomials this level is 2 Set [ 1, 0 ] occurs 1 times Set [ 0, 1 ] occurs 1 times Level 2 Number of monomials this level is 4 Set [ 2, 0 ] occurs 1 times Set [ 1, 1 ] occurs 2 times Set [ 0, 2 ] occurs 1 times Level 3 Number of monomials this level is 8 Set [ 3, 0 ] occurs 1 times Set [ 2, 1 ] occurs 3 times Set [ 1, 2 ] occurs 3 times Set [ 0, 3 ] occurs 1 times Level 4 Number of monomials this level is 14 Set [ 4, 0 ] occurs 1 times Set [ 3, 1 ] occurs 3 times Set [ 2, 2 ] occurs 6 times Set [ 1, 3 ] occurs 3 times Set [ 0, 4 ] occurs 1 times Level 5 Number of monomials this level is 24 Set [ 5, 0 ] occurs 1 times Set [ 4, 1 ] occurs 3 times Set [ 3, 2 ] occurs 8 times Set [ 2, 3 ] occurs 8 times Set [ 1, 4 ] occurs 3 times Set [ 0, 5 ] occurs 1 times Level 6 Number of monomials this level is 40 Set [ 6, 0 ] occurs 1 times Set [ 5, 1 ] occurs 3 times Set [ 4, 2 ] occurs 9 times Set [ 3, 3 ] occurs 14 times Set [ 2, 4 ] occurs 9 times Set [ 1, 5 ] occurs 3 times Set [ 0, 6 ] occurs 1 times Level 7 Number of monomials this level is 64 Set [ 7, 0 ] occurs 1 times Set [ 6, 1 ] occurs 3 times Set [ 5, 2 ] occurs 9 times Set [ 4, 3 ] occurs 19 times Set [ 3, 4 ] occurs 19 times Set [ 2, 5 ] occurs 9 times Set [ 1, 6 ] occurs 3 times Set [ 0, 7 ] occurs 1 times |
In order to show how the order of a finite group of manageable size with a manageable presentation can be computed, we determine the order of the Weyl group of type E_6. This number is well known to be 51840.
First load the package and set the standard infolevel InfoGBNP (4.2-1) to 1 and the time infolevel InfoGBNPTime (4.3-1) to 2 (for more information about the info level, see chapter 4.).
gap> LoadPackage("GBNP","0",false);;
gap> SetInfoLevel(InfoGBNP,1);
gap> SetInfoLevel(InfoGBNPTime,2);
|
Then input the relations in NP format (see 2.1). They come from the presentation of the Weyl group as a Coxeter group. This means that there are six variables, one for each generator. We let the corresponding variables be printed as r_1, ..., r_6 by means of GBNP.ConfigPrint (3.2-1)
gap> GBNP.ConfigPrint(6,"r"); |
The relations are binomial and represent the group relations, which express that the generators are involutions (that is, have order 2) and that the orders of the products of any two generators is specified by the Coxeter diagram (see any book on Coxeter groups for details). The relations will be assigned to KI.
gap> k1 := [[[1,3,1],[3,1,3]],[1,-1]];; gap> k2 := [[[4,3,4],[3,4,3]],[1,-1]];; gap> k3 := [[[4,2,4],[2,4,2]],[1,-1]];; gap> k4 := [[[4,5,4],[5,4,5]],[1,-1]];; gap> k5 := [[[6,5,6],[5,6,5]],[1,-1]];; gap> k6 := [[[1,2],[2,1]],[1,-1]];; gap> k7 := [[[1,4],[4,1]],[1,-1]];; gap> k8 := [[[1,5],[5,1]],[1,-1]];; gap> k9 := [[[1,6],[6,1]],[1,-1]];; gap> k10 := [[[2,3],[3,2]],[1,-1]];; gap> k11 := [[[2,5],[5,2]],[1,-1]];; gap> k12 := [[[2,6],[6,2]],[1,-1]];; gap> k13 := [[[3,5],[5,3]],[1,-1]];; gap> k14 := [[[3,6],[6,3]],[1,-1]];; gap> k15 := [[[4,6],[6,4]],[1,-1]];; gap> k16 := [[[1,1],[]],[1,-1]];; gap> k17 := [[[2,2],[]],[1,-1]];; gap> k18 := [[[3,3],[]],[1,-1]];; gap> k19 := [[[4,4],[]],[1,-1]];; gap> k20 := [[[5,5],[]],[1,-1]];; gap> k21 := [[[6,6],[]],[1,-1]];; gap> KI := [k1,k2,k3,k4,k5,k6,k7,k8,k9,k10, > k11,k12,k13,k14,k15,k16,k17,k18,k19,k20,k21 > ];; |
The relations can be shown with PrintNPList (3.2-3):
gap> PrintNPList(KI); r.1r.3r.1 - r.3r.1r.3 r.4r.3r.4 - r.3r.4r.3 r.4r.2r.4 - r.2r.4r.2 r.4r.5r.4 - r.5r.4r.5 r.6r.5r.6 - r.5r.6r.5 r.1r.2 - r.2r.1 r.1r.4 - r.4r.1 r.1r.5 - r.5r.1 r.1r.6 - r.6r.1 r.2r.3 - r.3r.2 r.2r.5 - r.5r.2 r.2r.6 - r.6r.2 r.3r.5 - r.5r.3 r.3r.6 - r.6r.3 r.4r.6 - r.6r.4 r.1^2 - 1 r.2^2 - 1 r.3^2 - 1 r.4^2 - 1 r.5^2 - 1 r.6^2 - 1 |
The Gröbner basis can now be calculated with SGrobner (3.4-2):
gap> GB := SGrobner(KI);; #I number of entered polynomials is 21 #I number of polynomials after reduction is 21 #I End of phase I #I End of phase II #I End of phase III #I Time needed to clean G :0 #I End of phase IV #I The computation took 540 msecs. gap> PrintNPList(GB); r.1^2 - 1 r.2r.1 - r.1r.2 r.2^2 - 1 r.3r.2 - r.2r.3 r.3^2 - 1 r.4r.1 - r.1r.4 r.4^2 - 1 r.5r.1 - r.1r.5 r.5r.2 - r.2r.5 r.5r.3 - r.3r.5 r.5^2 - 1 r.6r.1 - r.1r.6 r.6r.2 - r.2r.6 r.6r.3 - r.3r.6 r.6r.4 - r.4r.6 r.6^2 - 1 r.3r.1r.2 - r.2r.3r.1 r.3r.1r.3 - r.1r.3r.1 r.4r.2r.4 - r.2r.4r.2 r.4r.3r.4 - r.3r.4r.3 r.5r.4r.5 - r.4r.5r.4 r.6r.5r.6 - r.5r.6r.5 r.4r.3r.1r.4 - r.3r.4r.3r.1 r.5r.4r.2r.5 - r.4r.5r.4r.2 r.5r.4r.3r.5 - r.4r.5r.4r.3 r.6r.5r.4r.6 - r.5r.6r.5r.4 r.4r.2r.3r.4r.2 - r.3r.4r.2r.3r.4 r.4r.2r.3r.4r.3 - r.2r.4r.2r.3r.4 r.5r.4r.2r.3r.5 - r.4r.5r.4r.2r.3 r.5r.4r.3r.1r.5 - r.4r.5r.4r.3r.1 r.6r.5r.4r.2r.6 - r.5r.6r.5r.4r.2 r.6r.5r.4r.3r.6 - r.5r.6r.5r.4r.3 r.4r.2r.3r.1r.4r.2 - r.3r.4r.2r.3r.1r.4 r.5r.4r.2r.3r.1r.5 - r.4r.5r.4r.2r.3r.1 r.6r.5r.4r.2r.3r.6 - r.5r.6r.5r.4r.2r.3 r.6r.5r.4r.3r.1r.6 - r.5r.6r.5r.4r.3r.1 r.4r.2r.3r.1r.4r.3r.1 - r.2r.4r.2r.3r.1r.4r.3 r.5r.4r.2r.3r.4r.5r.4 - r.4r.5r.4r.2r.3r.4r.5 r.6r.5r.4r.2r.3r.1r.6 - r.5r.6r.5r.4r.2r.3r.1 r.6r.5r.4r.2r.3r.4r.6 - r.5r.6r.5r.4r.2r.3r.4 r.5r.4r.2r.3r.1r.4r.5r.4 - r.4r.5r.4r.2r.3r.1r.4r.5 r.6r.5r.4r.2r.3r.1r.4r.6 - r.5r.6r.5r.4r.2r.3r.1r.4 r.6r.5r.4r.2r.3r.1r.4r.3r.6 - r.5r.6r.5r.4r.2r.3r.1r.4r.3 r.6r.5r.4r.2r.3r.4r.5r.6r.5 - r.5r.6r.5r.4r.2r.3r.4r.5r.6 r.5r.4r.2r.3r.1r.4r.3r.5r.4r.3 - r.4r.5r.4r.2r.3r.1r.4r.3r.5r.4 r.6r.5r.4r.2r.3r.1r.4r.5r.6r.5 - r.5r.6r.5r.4r.2r.3r.1r.4r.5r.6 r.5r.4r.2r.3r.1r.4r.3r.5r.4r.2r.3 - r.4r.5r.4r.2r.3r.1r.4r.3r.5r.4r.2 r.6r.5r.4r.2r.3r.1r.4r.3r.5r.6r.5 - r.5r.6r.5r.4r.2r.3r.1r.4r.3r.5r.6 r.6r.5r.4r.2r.3r.1r.4r.3r.5r.4r.6r.5r.4 - r.5r.6r.5r.4r.2r.3r.1r.4r.3r.5r.4r.\ 6r.5 r.6r.5r.4r.2r.3r.1r.4r.3r.5r.4r.2r.6r.5r.4r.2 - r.5r.6r.5r.4r.2r.3r.1r.4r.3r.\ 5r.4r.2r.6r.5r.4 |
The base of the quotient algebra can be calculated with BaseQA (3.5-1), which has as arguments a Gröbner basis GB, a number of symbols 6 and a maximum terms to be found (here 0 is entered, for a full base) . Since it is very long we will not print it here.
gap> B:=BaseQA(GB,6,0);; |
The dimension of the quotient algebra can be calculated with DimQA (3.5-2), the arguments are the Gröbner basis GB and the number of symbols 6. Since InfoGBNPTime (4.3-1) is set to 2, we get timing information from DimQA (3.5-2):
gap> DimQA(GB,6); #I The computation took 720 msecs. 51840 |
Note that the calculation of the dimension takes almost as long as calculating the base. Since we have already calculated a base B it is much more efficient to calculate the dimension with Length:
gap> Length(B); 51840 |
A list of univariate polynomials is generated. The result of the Gröbner basis computation on this list should be a single monic polynomial, their gcd.
First load the package and set the standard infolevel InfoGBNP (4.2-1) to 2 and the time infolevel InfoGBNPTime (4.3-1) to 1 (for more information about the info level, see chapter 4.).
gap> LoadPackage("GBNP","0",false);;
gap> SetInfoLevel(InfoGBNP,2);
gap> SetInfoLevel(InfoGBNPTime,1);
|
Let the single variable be printed as x by means of GBNP.ConfigPrint (3.2-1)
gap> GBNP.ConfigPrint("x");
|
Now input the relations in NP format (see 2.1). They will be assigned to KI.
gap> p0 := [[[1,1,1],[1,1],[1],[]],[1,2,2,1]];; gap> p1 := [[[1,1,1,1],[1,1],[]],[1,1,1]];; gap> KI := [p0,p1];; gap> for i in [2..12] do > h := AddNP(AddNP(KI[i],KI[i-1],1,3), > AddNP(BimulNP([1],KI[i],[]),KI[i-1],2,1),3,-5); > Add(KI,h); > od; |
The relations can be shown with PrintNPList (3.2-3):
gap> PrintNPList(KI); x^3 + 2x^2 + 2x + 1 x^4 + x^2 + 1 - 10x^5 + 3x^4 - 6x^3 + 11x^2 - 2x + 7 100x^6 - 60x^5 + 73x^4 - 128x^3 + 57x^2 - 76x + 25 - 1000x^7 + 900x^6 - 950x^5 + 1511x^4 - 978x^3 + 975x^2 - 486x + 103 10000x^8 - 12000x^7 + 12600x^6 - 18200x^5 + 14605x^4 - 13196x^3 + 8013x^2 - 2\ 792x + 409 - 100000x^9 + 150000x^8 - 166000x^7 + 223400x^6 - 204450x^5 + 181819x^4 - 123\ 630x^3 + 55859x^2 - 14410x + 1639 1000000x^10 - 1800000x^9 + 2150000x^8 - 2780000x^7 + 2765100x^6 - 2504340x^5 \ + 1840177x^4 - 982264x^3 + 343729x^2 - 70788x + 6553 - 10000000x^11 + 21000000x^10 - 27300000x^9 + 34850000x^8 - 36655000x^7 + 342\ 32300x^6 - 26732590x^5 + 16070447x^4 - 6878602x^3 + 1962503x^2 - 335534x + 262\ 15 100000000x^12 - 240000000x^11 + 340000000x^10 - 437600000x^9 + 479700000x^8 -\ 463408000x^7 + 381083200x^6 - 250919600x^5 + 124358069x^4 - 44189892x^3 + 106\ 17765x^2 - 1551904x + 104857 - 1000000000x^13 + 2700000000x^12 - 4160000000x^11 + 5480000000x^10 - 6219000\ 000x^9 + 6212580000x^8 - 5347676000x^7 + 3789374800x^6 - 2103269850x^5 + 87925\ 4915x^4 - 266261734x^3 + 55222347x^2 - 7046418x + 419431 10000000000x^14 - 30000000000x^13 + 50100000000x^12 - 68240000000x^11 + 79990\ 000000x^10 - 82533200000x^9 + 74033300000x^8 - 55790408000x^7 + 33925155700x^6\ - 16106037100x^5 + 5797814361x^4 - 1527768240x^3 + 278602281x^2 - 31541180x +\ 1677721 - 100000000000x^15 + 330000000000x^14 - 595000000000x^13 + 843500000000x^12 -\ 1021260000000x^11 + 1087222000000x^10 - 1012808600000x^9 + 804854300000x^8 - \ 528013485000x^7 + 277993337300x^6 - 114709334310x^5 + 36188145143x^4 - 8434374\ 466x^3 + 1372108031x^2 - 139586422x + 6710887 gap> Length(KI); 13 |
The Gröbner basis can now be calculated with SGrobner (3.4-2):
gap> GB := SGrobner(KI); #I number of entered polynomials is 13 #I number of polynomials after reduction is 1 #I End of phase I #I End of phase II #I List of todo lengths is [ 0 ] #I End of phase III #I G: Cleaning finished, 0 polynomials reduced #I End of phase IV #I The computation took 10 msecs. [ [ [ [ 1, 1 ], [ 1 ], [ ] ], [ 1, 1, 1 ] ] ] |
Printed it looks like:
gap> PrintNPList(GB); x^2 + x + 1 |
This example is a standard commutative Gröbner basis computation from the book Some Tapas of Computer Algebra [CCS99], page 339. There are six variables, named a, ... , f by default. We work over the rationals and study the ideal generated by the twelve polynomials occurring on the middle of page 339 of the Tapas book in a project by De Boer and Pellikaan on the ternary cyclic code of length 11. Below these are named p1, ..., p12. The result should be the union of a,b and the set of 6 homogeneous binomials (that is, polynomials with two terms) of degree 2 forcing commuting between c, d, e, and f.
First load the package and set the standard infolevel InfoGBNP (4.2-1) to 2 and the time infolevel InfoGBNPTime (4.3-1) to 1 (for more information about the info level, see chapter 4.).
gap> LoadPackage("GBNP","0",false);;
gap> SetInfoLevel(InfoGBNP,2);
gap> SetInfoLevel(InfoGBNPTime,1);
|
Now define some functions which will help in the construction of relations. The function powermon(g, exp) will return the monomial g^exp. The function comm(a, b) will return a relation forcing commutativity between its two arguments a and b.
gap> powermon := function(base, exp) > local ans,i; > ans := []; > for i in [1..exp] do ans := Concatenation(ans,[base]); od; > return ans; > end;; gap> comm := function(a,b) > return [[[a,b],[b,a]],[1,-1]]; > end;; |
Now the relations are entered.
gap> p1 := [[[5,1]],[1]];; gap> p2 := [[powermon(1,3),[6,1]],[1,1]];; gap> p3 := [[powermon(1,9),Concatenation([3],powermon(1,3))],[1,1]];; gap> p4 := [[powermon(1,81),Concatenation([3],powermon(1,9)), > Concatenation([4],powermon(1,3))],[1,1,1]];; gap> p5 := [[Concatenation([3],powermon(1,81)),Concatenation([4],powermon(1,9)), > Concatenation([5],powermon(1,3))],[1,1,1]];; gap> p6 := [[powermon(1,27),Concatenation([4],powermon(1,81)),Concatenation([5], > powermon(1,9)),Concatenation([6],powermon(1,3))],[1,1,1,1]];; gap> p7 := [[powermon(2,1),Concatenation([3],powermon(1,27)),Concatenation([5], > powermon(1,81)),Concatenation([6],powermon(1,9))],[1,1,1,1]];; gap> p8 := [[Concatenation([3],powermon(2,1)),Concatenation([4],powermon(1,27)), > Concatenation([6],powermon(1,81))],[1,1,1]];; gap> p9 := [[Concatenation([],powermon(1,1)),Concatenation([4],powermon(2,1)), > Concatenation([5],powermon(1,27))],[1,1,1]];; gap> p10 := [[Concatenation([3],powermon(1,1)),Concatenation([5],powermon(2,1)), > Concatenation([6],powermon(1,27))],[1,1,1]];; gap> p11 := [[Concatenation([4],powermon(1,1)),Concatenation([6],powermon(2,1))], > [1,1]];; gap> p12 := [[Concatenation([],powermon(2,3)),Concatenation([],powermon(2,1))], > [1,-1]];; gap> KI := [p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12];; gap> for i in [1..5] do > for j in [i+1..6] do > Add(KI,comm(i,j)); > od; > od; |
The relations can be shown with PrintNPList (3.2-3):
gap> PrintNPList(KI); ea a^3 + fa a^9 + ca^3 a^81 + ca^9 + da^3 ca^81 + da^9 + ea^3 a^27 + da^81 + ea^9 + fa^3 b + ca^27 + ea^81 + fa^9 cb + da^27 + fa^81 a + db + ea^27 ca + eb + fa^27 da + fb b^3 - b ab - ba ac - ca ad - da ae - ea af - fa bc - cb bd - db be - eb bf - fb cd - dc ce - ec cf - fc de - ed df - fd ef - fe gap> Length(KI); 27 |
It is sometimes easier to enter the relations as elements of a free algebra and then use the function GP2NP (3.1-1) or the function GP2NPList (3.1-2) to convert them. This will be demonstrated below. More about converting can be read in Section 3.1.
gap> F:=Rationals;; gap> A:=FreeAssociativeAlgebraWithOne(F,"a","b","c","d","e","f");; gap> g:=GeneratorsOfAlgebraWithOne(A);; gap> a:=g[1];;b:=g[2];;c:=g[3];;d:=g[4];;e:=g[5];;f:=g[6];; gap> KI_gp:=[e*a, #p1 > a^3 + f*a, #p2 > a^9 + c*a^3, #p3 > a^81 + c*a^9 + d*a^3, #p4 > c*a^81 + d*a^9 + e*a^3, #p5 > a^27 + d*a^81 + e*a^9 + f*a^3, #p6 > b + c*a^27 + e*a^81 + f*a^9, #p7 > c*b + d*a^27 + f*a^81, #p8 > a + d*b + e*a^27, #p9 > c*a + e*b + f*a^27, #p10 > d*a + f*b, #p11 > b^3 - b];; #p12 |
These relations can be converted to NP form (see 2.1) with GP2NPList (3.1-2). For use in a Gröbner basis computation we have to order the NP polynomials in KI. This can be done with CleanNP (3.3-3).
gap> KI_np:=GP2NPList(KI_gp);;
gap> Apply(KI,x->CleanNP(x));;
gap> KI_np=KI{[1..12]};
true
|
The Gröbner basis can now be calculated with SGrobner (3.4-2) and printed with PrintNPList (3.2-3).
gap> GB := SGrobner(KI);; #I number of entered polynomials is 27 #I number of polynomials after reduction is 8 #I End of phase I #I End of phase II #I List of todo lengths is [ 0 ] #I End of phase III #I G: Cleaning finished, 0 polynomials reduced #I End of phase IV #I The computation took 3610 msecs. gap> PrintNPList(GB); a b dc - cd ec - ce ed - de fc - cf fd - df fe - ef |
We study the Birman-Murakami-Wenzl algebra of type A_3 as an algebra given by generators and relations. A reference for the relations used is [CGW05].
First load the package and set the standard infolevel InfoGBNP (4.2-1) to 2 and the time infolevel InfoGBNPTime (4.3-1) to 1 (for more information about the info level, see chapter 4.).
gap> LoadPackage("GBNP","0",false);;
gap> SetInfoLevel(InfoGBNP,1);
gap> SetInfoLevel(InfoGBNPTime,1);
|
The variables are g_1, g_2, g_3, e_1, e_2, e_3, in this order. In order to have the results printed out with these symbols, we invoke GBNP.ConfigPrint (3.2-1)
gap> GBNP.ConfigPrint("g1","g2","g3","e1","e2","e3");
|
Now enter the relations. This will be done in NP form (see 2.1). The inderminates m and l in the coefficient ring of the Birman-Murakami-Wenzl algebra are specialized to 7 and 11 in order to make the computations more efficient.
gap> m:= 7;; gap> l:= 11;; gap> #relations Theorem 1.1 gap> k1 := [[[4],[1,1],[1],[]],[1,-l/m,-l,l/m]];; gap> k2 := [[[5],[2,2],[2],[]],[1,-l/m,-l,l/m]];; gap> k3 := [[[6],[3,3],[3],[]],[1,-l/m,-l,l/m]];; gap> #relations B1 gap> #empty set here gap> #relations B2: gap> k4 := [[[1,2,1],[2,1,2]],[1,-1]];; gap> k5 := [[[2,3,2],[3,2,3]],[1,-1]];; gap> k6 := [[[1,3],[3,1]],[1,-1]];; gap> #relations R1 gap> kr1 := [[[1,4],[4]],[1,-1/l]];; gap> kr2 := [[[2,5],[5]],[1,-1/l]];; gap> kr3 := [[[3,6],[6]],[1,-1/l]];; gap> #relations R2: gap> kr4 := [[[4,2,4],[4]],[1,-l]];; gap> kr5 := [[[5,1,5],[5]],[1,-l]];; gap> kr6 := [[[5,3,5],[5]],[1,-l]];; gap> kr7 := [[[6,2,6],[6]],[1,-l]];; gap> #relations R2' gap> km1 := [[[4,5,4],[4]],[1,-1]];; gap> km2 := [[[5,4,5],[5]],[1,-1]];; gap> km3 := [[[5,6,5],[5]],[1,-1]];; gap> km4 := [[[6,5,6],[6]],[1,-1]];; gap> KI := [k1,k2,k3,k4,k5,k6,kr1,kr2,kr3,kr4,kr5,kr6,kr7,km1,km2,km3,km4];; |
Now print the relations with PrintNPList (3.2-3):
gap> PrintNPList(KI); e1 - 11/7g1^2 - 11g1 + 11/7 e2 - 11/7g2^2 - 11g2 + 11/7 e3 - 11/7g3^2 - 11g3 + 11/7 g1g2g1 - g2g1g2 g2g3g2 - g3g2g3 g1g3 - g3g1 g1e1 - 1/11e1 g2e2 - 1/11e2 g3e3 - 1/11e3 e1g2e1 - 11e1 e2g1e2 - 11e2 e2g3e2 - 11e2 e3g2e3 - 11e3 e1e2e1 - e1 e2e1e2 - e2 e2e3e2 - e2 e3e2e3 - e3 gap> Length(KI); 17 |
Now calculate the Gröbner basis with SGrobner (3.4-2):
gap> GB := SGrobner(KI);; #I number of entered polynomials is 17 #I number of polynomials after reduction is 17 #I End of phase I #I End of phase II #I End of phase III #I End of phase IV #I The computation took 310 msecs. gap> PrintNPList(GB); g1^2 - 7/11e1 + 7g1 - 1 g1e1 - 1/11e1 g2^2 - 7/11e2 + 7g2 - 1 g2e2 - 1/11e2 g3g1 - g1g3 g3^2 - 7/11e3 + 7g3 - 1 g3e3 - 1/11e3 e1g1 - 1/11e1 e1g3 - g3e1 e1^2 + 43/77e1 e2g2 - 1/11e2 e2^2 + 43/77e2 e3g1 - g1e3 e3g3 - 1/11e3 e3e1 - e1e3 e3^2 + 43/77e3 g1g2e1 - e2e1 g1g3e1 - 1/11g3e1 g1e2e1 + 7e2e1 - g2e1 - 7e1 g2g1g2 - g1g2g1 g2g1e2 - e1e2 g2g3e2 - e3e2 g2e1g2 - g1e2g1 - 7e2g1 + 7e1g2 + 7g2e1 - 7g1e2 - 49e2 + 49e1 g2e1e2 + 7e1e2 - g1e2 - 7e2 g2e3e2 + 7e3e2 - g3e2 - 7e2 g3g2g3 - g2g3g2 g3g2e3 - e2e3 g3e1e3 - 1/11e1e3 g3e2g3 - g2e3g2 - 7e3g2 + 7e2g3 + 7g3e2 - 7g2e3 - 49e3 + 49e2 g3e2e3 + 7e2e3 - g2e3 - 7e3 e1g2g1 - e1e2 e1g2e1 - 11e1 e1e2g1 + 7e1e2 - e1g2 - 7e1 e1e2e1 - e1 e2g1g2 - e2e1 e2g1e2 - 11e2 e2g3g2 - e2e3 e2g3e2 - 11e2 e2e1g2 + 7e2e1 - e2g1 - 7e2 e2e1e2 - e2 e2e3g2 + 7e2e3 - e2g3 - 7e2 e2e3e2 - e2 e3g2g3 - e3e2 e3g2e3 - 11e3 e3e2g3 + 7e3e2 - e3g2 - 7e3 e3e2e3 - e3 g1g2g3e1 - e2g3e1 g1g3g2e1 - g3e2e1 g1g3e2e1 + 7g3e2e1 - g3g2e1 - 7g3e1 g1e2g3e1 + 7e2g3e1 - g2g3e1 - 7g3e1 g1e3g2e1 - e3e2e1 g1e3e2e1 + 7e3e2e1 - e3g2e1 - 7e1e3 g3g2g1g3 - g2g3g2g1 g3g2g1e3 - e2g1e3 g3g2e1e3 - e2e1e3 g3e1g2e3 - e1e2e3 g3e1e2e3 + 7e1e2e3 - e1g2e3 - 7e1e3 g3e2g1g3 - g2e3g2g1 - 7e3g2g1 + 7e2g1g3 + 7g3e2g1 - 7g2g1e3 + 49e2g1 - 49g1e3\ g3e2g1e3 + 7e2g1e3 - g2g1e3 - 7g1e3 g3e2e1e3 + 7e2e1e3 - g2e1e3 - 7e1e3 e1g2g3g2 - g3e1g2g3 e1g2g3e1 - 11g3e1 e1g2e3g2 - g3e1e2g3 + 7e1e3g2 - 7e1e2g3 + 7e1g2e3 - 7g3e1e2 + 49e1e3 - 49e1e2\ e1e2g3e1 - g3e1 e1e3g2g1 - e1e3e2 e1e3g2e1 - 11e1e3 e1e3e2g1 + 7e1e3e2 - e1e3g2 - 7e1e3 e1e3e2e1 - e1e3 e2g3e1e2 - e2g1e3e2 e2e1e3e2 + 7e2g1e3e2 - e2g1g3e2 - 77e2 e3g2g1g3 - e3e2g1 e3g2g1e3 - 11g1e3 e3g2e1e3 - 11e1e3 e3e2g1g3 + 7e3e2g1 - e3g2g1 - 7g1e3 e3e2g1e3 - g1e3 e3e2e1e3 - e1e3 g1g2g1g3e2 - g2g1e3e2 g1g2g1e3e2 + 7g2g1e3e2 - g2g1g3e2 - 7e1e2 g1g2g3g2e1 - g2e3g2e1 - 7e3g2e1 + 7e2g3e1 + 7g3e2e1 - 7g2e1e3 + 49e2e1 - 49e1\ e3 g1g2e3g2e1 + 7g2e3g2e1 - g2g3g2e1 + 7e3e2e1 + 49e3g2e1 + 7e2e1e3 - 7g3g2e1 + \ 49g2e1e3 - 7g2g3e1 + 343e1e3 - 49g3e1 - 49g2e1 - 350e1 g1e2g1g3e2 + 7e2g1g3e2 - g2e1e3e2 - 7g2g3e1e2 - 7e1e3e2 - 49g3e1e2 + 77g1e2 +\ 539e2 g1e2g1e3e2 + 7e2g1e3e2 - g2g3e1e2 - 7g3e1e2 g2g3e1g2g3 - g1e2g1g3g2 - 7e2g1g3g2 + 7g3e1g2g3 + 7g2g3e1g2 + 49g3e1g2 - 7g1e\ 2e3 - 49e2e3 g2g3e1e2g3 - g1e2g1e3g2 - 7e2g1e3g2 + 7g3e1e2g3 + 7g2g3e1e2 - 7g1e2g1e3 - 49e\ 2g1e3 + 49g3e1e2 e2g1g3g2g1 - e2g1e3g2 e2g1g3e2g1 - e2e1e3g2 - 7e2g3e1g2 + 7e2g1g3e2 - 7e2e1e3 - 49e2g3e1 + 77e2g1 +\ 539e2 e2g1e3g2g1 + 7e2g1e3g2 - e2g1g3g2 - 7e2e1 e2g1e3e2g1 - e2g3e1g2 + 7e2g1e3e2 - 7e2g3e1 e2g3e1g2g3 + 7e2g3e1g2 - e2g1g3g2 - 7e2e3 |
Now calculate the dimension of the quotient algebra with DimQA (3.5-2) (the second argument is the number of symbols):
gap> DimQA(GB,6); 105 |
The conclusion is that the BMW algebra of type A3 has dimension 105.
The trace variant (see sections 2.5 and 3.7) will be used for a presentation of the Birman-Murakami-Wenzl algebra of type A2 by generators and relations in order to find a proof that the algebra has dimension 15.
First load the package and set the standard infolevel InfoGBNP (4.2-1) to 2 and the time infolevel InfoGBNPTime (4.3-1) to 1 (for more information about the info level, see chapter 4.).
gap> LoadPackage("GBNP","0",false);;
gap> SetInfoLevel(InfoGBNP,1);
gap> SetInfoLevel(InfoGBNPTime,1);
|
The variables are g_1, g_2, e_1, e_2, in this order. In order to have the results printed out with these symbols, we invoke GBNP.ConfigPrint (3.2-1)
gap> GBNP.ConfigPrint("g1","g2","e1","e2");
|
New attempt: with a field of rational functions
gap> ll := Indeterminate(Rationals,"l"); l gap> mm := Indeterminate(Rationals,"m"); m gap> F := Field(ll,mm); <field in characteristic 0> gap> gens := GeneratorsOfField(F); [ l, m ] gap> #one element of F gap> l := gens[1]; l gap> Print(l); lgap> m := gens[2]; m gap> Print(m); mgap> F1 := l^0; 1 gap> Print(F1); 1gap> # |
Now enter the relations. This will be done in NP form.
gap> #relations Theorem 1.1 gap> k1 := [[[3],[1,1],[1],[]],[F1,-l/m,-l,l/m]];; gap> k2 := [[[4],[2,2],[2],[]],[F1,-l/m,-l,l/m]];; gap> #relations B1 gap> #empty set here gap> #relations B2: gap> k3 := [[[1,2,1],[2,1,2]],[F1,-F1]];; gap> #relations R1 gap> k4 := [[[1,3],[3]],[F1,-1/l]];; gap> k5 := [[[2,4],[4]],[F1,-1/l]];; gap> #relations R2: gap> k6 := [[[3,2,3],[3]],[F1,-l]];; gap> k7 := [[[4,1,4],[4]],[F1,-l]];; gap> k8 := [[[3,4,3],[3]],[F1,-F1]];; gap> k9 := [[[4,3,4],[4]],[F1,-F1]];; gap> KI := [k1,k2,k3,k4,k5,k6,k7,k8,k9];; |
The input can be displayed with PrintNPList (3.2-3):
gap> PrintNPList(KI); e1 + -l/mg1^2 + -lg1 + l/m e2 + -l/mg2^2 + -lg2 + l/m g1g2g1 + -1g2g1g2 g1e1 + -1/le1 g2e2 + -1/le2 e1g2e1 + -le1 e2g1e2 + -le2 e1e2e1 + -1e1 e2e1e2 + -1e2 |
Now calculate the Gröbner basis with trace information, using the function SGrobnerTrace (3.7-4):
gap> GB := SGrobnerTrace(KI);; #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 List of todo lengths is [ 8, 7, 6, 5, 4, 6, 4, 4, 4, 3, 3, 2, 1, 0 ] #I End of phase III #I End of phase IV #I The computation took 2030 msecs. |
The full trace can be printed with PrintTraceList (3.7-1), while printing only the relations (and no trace) can be invoked by PrintNPListTrace (3.7-3). Since the total trace is very long we do not call PrintTraceList(GB) here but only show a few relations from the Gröbner basis with PrintTracePol (3.7-2):
gap> PrintNPListTrace(GB); g1^2 + m/-le1 + mg1 + -1 g1e1 + -1/le1 g2^2 + m/-le2 + mg2 + -1 g2e2 + -1/le2 e1g1 + 1/-le1 e1^2 + (l^2-l*m-1)/(l*m)e1 e2g2 + 1/-le2 e2^2 + (l^2-l*m-1)/(l*m)e2 g1g2e1 + -1e2e1 g1e2e1 + me2e1 + -1g2e1 + -me1 g2g1g2 + -1g1g2g1 g2g1e2 + -1e1e2 g2e1g2 + -1g1e2g1 + -me2g1 + me1g2 + mg2e1 + -mg1e2 + -m^2e2 + m^2e1 g2e1e2 + me1e2 + -1g1e2 + -me2 e1g2g1 + -1g2g1e2 e1g2e1 + -le1 e1e2g1 + me1e2 + -1e1g2 + -me1 e1e2e1 + -1e1 e2g1g2 + -1g1g2e1 e2g1e2 + -le2 e2e1g2 + me2e1 + -1e2g1 + -me2 e2e1e2 + -1e2 gap> PrintTracePol(GB[1]); m/-lG(1) gap> PrintTracePol(GB[2]); G(4) gap> PrintTracePol(GB[10]); -l/(-l*m-1)g2G(1)g1e2e1 + -l/(l*m+1)g2g1G(1)e2e1 + l^2/(-l*m-1)g2G( 1)g2g1e1 + -l/(-l*m-1)g2e1g2G(1)g2g1e1 + -l*m/(-l*m-1)e1g2G( 1)g2g1e1 + -l*m/(-l*m-1)G(1)g1e2e1 + -l*m/(l*m+1)g1G(1)e2e1 + l*m/(-l*m-1)g2G( 1)g2g1e2e1 + l*m^2/(-l*m-1)G(1)g2g1e2e1 + l^2*m/(-l*m-1)G( 1)g2g1e1 + -l/(l*m+1)g2e1g2^2g1G(2)e1 + l*m/(-l*m-1)g2^2g1G( 2)e2e1 + -l^2/(-l*m-1)g2^2g1G(2)e1 + -l^2*m/(-l*m-1)g2g1G( 2)e1 + -l*m/(l*m+1)e1g2^2g1G(2)e1 + m/(-l*m-1)g2e1G(2)g1e2e1 + -m/-lG( 2)g1e2e1 + -l*m/(-l*m-1)g2^2g1G(2)e2e1 + l*m^2/(-l*m-1)g2g1G( 2)e2e1 + m^2/(-l*m-1)e1G(2)g1e2e1 + -l*m^2/(-l*m-1)g2g1G( 2)e2e1 + -l^2/(-l*m^2-m)g2e1g2g1G(3)e1 + l^2/(-l*m-1)g2g1G( 3)e2e1 + l^3/(-l*m-1)g1G(3)e1 + l^3/(-l*m-1)g2G(3)e1 + l^3/(-l*m^2-m)g2g1G( 3)e1 + -l^2/(-l*m-1)g2e1g2G(3)e1 + -l^2/(-l*m-1)e1g2g1G( 3)e1 + -l^2/(-l*m^2-m)g2e1g2G(3)g2e1 + -l^2/(-l*m-1)e1g2G( 3)g2e1 + l^2/(-l*m-1)g2G(3)g2e2e1 + l^2*m/(-l*m-1)g1G( 3)e2e1 + l^2*m/(-l*m-1)g2G(3)e2e1 + l^2*m^2/(-l*m-1)G(3)e2e1 + l^3/(-l*m-1)G( 3)g2e1 + -l^2*m/(-l*m-1)e1g2G(3)e1 + l^3*m/(-l*m-1)G(3)e1 + l^3/(-l*m^2-m)g2G( 3)g2e1 + l^2*m/(-l*m-1)G(3)g2e2e1 + -l/(-l*m-1)g2G(4)e2e1 + -l*m/(-l*m-1)G( 4)e2e1 + l^2/(-l*m-1)g2^2g1g2G(5)e1 + l^2*m/(-l*m-1)g2g1g2G(5)e1 + -lg2^2g1G( 5)e1 + -l*mg2g1G(5)e1 + l/(-l*m-1)g2G(6)g2g1e1 + l*m/(-l*m-1)G( 6)g2g1e1 + m/-lG(7)e1 + -m^2/(-l*m-1)e1G(7)e1 + -m/(-l*m-1)g2e1G(7)e1 + g2G( 8) + mG(8) |
As a result the dimension of the quotient algebra can be calculated with DimQA (3.5-2) and the quotient algebra itself with BaseQA (3.5-1).
gap> GB_pols:=List(GB,x->x.pol);
[ [ [ [ 1, 1 ], [ 3 ], [ 1 ], [ ] ], [ 1, m/-l, m, -1 ] ],
[ [ [ 1, 3 ], [ 3 ] ], [ 1, -l^-1 ] ],
[ [ [ 2, 2 ], [ 4 ], [ 2 ], [ ] ], [ 1, m/-l, m, -1 ] ],
[ [ [ 2, 4 ], [ 4 ] ], [ 1, -l^-1 ] ], [ [ [ 3, 1 ], [ 3 ] ], [ 1, 1/-l ] ],
[ [ [ 3, 3 ], [ 3 ] ], [ 1, (l^2-l*m-1)/(l*m) ] ],
[ [ [ 4, 2 ], [ 4 ] ], [ 1, 1/-l ] ],
[ [ [ 4, 4 ], [ 4 ] ], [ 1, (l^2-l*m-1)/(l*m) ] ],
[ [ [ 1, 2, 3 ], [ 4, 3 ] ], [ 1, -1 ] ],
[ [ [ 1, 4, 3 ], [ 4, 3 ], [ 2, 3 ], [ 3 ] ], [ 1, m, -1, -m ] ],
[ [ [ 2, 1, 2 ], [ 1, 2, 1 ] ], [ 1, -1 ] ],
[ [ [ 2, 1, 4 ], [ 3, 4 ] ], [ 1, -1 ] ],
[ [ [ 2, 3, 2 ], [ 1, 4, 1 ], [ 4, 1 ], [ 3, 2 ], [ 2, 3 ], [ 1, 4 ],
[ 4 ], [ 3 ] ], [ 1, -1, -m, m, m, -m, -m^2, m^2 ] ],
[ [ [ 2, 3, 4 ], [ 3, 4 ], [ 1, 4 ], [ 4 ] ], [ 1, m, -1, -m ] ],
[ [ [ 3, 2, 1 ], [ 2, 1, 4 ] ], [ 1, -1 ] ],
[ [ [ 3, 2, 3 ], [ 3 ] ], [ 1, -l ] ],
[ [ [ 3, 4, 1 ], [ 3, 4 ], [ 3, 2 ], [ 3 ] ], [ 1, m, -1, -m ] ],
[ [ [ 3, 4, 3 ], [ 3 ] ], [ 1, -1 ] ],
[ [ [ 4, 1, 2 ], [ 1, 2, 3 ] ], [ 1, -1 ] ],
[ [ [ 4, 1, 4 ], [ 4 ] ], [ 1, -l ] ],
[ [ [ 4, 3, 2 ], [ 4, 3 ], [ 4, 1 ], [ 4 ] ], [ 1, m, -1, -m ] ],
[ [ [ 4, 3, 4 ], [ 4 ] ], [ 1, -1 ] ] ]
gap> DimQA(GB_pols,2);
6
gap> B:=BaseQA(GB_pols,2,0);;
gap> PrintNPList(B);
1
g1
g2
g1g2
g2g1
g1g2g1
|
Here we present a commutative example from page 339 of "An introduction to commutative and non-commutative Gröbner Bases", by Teo Mora [M]. It involves the seven variables a,b,c,d,e,f,g. In order to force commuting between each pair from a,b,c,d,e,f,g, we let part of the input equations be the homogeneous binomials of the form xy - yx.
First load the package and set the standard infolevel InfoGBNP (4.2-1) to 1 and the time infolevel InfoGBNPTime (4.3-1) to 1 (for more information about the info level, see chapter 4.).
gap> LoadPackage("GBNP","0",false);;
gap> SetInfoLevel(InfoGBNP,1);
gap> SetInfoLevel(InfoGBNPTime,1);
|
The relations will be entered as GAP polynomials and converted to NP form (see 2.1) with GP2NPList (3.1-2).
gap> F:=GF(7); ef:=One(F); GF(7) Z(7)^0 gap> A:=FreeAssociativeAlgebraWithOne(F, "a", "b", "c", "d", "e", "f", "g"); <algebra-with-one over GF(7), with 7 generators> gap> gens:=GeneratorsOfAlgebra(A); [ (Z(7)^0)*<identity ...>, (Z(7)^0)*a, (Z(7)^0)*b, (Z(7)^0)*c, (Z(7)^0)*d, (Z(7)^0)*e, (Z(7)^0)*f, (Z(7)^0)*g ] gap> a:=gens[2]; b:=gens[3]; c:=gens[4]; d:=gens[5]; e:=gens[6]; f:=gens[7]; (Z(7)^0)*a (Z(7)^0)*b (Z(7)^0)*c (Z(7)^0)*d (Z(7)^0)*e (Z(7)^0)*f gap> g:=gens[8]; ea:=gens[1]; (Z(7)^0)*g (Z(7)^0)*<identity ...> gap> rels := [ a^3 + f*a, > a^9 + c*a^3 + g*a, > a^81 + c*a^9 + d*a^3, > c*a^81 + d*a^9 + e*a^3, > a^27 + d*a^81 + e*a^9 + f*a^3, > b + c*a^27 + e*a^81 + f*a^9 + g*a^3, > c*b + d*a^27 + f*a^81 + g*a^9, > a + d*b + e*a^27 + g*a^81, > c*a + e*b + f*a^27, > d*a + f*b + g*a^27, > e*a + g*b, > b^3 - b ];; |
Some relations added to enforce commutativity.
gap> for i in [1..6] do > for j in [i+1..7] do > Add(rels,gens[i+1]*gens[j+1]-gens[j+1]*gens[i+1]); > od; > od; |
Now the relations are converted to NP form (see 2.1) with the function GP2NPList (3.1-2).
gap> KI:=GP2NPList(rels);; |
The Gröbner basis can be calculated with SGrobner (3.4-2) and printed with PrintNPList (3.2-3).
gap> GB := SGrobner(KI);; #I number of entered polynomials is 33 #I number of polynomials after reduction is 33 #I End of phase I #I End of phase II #I End of phase III #I End of phase IV #I The computation took 107720 msecs. gap> PrintNPList(GB); a b dc + Z(7)^3cd ec + Z(7)^3ce ed + Z(7)^3de fc + Z(7)^3cf fd + Z(7)^3df fe + Z(7)^3ef gc + Z(7)^3cg gd + Z(7)^3dg ge + Z(7)^3eg gf + Z(7)^3fg |
Determine whether the quotient algebra is finite dimensional by means of FinCheck (3.6-4), with arguments the leading monomials of GB and 7, the number of variables involved. The leading monomials of GB are found by invoking LTermsNP (3.3-6).
gap> F := LTermsNP(GB);; gap> FinCheck(F,7); false |
Now that the quotient algebra turns out to be infinite dimensional, we determine its growth by DetermineGrowth (3.6-2), with same arguments as for LTermsNP (3.3-6).
gap> DetermineGrowth(F,7); infinite: polynomial growth of degree d = 5 5 |
This example of a noncommutative Gröbner basis computation is from page 18 of "An introduction to commutative and non-commutative Gröbner Bases", by Teo Mora [M]. 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 InfoGBNP (4.2-1) to 2 and the time infolevel InfoGBNPTime (4.3-1) to 1 (for more information about the info level, see chapter 4.).
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 GBNP.ConfigPrint (3.2-1)
gap> GBNP.ConfigPrint("x","y");
|
Next we input the relations in NP format (see Section 2.1). They will be assigned to KI.
gap> xyx := [[[1,2,1],[2]],[1,-1]]; [ [ [ 1, 2, 1 ], [ 2 ] ], [ 1, -1 ] ] gap> yxy := [[[2,1,2],[2]],[1,-1]]; [ [ [ 2, 1, 2 ], [ 2 ] ], [ 1, -1 ] ] gap> KI:=[xyx,yxy]; [ [ [ [ 1, 2, 1 ], [ 2 ] ], [ 1, -1 ] ], [ [ [ 2, 1, 2 ], [ 2 ] ], [ 1, -1 ] ] ] |
The relations can be shown with PrintNPList (3.2-3):
gap> PrintNPList(KI); xyx - y yxy - y |
The Gröbner basis with trace can now be calculated with SGrobnerTrace (3.7-4):
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 10 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 ], [ 2, 1 ] ], [ 1, -1 ] ],
trace := [ [ [ 2 ], 1, [ ], -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 PrintNPListTrace (3.7-3):
gap> PrintNPListTrace(GB); yx - xy y^2 - yx x^2y - y |
The trace of the Grobner basis can be printed with PrintTraceList (3.7-1):
gap> PrintTraceList(GB); - G(1)y + yG(1) + xG(2) - G(2)x - yG(1) + G(2)x G(1) + xG(1)y - xyG(1) - x^2G(2) + xG(2)x |
This example extends A.6, which computes the order of the Weyl group of type E_6.
Here, before the dimension is calculated, it is checked whether the quotient algebra is finite dimensional or infinite dimensional. The function FinCheck (3.6-4) is used for this computation. For the use of Preprocess (3.6-6) to speed up determination of finite dimensionality see Example A.14.
First load the package and set the standard infolevel InfoGBNP (4.2-1) to 1 and the time infolevel InfoGBNPTime (4.3-1) to 2 (for more information about the info level, see chapter 4.).
gap> LoadPackage("GBNP","0",false);;
gap> SetInfoLevel(InfoGBNP,1);
gap> SetInfoLevel(InfoGBNPTime,2);
|
Then input the relations in NP format (see Section 2.1). They will be assigned to KI. These relations are the same as those in Example 3.
gap> k1 := [[[1,3,1],[3,1,3]],[1,-1]];; gap> k2 := [[[4,3,4],[3,4,3]],[1,-1]];; gap> k3 := [[[4,2,4],[2,4,2]],[1,-1]];; gap> k4 := [[[4,5,4],[5,4,5]],[1,-1]];; gap> k5 := [[[6,5,6],[5,6,5]],[1,-1]];; gap> k6 := [[[1,2],[2,1]],[1,-1]];; gap> k7 := [[[1,4],[4,1]],[1,-1]];; gap> k8 := [[[1,5],[5,1]],[1,-1]];; gap> k9 := [[[1,6],[6,1]],[1,-1]];; gap> k10 := [[[2,3],[3,2]],[1,-1]];; gap> k11 := [[[2,5],[5,2]],[1,-1]];; gap> k12 := [[[2,6],[6,2]],[1,-1]];; gap> k13 := [[[3,5],[5,3]],[1,-1]];; gap> k14 := [[[3,6],[6,3]],[1,-1]];; gap> k15 := [[[4,6],[6,4]],[1,-1]];; gap> k16 := [[[1,1],[]],[1,-1]];; gap> k17 := [[[2,2],[]],[1,-1]];; gap> k18 := [[[3,3],[]],[1,-1]];; gap> k19 := [[[4,4],[]],[1,-1]];; gap> k20 := [[[5,5],[]],[1,-1]];; gap> k21 := [[[6,6],[]],[1,-1]];; gap> KI := [k1,k2,k3,k4,k5,k6,k7,k8,k9,k10, > k11,k12,k13,k14,k15,k16,k17,k18,k19,k20,k21 > ];; |
The Gröbner basis can now be calculated with SGrobner (3.4-2):
gap> GB := SGrobner(KI);; #I number of entered polynomials is 21 #I number of polynomials after reduction is 21 #I End of phase I #I End of phase II #I End of phase III #I Time needed to clean G :0 #I End of phase IV #I The computation took 630 msecs. |
Check the dimensionality of the quotient algebra. We will check whether it is finite dimensional or infinite dimensional. In case of finite dimensionality we can compute this dimension.
The function FinCheck (3.6-4), which is used to check finite dimensionality has as the first argument the leading monomials of a Gröbner basis and as the second argument the number of symbols. The leading monomials can be calculated with LTermsNP (3.3-6).
gap> L:=LTermsNP(GB);; gap> FinCheck(L,6); true gap> time; 250 |
If a quotient algebra is finite dimensional, the dimension can be calculated with DimQA (3.5-2), the arguments are the Gröbner basis GB and the number of symbols 6. Since InfoGBNPTime (4.3-1) is set to 2, we get timing information from DimQA (3.5-2):
gap> dim := DimQA(GB,6); #I The computation took 700 msecs. 51840 |
This example extends Example 3 (see Section A.6) with the following action: after the Gröbner basis computation, we first check if the quotient algebra is finite dimensional or infinite dimensional before we possibly try to compute that dimension. Preprocessing of the set of leading terms of the Gröbner basis is used to speed up the determination of the finite dimensionality. The functions Preprocess (3.6-6) and FinCheck (3.6-4) are used for the computations. Even without preprocessing this already goes fast. Preprocessing might sometimes be useful. One might want to adapt this example to run for E7, in which case preprocessing speeds up this computation from 400 secs to about 40 secs. (Be aware that Gröbner basis computation will take a while for E7).
More information about the preprocessing can be found in the preprint "The dimensionality of quotient algebras" [K03] which is part of the documentation.
Note: there is no information on the amount of preprocessing which is optimal, but in general for big examples, even full preprocessing is better than using no preprocessing at all.
Note: Example 13 (see Section A.13) also determines if the quotient algebra is finite or infinite dimensional but does not use preprocessing.
First load the package and set the standard infolevel InfoGBNP (4.2-1) to 1 and the time infolevel InfoGBNPTime (4.3-1) to 2 (for more information about the info level, see chapter 4.).
gap> LoadPackage("GBNP","0",false);;
gap> SetInfoLevel(InfoGBNP,1);
gap> SetInfoLevel(InfoGBNPTime,2);
|
Then input the relations in NP format (see Section 2.1). They will be assigned to KI.
gap> k1 := [[[1,3,1],[3,1,3]],[1,-1]];; gap> k2 := [[[4,3,4],[3,4,3]],[1,-1]];; gap> k3 := [[[4,2,4],[2,4,2]],[1,-1]];; gap> k4 := [[[4,5,4],[5,4,5]],[1,-1]];; gap> k5 := [[[6,5,6],[5,6,5]],[1,-1]];; gap> k6 := [[[1,2],[2,1]],[1,-1]];; gap> k7 := [[[1,4],[4,1]],[1,-1]];; gap> k8 := [[[1,5],[5,1]],[1,-1]];; gap> k9 := [[[1,6],[6,1]],[1,-1]];; gap> k10 := [[[2,3],[3,2]],[1,-1]];; gap> k11 := [[[2,5],[5,2]],[1,-1]];; gap> k12 := [[[2,6],[6,2]],[1,-1]];; gap> k13 := [[[3,5],[5,3]],[1,-1]];; gap> k14 := [[[3,6],[6,3]],[1,-1]];; gap> k15 := [[[4,6],[6,4]],[1,-1]];; gap> k16 := [[[1,1],[]],[1,-1]];; gap> k17 := [[[2,2],[]],[1,-1]];; gap> k18 := [[[3,3],[]],[1,-1]];; gap> k19 := [[[4,4],[]],[1,-1]];; gap> k20 := [[[5,5],[]],[1,-1]];; gap> k21 := [[[6,6],[]],[1,-1]];; gap> KI := [k1,k2,k3,k4,k5,k6,k7,k8,k9,k10, > k11,k12,k13,k14,k15,k16,k17,k18,k19,k20,k21 > ];; |
The Gröbner basis can now be calculated with SGrobner (3.4-2):
gap> GB := SGrobner(KI);; #I number of entered polynomials is 21 #I number of polynomials after reduction is 21 #I End of phase I #I End of phase II #I End of phase III #I Time needed to clean G :0 #I End of phase IV #I The computation took 530 msecs. |
Check the dimensionality of the quotient algebra. We will check whether it is finite dimensional or infinite dimensional. In case of finite dimensionality we can compute this dimension.
The function FinCheck (3.6-4), which is used to check finite dimensionality has as a first argument the leading monomials of a Gröbner basis and as a second argument the number of symbols. The monomials can be calculated with LTermsNP (3.3-6). They then will be preprocessed using 4 recursions. If you want full preprocessing, use 0 as a parameter for the number of recursions.
gap> L:=LTermsNP(GB);; gap> L:=Preprocess(L,6,4);; gap> time; 30 gap> fd:=FinCheck(L,6); true gap> time; 20 |
If a quotient algebra is finite dimensional, the dimension can be calculated with DimQA (3.5-2), the arguments are the Gröbner basis GB and the number of symbols 6. Since InfoGBNPTime (4.3-1) is set to 2, we get timing information from DimQA (3.5-2):
gap> dim := DimQA(GB,6); #I The computation took 710 msecs. 51840 |
This example demonstrates an instance in which the quotient algebra is infinite dimensional and has exponential growth. We start out with KI:=[y^4-y^2,x^2y-xy] and obtain a Gröbner basis with leading terms [xxy,yyy]. The quotient algebra will thus have exponential growth since cycles (xyyx)^n and (xy)^m intersect in the common subwords xy (and in yx). This is explained in [K03]. The function DetermineGrowth (3.6-2) is used for the computation.
First load the package and set the standard infolevel InfoGBNP (4.2-1) to 2 and the time infolevel InfoGBNPTime (4.3-1) to 1 (for more information about the info level, see chapter 4.).
gap> LoadPackage("GBNP","0",false);;
gap> SetInfoLevel(InfoGBNP,2);
gap> SetInfoLevel(InfoGBNPTime,1);
|
Then input the relations in NP format (see Section 2.1). They will be assigned to KI.
gap> k1 := [[[2,2,2,2],[2,2]],[1,-1]];; gap> k2 := [[[1,1,2],[1,2]],[1,-1]];; gap> KI := [k1,k2]; [ [ [ [ 2, 2, 2, 2 ], [ 2, 2 ] ], [ 1, -1 ] ], [ [ [ 1, 1, 2 ], [ 1, 2 ] ], [ 1, -1 ] ] ] |
Now calculate the Gröbner basis with the function SGrobner (3.4-2) and print it with PrintNPList (3.2-3).
gap> GB := SGrobner(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 List of todo lengths is [ 0 ] #I End of phase III #I G: Cleaning finished, 0 polynomials reduced #I End of phase IV #I The computation took 10 msecs. gap> PrintNPList(GB); a^2b - ab b^4 - b^2 |
Now check the dimensionality of the quotient algebra with the function FinCheck (3.6-4) or the function DetermineGrowth (3.6-2). These functions have an argument F, the leading terms of a Gröbner basis, which can be calculated with the function LTermsNP (3.3-6) and an argument for the number of symbols (here equal to 2). The function DetermineGrowth (3.6-2) will not only report whether a Gröbner basis is finite, but will also provide information about its growth.
gap> L:=LTermsNP(GB); [ [ 1, 1, 2 ], [ 2, 2, 2, 2 ] ] gap> fd:=FinCheck(L,2); false gap> fd:=DetermineGrowth(L,2); "infinite: exponential growth" |
This example extends A.8, a commutative example from Some Tapas of Computer Algebra [CCS99], page 339.
The result of the Gröbner basis computation should be the union of a,b and the set of 6 homogeneous binomials (that is, polynomials with two terms) of degree 2 forcing commuting between c, d, e, and f, as before. After computation of the Gröbner basis, the quotient algebra is studied and found to be infinite dimensional of polynomial growth of degree 4. The function DetermineGrowth (3.6-2) is used for this computation. Then part of its Hilbert series is computed. The function HilbertSeries (3.6-5) is used for the computations.
First load the package and set the standard infolevel InfoGBNP (4.2-1) to 2 and the time infolevel InfoGBNPTime (4.3-1) to 1 (for more information about the info level, see chapter 4.).
gap> LoadPackage("GBNP","0",false);;
gap> SetInfoLevel(InfoGBNP,2);
gap> SetInfoLevel(InfoGBNPTime,1);
|
Now define some functions which will help in the construction of relations. The function powermon(i, exp) will return the monomial i^exp. The function comm(aa, bb) will return a relation forcing commutativity between its two arguments aa and bb.
gap> powermon := function(base, exp) > local ans,i; > ans := []; > for i in [1..exp] do ans := Concatenation(ans,[base]); od; > return ans; > end;; gap> comm := function(aa,bb) > return [[[aa,bb],[bb,aa]],[1,-1]]; > end;; |
Now the relations are entered:
gap> p1 := [[[5,1]],[1]];; gap> p2 := [[powermon(1,3),[6,1]],[1,1]];; gap> p3 := [[powermon(1,9),Concatenation([3],powermon(1,3))],[1,1]];; gap> p4 := [[powermon(1,81),Concatenation([3],powermon(1,9)),Concatenation([4], > powermon(1,3))],[1,1,1]];; gap> p5 := [[Concatenation([3],powermon(1,81)),Concatenation([4],powermon(1,9)), > Concatenation([5],powermon(1,3))],[1,1,1]];; gap> p6 := [[powermon(1,27),Concatenation([4],powermon(1,81)),Concatenation([5], > powermon(1,9)),Concatenation([6],powermon(1,3))],[1,1,1,1]];; gap> p7 := [[powermon(2,1),Concatenation([3],powermon(1,27)),Concatenation([5], > powermon(1,81)),Concatenation([6],powermon(1,9))],[1,1,1,1]];; gap> p8 := [[Concatenation([3],powermon(2,1)),Concatenation([4],powermon(1,27)), > Concatenation([6],powermon(1,81))],[1,1,1]];; gap> p9 := [[Concatenation([],powermon(1,1)),Concatenation([4],powermon(2,1)), > Concatenation([5],powermon(1,27))],[1,1,1]];; gap> p10 := [[Concatenation([3],powermon(1,1)),Concatenation([5],powermon(2,1)), > Concatenation([6],powermon(1,27))],[1,1,1]];; gap> p11 := [[Concatenation([4],powermon(1,1)),Concatenation([6],powermon(2,1))], > [1,1]];; gap> p12 := [[Concatenation([],powermon(2,3)),Concatenation([],powermon(2,1))], > [1,-1]];; gap> KI := [p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12];; gap> for i in [1..5] do > for j in [i+1..6] do > Add(KI,comm(i,j)); > od; > od; |
The relations can be shown with PrintNPList (3.2-3):
gap> PrintNPList(KI); ea a^3 + fa a^9 + ca^3 a^81 + ca^9 + da^3 ca^81 + da^9 + ea^3 a^27 + da^81 + ea^9 + fa^3 b + ca^27 + ea^81 + fa^9 cb + da^27 + fa^81 a + db + ea^27 ca + eb + fa^27 da + fb b^3 - b ab - ba ac - ca ad - da ae - ea af - fa bc - cb bd - db be - eb bf - fb cd - dc ce - ec cf - fc de - ed df - fd ef - fe |
It is usually easier to use the function GP2NP (3.1-1) or the function GP2NPList (3.1-2) to enter relations. Entering the first twelve relations and then converting them with GP2NPList (3.1-2) is demonstrated in example 6 (A.8). More about converting can be read in Section 3.1.
The Gröbner basis can now be calculated with SGrobner (3.4-2) and printed with PrintNPList (3.2-3).
gap> GB := SGrobner(KI);
#I number of entered polynomials is 27
#I number of polynomials after reduction is 8
#I End of phase I
#I End of phase II
#I List of todo lengths is [ 0 ]
#I End of phase III
#I G: Cleaning finished, 0 polynomials reduced
#I End of phase IV
#I The computation took 3600 msecs.
[ [ [ [ 1 ] ], [ 1 ] ], [ [ [ 2 ] ], [ 1 ] ],
[ [ [ 4, 3 ], [ 3, 4 ] ], [ 1, -1 ] ], [ [ [ 5, 3 ], [ 3, 5 ] ], [ 1, -1 ] ]
, [ [ [ 5, 4 ], [ 4, 5 ] ], [ 1, -1 ] ],
[ [ [ 6, 3 ], [ 3, 6 ] ], [ 1, -1 ] ], [ [ [ 6, 4 ], [ 4, 6 ] ], [ 1, -1 ] ]
, [ [ [ 6, 5 ], [ 5, 6 ] ], [ 1, -1 ] ] ]
gap> PrintNPList(GB);
a
b
dc - cd
ec - ce
ed - de
fc - cf
fd - df
fe - ef
|
The growth of the quotient algebra can be studied with DetermineGrowth (3.6-2). The first argument is the list of leading monomials, which can be calculated with LTermsNP (3.3-6). The second argument is the size of the alphabet.
gap> L:=LTermsNP(GB);; gap> DetermineGrowth(L,6); infinite: polynomial growth of degree d = 4 4 gap> time; 0 |
Now compute the first 10 terms of the Hilbert Series with HilbertSeries (3.6-5) (note that trailing zeroes are removed):
gap> HilbertSeries(L,6,10); [ 1, 4, 10, 20, 35 ] |
A small example over a field other than the rationals, using the conversion functions from 3.1. The input relations define the symmetric group of degree 3, denoted S_3.
First load the package and set the standard infolevel InfoGBNP (4.2-1) to 2 and the time infolevel InfoGBNPTime (4.3-1) to 1 (for more information about the info level, see chapter 4.).
gap> LoadPackage("GBNP","0",false);;
gap> SetInfoLevel(InfoGBNP,2);
gap> SetInfoLevel(InfoGBNPTime,1);
|
Let F be the field GF(2). The relations can be entered as elements of a free associative algebra with one A (see Reference: FreeAssociativeAlgebraWithOne).
gap> F:=GF(2);; gap> A:=FreeAssociativeAlgebraWithOne(F,"a","b"); <algebra-with-one over GF(2), with 2 generators> gap> g:=GeneratorsOfAlgebraWithOne(A); [ (Z(2)^0)*a, (Z(2)^0)*b ] |
Enter the relations a^2-1,b^2-1,(ab)^3-1, convert them to NP-form 2.1 with GP2NPList (3.1-2) and print them with PrintNPList (3.2-3):
gap> KI_GP := [ g[1]^2-g[1]^0, g[2]^2-g[1]^0, (g[1]*g[2])^3-g[1]^0]; [ (Z(2)^0)*<identity ...>+(Z(2)^0)*a^2, (Z(2)^0)*<identity ...>+(Z(2)^0)*b^2, (Z(2)^0)*<identity ...>+(Z(2)^0)*a*b*a*b*a*b ] gap> KI:=GP2NPList(KI_GP);; gap> PrintNPList(KI); a^2 + Z(2)^0 b^2 + Z(2)^0 ababab + Z(2)^0 |
Now calculate the Gröbner basis with SGrobner (3.4-2) and print it with PrintNPList (3.2-3):
gap> GB:=SGrobner(KI);; #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 length of G =3 #I length of todo is 3 #I length of G =3 #I length of todo is 2 #I length of G =3 #I length of todo is 0 #I List of todo lengths is [ 2, 3, 2, 0 ] #I End of phase III #I G: Cleaning finished, 0 polynomials reduced #I End of phase IV #I The computation took 10 msecs. gap> PrintNPList(GB); a^2 + Z(2)^0 b^2 + Z(2)^0 bab + aba |
Now calculate the dimension of the quotient algebra with DimQA (3.5-2) (2 symbols) and a base with BaseQA (3.5-1) (2 symbols, 0 for whole base) and print the base. This will give a list of elements of the group.
gap> DimQA(GB,2); 6 gap> B:=BaseQA(GB,2,0);; gap> PrintNPList(B); Z(2)^0 a b ab ba aba |
We can print the Gröbner basis and the basis of the quotient algebra, converted back to GAP polynomials with NP2GPList (3.1-4). The functions used to convert the polynomials also require the algebra as an argument. The result is useful for further computations in A.
gap> NP2GPList(GB,A); [ (Z(2)^0)*a^2+(Z(2)^0)*<identity ...>, (Z(2)^0)*b^2+(Z(2)^0)*<identity ...>, (Z(2)^0)*b*a*b+(Z(2)^0)*a*b*a ] gap> NP2GPList(B,A); [ (Z(2)^0)*<identity ...>, (Z(2)^0)*a, (Z(2)^0)*b, (Z(2)^0)*a*b, (Z(2)^0)*b*a, (Z(2)^0)*a*b*a ] |
The compressed matrix of right multiplication with the image of the first variable can be computed by MatrixQAC (3.5-6).
gap> Display(MatrixQAC(1,B,GB)); . . . . . . . . . . . . . . . 1 1 . . . 1 . . 1 . . 1 . . 1 . . . 1 1 . |
In this example (Example 1 from Linton [L93]) the two-sided relations give the group algebra of the group with presentation < a,b | a^4=b^2=(ab)^2=1>, the dihedral group of order 8. It is possible to construct a permutation module of degree 4, over a field k. In this example k will be the field of rational numbers.
First load the package and set the standard infolevel InfoGBNP (4.2-1) to 1 and the time infolevel InfoGBNPTime (4.3-1) to 1 (for more information about the info level, see chapter 4.).
gap> LoadPackage("GBNP","0",false);;
gap> SetInfoLevel(InfoGBNP,1);
gap> SetInfoLevel(InfoGBNPTime,1);
|
Now enter the relations as GAP polynomials. It is possible to enter them with and without module generators. First it is shown how to enter the relations without using a module. It is possible to enter them with a free associative algebra with one over the field (the rational numbers) (see also Reference: FreeAssociativeAlgebraWithOne). 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];; |
First the relations are converted into NP format (see 2.1) after which the function SGrobnerPTS (3.9-4) is called to calculate a Gröbner basis record.
gap> GBR:=SGrobnerPTS(GP2NPList(prefrels),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 20 msecs. #I number of entered polynomials is 7 #I number of polynomials after reduction is 7 #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 PrintNPList (3.2-3):
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 ] [ a^3 - ab ] [ a^2b - a^2 ] |
It is now possible to calculate the basis of the quotient algebra with the function BaseQAPTS (3.9-1). This function has as arguments the Gröbner basis record GBR, the number of generators of the algebra (2), and a variable maxno for returning partial quotient algebras (0 means full basis).
gap> B:=BaseQAPTS(GBR,2,0);; gap> PrintNPList(B); [ 1 ] [ a ] [ a^2 ] [ ab ] |
It is also possible to use a module with one generator to enter these relations:
gap> D:=A^1;; gap> gd:=GeneratorsOfLeftModule(D);; gap> prefrelsdom:=[gd[1]*(b-e)];; |
It is possible to use the two-sided Gröbner basis which was already calculated.
gap> GBR:=SGrobnerPTS(GP2NPList(prefrelsdom),GBR.ts);; #I number of entered polynomials is 6 #I number of polynomials after reduction is 6 #I End of phase I #I End of phase II #I End of phase III #I End of phase IV #I The computation took 10 msecs. #I number of entered polynomials is 7 #I number of polynomials after reduction is 7 #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. gap> PrintNPList(GBR.p);; [ b - 1 ] [ a^3 - ab ] [ a^2b - a^2 ] gap> B:=BaseQAPTS(GBR,2,0);; gap> PrintNPList(B); [ 1 ] [ a ] [ a^2 ] [ ab ] |
In this example (Example 2 from Linton [L93]) the two-sided relations give the group algebra of the group with presentation < a,b| a^4=b^2=(ab)^2=1>, the dihedral group of order 8. This module relation fixes the all-one vector of Example A.18: 1 + a(1+a+b).
First load the package and set the standard infolevel InfoGBNP (4.2-1) to 1 and the time infolevel InfoGBNPTime (4.3-1) to 1 (for more information about the info level, see chapter 4.).
gap> LoadPackage("GBNP","0",false);;
gap> SetInfoLevel(InfoGBNP,1);
gap> SetInfoLevel(InfoGBNPTime,1);
|
Now 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 Reference: FreeAssociativeAlgebraWithOne). 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 2.1) after which the function SGrobnerPTS (3.9-4) is called to calculate a Gröbner basis record.
gap> GBR:=SGrobnerPTS(GP2NPList(prefrels),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 20 msecs. #I number of entered polynomials is 8 #I number of polynomials after reduction is 8 #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 PrintNPList (3.2-3):
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 basis of the quotient algebra with the function BaseQAPTS (3.9-1). This function has as arguments the Gröbner basis record GBR, the number of generators of the algebra (here it is 2), and a variable maxno for returning partial quotient algebras (0 means full basis).
gap> B:=BaseQAPTS(GBR,2,0);; gap> PrintNPList(B); [ 1 ] [ a ] [ a^2 ] |
In this example (Example 3 from Linton [L93]), the two-sided relations give the group algebra of the group with presentation < a,b| a^4=b^2=(ab)^2=1>, 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 A.18 and fusing their one-dimensional submodules.
Load the package and set the standard infolevel InfoGBNP (4.2-1) to 1 and the time infolevel InfoGBNPTime (4.3-1) to 1 (for more information about the info level, see Chapter 4.).
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 2.1) with the function GP2NPList (3.1-2). 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 SGrobnerPTS (3.9-4) is called to calculate a Gröbner basis record (see 2.8).
gap> GBR:=SGrobnerPTS(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 10 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 10 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 PrintNPList (3.2-3):
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 basis of the quotient algebra with the function BaseQAPTS (3.9-1). This function has as arguments the Gröbner basis record GBR, the number of generators of the algebra (in this case 2) and a variable maxno for returning partial quotient algebras (0 means full basis).
gap> B:=BaseQAPTS(GBR,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 NP2GPList (3.1-4).
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 with the function NP2GP (3.1-3).
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 MatrixQA (3.5-5).
gap> Display(MatrixQA(1,B,GBR)); Print("\n");
[ [ 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 StrongNormalFormPTSNP (3.9-5). Its first argument will be the vector and its second the Gröbner basis. The transformation GP2NP (3.1-1) to the NP input format needs to be applied to the vector before it can be used as an argument.
gap> v:=StrongNormalFormPTSNP(GP2NP((y[1]*2+y[2]*3)*a*a*b), GBR);; gap> PrintNP(v); [ 2a^2 , 3a^2 ] |
In this example the two-sided relations give the group algebra of the group with presentation < a,b,c | a^2=b^2=c^2=(ab)^3=(bc)^5=(ac)^2=1>, the icosahedral group of order 120. This is the Coxeter group of type H_3. The module under construction is a 3-dimensional reflection representation,
First load the package and set the standard infolevel InfoGBNP (4.2-1) to 1 and the time infolevel InfoGBNPTime (4.3-1) to 1 (for more information about the info level, see Chapter 4.).
gap> LoadPackage("GBNP","0",false);;
gap> SetInfoLevel(InfoGBNP,1);
gap> SetInfoLevel(InfoGBNPTime,1);
|
Create the field containing the golden ration tau
gap> x := Indeterminate(Rationals,"x"); x gap> p := x^2+ x-1; x^2+x-1 gap> K := AlgebraicExtension(Rationals,p); <field in characteristic 0> gap> tau:=RootOfDefiningPolynomial(K); (a) |
Create the free algebra with 2 generators over this field:
gap> A:=FreeAssociativeAlgebraWithOne(K, "a", "b", "c"); <algebra-with-one over Field( [ (a) ] ), with 3 generators> gap> gens:=GeneratorsOfAlgebra(A); [ (!1)*<identity ...>, (!1)*a, (!1)*b, (!1)*c ] gap> a:=gens[2]; (!1)*a gap> b:=gens[3]; (!1)*b gap> c:=gens[4]; (!1)*c gap> e:=gens[1]; (!1)*<identity ...> gap> #GBNP.ConfigPrint(A); |
The ideal for a quotient of the icosahedral group algebra over this field, in which bc has a quadratic minimal polynomial involving tau:
gap> #(b*c)^2-tau*b*c+e gap> Irels:=[a^2-e,b^2-e,c^2-e,a*b*a-b*a*b,((b*c)^2-tau*b*c+e)*(b*c-e),a*c-c*a]; [ (!-1)*<identity ...>+(!1)*a^2, (!-1)*<identity ...>+(!1)*b^2, (!-1)*<identity ...>+(!1)*c^2, (!1)*a*b*a+(!-1)*b*a*b, (!-1)*<identity ...>+((1+a))*b*c+((-1-1*a))*b*c*b*c+(!1)*b*c*b*c*b*c, (!1)*a*c+(!-1)*c*a ] |
The module relations. The first two describe group elements of a vector stabilizer, the third forces the central element (abc)^5 to be nontrivial.
gap> Mrels:=[b*c-e,b-e,(a*b*c)^5+e];; |
First the relations are converted into NP format (see 2.1) with the function GP2NPList (3.1-2). Next the function SGrobnerPTS (3.9-4) is called to calculate a Gröbner basis record (see 2.8).
gap> GBR:=SGrobnerPTS(GP2NPList(Mrels),GP2NPList(Irels));
#I number of entered polynomials is 6
#I number of polynomials after reduction is 6
#I End of phase I
#I End of phase II
#I End of phase III
#I End of phase IV
#I The computation took 80 msecs.
#I number of entered polynomials is 12
#I number of polynomials after reduction is 12
#I End of phase I
#I End of phase II
#I End of phase III
#I End of phase IV
#I The computation took 160 msecs.
rec(
ts := [ [ [ [ 1, 1 ], [ ] ], [ !1, !-1 ] ], [ [ [ 2, 2 ], [ ] ], [ !1, !-1\
] ], [ [ [ 3, 1 ], [ 1, 3 ] ], [ !1, !-1 ] ],
[ [ [ 3, 3 ], [ ] ], [ !1, !-1 ] ],
[ [ [ 2, 1, 2 ], [ 1, 2, 1 ] ], [ !1, !-1 ] ],
[ [ [ 3, 2, 3 ], [ 2, 3, 2 ], [ 3 ], [ 2 ] ],
[ !1, !-1, (-1-1*a), (1+a) ] ],
[ [ [ 2, 3, 2, 1 ], [ 1, 3, 2, 1 ], [ 1, 2, 3, 2 ], [ 1, 2, 1, 3 ],
[ 3, 2 ], [ 2, 3 ], [ 2, 1 ], [ 1, 2 ] ],
[ !1, !-1, !-1, !1, !1, !-1, (-2-1*a), (2+a) ] ],
[ [ [ 3, 2, 1, 3 ], [ 1, 3, 2, 1 ], [ 1, 2, 3, 2 ], [ 1, 2, 1, 3 ],
[ 3, 2 ], [ 2, 3 ], [ 2, 1 ], [ 1, 3 ], [ 1, 2 ] ],
[ !1, !-1, !-1, !1, !1, !-1, !-1, (-1-1*a), (2+a) ] ],
[ [ [ 2, 1, 3, 2, 1 ], [ 1, 2, 1, 3, 2 ], [ 3, 2, 1 ], [ 2, 3, 2 ],
[ 1, 2, 3 ], [ 1, 2, 1 ], [ 3 ], [ 1 ] ],
[ !1, !1, !-1, !-1, !-1, (-2-1*a), !1, (2+a) ] ] ],
p := [ [ [ [ -1, 2 ], [ -1 ] ], [ !1, !-1 ] ],
[ [ [ -1, 3 ], [ -1 ] ], [ !1, !-1 ] ],
[ [ [ -1, 1, 3 ], [ -1, 1 ] ], [ !1, !-1 ] ],
[ [ [ -1, 1, 2, 1 ], [ -1, 1, 2 ] ], [ !1, !-1 ] ],
[ [ [ -1, 1, 2, 3 ], [ -1, 1, 2 ], [ -1, 1 ], [ -1 ] ],
[ !1, !1, (-1*a), (-1*a) ] ] ], pg := 1 )
gap> PrintNPList(GBR.ts);;
a^2 + !-1
b^2 + !-1
ca + !-1ac
c^2 + !-1
bab + !-1aba
cbc + !-1bcb + (-1-1*a)c + (1+a)b
bcba + !-1acba + !-1abcb + abac + cb + !-1bc + (-2-1*a)ba + (2+a)ab
cbac + !-1acba + !-1abcb + abac + cb + !-1bc + !-1ba + (-1-1*a)ac + (2+a)ab
bacba + abacb + !-1cba + !-1bcb + !-1abc + (-2-1*a)aba + c + (2+a)a
gap> PrintNPList(GBR.p);;
[ b + !-1 ]
[ c + !-1 ]
[ ac + !-1a ]
[ aba + !-1ab ]
[ abc + ab + (-1*a)a + (-1*a) ]
|
It is now possible to calculate the basis of the quotient algebra with the function BaseQAPTS (3.9-1). This function has as arguments the Gröbner basis record GBR, the number of generators of the algebra (in this case 3) and a variable maxno for returning partial quotient algebras (0 means full basis).
gap> B:=BaseQAPTS(GBR,3,0); [ [ [ [ -1 ] ], [ !1 ] ], [ [ [ -1, 1 ] ], [ !1 ] ], [ [ [ -1, 1, 2 ] ], [ !1 ] ] ] gap> PrintNPList(B); [ !1 ] [ a ] [ ab ] |
Calculate the dimension of the quotient algebra with the function DimQAPTS (3.9-2). This function has as arguments the Gröbner basis record GBR, the number of generators of the algebra (in this case 3) and the number of module generators (in this case 1).
gap> DimQAPTS(GBR,3,1); 3 |
Next we write down the matrices for the right action of the generators on the module by means of MatrixQA (3.5-5).
gap> MatricesQA(3,B,GBR); [ [ [ !0, !1, !0 ], [ !1, !0, !0 ], [ !0, !0, !1 ] ], [ [ !1, !0, !0 ], [ !0, !0, !1 ], [ !0, !1, !0 ] ], [ [ !1, !0, !0 ], [ !0, !1, !0 ], [ (a), (a), !-1 ] ] ] gap> aa := MatrixQA(1,B,GBR); [ [ !0, !1, !0 ], [ !1, !0, !0 ], [ !0, !0, !1 ] ] gap> bb := MatrixQA(2,B,GBR); [ [ !1, !0, !0 ], [ !0, !0, !1 ], [ !0, !1, !0 ] ] gap> cc := MatrixQA(3,B,GBR); [ [ !1, !0, !0 ], [ !0, !1, !0 ], [ (a), (a), !-1 ] ] |
Finally we check the defining relations for the icosahedral group on the three new matrix generators.
gap> ee := IdentityMat(3,K);; gap> Display(ee); [ [ !1, !0, !0 ], [ !0, !1, !0 ], [ !0, !0, !1 ] ] gap> aa^2 = ee; true gap> bb^2 = ee; true gap> cc^2 = ee; true gap> (aa*bb)^3 = ee; true gap> (aa*cc)^2 = ee; true gap> (bb*cc)^5 = ee; true |
The algebra we will consider is from Example 4 from Linton [L93]. 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 < s_1,s_2,s_3,e| 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>. 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 InfoGBNP (4.2-1) to 1 and the time infolevel InfoGBNPTime (4.3-1) to 1 (for more information about the info level, see chapter 4.).
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 (A.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 Reference: FreeAssociativeAlgebraWithOne). 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 GBNP.ConfigPrint (3.2-1):
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*s1*s2*s1*s2, (-1)*<identity ...>+(1)*s2*s3*s2*s3*s2*s3, (-1)*<identity ...>+(1)*s1*s3*s1*s3, (-1)*e+(1)*e^2, (1)*s1*e+(-1)*e*s1, (1)*s2*e+(-1)*e*s2, (1)*e*s3*e+(-1)*e*s3*e*s3, (1)*e*s3*e+(-1)*s3*e*s3*e ] gap> prefrels:=[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 2.1) and next the function SGrobnerPTS (3.9-4) is called to calculate a Gröbner basis record.
gap> GBR:=SGrobnerPTS(GP2NPList(prefrels),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 80 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 80 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 PrintNPList (3.2-3):
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 basis of the quotient algebra with the function BaseQAPTS (3.9-1). This function has as arguments the Gröbner basis record GBR, the number of generators of the algebra (here this is 4) and a variable maxno for returning partial quotient algebras (0 means full basis).
gap> B:=BaseQAPTS(GBR,4,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 MatricesQA (3.5-3), next one by one by means of MatrixQA (3.5-5) 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 ] ]
|
This example is an extension of Example 5 from Linton, [L93]. It concerns the Hecke Algebra of type A_3. By reducing mod 3 but without evaluating at q=1 it is possible to obtain the following representation of the Hecke algebra of type A_3 over GF(3): < x, y, z| x^2+(1-q)*x-q,y^2+(1-q)*y-q,z^2+(1-q)*z-q,y*x*y-x*y*x, z*y*z-y*z*y, z*x-x*z>. It has a natural representation of the same dimension as the Lie algebra of type A_3, namely 4. This representation can be obtained with the module relations x+1,y+1.
First load the package and set the standard infolevel InfoGBNP (4.2-1) to 1 and the time infolevel InfoGBNPTime (4.3-1) to 1 (for more information about the info level, see Chapter 4.).
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. Both are used in Example A.18. Here the relations will be entered without using a module. First a free associative algebra with one is created over the field (GF(3)) (see also Reference: FreeAssociativeAlgebraWithOne). For convenience we use the variables a and b for the generators of the algebra and e for the one of the algebra.
gap> q:=Indeterminate(GF(3),"q"); q gap> A:=FreeAssociativeAlgebraWithOne(Field(q), "x", "y", "z");; gap> g:=GeneratorsOfAlgebra(A);; gap> x:=g[2];;y:=g[3];;z:=g[4];;e:=g[1];;q:=q*e;; |
In order to print the variables like they are printed in the algebra A with the function GBNP.ConfigPrint (3.2-1):
gap> GBNP.ConfigPrint(A); |
Now the relations are entered:
gap> twosidrels:=[x^2+(e-q)*x-q,y^2+(e-q)*y-q,z^2+(e-q)*z-q, > y*x*y-x*y*x,z*y*z-y*z*y,z*x-x*z]; [ (-q)*<identity ...>+(-q+Z(3)^0)*x+(Z(3)^0)*x^2, (-q)*<identity ...>+(-q+Z(3)^0)*y+(Z(3)^0)*y^2, (-q)*<identity ...>+(-q+Z(3)^0)*z+(Z(3)^0)*z^2, (-Z(3)^0)*x*y*x+(Z(3)^0)*y*x*y, (-Z(3)^0)*y*z*y+(Z(3)^0)*z*y*z, (-Z(3)^0)*x*z+(Z(3)^0)*z*x ] gap> prefrels:=[x+e,y+e]; [ (Z(3)^0)*<identity ...>+(Z(3)^0)*x, (Z(3)^0)*<identity ...>+(Z(3)^0)*y ] |
First the relations are converted into NP format (see 2.1) after which the function SGrobnerPTS (3.9-4) is called to calculate a Gröbner basis record.
gap> GBR:=SGrobnerPTS(GP2NPList(prefrels),GP2NPList(twosidrels));; #I number of entered polynomials is 6 #I number of polynomials after reduction is 6 #I End of phase I #I End of phase II #I End of phase III #I End of phase IV #I The computation took 50 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 20 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 PrintNPList (3.2-3):
gap> PrintNPList(GBR.ts); x^2 + -q+Z(3)^0x + -q y^2 + -q+Z(3)^0y + -q zx + -Z(3)^0xz z^2 + -q+Z(3)^0z + -q yxy + -Z(3)^0xyx zyz + -Z(3)^0yzy zyxz + -Z(3)^0yzyx gap> #Print(GBR.ts); gap> PrintNPMList(GBR.p); Variable: 'PrintNPMList' must have a value gap> #Print(GBR.p); |
It is now possible to calculate the basis of the quotient algebra with the function BaseQAPTS (3.9-1). This function has as arguments the Gröbner basis record GBR, the number of generators of the algebra (here this is 3) and a variable maxno for returning partial quotient algebras (0 means full basis).
gap> B:=BaseQAPTS(GBR,3,0);;
gap> PrintNPMList(B);
Variable: 'PrintNPMList' must have a value
gap> Print(B);
[ [ [ [ -1 ] ], [ Z(3)^0 ] ], [ [ [ -1, 3 ] ], [ Z(3)^0 ] ],
[ [ [ -1, 3, 2 ] ], [ Z(3)^0 ] ], [ [ [ -1, 3, 2, 1 ] ], [ Z(3)^0 ] ] ]gap> Print("\n");
|
Next we write down the matrices for the right action of the generators on the module, by means of the list command MatricesQA (3.5-3).
gap> MatricesQA(3,B,GBR);
[ [ [ -Z(3)^0, 0*Z(3), 0*Z(3), 0*Z(3) ], [ 0*Z(3), -Z(3)^0, 0*Z(3), 0*Z(3) ],
[ 0*Z(3), 0*Z(3), 0*Z(3), Z(3)^0 ], [ 0*Z(3), 0*Z(3), q, q-Z(3)^0 ] ],
[ [ -Z(3)^0, 0*Z(3), 0*Z(3), 0*Z(3) ], [ 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3) ],
[ 0*Z(3), q, q-Z(3)^0, 0*Z(3) ], [ 0*Z(3), 0*Z(3), 0*Z(3), -Z(3)^0 ] ],
[ [ 0*Z(3), Z(3)^0, 0*Z(3), 0*Z(3) ], [ q, q-Z(3)^0, 0*Z(3), 0*Z(3) ],
[ 0*Z(3), 0*Z(3), -Z(3)^0, 0*Z(3) ],
[ 0*Z(3), 0*Z(3), 0*Z(3), -Z(3)^0 ] ] ]
gap> for i in [1..3] do
> Display(MatrixQA(i,B,GBR)); Print("\n");
> od;
[ [ -Z(3)^0, 0*Z(3), 0*Z(3), 0*Z(3) ],
[ 0*Z(3), -Z(3)^0, 0*Z(3), 0*Z(3) ],
[ 0*Z(3), 0*Z(3), 0*Z(3), Z(3)^0 ],
[ 0*Z(3), 0*Z(3), q, q-Z(3)^0 ] ]
[ [ -Z(3)^0, 0*Z(3), 0*Z(3), 0*Z(3) ],
[ 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3) ],
[ 0*Z(3), q, q-Z(3)^0, 0*Z(3) ],
[ 0*Z(3), 0*Z(3), 0*Z(3), -Z(3)^0 ] ]
[ [ 0*Z(3), Z(3)^0, 0*Z(3), 0*Z(3) ],
[ q, q-Z(3)^0, 0*Z(3), 0*Z(3) ],
[ 0*Z(3), 0*Z(3), -Z(3)^0, 0*Z(3) ],
[ 0*Z(3), 0*Z(3), 0*Z(3), -Z(3)^0 ] ]
|
This example shows how the dimension of a Generalized Temperley-Lieb Algebra of type A, D, or E can be calculated. For textrmA_n-1 this is the usual Temperley-Lieb Algebra on n strands with dimension textrmdim TL(A_n-1)={2n choose n}/(n+1). For more information see [G95].
First load the package and set the standard infolevel InfoGBNP (4.2-1) to 1 and the time infolevel InfoGBNPTime (4.3-1) to 1 (for more information about the info level, see chapter 4.).
gap> LoadPackage("GBNP","0",false);;
gap> SetInfoLevel(InfoGBNP,1);
gap> SetInfoLevel(InfoGBNPTime,1);
|
The relations are generated automatically from the Coxeter diagram. This file can be easily adapted by specifying the number of points and the set of edges describing another Coxeter diagram. First enter the number of points, numpoints.
gap> numpoints:=8; 8 |
Now define some edges describing the diagrams of textrmE_n, (these can be easily extended). In this example the dimension of the Generalized Temperley-Lieb algebgra of type textrmE_8 will be calculated. For textrmA_1... 10 the command edges:=[[1,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,9],[9,10]]; can be used. For textrmD_1... 10 the command edges:=[[1,3],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,9],[9,10]]; can be used.
gap> edges:=[[1,3],[2,4],[3,4],[4,5],[5,6],[6,7],[7,8]]; # for E6..8 [ [ 1, 3 ], [ 2, 4 ], [ 3, 4 ], [ 4, 5 ], [ 5, 6 ], [ 6, 7 ], [ 7, 8 ] ] |
Now enter the relations as GAP polynomials. First a free associative algebra with identity element is created over the Rationals (see also Reference: FreeAssociativeAlgebraWithOne). For convenience the generators are stored in e.
gap> A:=FreeAssociativeAlgebraWithOne(Rationals,numpoints,"e"); <algebra-with-one over Rationals, with 8 generators> gap> e:=GeneratorsOfAlgebraWithOne(A); [ (1)*e.1, (1)*e.2, (1)*e.3, (1)*e.4, (1)*e.5, (1)*e.6, (1)*e.7, (1)*e.8 ] |
It is possible to print symbols like they are printed in the algebra A with the function GBNP.ConfigPrint (3.2-1):
gap> GBNP.ConfigPrint(A); |
Now the relations are generated automatically. For this we need to make sure the edges are sorted and converted to a set.
gap> edges:=Set(List(edges, e->SortedList(e))); [ [ 1, 3 ], [ 2, 4 ], [ 3, 4 ], [ 4, 5 ], [ 5, 6 ], [ 6, 7 ], [ 7, 8 ] ] |
Now the relations can be generated. The relations are e_i*e_i=e_i, for all i and e_i*e_j*e_i=e_i for all i,j that are connected in the Coxeter diagram and e_i*e_j=e_j*e_i for all i, j that are not connected in the Coxeter diagram.
gap> rels:=[];
[ ]
for all i,j
gap> for i in [1..numpoints] do
> for j in [1..numpoints] do
> if (i=j) then
> # if i=j then add e.i*e.i=e.i
> Add(rels, e[i]*e[i]-e[i]);
> elif ([i,j] in edges) or ([j,i] in edges) then
> # if {i,j} is an edge then add e.i*e.j*e.i=e.i
> Add(rels, e[i]*e[j]*e[i]- e[i]);
> else
> # if not {i,j} is not an edge then add e.i*e.j=e.j*e.i
> # (note: this causes double rules, but that's ok)
> Add(rels, e[i]*e[j]- e[j]*e[i]);
> fi;
> od;
> od;
|
Then the relations are converted into NP format (see 2.1) after which the function SGrobner (3.4-2) is called to calculate a Gröbner basis.
gap> relsNP:=GP2NPList(rels);; gap> GB:=SGrobner(relsNP);; #I number of entered polynomials is 64 #I number of polynomials after reduction is 43 #I End of phase I #I End of phase II #I End of phase III #I End of phase IV #I The computation took 760 msecs. |
It is now possible to calculate the dimension of the quotient algebra with the function DimQA (3.5-2). This function has as arguments the Gröbner basis GB and the number of generators of the algebra (here this is numpoints). To get the full basis the function BaseQA (3.5-1) can be used.
gap> DimQA(GB,numpoints); 10846 |
generated by GAPDoc2HTML