# source:git/Singular/LIB/fpalgebras.lib@bf691c

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