# source:git/Singular/LIB/fpalgebras.lib@6f2278

spielwiese
Last change on this file since 6f2278 was 6f2278, checked in by Karim Abou Zeid <karim23697@…>, 6 years ago
Add doc for crystalographic groups
• Property mode set to `100644`
File size: 30.1 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"USAGE: cgP1(d); d an integer
150RETURN: ring
151NOTE: - the ring contains the ideal I, which contains the required relations
152@*    - p1 group with the following presentation
153@*      < x, y | [x, y] = 1 >
154@*    -d gives the degreebound for the Letterplace ring
155"
156{
157 if (d < 2){ERROR("Degreebound is to small for choosen example!");}
158
159 int baseringdef;
160 if (defined(basering)) // if a basering is defined, it should be saved for later use
161 {
162  def save = basering;
163  baseringdef = 1;
164 }
165 ring r = 2,(x,y,X,Y),dp;
166 def R = makeLetterplaceRing(d);
167 setring R;
168 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;
169 I = simplify(I,2);
170 export(I);
171 if (baseringdef == 1) {setring save;}
172 return(R);
173}
174
175// old? there is already another cgP2 proc
176/* proc cgP2(int d) */
177/* " */
178/* p2 group with the following presentation */
179/* < x, y, r | [x, y] = r^2 = 1, r^-1*x*r = x^-1, r^-1*y*r = y^-1 > */
180/* Note: r = r^-1 */
181/* " */
182/* { */
183/*  if (d < 3){ERROR("Degreebound is to small for choosen example!");} */
184
185/*  int baseringdef; */
186/*  if (defined(basering)) // if a basering is defined, it should be saved for later use */
187/*  { */
188/*   def save = basering; */
189/*   baseringdef = 1; */
190/*  } */
191/*  ring r = 2,(x,y,r,X,Y),dp; */
192/*  def R = makeLetterplaceRing(d); */
193/*  setring R; */
194/*  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, */
195/* X(1)*x(2)-1, Y(1)*y(2)-1,  y(1)*Y(2)-1; */
196/*  I = simplify(I,2); */
197/*  export(I); */
198/*  if (baseringdef == 1) {setring save;} */
199/*  return(R); */
200/* } */
201
202proc cgPM(int d)
203"USAGE: cgPM(d); d an integer
204RETURN: ring
205NOTE: - the ring contains the ideal I, which contains the required relations
206@*    - pm group with the following presentation
207@*      < x, y, m | [x, y] = m^2 = 1, m^-1*x*m = x, m^-1*y*m = y^-1 >
208@*    - d gives the degreebound for the Letterplace ring
209"
210{
211 if (d < 3){ERROR("Degreebound is to small for choosen example!");}
212
213 int baseringdef;
214 if (defined(basering)) // if a basering is defined, it should be saved for later use
215 {
216  def save = basering;
217  baseringdef = 1;
218 }
219 ring r = 2,(x,y,m,X,Y),dp;
220 def R = makeLetterplaceRing(d);
221 setring R;
222 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,
223X(1)*x(2)-1, Y(1)*y(2)-1,  y(1)*Y(2)-1;
224 I = simplify(I,2);
225 export(I);
226 if (baseringdef == 1) {setring save;}
227 return(R);
228}
229
230proc cgPG(int d)
231"USAGE: cgPG(d); d an integer
232RETURN: ring
233NOTE: - the ring contains the ideal I, which contains the required relations
234@*    - pg group with the following presentation
235@*      < x, y, t | [x, y] = 1, t^2 = x, t^-1*y*t = y^-1 >
236@*    - d gives the degreebound for the Letterplace ring
237"
238{
239 if (d < 3){ERROR("Degreebound is to small for choosen example!");}
240
241 int baseringdef;
242 if (defined(basering)) // if a basering is defined, it should be saved for later use
243 {
244  def save = basering;
245  baseringdef = 1;
246 }
247 ring r = 2,(x,y,t,X,Y,T),dp;
248 def R = makeLetterplaceRing(d);
249 setring R;
250 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,
251Y(1)*y(2)-1,  y(1)*Y(2)-1, t(1)*T(2)-1, T(1)*t(2)-1;
252 I = simplify(I,2);
253 export(I);
254 if (baseringdef == 1) {setring save;}
255 return(R);
256}
257
258
259proc cgP2MM(int d)
260"USAGE: cgP2(d); d an integer
261RETURN: ring
262NOTE: - the ring contains the ideal I, which contains the required relations
263@*    - p2mm group with the following presentation
264@*      < 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 >
265@*    - d gives the degreebound for the Letterplace ring
266"
267{
268 if (d < 3){ERROR("Degreebound is to small for choosen example!");}
269
270 int baseringdef;
271 if (defined(basering)) // if a basering is defined, it should be saved for later use
272 {
273  def save = basering;
274  baseringdef = 1;
275 }
276 ring r = 2,(x,y,p,q,X,Y),dp;
277 def R = makeLetterplaceRing(d);
278 setring R;
279 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),
280 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),
281 x(1)*y(2)-y(1)*x(2)- q(1)*q(2), p(1)*p(2)-q(1)*q(2);
282 I = simplify(I,2);
283 export(I);
284 if (baseringdef == 1) {setring save;}
285 return(R);
286}
287
288proc cgP2(int d)
289"USAGE: cgP2(d); d an integer
290RETURN: ring
291NOTE: - the ring contains the ideal I, which contains the required relations
292@*    - p2 group with the following presentation
293@*      < 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 >
294@*    - d gives the degreebound for the Letterplace ring
295"
296{
297 if (d < 3){ERROR("Degreebound is to small for choosen example!");}
298
299 int baseringdef;
300 if (defined(basering)) // if a basering is defined, it should be saved for later use
301 {
302  def save = basering;
303  baseringdef = 1;
304 }
305 ring r = 2,(x,y,m,t,X,Y,M),dp;
306 def R = makeLetterplaceRing(d);
307 setring R;
308 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),
309M(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,
310m(1)*M(2)-1, M(1)*m(2)-1;
311 I = simplify(I,2);
312 export(I);
313 if (baseringdef == 1) {setring save;}
314 return(R);
315}
316
317proc cgP2GG(int d)
318"USAGE: cgP2(d); d an integer
319RETURN: ring
320NOTE: - the ring contains the ideal I, which contains the required relations
321@*    - p2gg group with the following presentation
322@*      < 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 >
323@*    - d gives the degreebound for the Letterplace ring
324"
325{
326 if (d < 4){ERROR("Degreebound is to small for choosen example!");}
327
328 int baseringdef;
329 if (defined(basering)) // if a basering is defined, it should be saved for later use
330 {
331  def save = basering;
332  baseringdef = 1;
333 }
334 ring r = 2,(x,y,u,v,X,Y,u,v),dp;
335 def R = makeLetterplaceRing(d);
336 setring R;
337 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,
338V(1)*x(2)*v(3)-X(1), U(1)*y(2)*u(3)-Y(1),
339X(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;
340 I = simplify(I,2);
341 export(I);
342 if (baseringdef == 1) {setring save;}
343 return(R);
344}
345
346proc cgCM(int d)
347"USAGE: cgCM(d); d an integer
348RETURN: ring
349NOTE: - the ring contains the ideal I, which contains the required relations
350@*    - cm group with the following presentation
351@*      < x, y, t | [x, y] = t^2 = 1, t^-1*x*t = x*y, t^-1*y*t = y^-1 >
352@*    - d gives the degreebound for the Letterplace ring
353"
354{
355 if (d < 3){ERROR("Degreebound is to small for choosen example!");}
356
357 int baseringdef;
358 if (defined(basering)) // if a basering is defined, it should be saved for later use
359 {
360  def save = basering;
361  baseringdef = 1;
362 }
363 ring r = 2,(x,y,t,X,Y),dp;
364 def R = makeLetterplaceRing(d);
365 setring R;
366 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,
367t(1)*x(2)*t(3)-x(1)*y(2), t(1)*y(2)*t(3)-Y(1),
368X(1)*x(2)-1, x(1)*X(2)-1,  Y(1)*y(2)-1,  y(1)*Y(2)-1;
369 I = simplify(I,2);
370 export(I);
371 if (baseringdef == 1) {setring save;}
372 return(R);
373}
374
375proc cgC2MM(int d)
376"USAGE: cgC2(d); d an integer
377RETURN: ring
378NOTE: - the ring contains the ideal I, which contains the required relations
379@*    - c2mm group with the following presentation
380@*      < 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 >
381@*    - d gives the degreebound for the Letterplace ring
382"
383{
384 if (d < 3){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,m,r,X,Y),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)-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,
396 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),
397X(1)*x(2)-1, x(1)*X(2)-1,  Y(1)*y(2)-1,  y(1)*Y(2)-1;
398 I = simplify(I,2);
399 export(I);
400 if (baseringdef == 1) {setring save;}
401 return(R);
402}
403
404proc cgP4(int d)
405"USAGE: cgP4(d); d an integer
406RETURN: ring
407NOTE: - the ring contains the ideal I, which contains the required relations
408@*    - p4 group with the following presentation
409@*      < x, y, r | [x, y] = r^4 = 1, r^-1*x*r = x^-1, r^-1*x*r = y >
410@*    - d gives the degreebound for the Letterplace ring
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,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 cgP4MM(int d)
434"USAGE: cgP4(d); d an integer
435RETURN: ring
436NOTE: - the ring contains the ideal I, which contains the required relations
437@*    - p4mm group with the following presentation
438@*      < 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 >
439@*    - d gives the degreebound for the Letterplace ring
440"
441{
442 if (d < 5){ERROR("Degreebound is to small for choosen example!");}
443
444 int baseringdef;
445 if (defined(basering)) // if a basering is defined, it should be saved for later use
446 {
447  def save = basering;
448  baseringdef = 1;
449 }
450 ring r = 2,(x,y,r,m,X,Y),dp;
451 def R = makeLetterplaceRing(d);
452 setring R;
453 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,
454 r(1)*r(2)*r(3)*x(4)*r(5)-X(1), r(1)*r(2)*r(3)*x(4)*r(5)-y(1),
455X(1)*x(2)-1, x(1)*X(2)-1,  Y(1)*y(2)-1,  y(1)*Y(2)-1;
456 I = simplify(I,2);
457 export(I);
458 if (baseringdef == 1) {setring save;}
459 return(R);
460}
461
462proc cgP4GM(int d)
463"USAGE: cgP4(d); d an integer
464RETURN: ring
465NOTE: - the ring contains the ideal I, which contains the required relations
466@*    - p4gm group with the following presentation
467@*      < 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>
468@*    - d gives the degreebound for the Letterplace ring
469"
470{
471 if (d < 5){ERROR("Degreebound is to small for choosen example!");}
472
473 int baseringdef;
474 if (defined(basering)) // if a basering is defined, it should be saved for later use
475 {
476  def save = basering;
477  baseringdef = 1;
478 }
479 ring r = 2,(x,y,r,t,X,Y),dp;
480 def R = makeLetterplaceRing(d);
481 setring R;
482 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),
483 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),
484 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;
485 I = simplify(I,2);
486 export(I);
487 if (baseringdef == 1) {setring save;}
488 return(R);
489}
490
491proc cgP3(int d)
492"USAGE: cgP3(d); d an integer
493RETURN: ring
494NOTE: - the ring contains the ideal I, which contains the required relations
495@*    - p3 group with the following presentation
496@*      < x, y, r | [x, y] = r^3 = 1, r^-1*x*r = x^-1*y, r^-1*y*r = x^-1>
497@*    - d gives the degreebound for the Letterplace ring
498"
499{
500 if (d < 4){ERROR("Degreebound is to small for choosen example!");}
501
502 int baseringdef;
503 if (defined(basering)) // if a basering is defined, it should be saved for later use
504 {
505  def save = basering;
506  baseringdef = 1;
507 }
508 ring r = 2,(x,y,r,X,Y),dp;
509 def R = makeLetterplaceRing(d);
510 setring R;
511 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,
512  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;
513 I = simplify(I,2);
514 export(I);
515 if (baseringdef == 1) {setring save;}
516 return(R);
517}
518
519proc cgP31M(int d)
520"USAGE: cgP3(d); d an integer
521RETURN: ring
522NOTE: - the ring contains the ideal I, which contains the required relations
523@*    - p31m group with the following presentation
524@*      < 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 >
525@*    - d gives the degreebound for the Letterplace ring
526"
527{
528 if (d < 6){ERROR("Degreebound is to small for choosen example!");}
529
530 int baseringdef;
531 if (defined(basering)) // if a basering is defined, it should be saved for later use
532 {
533  def save = basering;
534  baseringdef = 1;
535 }
536 ring r = 2,(x,y,r,t,X,Y),dp;
537 def R = makeLetterplaceRing(d);
538 setring R;
539 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,
540 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),
541 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),
542 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),
543 X(1)*x(2)-1, x(1)*X(2)-1, Y(1)*y(2)-1,  y(1)*Y(2)-1;
544 I = simplify(I,2);
545 export(I);
546 if (baseringdef == 1) {setring save;}
547 return(R);
548}
549
550proc cgP3M1(int d)
551"USAGE: cgP3(d); d an integer
552RETURN: ring
553NOTE: - the ring contains the ideal I, which contains the required relations
554@*    - p3m1 group with the following presentation
555@*      < 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 >
556@*    - d gives the degreebound for the Letterplace ring
557"
558{
559 if (d < 4){ERROR("Degreebound is to small for choosen example!");}
560
561 int baseringdef;
562 if (defined(basering)) // if a basering is defined, it should be saved for later use
563 {
564  def save = basering;
565  baseringdef = 1;
566 }
567 ring r = 2,(x,y,r,m,X,Y),dp;
568 def R = makeLetterplaceRing(d);
569 setring R;
570 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,
571 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),
572 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;
573 I = simplify(I,2);
574 export(I);
575 if (baseringdef == 1) {setring save;}
576 return(R);
577}
578
579proc cgP6(int d)
580"USAGE: cgP6(d); d an integer
581RETURN: ring
582NOTE: - the ring contains the ideal I, which contains the required relations
583@*    - p6 group with the following presentation
584@*      < x, y, r | [x, y] = r^6 = 1, r^-1*x*r = y, r^-1*y*r = x^-1*y>
585@*    - d gives the degreebound for the Letterplace ring
586"
587{
588 if (d < 7){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(4)*r(5)*r(6), r(1)*r(2)*r(3)*r(4)*r(5)*r(6)-1,
600 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),
601 X(1)*x(2)-1, x(1)*X(2)-1, Y(1)*y(2)-1,  y(1)*Y(2)-1;
602 I = simplify(I,2);
603 export(I);
604 if (baseringdef == 1) {setring save;}
605 return(R);
606}
607
608proc cgP6MM(int d)
609"USAGE: cgP6(d); d an integer
610RETURN: ring
611NOTE: - the ring contains the ideal I, which contains the required relations
612@*    - p6mm group with the following presentation
613@*      < 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>
614@*    - d gives the degreebound for the Letterplace ring
615"
616{
617 if (d < 7){ERROR("Degreebound is to small for choosen example!");}
618
619 int baseringdef;
620 if (defined(basering)) // if a basering is defined, it should be saved for later use
621 {
622  def save = basering;
623  baseringdef = 1;
624 }
625 ring r = 2,(x,y,r,m,X,Y),dp;
626 def R = makeLetterplaceRing(d);
627 setring R;
628 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,
629 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),
630 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)
631 X(1)*x(2)-1, x(1)*X(2)-1, Y(1)*y(2)-1,  y(1)*Y(2)-1;
632 I = simplify(I,2);
633 export(I);
634 if (baseringdef == 1) {setring save;}
635 return(R);
636}
637
638////////////////////////////////////////////////////////////////////
639// Dyck Group //////////////////////////////////////////////////////
640// from Grischa Studzinski /////////////////////////////////////////
641////////////////////////////////////////////////////////////////////
642
643proc dyckGrp1(int n, int d, intvec P)
644"
645The Dyck group with the following presentation
646< x_1, x_2, ... , x_n | (x_1)^p1 = (x_2)^p2 = ... = (x_n)^pn = x_1 * x_2 * ... * x_n = 1 >
647negative exponents are allowed
648representation in the form x_i^p_i - x_(i+1)^p_(i+1)
649"
650{
651 int baseringdef,i,j;
652 if (n < 1) {ERROR("There must be at least one variable!");}
653 if (d < n) {ERROR("Degreebound is to small!");}
654 for (i = 1; i <= size(P); i++) {if (d < absValue(P[i])){ERROR("Degreebound is to small!");}}
655
656 if (defined(basering)) // if a basering is defined, it should be saved for later use
657 {
658  def save = basering;
659  baseringdef = 1;
660 }
661 ring r = 2,(x(1..n),Y(1..n)),dp;
662 def R = makeLetterplaceRing(d);
663 setring R;
664 ideal I; poly p,q;
665 p = 1; q = 1;
666 for (i = 1; i<= n; i++) {p = lpMult(p,var(i));}
667 I = p-1;
668 for (i = n; i > 0; i--)
669 {
670  if (P[i] >= 0) {for (j = 1; j <= P[i]; j++){q = lpMult(q,var(i));}}
671  else {for (j = 1; j <= -P[i]; j++){q = lpMult(q,var(i+n));}}
672  I = p - q,I;
673  p = q; q = 1;
674 }
675
676 I = simplify(I,2);
677 export(I);
678 if (baseringdef == 1) {setring save;}
679 return(R);
680}
681
682
683proc dyckGrp2(int n, int d, intvec P)
684"
685The Dyck group with the following presentation
686< x_1, x_2, ... , x_n | (x_1)^p1 = (x_2)^p2 = ... = (x_n)^pn = x_1 * x_2 * ... * x_n = 1 >
687negative exponents are allowed
688representation in the form x_i^p_i - 1
689"
690{
691 int baseringdef,i,j;
692 if (n < 1) {ERROR("There must be at least one variable!");}
693 if (d < n) {ERROR("Degreebound is to small!");}
694 for (i = 1; i <= size(P); i++) {if (d < absValue(P[i])){ERROR("Degreebound is to small!");}}
695
696 if (defined(basering)) // if a basering is defined, it should be saved for later use
697 {
698  def save = basering;
699  baseringdef = 1;
700 }
701 ring r = 2,(x(1..n),Y(1..n)),dp;
702 def R = makeLetterplaceRing(d);
703 setring R;
704 ideal I; poly p;
705 p = 1;
706 for (i = 1; i<= n; i++) {p = lpMult(p,var(i));}
707 I = p-1;
708 for (i = n; i > 0; i--)
709 {
710  p = 1;
711  if (P[i] >= 0) {for (j = 1; j <= P[i]; j++){p = lpMult(p,var(i));}}
712  else {for (j = 1; j <= -P[i]; j++){p = lpMult(p,var(i+n));}}
713  I = p - 1,I;
714 }
715
716 I = simplify(I,2);
717 export(I);
718 if (baseringdef == 1) {setring save;}
719 return(R);
720}
721
722
723
724proc dyckGrp3(int n, int d, intvec P)
725"
726The Dyck group with the following presentation
727< x_1, x_2, ... , x_n | (x_1)^p1 = (x_2)^p2 = ... = (x_n)^pn = x_1 * x_2 * ... * x_n = 1 >
728only positive exponents are allowed
729no inverse generators needed
730"
731{
732 int baseringdef,i,j;
733 if (n < 1) {ERROR("There must be at least one variable!");}
734 if (d < n) {ERROR("Degreebound is to small!");}
735 for (i = 1; i <= size(P); i++) {if (P[i] < 0){ERROR("Exponents must be positive!");}}
736 for (i = 1; i <= size(P); i++) {if (d < P[i]){ERROR("Degreebound is to small!");}}
737
738
739 if (defined(basering)) // if a basering is defined, it should be saved for later use
740 {
741  def save = basering;
742  baseringdef = 1;
743 }
744 ring r = 2,x(1..n),dp;
745 def R = makeLetterplaceRing(d);
746 setring R;
747 ideal I; poly p;
748 p = 1;
749 for (i = 1; i<= n; i++) {p = lpMult(p,var(i));}
750 I = p-1;
751 for (i = n; i > 0; i--)
752 {
753  p = 1;
754  for (j = 1; j <= P[i]; j++){p = lpMult(p,var(i));}
755  I = p - 1,I;
756 }
757
758 I = simplify(I,2);
759 export(I);
760 if (baseringdef == 1) {setring save;}
761 return(R);
762}
763
764////////////////////////////////////////////////////////////////////
765// Fibonacci Group /////////////////////////////////////////////////
766// from Grischa Studzinski /////////////////////////////////////////
767////////////////////////////////////////////////////////////////////
768
769proc fibGroup(int m, int d)
770"The Fibonacci group F(2, m) with the following presentation
771< x_1, x_2, ... , x_m | x_i * x_(i + 1) = x_(i + 2) >
772TODO: basefield Q oder F2?
773inverse Elemente!
774"
775{
776 if (m < 3) {ERROR("At least three generators are required!");}
777 if (d < 2) {ERROR("Degree bound must be at least 2!");}
778 int baseringdef,i;
779 if (defined(basering)) // if a basering is defined, it should be saved for later use
780 {
781  def save = basering;
782  baseringdef = 1;
783 }
784 ring r = 2,(x(1..m),Y(1..m)),dp;
785 def R = makeLetterplaceRing(d);
786 setring R;
787 ideal I; poly p;
788 for (i = 1; i < m-1; i++)
789 {
790  p = lpMult(var(i),var(i+1))-var(i+2);
791  I = I,p;
792 }
793 for (i = 1; i <= m; i++)
794 {
795  p = lpMult(var(i),var(i+m))-1;
796  I = I,p;
797  p = lpMult(var(i+m),var(i))-1;
798  I = I,p;
799 }
800 I = simplify(I,2);
801 export(I);
802 if (baseringdef == 1) {setring save;}
803 return(R);
804}
805
806
807////////////////////////////////////////////////////////////////////
808// Tetrahedon Groups ///////////////////////////////////////////////
809// from Grischa Studzinski /////////////////////////////////////////
810////////////////////////////////////////////////////////////////////
811
812proc tetrahedron (int g, int d)
813"The following examples are found in
814Classification of the finite generalized tetrahedron groups
815by Gerhard Rosenberger and Martin Scheer.
816The following 5 examples are denoted in Proposition 1.9 and concern
817finite generalized tetrahedron group in the Tsarnarov-case, which are
818not equivalent to a presentation for an ordinary tetrahedron group.
819g gives the number of the example
820"
821{
822 if (g < 1 || g > 5) {ERROR("There are only 5 examples!");}
823 if ((g == 1 && d < 6)||(g == 2 && d < 6)||(g == 3 && d < 5)||(g == 4 && d < 4)||(g == 5 && d < 5))
824 {ERROR("Degreebound is to small for choosen example!");}
825
826 int baseringdef,i,j;
827 if (defined(basering)) // if a basering is defined, it should be saved for later use
828 {
829  def save = basering;
830  baseringdef = 1;
831 }
832 ring r = 2,(x,y,z),dp;
833 def R = makeLetterplaceRing(d);
834 setring R;
835 ideal I;
836 if (g == 1)
837 {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,
838      y(1)*z(2)*y(3)*z(4)-1;
839 }
840 if (g == 2)
841 {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,
842      y(1)*z(2)*z(3)*y(4)*z(5)*z(6)-1;
843 }
844 if (g == 3)
845 {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;
846 }
847 if (g == 4)
848 {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;
849 }
850 if (g ==5)
851 {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;
852 }
853
854 I = simplify(I,2);
855 export(I);
856 if (baseringdef == 1) {setring save;}
857 return(R);
858}
859
860
861////////////////////////////////////////////////////////////////////
862// Triangular Groups ///////////////////////////////////////////////
863// from Grischa Studzinski /////////////////////////////////////////
864////////////////////////////////////////////////////////////////////
865
866proc trianGrp(int g, int d)
867"The following examples are found in
868Classification of the finite generalized tetrahedron groups
869by Gerhard Rosenberger and Martin Scheer.
870Triangle groups, as in theorem 2.12
871g is the number of the example
872"
873{
874 if (g < 1 || g > 14) {ERROR("There are only 14 examples!");}
875 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))
876 {ERROR("Degreebound is to small for choosen example!");}
877
878 int baseringdef;
879 if (defined(basering)) // if a basering is defined, it should be saved for later use
880 {
881  def save = basering;
882  baseringdef = 1;
883 }
884 ring r = 2,(a,b),dp;
885 def R = makeLetterplaceRing(d);
886 setring R;
887 ideal I;
888
889 if (g == 1)
890 {I = a(1)*a(2)-1, b(1)*b(2)*b(3)-1,
891  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;
892 }
893 if (g == 2)
894 {I = a(1)*a(2)-1, b(1)*b(2)*b(3)-1,
895  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;
896 }
897 if (g == 3)
898 {I = a(1)*a(2)*a(3)-1, b(1)*b(2)*b(3)-1,
899  a(1)*b(2)*a(3)*b(4)*b(5)*a(6)*b(7)*a(8)*b(9)*b(10)-1;
900 }
901 if (g == 4)
902 {I = a(1)*a(2)*a(3)-1, b(1)*b(2)*b(3)-1,
903  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;
904 }
905 if (g == 5)
906 {I = a(1)*a(2)-1, b(1)*b(2)*b(3)*b(4)*b(5)-1,
907   a(1)*b(2)*a(3)*b(4)*b(5)*a(6)*b(7)*a(8)*b(9)*b(10)-1;
908 }
909 if (g == 6)
910 {I = a(1)*a(2)-1, b(1)*b(2)*b(3)*b(4)*b(5)-1,
911   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;
912 }
913 if (g == 7)
914 {I = a(1)*a(2)-1, b(1)*b(2)*b(3)*b(4)*b(5)-1,
915   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;
916 }
917 if (g == 8)
918 {I = a(1)*a(2)-1, b(1)*b(2)*b(3)*b(4)-1,
919   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;
920 }
921 if (g == 9)
922 {I = a(1)*a(2)-1, b(1)*b(2)*b(3)-1,
923   a(1)*b(2)*a(3)*b(4)*b(5)*a(6)*b(7)*a(8)*b(9)*b(10)-1;
924 }
925 if (g == 10)
926 {I = a(1)*a(2)-1, b(1)*b(2)*b(3)-1,
927  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;
928 }
929 if (g == 11)
930 {I = a(1)*a(2)-1, b(1)*b(2)*b(3)-1,
931  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;
932 }
933 if (g == 12)
934 {I = a(1)*a(2)-1, b(1)*b(2)*b(3)-1,
935  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;
936 }
937 if (g == 13)
938 {I = a(1)*a(2)-1, b(1)*b(2)*b(3)-1,
939a(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;
940 }
941 if (g == 14)
942 {I = a(1)*a(2)-1, b(1)*b(2)*b(3)-1,
943a(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;
944 }
945
946 I = simplify(I,2);
947 export(I);
948 if (baseringdef == 1) {setring save;}
949 return(R);
950}
Note: See TracBrowser for help on using the repository browser.