source: git/Singular/LIB/fpalgebras.lib @ 0b3f03

spielwiese
Last change on this file since 0b3f03 was 0b3f03, checked in by Karim Abou Zeid <karim23697@…>, 6 years ago
Change meta data of fpalgebras
  • Property mode set to 100644
File size: 35.4 KB
Line 
1////////////////////////////////////////////////////////////////
2version="version fpalgebras.lib 4.1.1.0 Feb_2018 ";
3category="Noncommutative";
4info="
5LIBRARY: fpalgebras.lib
6AUTHORS: Karim Abou Zeid,       karim.abou.zeid at rwth-aachen.de
7@*       Grischa Studzinski,    grischa.studzinski at rwth-aachen.de
8
9Support: Project II.6 in the transregional collaborative research centre
10SFB-TRR 195 'Symbolic Tools in Mathematics and their Application' of the German DFG
11
12OVERVIEW:
13Generation of various algebras, including group algebras of finitely presented groups in the Letterplace ring
14
15PROCEDURES:
16baumslagSolitar(int n, int m, int d, list #);
17baumslag(int m, int n, int d);
18crystallographicGroupP1(int d);
19crystallographicGroupPM(int d);
20crystallographicGroupPG(int d);
21crystallographicGroupP2MM(int d);
22crystallographicGroupP2(int d);
23crystallographicGroupP2GG(int d);
24crystallographicGroupCM(int d);
25crystallographicGroupC2MM(int d);
26crystallographicGroupP4(int d);
27crystallographicGroupP4MM(int d);
28crystallographicGroupP4GM(int d);
29crystallographicGroupP3(int d);
30crystallographicGroupP31M(int d);
31crystallographicGroupP3M1(int d);
32crystallographicGroupP6(int d);
33crystallographicGroupP6MM(int d);
34dyckGroup1(int n, int d, intvec P);
35dyckGroup2(int n, int d, intvec P);
36dyckGroup3(int n, int d, intvec P);
37fibonacciGroup(int m, int d);
38tetrahedronGroup(int g, int d);
39triangularGroup(int g, int d);
40";
41
42LIB "freegb.lib";
43LIB "general.lib";
44////////////////////////////////////////////////////////////////////
45
46////////////////////////////////////////////////////////////////////
47// Baumslag ////////////////////////////////////////////////////////
48// from Grischa Studzinski /////////////////////////////////////////
49////////////////////////////////////////////////////////////////////
50
51proc baumslagSolitar(int n, int m, int d, list #)
52"USAGE: baumslagSolitar(m,n,d[,IsGroup]); n an integer, m an integer, d an integer, IsGroup an optional integer
53RETURN: ring
54NOTE: - the ring contains the ideal I, which contains the required relations
55@*    - in the group case: A = a^(-1), B = b^(-1)
56@*    - negativ input is only allowed in the group case!
57@*    - d gives a degreebound and must be >m,n
58"
59{
60  int isGroup = 0;
61  if (size(#) > 0) {isGroup = #[1];}
62
63  if (isGroup != 0)
64  {
65   int baseringdef;
66   if (defined(basering)) // if a basering is defined, it should be saved for later use
67   {
68    def save = basering;
69    baseringdef = 1;
70   }
71   if (m < 0 || n < 0) {ERROR("Exponent can't be negativ in monoid rings!");}
72   if (d < 1 || d < m || d < n) {ERROR("Degree bound must be positiv and greater then m,n!");}
73   int i;
74   ring mr = 0,(a,b),Dp;
75   def Mr = makeLetterplaceRing(d);
76   setring Mr;
77   poly p,q;
78   if (n==0) {p = b(1);}
79   else
80   {
81    p = a(1)*b(2);
82    for (i = 1; i < n; i++) {p = lpMult(a(1),p);}
83   }
84   if (m==0) {q = b(1);}
85   else
86   {
87    q = b(1)*a(2);
88    for (i = 1; i < m; i++) {q = lpMult(q,a(1));}
89   }
90   ideal I = p - q;
91   export(I);
92   if (baseringdef == 1) {setring save;}
93   return(Mr);
94  }
95  else
96  {
97   int baseringdef;
98   if (defined(basering)) // if a basering is defined, it should be saved for later use
99   {
100    def save = basering;
101    baseringdef = 1;
102   }
103   int i;
104   if (d < 1 || d < absValue(m) || d < absValue(n)) {ERROR("Degree bound must be positiv and greater then |m|,|n|!");}
105   ring gr = 0,(a,b,A,B),Dp;
106   def Gr = makeLetterplaceRing(d);
107   setring Gr;
108   poly p,q;
109   if (n==0) {p = b(1);}
110   else
111   {if (n > 0)
112    {
113     p = a(1)*b(2);
114     for (i = 1; i < n; i++) {p = lpMult(a(1),p);}
115    }
116    else
117    {
118     p = A(1)*b(2);
119     for (i = 1; i < -n; i++) {p = lpMult(A(1),p);}
120    }
121   }
122   if (m==0) {q = b(1);}
123   else
124   {if (m > 0)
125    {
126     q = b(1)*a(2);
127     for (i = 1; i < m; i++) {q = lpMult(q,a(1));}
128    }
129    else
130    {
131     q = A(1)*b(2);
132     for (i = 1; i < -m; i++) {q = lpMult(q,A(1));}
133    }
134   }
135   ideal I = p - q, a(1)*A(2) - 1, b(1)*B(2) - 1, a(1)*A(2) - A(1)*a(2), b(1)*B(2) - B(1)*b(2);
136   export(I);
137   if (baseringdef == 1) {setring save;}
138   return(Gr);
139  }
140}
141example {
142  "EXAMPLE:"; echo = 2;
143  def R = baumslagSolitar(2,3,4); setring R;
144  I;
145}
146
147proc baumslagGroup(int m, int n, int d)
148"USAGE: baumslagGroup(m,n,d); m an integer, n an integer, d an integer
149RETURN: ring
150NOTE: - the ring contains the ideal I, which contains the required relations
151@*    - Baumslag group with the following presentation
152@*      < a, b | a^m = b^n = 1 >
153@*    -d gives the degreebound for the Letterplace ring
154"
155{
156 if (m < 0 || n < 0 ) {ERROR("m,n must be non-negativ integers!");}
157 if (d < 1 || d < m || d < n) {ERROR("degreebound must be positiv and larger than n and m!");}
158 int i;
159 ring r = 0,(a,b),dp;
160 def R = makeLetterplaceRing(d);
161 setring R;
162 poly p,q;
163 p = 1; q = 1;
164 for (i = 1; i <= m; i++){p = lpMult(p,a(1));}
165 for (i = 1; i <= n; i++){q = lpMult(q,b(1));}
166 ideal I = p-1,q-1;
167 export(I);
168 return(R);
169}
170example {
171  "EXAMPLE:"; echo = 2;
172  def R = baumslag(2,3,4); setring R;
173  I;
174}
175
176////////////////////////////////////////////////////////////////////
177// Crystallographic Groups //////////////////////////////////////////
178// from Grischa Studzinski /////////////////////////////////////////
179////////////////////////////////////////////////////////////////////
180
181proc crystallographicGroupP1(int d)
182"USAGE: crystallographicGroupP1(d); d an integer
183RETURN: ring
184NOTE: - the ring contains the ideal I, which contains the required relations
185@*    - p1 group with the following presentation
186@*      < x, y | [x, y] = 1 >
187@*    -d gives the degreebound for the Letterplace ring
188"
189{
190 if (d < 2){ERROR("Degreebound is to small for choosen example!");}
191 
192 int baseringdef;
193 if (defined(basering)) // if a basering is defined, it should be saved for later use
194 {
195  def save = basering;
196  baseringdef = 1;
197 }
198 ring r = 2,(x,y,X,Y),dp;
199 def R = makeLetterplaceRing(d);
200 setring R;
201 ideal I = x(1)*y(2)-y(1)*x(2)-1, X(1)*x(2)-1, x(1)*X(2)-1, y(1)*Y(2)-1, Y(1)*y(2)-1;
202 I = simplify(I,2);
203 export(I);
204 if (baseringdef == 1) {setring save;}
205 return(R);
206}
207example {
208  "EXAMPLE:"; echo = 2;
209  def R = crystallographicGroupP1(5); setring R;
210  I;
211}
212
213// old? there is already another crystallographicGroupP2 proc
214/* proc crystallographicGroupP2(int d) */
215/* " */
216/* p2 group with the following presentation */
217/* < x, y, r | [x, y] = r^2 = 1, r^-1*x*r = x^-1, r^-1*y*r = y^-1 > */
218/* Note: r = r^-1 */
219/* " */
220/* { */
221/*  if (d < 3){ERROR("Degreebound is to small for choosen example!");} */
222 
223/*  int baseringdef; */
224/*  if (defined(basering)) // if a basering is defined, it should be saved for later use */
225/*  { */
226/*   def save = basering; */
227/*   baseringdef = 1; */
228/*  } */
229/*  ring r = 2,(x,y,r,X,Y),dp; */
230/*  def R = makeLetterplaceRing(d); */
231/*  setring R; */
232/*  ideal I = x(1)*y(2)-y(1)*x(2)-1, x(1)*y(2)-y(1)*x(2)-r(1)*r(2), r(1)*r(2)-1, r(1)*x(2)*r(3)-X(1), r(1)*y(2)*r(3)-Y(1),x(1)*X(2)-1, */ 
233/* X(1)*x(2)-1, Y(1)*y(2)-1,  y(1)*Y(2)-1; */
234/*  I = simplify(I,2); */
235/*  export(I); */
236/*  if (baseringdef == 1) {setring save;} */
237/*  return(R); */
238/* } */
239
240proc crystallographicGroupPM(int d)
241"USAGE: crystallographicGroupPM(d); d an integer
242RETURN: ring
243NOTE: - the ring contains the ideal I, which contains the required relations
244@*    - pm group with the following presentation
245@*      < x, y, m | [x, y] = m^2 = 1, m^-1*x*m = x, m^-1*y*m = y^-1 >
246@*    - d gives the degreebound for the Letterplace ring
247"
248{
249 if (d < 3){ERROR("Degreebound is to small for choosen example!");}
250 
251 int baseringdef;
252 if (defined(basering)) // if a basering is defined, it should be saved for later use
253 {
254  def save = basering;
255  baseringdef = 1;
256 }
257 ring r = 2,(x,y,m,X,Y),dp;
258 def R = makeLetterplaceRing(d);
259 setring R;
260 ideal I = x(1)*y(2)-y(1)*x(2)-1, x(1)*y(2)-y(1)*x(2)-m(1)*m(2), m(1)*m(2)-1, m(1)*x(2)*m(3)-x(1), m(1)*y(2)*m(3)-Y(1),x(1)*X(2)-1, 
261X(1)*x(2)-1, Y(1)*y(2)-1,  y(1)*Y(2)-1;
262 I = simplify(I,2);
263 export(I);
264 if (baseringdef == 1) {setring save;}
265 return(R);
266}
267example {
268  "EXAMPLE:"; echo = 2;
269  def R = crystallographicGroupPM(5); setring R;
270  I;
271}
272
273proc crystallographicGroupPG(int d)
274"USAGE: crystallographicGroupPG(d); d an integer
275RETURN: ring
276NOTE: - the ring contains the ideal I, which contains the required relations
277@*    - pg group with the following presentation
278@*      < x, y, t | [x, y] = 1, t^2 = x, t^-1*y*t = y^-1 >
279@*    - d gives the degreebound for the Letterplace ring
280"
281{
282 if (d < 3){ERROR("Degreebound is to small for choosen example!");}
283 
284 int baseringdef;
285 if (defined(basering)) // if a basering is defined, it should be saved for later use
286 {
287  def save = basering;
288  baseringdef = 1;
289 }
290 ring r = 2,(x,y,t,X,Y,T),dp;
291 def R = makeLetterplaceRing(d);
292 setring R;
293 ideal I = x(1)*y(2)-y(1)*x(2)-1, t(1)*t(2) - x(1), T(1)*y(2)*t(3)-Y(1), X(1)*x(2)-1, x(1)*X(2)-1, 
294Y(1)*y(2)-1,  y(1)*Y(2)-1, t(1)*T(2)-1, T(1)*t(2)-1;
295 I = simplify(I,2);
296 export(I);
297 if (baseringdef == 1) {setring save;}
298 return(R);
299}
300example {
301  "EXAMPLE:"; echo = 2;
302  def R = crystallographicGroupPG(5); setring R;
303  I;
304}
305
306
307proc crystallographicGroupP2MM(int d)
308"USAGE: crystallographicGroupP2MM(d); d an integer
309RETURN: ring
310NOTE: - the ring contains the ideal I, which contains the required relations
311@*    - p2mm group with the following presentation
312@*      < x, y, p, q | [x, y] = [p, q] = p^2 = q^2 = 1, p^-1*x*p = x, q^-1*x*q = x^-1, p^-1*y*p = y^-1, q^-1*y*q = y >
313@*    - d gives the degreebound for the Letterplace ring
314"
315{
316 if (d < 3){ERROR("Degreebound is to small for choosen example!");}
317 
318 int baseringdef;
319 if (defined(basering)) // if a basering is defined, it should be saved for later use
320 {
321  def save = basering;
322  baseringdef = 1;
323 }
324 ring r = 2,(x,y,p,q,X,Y),dp;
325 def R = makeLetterplaceRing(d);
326 setring R;
327 ideal I = x(1)*y(2)-y(1)*x(2)-1, p(1)*q(2)-q(1)*p(2)-1, p(1)*p(2) - 1, q(1)*q(2) - 1, p(1)*y(2)*p(3)-Y(1), p(1)*x(2)*p(3)-x(1),
328 q(1)*y(2)*q(3)-y(1), q(1)*x(2)*q(3)-X(1), X(1)*x(2)-1, x(1)*X(2)-1,  Y(1)*y(2)-1,  y(1)*Y(2)-1,  x(1)*y(2)-y(1)*x(2)- p(1)*p(2),
329 x(1)*y(2)-y(1)*x(2)- q(1)*q(2), p(1)*p(2)-q(1)*q(2);
330 I = simplify(I,2);
331 export(I);
332 if (baseringdef == 1) {setring save;}
333 return(R);
334}
335example {
336  "EXAMPLE:"; echo = 2;
337  def R = crystallographicGroupP2MM(5); setring R;
338  I;
339}
340
341proc crystallographicGroupP2(int d)
342"USAGE: crystallographicGroupP2(d); d an integer
343RETURN: ring
344NOTE: - the ring contains the ideal I, which contains the required relations
345@*    - p2 group with the following presentation
346@*      < x, y, m, t | [x, y] = t^2 = 1, m^2 = y, t^-1*x*t = x, m^-1*x*m = x^-1, t^-1*y*t = y^-1, t^-1*m*t = m^-1 >
347@*    - d gives the degreebound for the Letterplace ring
348"
349{
350 if (d < 3){ERROR("Degreebound is to small for choosen example!");}
351 
352 int baseringdef;
353 if (defined(basering)) // if a basering is defined, it should be saved for later use
354 {
355  def save = basering;
356  baseringdef = 1;
357 }
358 ring r = 2,(x,y,m,t,X,Y,M),dp;
359 def R = makeLetterplaceRing(d);
360 setring R;
361 ideal I = x(1)*y(2)-y(1)*x(2)-1, x(1)*y(2)-y(1)*x(2)-t(1)*t(2), m(1)*m(2)-y(1), t(1)*t(2) - 1, t(1)*x(2)*t(3)-x(1),
362M(1)*x(2)*m(3)-X(1), t(1)*y(2)*t(3)-Y(1), t(1)*m(2)*t(3)-M(1), X(1)*x(2)-1, x(1)*X(2)-1,  Y(1)*y(2)-1,  y(1)*Y(2)-1,
363m(1)*M(2)-1, M(1)*m(2)-1;
364 I = simplify(I,2);
365 export(I);
366 if (baseringdef == 1) {setring save;}
367 return(R);
368}
369example {
370  "EXAMPLE:"; echo = 2;
371  def R = crystallographicGroupP2(5); setring R;
372  I;
373}
374
375proc crystallographicGroupP2GG(int d)
376"USAGE: crystallographicGroupP2GG(d); d an integer
377RETURN: ring
378NOTE: - the ring contains the ideal I, which contains the required relations
379@*    - p2gg group with the following presentation
380@*      < x, y, u, v | [x, y] = (u*v)^2 = 1, u^2 = x, v^2 = y, v^-1*x*v = x^-1, u^-1*y*u = y^-1 >
381@*    - d gives the degreebound for the Letterplace ring
382"
383{
384 if (d < 4){ERROR("Degreebound is to small for choosen example!");}
385 
386 int baseringdef;
387 if (defined(basering)) // if a basering is defined, it should be saved for later use
388 {
389  def save = basering;
390  baseringdef = 1;
391 }
392 ring r = 2,(x,y,u,v,X,Y,u,v),dp;
393 def R = makeLetterplaceRing(d);
394 setring R;
395 ideal I = x(1)*y(2)-y(1)*x(2)-1, x(1)*y(2)-y(1)*x(2)-u(1)*v(2)*u(3)*v(4), u(1)*v(2)*u(3)*v(4)-1, u(1)*u(2)-x(1), v(1)*v(2) - y,
396V(1)*x(2)*v(3)-X(1), U(1)*y(2)*u(3)-Y(1),
397X(1)*x(2)-1, x(1)*X(2)-1,  Y(1)*y(2)-1,  y(1)*Y(2)-1, u(1)*U(2)-1, U(1)*u(2)-1, v(1)*V(2)-1, V(1)*v(2)-1;
398 I = simplify(I,2);
399 export(I);
400 if (baseringdef == 1) {setring save;}
401 return(R);
402}
403example {
404  "EXAMPLE:"; echo = 2;
405  def R = crystallographicGroupP2GG(5); setring R;
406  I;
407}
408
409proc crystallographicGroupCM(int d)
410"USAGE: crystallographicGroupCM(d); d an integer
411RETURN: ring
412NOTE: - the ring contains the ideal I, which contains the required relations
413@*    - cm group with the following presentation
414@*      < x, y, t | [x, y] = t^2 = 1, t^-1*x*t = x*y, t^-1*y*t = y^-1 >   
415@*    - d gives the degreebound for the Letterplace ring
416"
417{
418 if (d < 3){ERROR("Degreebound is to small for choosen example!");}
419 
420 int baseringdef;
421 if (defined(basering)) // if a basering is defined, it should be saved for later use
422 {
423  def save = basering;
424  baseringdef = 1;
425 }
426 ring r = 2,(x,y,t,X,Y),dp;
427 def R = makeLetterplaceRing(d);
428 setring R;
429 ideal I = x(1)*y(2)-y(1)*x(2)-1, x(1)*y(2)-y(1)*x(2)-t(1)*t(2), t(1)*t(2)-1, 
430t(1)*x(2)*t(3)-x(1)*y(2), t(1)*y(2)*t(3)-Y(1),
431X(1)*x(2)-1, x(1)*X(2)-1,  Y(1)*y(2)-1,  y(1)*Y(2)-1;
432 I = simplify(I,2);
433 export(I);
434 if (baseringdef == 1) {setring save;}
435 return(R);
436}
437example {
438  "EXAMPLE:"; echo = 2;
439  def R = crystallographicGroupCM(5); setring R;
440  I;
441}
442
443proc crystallographicGroupC2MM(int d)
444"USAGE: crystallographicGroupC2MM(d); d an integer
445RETURN: ring
446NOTE: - the ring contains the ideal I, which contains the required relations
447@*    - c2mm group with the following presentation
448@*      < x, y, m, r | [x, y] = m^2 = r^2 = 1, m^-1*y*m = y^-1, m^-1*x*m = x*y, r^-1*y*r = y^-1, r^-1*x*r = x^-1, m^-1*r*m = r^-1 >
449@*    - d gives the degreebound for the Letterplace ring
450"
451{
452 if (d < 3){ERROR("Degreebound is to small for choosen example!");}
453 
454 int baseringdef;
455 if (defined(basering)) // if a basering is defined, it should be saved for later use
456 {
457  def save = basering;
458  baseringdef = 1;
459 }
460 ring r = 2,(x,y,m,r,X,Y),dp;
461 def R = makeLetterplaceRing(d);
462 setring R;
463 ideal I = x(1)*y(2)-y(1)*x(2)-1, x(1)*y(2)-y(1)*x(2)-m(1)*m(2), x(1)*y(2)-y(1)*x(2)-r(1)*r(2), m(1)*m(2)-1,  r(1)*r(2)-1,
464 m(1)*m(2)-r(1)*r(2), m(1)*y(2)*m(3)-Y(1), m(1)*x(2)*m(3)-x(1)*y(2), (1)*y(2)*r(3)-Y(1), r(1)*x(2)*r(3)-X(1), m(1)*r(2)*m(3)-r(1),
465X(1)*x(2)-1, x(1)*X(2)-1,  Y(1)*y(2)-1,  y(1)*Y(2)-1;
466 I = simplify(I,2);
467 export(I);
468 if (baseringdef == 1) {setring save;}
469 return(R);
470}
471example {
472  "EXAMPLE:"; echo = 2;
473  def R = crystallographicGroupC2MM(5); setring R;
474  I;
475}
476
477proc crystallographicGroupP4(int d)
478"USAGE: crystallographicGroupP4(d); d an integer
479RETURN: ring
480NOTE: - the ring contains the ideal I, which contains the required relations
481@*    - p4 group with the following presentation
482@*      < x, y, r | [x, y] = r^4 = 1, r^-1*x*r = x^-1, r^-1*x*r = y >   
483@*    - d gives the degreebound for the Letterplace ring
484"
485{
486 if (d < 5){ERROR("Degreebound is to small for choosen example!");}
487 
488 int baseringdef;
489 if (defined(basering)) // if a basering is defined, it should be saved for later use
490 {
491  def save = basering;
492  baseringdef = 1;
493 }
494 ring r = 2,(x,y,r,X,Y),dp;
495 def R = makeLetterplaceRing(d);
496 setring R;
497 ideal I = x(1)*y(2)-y(1)*x(2)-1, x(1)*y(2)-y(1)*x(2)-r(1)*r(2)*r(3)*r(4), r(1)*r(2)*r(3)*r(4)-1,
498 r(1)*r(2)*r(3)*x(4)*r(5)-X(1), r(1)*r(2)*r(3)*x(4)*r(5)-y(1),
499X(1)*x(2)-1, x(1)*X(2)-1,  Y(1)*y(2)-1,  y(1)*Y(2)-1;
500 I = simplify(I,2);
501 export(I);
502 if (baseringdef == 1) {setring save;}
503 return(R);
504}
505example {
506  "EXAMPLE:"; echo = 2;
507  def R = crystallographicGroupP4(5); setring R;
508  I;
509}
510
511proc crystallographicGroupP4MM(int d)
512"USAGE: crystallographicGroupP4MM(d); d an integer
513RETURN: ring
514NOTE: - the ring contains the ideal I, which contains the required relations
515@*    - p4mm group with the following presentation
516@*      < x, y, r, m | [x, y] = r^4 = m^2 = 1, r^-1*y*r = x^-1, r^-1*x*r = y, m^-1*x*m = y, m^-1*r*m = r^-1 >
517@*    - d gives the degreebound for the Letterplace ring
518"
519{
520 if (d < 5){ERROR("Degreebound is to small for choosen example!");}
521 
522 int baseringdef;
523 if (defined(basering)) // if a basering is defined, it should be saved for later use
524 {
525  def save = basering;
526  baseringdef = 1;
527 }
528 ring r = 2,(x,y,r,m,X,Y),dp;
529 def R = makeLetterplaceRing(d);
530 setring R;
531 ideal I = x(1)*y(2)-y(1)*x(2)-1, x(1)*y(2)-y(1)*x(2)-r(1)*r(2)*r(3)*r(4),  r(1)*r(2)*r(3)*r(4)-1,
532 r(1)*r(2)*r(3)*x(4)*r(5)-X(1), r(1)*r(2)*r(3)*x(4)*r(5)-y(1),
533X(1)*x(2)-1, x(1)*X(2)-1,  Y(1)*y(2)-1,  y(1)*Y(2)-1;
534 I = simplify(I,2);
535 export(I);
536 if (baseringdef == 1) {setring save;}
537 return(R);
538}
539example {
540  "EXAMPLE:"; echo = 2;
541  def R = crystallographicGroupP4MM(5); setring R;
542  I;
543}
544
545proc crystallographicGroupP4GM(int d)
546"USAGE: crystallographicGroupP4GM(d); d an integer
547RETURN: ring
548NOTE: - the ring contains the ideal I, which contains the required relations
549@*    - p4gm group with the following presentation
550@*      < x, y, r, t | [x, y] = r^4 = t^2 = 1, r^-1*y*r = x^-1, r^-1*x*r = y, t^-1*x*t = y, t^-1*r*t = x^-1*r^-1>
551@*    - d gives the degreebound for the Letterplace ring
552"
553{
554 if (d < 5){ERROR("Degreebound is to small for choosen example!");}
555 
556 int baseringdef;
557 if (defined(basering)) // if a basering is defined, it should be saved for later use
558 {
559  def save = basering;
560  baseringdef = 1;
561 }
562 ring r = 2,(x,y,r,t,X,Y),dp;
563 def R = makeLetterplaceRing(d);
564 setring R;
565 ideal I = x(1)*y(2)-y(1)*x(2)-1, x(1)*y(2)-y(1)*x(2)-r(1)*r(2)*r(3)*r(4),  r(1)*r(2)*r(3)*r(4)-1, x(1)*y(2)-y(1)*x(2)-t(1)*t(2),
566 t(1)*t(2)-1,  r(1)*r(2)*r(3)*r(4)-t(1)*t(2),  r(1)*r(2)*r(3)*y(4)*r(5)-X(1), r(1)*r(2)*r(3)*x(4)*r(5)-y(1),
567 t(1)*r(2)*t(3)-X(1)*r(2)*r(3)*r(4), X(1)*x(2)-1, x(1)*X(2)-1,  Y(1)*y(2)-1,  y(1)*Y(2)-1;
568 I = simplify(I,2);
569 export(I);
570 if (baseringdef == 1) {setring save;}
571 return(R);
572}
573example {
574  "EXAMPLE:"; echo = 2;
575  def R = crystallographicGroupP4GM(5); setring R;
576  I;
577}
578
579proc crystallographicGroupP3(int d)
580"USAGE: crystallographicGroupP3(d); d an integer
581RETURN: ring
582NOTE: - the ring contains the ideal I, which contains the required relations
583@*    - p3 group with the following presentation
584@*      < x, y, r | [x, y] = r^3 = 1, r^-1*x*r = x^-1*y, r^-1*y*r = x^-1>
585@*    - d gives the degreebound for the Letterplace ring
586"
587{
588 if (d < 4){ERROR("Degreebound is to small for choosen example!");}
589 
590 int baseringdef;
591 if (defined(basering)) // if a basering is defined, it should be saved for later use
592 {
593  def save = basering;
594  baseringdef = 1;
595 }
596 ring r = 2,(x,y,r,X,Y),dp;
597 def R = makeLetterplaceRing(d);
598 setring R;
599 ideal I = x(1)*y(2)-y(1)*x(2)-1, x(1)*y(2)-y(1)*x(2)-r(1)*r(2)*r(3),  r(1)*r(2)*r(3)-1,
600  r(1)*r(2)*x(3)*r(4)-X(1)*y(2),  r(1)*r(2)*y(3)*r(4)-X(1), X(1)*x(2)-1, x(1)*X(2)-1,  Y(1)*y(2)-1,  y(1)*Y(2)-1;
601 I = simplify(I,2);
602 export(I);
603 if (baseringdef == 1) {setring save;}
604 return(R);
605}
606example {
607  "EXAMPLE:"; echo = 2;
608  def R = crystallographicGroupP3(5); setring R;
609  I;
610}
611
612proc crystallographicGroupP31M(int d)
613"USAGE: crystallographicGroupP31M(d); d an integer
614RETURN: ring
615NOTE: - the ring contains the ideal I, which contains the required relations
616@*    - p31m group with the following presentation
617@*      < x, y, r, t | [x, y] = r^2 = t^2 = (t*r)^3 = 1, r^-1*x*r = x, t^-1*y*t = y, t^-1*x*t = x^-1*y, r^-1*y*r = x*y^-1 >
618@*    - d gives the degreebound for the Letterplace ring
619"
620{
621 if (d < 6){ERROR("Degreebound is to small for choosen example!");}
622 
623 int baseringdef;
624 if (defined(basering)) // if a basering is defined, it should be saved for later use
625 {
626  def save = basering;
627  baseringdef = 1;
628 }
629 ring r = 2,(x,y,r,t,X,Y),dp;
630 def R = makeLetterplaceRing(d);
631 setring R;
632 ideal I = x(1)*y(2)-y(1)*x(2)-1, x(1)*y(2)-y(1)*x(2)-r(1)*r(2), x(1)*y(2)-y(1)*x(2)-t(1)*t(2), r(1)*r(2)-1, t(1)*t(2)-1,
633 t(1)*r(2)*t(3)*r(4)*t(5)*r(6)-1, r(1)*r(2)-t(1)*t(2),  x(1)*y(2)-y(1)*x(2)-t(1)*r(2)*t(3)*r(4)*t(5)*r(6),
634 t(1)*r(2)*t(3)*r(4)*t(5)*r(6)-r(1)*r(2), t(1)*r(2)*t(3)*r(4)*t(5)*r(6)-t(1)*t(2),
635 r(1)*x(2)*r(3)-x(1),  t(1)*y(2)*t(3)-y(1), t(1)*x(2)*t(3)-X(1)*y(2), r(1)*y(2)*r(3)-x(1)*Y(2),
636 X(1)*x(2)-1, x(1)*X(2)-1, Y(1)*y(2)-1,  y(1)*Y(2)-1;
637 I = simplify(I,2);
638 export(I);
639 if (baseringdef == 1) {setring save;}
640 return(R);
641}
642example {
643  "EXAMPLE:"; echo = 2;
644  def R = crystallographicGroupP31M(5); setring R;
645  I;
646}
647
648proc crystallographicGroupP3M1(int d)
649"USAGE: crystallographicGroupP3M1(d); d an integer
650RETURN: ring
651NOTE: - the ring contains the ideal I, which contains the required relations
652@*    - p3m1 group with the following presentation
653@*      < x, y, r, m | [x, y] = r^3 = m^2 = 1, m^-1*r*m = r^2, r^-1*x*r = x^-1*y, r^-1*y*r = x^-1, m^-1*x*m = x^-1, m^-1*y*m = x^-1*y >
654@*    - d gives the degreebound for the Letterplace ring
655"
656{
657 if (d < 4){ERROR("Degreebound is to small for choosen example!");}
658 
659 int baseringdef;
660 if (defined(basering)) // if a basering is defined, it should be saved for later use
661 {
662  def save = basering;
663  baseringdef = 1;
664 }
665 ring r = 2,(x,y,r,m,X,Y),dp;
666 def R = makeLetterplaceRing(d);
667 setring R;
668 ideal I = x(1)*y(2)-y(1)*x(2)-1, x(1)*y(2)-y(1)*x(2)-r(1)*r(2)*r(3), x(1)*y(2)-y(1)*x(2)-m(1)*m(2), r(1)*r(2)*r(3)-1, m(1)*m(2)-1,
669 r(1)*r(2)*r(3)-m(1)*m(2),  m(1)*r(2)*m(3)-r(1)*r(2), r(1)*r(2)*x(3)*r(4)-X(1)*y(2), r(1)*r(2)*y(3)*r(4)-X(1),m(1)*x(2)*m(3)-X(1),
670 m(1)*y(2)*m(3)-X(1)*y(2), X(1)*x(2)-1, x(1)*X(2)-1, Y(1)*y(2)-1,  y(1)*Y(2)-1;
671 I = simplify(I,2);
672 export(I);
673 if (baseringdef == 1) {setring save;}
674 return(R);
675}
676example {
677  "EXAMPLE:"; echo = 2;
678  def R = crystallographicGroupP3M1(5); setring R;
679  I;
680}
681
682proc crystallographicGroupP6(int d)
683"USAGE: crystallographicGroupP6(d); d an integer
684RETURN: ring
685NOTE: - the ring contains the ideal I, which contains the required relations
686@*    - p6 group with the following presentation
687@*      < x, y, r | [x, y] = r^6 = 1, r^-1*x*r = y, r^-1*y*r = x^-1*y>
688@*    - d gives the degreebound for the Letterplace ring
689"
690{
691 if (d < 7){ERROR("Degreebound is to small for choosen example!");}
692 
693 int baseringdef;
694 if (defined(basering)) // if a basering is defined, it should be saved for later use
695 {
696  def save = basering;
697  baseringdef = 1;
698 }
699 ring r = 2,(x,y,r,X,Y),dp;
700 def R = makeLetterplaceRing(d);
701 setring R;
702 ideal I = x(1)*y(2)-y(1)*x(2)-1, x(1)*y(2)-y(1)*x(2)-r(1)*r(2)*r(3)*r(4)*r(5)*r(6), r(1)*r(2)*r(3)*r(4)*r(5)*r(6)-1,
703 r(1)*r(2)*r(3)*r(4)*r(5)*x(6)*r(7)-y(1), r(1)*r(2)*r(3)*r(4)*r(5)*y(6)*r(7)-X(1)*y(2),
704 X(1)*x(2)-1, x(1)*X(2)-1, Y(1)*y(2)-1,  y(1)*Y(2)-1;
705 I = simplify(I,2);
706 export(I);
707 if (baseringdef == 1) {setring save;}
708 return(R);
709}
710example {
711  "EXAMPLE:"; echo = 2;
712  def R = crystallographicGroupP6(5); setring R;
713  I;
714}
715
716proc crystallographicGroupP6MM(int d)
717"USAGE: crystallographicGroupP6MM(d); d an integer
718RETURN: ring
719NOTE: - the ring contains the ideal I, which contains the required relations
720@*    - p6mm group with the following presentation
721@*      < x, y, r, m | [x, y] = r^6 = m^2 = 1, r^-1*y*r = x^-1*y, r^-1*x*r = y, m^-1*x*m = x^-1, m^-1*y*m = x^-1*y, m^-1*r*m = r^-1*y>
722@*    - d gives the degreebound for the Letterplace ring
723"
724{
725 if (d < 7){ERROR("Degreebound is to small for choosen example!");}
726 
727 int baseringdef;
728 if (defined(basering)) // if a basering is defined, it should be saved for later use
729 {
730  def save = basering;
731  baseringdef = 1;
732 }
733 ring r = 2,(x,y,r,m,X,Y),dp;
734 def R = makeLetterplaceRing(d);
735 setring R;
736 ideal I = x(1)*y(2)-y(1)*x(2)-1, x(1)*y(2)-y(1)*x(2)-r(1)*r(2)*r(3)*r(4)*r(5)*r(6), r(1)*r(2)*r(3)*r(4)*r(5)*r(6)-1,
737 x(1)*y(2)-y(1)*x(2)-m(1)*m(2), r(1)*r(2)*r(3)*r(4)*r(5)*r(6)-m(1)*m(2), m(1)*m(2)-1, m(1)*x(2)*m(3)-X(1),  m(1)*y(2)*m(3)-X(1)*y(2),
738 r(1)*r(2)*r(3)*r(4)*r(5)*x(6)*r(7)-y(1), r(1)*r(2)*r(3)*r(4)*r(5)*y(6)*r(7)-X(1)*y(2), M(1)*r(2)*m(3)- r(1)*r(2)*r(3)*r(4)*r(5)*y(6)
739 X(1)*x(2)-1, x(1)*X(2)-1, Y(1)*y(2)-1,  y(1)*Y(2)-1;
740 I = simplify(I,2);
741 export(I);
742 if (baseringdef == 1) {setring save;}
743 return(R);
744}
745example {
746  "EXAMPLE:"; echo = 2;
747  def R = crystallographicGroupP6MM(5); setring R;
748  I;
749}
750
751////////////////////////////////////////////////////////////////////
752// Dyck Group //////////////////////////////////////////////////////
753// from Grischa Studzinski /////////////////////////////////////////
754////////////////////////////////////////////////////////////////////
755
756proc dyckGroup1(int n, int d, intvec P)
757"USAGE: dyckGroup1(n,d,P); n an integer, d an integer, P an intvec
758RETURN: ring
759NOTE: - the ring contains the ideal I, which contains the required relations
760@*    - The Dyck group with the following presentation
761@*      < x_1, x_2, ... , x_n | (x_1)^p1 = (x_2)^p2 = ... = (x_n)^pn = x_1 * x_2 * ... * x_n = 1 >
762@*    - negative exponents are allowed
763@*    - representation in the form x_i^p_i - x_(i+1)^p_(i+1)
764@*    - d gives the degreebound for the Letterplace ring
765"
766{
767 int baseringdef,i,j;
768 if (n < 1) {ERROR("There must be at least one variable!");}
769 if (d < n) {ERROR("Degreebound is to small!");}
770 for (i = 1; i <= size(P); i++) {if (d < absValue(P[i])){ERROR("Degreebound is to small!");}}
771
772 if (defined(basering)) // if a basering is defined, it should be saved for later use
773 {
774  def save = basering;
775  baseringdef = 1;
776 }
777 ring r = 2,(x(1..n),Y(1..n)),dp;
778 def R = makeLetterplaceRing(d);
779 setring R;
780 ideal I; poly p,q;
781 p = 1; q = 1;
782 for (i = 1; i<= n; i++) {p = lpMult(p,var(i));}
783 I = p-1;
784 for (i = n; i > 0; i--)
785 {
786  if (P[i] >= 0) {for (j = 1; j <= P[i]; j++){q = lpMult(q,var(i));}}
787  else {for (j = 1; j <= -P[i]; j++){q = lpMult(q,var(i+n));}}
788  I = p - q,I;
789  p = q; q = 1;
790 }
791 
792 I = simplify(I,2);
793 export(I);
794 if (baseringdef == 1) {setring save;}
795 return(R);
796}
797example {
798  "EXAMPLE:"; echo = 2;
799  intvec P = 1,2,3;
800  def R = dyckGroup1(3,5,P); setring R;
801  I;
802}
803
804
805proc dyckGroup2(int n, int d, intvec P)
806"USAGE: dyckGroup2(n,d,P); n an integer, d an integer, P an intvec
807RETURN: ring
808NOTE: - the ring contains the ideal I, which contains the required relations
809@*    - The Dyck group with the following presentation
810@*      < x_1, x_2, ... , x_n | (x_1)^p1 = (x_2)^p2 = ... = (x_n)^pn = x_1 * x_2 * ... * x_n = 1 >
811@*    - negative exponents are allowed
812@*    - representation in the form x_i^p_i - 1
813@*    - d gives the degreebound for the Letterplace ring
814"
815{
816 int baseringdef,i,j;
817 if (n < 1) {ERROR("There must be at least one variable!");}
818 if (d < n) {ERROR("Degreebound is to small!");}
819 for (i = 1; i <= size(P); i++) {if (d < absValue(P[i])){ERROR("Degreebound is to small!");}}
820
821 if (defined(basering)) // if a basering is defined, it should be saved for later use
822 {
823  def save = basering;
824  baseringdef = 1;
825 }
826 ring r = 2,(x(1..n),Y(1..n)),dp;
827 def R = makeLetterplaceRing(d);
828 setring R;
829 ideal I; poly p;
830 p = 1;
831 for (i = 1; i<= n; i++) {p = lpMult(p,var(i));}
832 I = p-1;
833 for (i = n; i > 0; i--)
834 {
835  p = 1;
836  if (P[i] >= 0) {for (j = 1; j <= P[i]; j++){p = lpMult(p,var(i));}}
837  else {for (j = 1; j <= -P[i]; j++){p = lpMult(p,var(i+n));}}
838  I = p - 1,I;
839 }
840 
841 I = simplify(I,2);
842 export(I);
843 if (baseringdef == 1) {setring save;}
844 return(R);
845}
846example {
847  "EXAMPLE:"; echo = 2;
848  intvec P = 1,2,3;
849  def R = dyckGroup2(3,5,P); setring R;
850  I;
851}
852
853
854
855proc dyckGroup3(int n, int d, intvec P)
856"USAGE: dyckGroup2(n,d,P); n an integer, d an integer, P an intvec
857RETURN: ring
858NOTE: - the ring contains the ideal I, which contains the required relations
859@*    - The Dyck group with the following presentation
860@*      < x_1, x_2, ... , x_n | (x_1)^p1 = (x_2)^p2 = ... = (x_n)^pn = x_1 * x_2 * ... * x_n = 1 >
861@*    - only positive exponents are allowed
862@*    - no inverse generators needed
863@*    - d gives the degreebound for the Letterplace ring
864"
865{
866 int baseringdef,i,j;
867 if (n < 1) {ERROR("There must be at least one variable!");}
868 if (d < n) {ERROR("Degreebound is to small!");}
869 for (i = 1; i <= size(P); i++) {if (P[i] < 0){ERROR("Exponents must be positive!");}}
870 for (i = 1; i <= size(P); i++) {if (d < P[i]){ERROR("Degreebound is to small!");}}
871 
872
873 if (defined(basering)) // if a basering is defined, it should be saved for later use
874 {
875  def save = basering;
876  baseringdef = 1;
877 }
878 ring r = 2,x(1..n),dp;
879 def R = makeLetterplaceRing(d);
880 setring R;
881 ideal I; poly p;
882 p = 1;
883 for (i = 1; i<= n; i++) {p = lpMult(p,var(i));}
884 I = p-1;
885 for (i = n; i > 0; i--)
886 {
887  p = 1;
888  for (j = 1; j <= P[i]; j++){p = lpMult(p,var(i));}
889  I = p - 1,I;
890 }
891 
892 I = simplify(I,2);
893 export(I);
894 if (baseringdef == 1) {setring save;}
895 return(R);
896}
897example {
898  "EXAMPLE:"; echo = 2;
899  intvec P = 1,2,3;
900  def R = dyckGroup3(3,5,P); setring R;
901  I;
902}
903
904////////////////////////////////////////////////////////////////////
905// Fibonacci Group /////////////////////////////////////////////////
906// from Grischa Studzinski /////////////////////////////////////////
907////////////////////////////////////////////////////////////////////
908
909proc fibonacciGroup(int m, int d)
910"USAGE: fibonacciGroup(m,d); m an integer, d an integer
911RETURN: ring
912NOTE: - the ring contains the ideal I, which contains the required relations
913@*    - The Fibonacci group F(2, m) with the following presentation
914@*      < x_1, x_2, ... , x_m | x_i * x_(i + 1) = x_(i + 2) >
915@*    - d gives the degreebound for the Letterplace ring
916"
917// TODO: basefield Q oder F2?
918// TODO: inverse Elemente!
919{
920 if (m < 3) {ERROR("At least three generators are required!");}
921 if (d < 2) {ERROR("Degree bound must be at least 2!");}
922 int baseringdef,i;
923 if (defined(basering)) // if a basering is defined, it should be saved for later use
924 {
925  def save = basering;
926  baseringdef = 1;
927 }
928 ring r = 2,(x(1..m),Y(1..m)),dp;
929 def R = makeLetterplaceRing(d);
930 setring R;
931 ideal I; poly p;
932 for (i = 1; i < m-1; i++)
933 {
934  p = lpMult(var(i),var(i+1))-var(i+2);
935  I = I,p;
936 }
937 for (i = 1; i <= m; i++)
938 {
939  p = lpMult(var(i),var(i+m))-1;
940  I = I,p;
941  p = lpMult(var(i+m),var(i))-1;
942  I = I,p;
943 }
944 I = simplify(I,2);
945 export(I);
946 if (baseringdef == 1) {setring save;}
947 return(R);
948}
949example {
950  "EXAMPLE:"; echo = 2;
951  def R = fibonacciGroup(3,5); setring R;
952  I;
953}
954
955
956////////////////////////////////////////////////////////////////////
957// Tetrahedron Groups ///////////////////////////////////////////////
958// from Grischa Studzinski /////////////////////////////////////////
959////////////////////////////////////////////////////////////////////
960
961proc tetrahedronGroup(int g, int d)
962"USAGE: tetrahedronGroup(g,d); g an integer, d an integer
963RETURN: ring
964NOTE: - the ring contains the ideal I, which contains the required relations
965@*    - g gives the number of the example
966@*    - d gives the degreebound for the Letterplace ring
967@*
968The examples are found in
969Classification of the finite generalized tetrahedron groups
970by Gerhard Rosenberger and Martin Scheer.
971The 5 examples are denoted in Proposition 1.9 and concern
972finite generalized tetrahedron group in the Tsarnarov-case, which are
973not equivalent to a presentation for an ordinary tetrahedron group.
974@*
975"
976{
977 if (g < 1 || g > 5) {ERROR("There are only 5 examples!");}
978 if ((g == 1 && d < 6)||(g == 2 && d < 6)||(g == 3 && d < 5)||(g == 4 && d < 4)||(g == 5 && d < 5))
979 {ERROR("Degreebound is to small for choosen example!");}
980 
981 int baseringdef,i,j;
982 if (defined(basering)) // if a basering is defined, it should be saved for later use
983 {
984  def save = basering;
985  baseringdef = 1;
986 }
987 ring r = 2,(x,y,z),dp;
988 def R = makeLetterplaceRing(d);
989 setring R;
990 ideal I;
991 if (g == 1)
992 {I = x(1)*x(2)*x(3)*x(4)*x(5)-1, y(1)*y(2)-1, z(1)*z(2)*z(3)-1, x(1)*y(2)*x(3)*y(4)*x(5)*y(6)-1, x(1)*x(2)*z(3)*x(4)*x(5)*z(6)-1,
993      y(1)*z(2)*y(3)*z(4)-1;
994 }
995 if (g == 2)
996 {I = x(1)*x(2)*x(3)-1, y(1)*y(2)*y(3)-1, z(1)*z(2)*z(3)*z(4)*z(5)-1,x(1)*y(2)*x(3)*y(4)-1,x(1)*z(2)*x(3)*z(4)-1,
997      y(1)*z(2)*z(3)*y(4)*z(5)*z(6)-1;
998 }
999 if (g == 3)
1000 {I =  x(1)*x(2)*x(3)-1, y(1)*y(2)*y(3)-1, z(1)*z(2)*z(3)-1, x(1)*y(2)*x(3)*y(4)-1, x(1)*z(2)*x(3)*z(4)-1, y(1)*z(2)*y(3)*z(4)-1;
1001 }
1002 if (g == 4)
1003 {I =  x(1)*x(2)*x(3)-1, y(1)*y(2)*y(3)-1, z(1)*z(2)*z(3)*z(4)-1,x(1)*y(2)*x(3)*y(4)-1, x(1)*z(2)*x(3)*z(4)-1, y(1)*z(2)*y(3)*z(4)-1;
1004 }
1005 if (g ==5)
1006 {I =  x(1)*x(2)*x(3)-1, y(1)*y(2)*y(3)-1, z(1)*z(2)*z(3)*z(4)*z(5)-1,x(1)*y(2)*x(3)*y(4)-1, x(1)*z(2)*x(3)*z(4)-1, y(1)*z(2)*y(3)*z(4)-1;
1007 }
1008 
1009 I = simplify(I,2);
1010 export(I);
1011 if (baseringdef == 1) {setring save;}
1012 return(R);
1013}
1014example {
1015  "EXAMPLE:"; echo = 2;
1016  def R = tetrahedronGroup(3,5); setring R;
1017  I;
1018}
1019
1020
1021////////////////////////////////////////////////////////////////////
1022// Triangular Groups ///////////////////////////////////////////////
1023// from Grischa Studzinski /////////////////////////////////////////
1024////////////////////////////////////////////////////////////////////
1025
1026proc triangularGroup(int g, int d)
1027"USAGE: triangularGroup(g,d); g an integer, d an integer
1028RETURN: ring
1029NOTE: - the ring contains the ideal I, which contains the required relations
1030@*    - g gives the number of the example
1031@*    - d gives the degreebound for the Letterplace ring
1032@*
1033The examples are found in
1034Classification of the finite generalized tetrahedron groups
1035by Gerhard Rosenberger and Martin Scheer.
1036The 14 examples are denoted in theorem 2.12
1037@*
1038"
1039{
1040 if (g < 1 || g > 14) {ERROR("There are only 14 examples!");}
1041 if ((g == 1 && d < 20)||(g == 2 && d < 21)||(g == 3 && d < 10)||(g == 4 && d < 12)||(g == 5 && d < 10)||(g == 6 && d < 18)||(g == 7 && d < 20)||(g == 8 && d < 16)||(g == 9 && d < 10)||(g == 10 && d < 14)||(g == 11 && d < 16)||(g == 12 && d < 24)||(g == 13 && d < 28)||(g == 14 && d < 37))
1042 {ERROR("Degreebound is to small for choosen example!");}
1043 
1044 int baseringdef;
1045 if (defined(basering)) // if a basering is defined, it should be saved for later use
1046 {
1047  def save = basering;
1048  baseringdef = 1;
1049 }
1050 ring r = 2,(a,b),dp;
1051 def R = makeLetterplaceRing(d);
1052 setring R;
1053 ideal I;
1054 
1055 if (g == 1)
1056 {I = a(1)*a(2)-1, b(1)*b(2)*b(3)-1,
1057  a(1)*b(2)*a(3)*b(4)*a(5)*b(6)*b(7)*a(8)*b(9)*b(10)*a(11)*b(12)*a(13)*b(14)*a(15)*b(16)*b(17)*a(18)*b(19)*b(20)-1;
1058 }
1059 if (g == 2)
1060 {I = a(1)*a(2)-1, b(1)*b(2)*b(3)-1,
1061  a(1)*b(2)*a(3)*b(4)*a(5)*b(6)*b(7)*a(8)*b(9)*a(10)*b(11)*a(12)*b(13)*b(14)*a(15)*b(16)*a(17)*b(18)*a(19)*b(20)*b(21)-1;
1062 }
1063 if (g == 3)
1064 {I = a(1)*a(2)*a(3)-1, b(1)*b(2)*b(3)-1,
1065  a(1)*b(2)*a(3)*b(4)*b(5)*a(6)*b(7)*a(8)*b(9)*b(10)-1;
1066 }
1067 if (g == 4)
1068 {I = a(1)*a(2)*a(3)-1, b(1)*b(2)*b(3)-1,
1069  a(1)*b(2)*a(3)*a(4)*b(5)*b(6)*a(7)*b(8)*a(9)*a(10)*b(11)*b(12)-1;
1070 }
1071 if (g == 5)
1072 {I = a(1)*a(2)-1, b(1)*b(2)*b(3)*b(4)*b(5)-1,
1073   a(1)*b(2)*a(3)*b(4)*b(5)*a(6)*b(7)*a(8)*b(9)*b(10)-1;
1074 }
1075 if (g == 6)
1076 {I = a(1)*a(2)-1, b(1)*b(2)*b(3)*b(4)*b(5)-1,
1077   a(1)*b(2)*a(3)*b(4)*a(5)*b(6)*b(7)*b(8)*b(9)*a(10)*b(11)*a(12)*b(13)*a(14)*b(15)*b(16)*b(17)*b(18)-1;
1078 }
1079 if (g == 7)
1080 {I = a(1)*a(2)-1, b(1)*b(2)*b(3)*b(4)*b(5)-1,
1081   a(1)*b(2)*a(3)*b(4)*b(5)*a(6)*b(7)*b(8)*b(9)*b(10)*a(11)*b(12)*a(13)*b(14)*b(15)*a(16)*b(17)*b(18)*b(19)*b(20)-1;
1082 }
1083 if (g == 8)
1084 {I = a(1)*a(2)-1, b(1)*b(2)*b(3)*b(4)-1,
1085   a(1)*b(2)*a(3)*b(4)*a(5)*b(6)*b(7)*b(8)*a(9)*b(10)*a(11)*b(12)*a(13)*b(14)*b(15)*b(16)-1;
1086 }
1087 if (g == 9)
1088 {I = a(1)*a(2)-1, b(1)*b(2)*b(3)-1,
1089   a(1)*b(2)*a(3)*b(4)*b(5)*a(6)*b(7)*a(8)*b(9)*b(10)-1;
1090 }
1091 if (g == 10)
1092 {I = a(1)*a(2)-1, b(1)*b(2)*b(3)-1,
1093  a(1)*b(2)*a(3)*b(4)*a(5)*b(6)*b(7)*a(8)*b(9)*a(10)*b(11)*a(12)*b(13)*b(14)-1;
1094 }
1095 if (g == 11)
1096 {I = a(1)*a(2)-1, b(1)*b(2)*b(3)-1,
1097  a(1)*b(2)*a(3)*b(4)*a(5)*b(6)*a(7)*b(8)*b(9)*a(10)*b(11)*a(12)*b(13)*a(14)*b(15)*b(16)-1;
1098 }
1099 if (g == 12)
1100 {I = a(1)*a(2)-1, b(1)*b(2)*b(3)-1,
1101  a(1)*b(2)*a(3)*b(4)*a(5)*b(6)*b(7)*a(8)*b(9)*a(10)*b(11)*b(12)*a(13)*b(14)*a(15)*b(16)*a(17)*b(18)*b(19)*a(20)*b(21)*a(22)*b(23)*b(24)-1;
1102 }
1103 if (g == 13)
1104 {I = a(1)*a(2)-1, b(1)*b(2)*b(3)-1,
1105a(1)*b(2)*a(3)*b(4)*a(5)*b(6)*a(7)*b(8)*a(9)*b(10)*b(11)*a(12)*b(13)*b(14)*a(15)*b(16)*a(17)*b(18)*a(19)*b(20)*a(21)*b(22)*a(23)*b(24)*b(25)*a(26)*b(27)*b(28)-1;
1106 }
1107 if (g == 14)
1108 {I = a(1)*a(2)-1, b(1)*b(2)*b(3)-1,
1109a(1)*b(2)*a(3)*b(4)*a(5)*b(6)*a(7)*b(8)*b(9)*a(10)*b(11)*b(12)*a(13)*b(14)*a(15)*b(16)*b(17)*a(18)*b(19)*b(20)*a(21)*b(22)*a(23)*b(24)*a(25)*b(26)*a(27)*b(28)*b(29)*a(30)*b(31)*a(32)*b(33)*b(34)*a(35)*b(36)*b(37)-1;
1110 }
1111
1112 I = simplify(I,2);
1113 export(I);
1114 if (baseringdef == 1) {setring save;}
1115 return(R);
1116}
1117example {
1118  "EXAMPLE:"; echo = 2;
1119  def R = triangularGroup(3,10); setring R;
1120  I;
1121}
Note: See TracBrowser for help on using the repository browser.