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