Changeset 6e40beb in git
 Timestamp:
 Sep 30, 2010, 3:37:51 PM (13 years ago)
 Branches:
 (u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
 Children:
 a56ed44773b523e0bf45bcb99e4c02c8a9671db3
 Parents:
 8eda39598bf5a0767209a0c1a874ffbdbfead64b
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

Singular/LIB/fpadim.lib
r8eda39 r6e40beb 10 10 @* of the German DFG 11 11 12 THEORY: Given the free algebra A = K<x_1,...,x_n> and a (finite) Groebner basis12 OVERVIEW: Given the free algebra A = K<x_1,...,x_n> and a (finite) Groebner basis 13 13 @* GB = {g_1,..,g_w}, one is interested in the Kdimension and in the 14 14 @* explicit Kbasis of A/<GB>. … … 20 20 @* 21 21 @* The Ufnarovskij graph is used to determine whether A/<GB> has finite 22 @* Kdimension. One has to check if the graph contains cycles. 23 @* For the whole theory we refer to [ufna]. Given a 22 @* Kdimension. One has to check if the graph contains cycles. 23 @* For the whole theory we refer to [ufna]. Given a 24 24 @* reduced set of monomials GB one can define the basis tree, which vertex 25 @* set V consists of all normal monomials w.r.t. GB. For every two 25 @* set V consists of all normal monomials w.r.t. GB. For every two 26 26 @* monomials m_1, m_2 in V there is a direct edge from m_1 to m_2, if and 27 27 @* only if there exists x_k in {x_1,..,x_n}, such that m_1*x_k = m_2. The 28 28 @* set M = {m in V  there is no edge from m to another monomial in V} is 29 @* called the set of mistletoes. As one can easily see it consists of 29 @* called the set of mistletoes. As one can easily see it consists of 30 30 @* the endpoints of the graph. Since there is a unique path to every 31 31 @* monomial in V the whole graph can be described only from the knowledge … … 37 37 @* number, so variable one is represented as 1, variable two as 2 and so 38 38 @* on. The monomial x_1*x_3*x_2 for example will be stored as (1,3,2). 39 @* Multiplication is concatenation. Note that there is no algorithm for 39 @* Multiplication is concatenation. Note that there is no algorithm for 40 40 @* computing the normalform yet, but for our case it is not needed. 41 41 @* … … 43 43 REFERENCES: 44 44 45 @* [ufna] 45 @* [ufna] Ufnarovskij: Combinatorical and asymptotic methods in algebra, 46 46 @* 1990 47 @* [lls] 47 @* [lls] Levandovskyy, La Scala: Letterplace ideals and noncommutative 48 48 @* Groebner bases, 2009 49 @* [studzins] Studzinski: Dimension computations in noncommutative, 49 @* [studzins] Studzinski: Dimension computations in noncommutative, 50 50 @* associative algebras, Diploma thesis, RWTH Aachen, 2010 51 51 … … 53 53 @*  basering is always a Letterplace ring 54 54 @*  all intvecs correspond to Letterplace monomials 55 @*  if you specify a different degree bound d, 55 @*  if you specify a different degree bound d, 56 56 @* d <= attrib(basering,uptodeg) holds 57 57 @* … … 59 59 @* and 'lp' for the letterplace representation of monomials 60 60 61 MAINPROCEDURES:61 PROCEDURES: 62 62 63 63 ivDHilbert(L,n[,d]); computes the Kdimension and the Hilbert series … … 84 84 85 85 86 AUXILIARY PROCEDURES:87 88 86 ivL2lpI(L); transforms a list of intvecs into an ideal of lp monomials 89 iv2lp(I); transforms an intvec into the corresponding monomial 87 iv2lp(I); transforms an intvec into the corresponding monomial 90 88 iv2lpList(L); transforms a list of intmats into an ideal of lp monomials 91 89 iv2lpMat(M); transforms an intmat into an ideal of lp monomials … … 185 183 if (size(#) > 0) {if (#[1] > 0) {degbound = #[1];}} 186 184 int dimen,i,j,w,it; 187 intvec Vt,Vt2; 185 intvec Vt,Vt2; 188 186 module M; 189 187 if (degbound == 0) … … 196 194 } 197 195 } 198 if (w == 0) 196 if (w == 0) 199 197 {vector Vtt; 200 198 for (it = 1; it <= size(Vt); it++){Vtt = Vtt + Vt[it]*gen(it);} … … 205 203 if (size(M) == 0) {return(0);} 206 204 else 207 {M = simplify(M,2); 205 {M = simplify(M,2); 208 206 for (i = 1; i <= size(M); i++) 209 207 {kill Vt; intvec Vt; … … 233 231 if (size(M) == 0) {return(0);} 234 232 else 235 {M = simplify(M,2); 233 {M = simplify(M,2); 236 234 for (i = 1; i <= size(M); i++) 237 235 {kill Vt; intvec Vt; … … 302 300 else 303 301 { Vt = V[(size(V)ld+1)..size(V)]; 304 vector Vtt; 302 vector Vtt; 305 303 for (it = 1; it <= size(Vt); it++) 306 304 {Vtt = Vtt + Vt[it]*gen(it);} … … 317 315 } 318 316 } 319 if (w == 0) {r = findCycle(Vt,L,P,n,ld,M);} 317 if (w == 0) {r = findCycle(Vt,L,P,n,ld,M);} 320 318 if (r == 1) {break;} 321 319 } … … 330 328 PURPOSE:Computing the coefficient of the Hilbert series (upto degree degbound) 331 329 NOTE: Starting with a part of the Hilbert series we change the coefficient 332 @* depending on how many baseelements we found on the actual branch 333 " 330 @* depending on how many baseelements we found on the actual branch 331 " 334 332 {int degbound = 0; 335 333 if (size(#) > 0){if (#[1] > 0){degbound = #[1];}} … … 337 335 int h1 = 0; 338 336 intvec Vt,Vt2,H1; 339 module M; 337 module M; 340 338 if (degbound == 0) 341 339 {for (i = 1; i <= n; i++) … … 347 345 } 348 346 } 349 if (w == 0) 347 if (w == 0) 350 348 {vector Vtt; 351 349 for (it = 1; it <= size(Vt); it++){Vtt = Vtt + Vt[it]*gen(it);} … … 439 437 {Vt[j] = int(leadcoef(M[i][j]));} 440 438 if (size(R[1]) < (size(V)+2)) { R[1][(size(V)+2)] = 1;} 441 else 439 else 442 440 {R[1][(size(V)+2)] = R[1][(size(V)+2)] + 1;} 443 441 R = findHCoeffMis(Vt,n,L,P,R); … … 450 448 if (size(V) == degbound) 451 449 {if (size(R) < 2){R[2] = list (V);} 452 else{R[2] = R[2] + list (V);} 450 else{R[2] = R[2] + list (V);} 453 451 return(R); 454 452 } … … 476 474 {Vt[j] = int(leadcoef(M[i][j]));} 477 475 if (size(R[1]) < (size(V)+2)) { R[1][(size(V)+2)] = 1;} 478 else 476 else 479 477 {R[1][(size(V)+2)] = R[1][(size(V)+2)] + 1;} 480 478 R = findHCoeffMis(Vt,n,L,P,R,degbound); … … 505 503 } 506 504 } 507 if (w == 0) 505 if (w == 0) 508 506 {vector Vtt; 509 507 for (it = 1; it <= size(Vt); it++){Vtt = Vtt + Vt[it]*gen(it);} … … 512 510 } 513 511 } 514 if (size(M) == 0) 512 if (size(M) == 0) 515 513 {if (size(R) < 2){R[2] = list (V);} 516 else{R[2] = R[2] + list(V);} 514 else{R[2] = R[2] + list(V);} 517 515 return(R); 518 516 } … … 531 529 if (size(V) == degbound) 532 530 {if (size(R) < 2){R[2] = list (V);} 533 else{R[2] = R[2] + list (V);} 531 else{R[2] = R[2] + list (V);} 534 532 return(R); 535 533 } … … 542 540 } 543 541 } 544 if (w == 0) 542 if (w == 0) 545 543 {vector Vtt; 546 544 for (it = 1; it <= size(Vt); it++){Vtt = Vtt + Vt[it]*gen(it);} … … 549 547 } 550 548 } 551 if (size(M) == 0) 549 if (size(M) == 0) 552 550 {if (size(R) < 2){R[2] = list (V);} 553 else{R[2] = R[2] + list(V);} 551 else{R[2] = R[2] + list(V);} 554 552 return(R); 555 553 } … … 601 599 if (size(M)==0) {R = V; return(R);} 602 600 else 603 {M = simplify(M,2); 601 {M = simplify(M,2); 604 602 for (i = 1; i <= size(M); i++) 605 603 {kill Vt; intvec Vt; … … 622 620 } 623 621 } 624 if (w == 0) 622 if (w == 0) 625 623 {vector Vtt; 626 624 for (it = 1; it <= size(Vt); it++){Vtt = Vtt + Vt[it]*gen(it);} … … 628 626 kill Vtt; 629 627 } 630 } 628 } 631 629 if (size(M) == 0) {R = V; return(R);} 632 630 else … … 704 702 def R = makeLetterplaceRing(5);// constructs a Letterplace ring 705 703 setring R; //sets basering to Letterplace ring 706 intvec u = 1,1,2; intvec v = 2,1,3; intvec w = 3,1,1; 704 intvec u = 1,1,2; intvec v = 2,1,3; intvec w = 3,1,1; 707 705 // u = x^2y, v = yxz, w = zx^2 in intvec representation 708 706 list L = u,v,w; … … 721 719 {if (I[1] == 0) {return(1);} 722 720 int i = size(I); 723 if (i > attrib(basering,"uptodeg")) {ERROR("polynomial exceeds degreebound");} 721 if (i > attrib(basering,"uptodeg")) {ERROR("polynomial exceeds degreebound");} 724 722 int j; poly p = 1; 725 723 for (j = 1; j <= i; j++) {if (I[j] > 0) { p = lpMult(p,var(I[j]));}} //ignore zeroes, because they correspond to 1 … … 732 730 def R = makeLetterplaceRing(5); // constructs a Letterplace ring 733 731 setring R; //sets basering to Letterplace ring 734 intvec u = 1,1,2; intvec v = 2,1,3; intvec w = 3,1,1; 732 intvec u = 1,1,2; intvec v = 2,1,3; intvec w = 3,1,1; 735 733 // u = x^2y, v = yxz, w = zx^2 in intvec representation 736 734 iv2lp(u); // invokes the procedure and returns the corresponding poly … … 762 760 // defines intmats of different size containing intvec representations of 763 761 // monomials as rows 764 list L = u,v,w; 762 list L = u,v,w; 765 763 print(u); print(v); print(w); // shows the intmats contained in L 766 764 iv2lpList(L); // returns the corresponding monomials as an ideal … … 787 785 } 788 786 return(G); 789 } 787 } 790 788 example 791 789 { … … 823 821 ideal L = x(1)*x(2),y(1)*y(2),x(1)*y(2)*x(3); 824 822 lpId2ivLi(L); // returns the corresponding intvecs as a list 825 } 823 } 826 824 827 825 proc lp2iv(poly p) … … 842 840 for ( i = 1; i <= attrib(basering,"lV"); i++) {if (lep[i] == 1) {I = i; break;}} 843 841 for (i = (attrib(basering,"lV")+1); i <= size(lep); i++) 844 {if (lep[i] == 1) 845 { j = (i mod attrib(basering,"lV")); 842 {if (lep[i] == 1) 843 { j = (i mod attrib(basering,"lV")); 846 844 if (j == 0) {I = I,attrib(basering,"lV");} 847 845 else {I = I,j;} … … 861 859 poly p = x(1)*x(2)*z(3); poly q = y(1)*y(2)*x(3)*x(4); 862 860 poly w= z(1)*y(2)*x(3)*z(4)*z(5); 863 // p,q,w are some polynomials we want to transform into their 861 // p,q,w are some polynomials we want to transform into their 864 862 // intvec representation 865 863 lp2iv(p); lp2iv(q); lp2iv(w); … … 878 876 checkAssumptions(0,L); 879 877 int i,md; 880 for (i = 1; i <= size(G); i++) { if (md <= deg(G[i])) {md = deg(G[i]);}} 878 for (i = 1; i <= size(G); i++) { if (md <= deg(G[i])) {md = deg(G[i]);}} 881 879 while (size(G) > 0) 882 880 {ideal Gt; 883 881 for (i = 1; i <= ncols(G); i++) {if (md == deg(G[i])) {Gt = Gt + G[i]; G[i] = 0;}} 884 882 if (size(Gt) > 0) 885 {G = simplify(G,2); 883 {G = simplify(G,2); 886 884 intmat M [size(Gt)][md]; 887 885 for (i = 1; i <= size(Gt); i++) {M[i,1..md] = lp2iv(Gt[i]);} 888 886 L = insert(L,M); 889 887 kill M; kill Gt; 890 md = md  1; 891 } 892 else {kill Gt; md = md  1;} 888 md = md  1; 889 } 890 else {kill Gt; md = md  1;} 893 891 } 894 892 return(L); … … 902 900 poly p = x(1)*x(2)*z(3); poly q = y(1)*y(2)*x(3)*x(4); 903 901 poly w = z(1)*y(2)*x(3)*z(4); 904 // p,q,w are some polynomials we want to transform into their 902 // p,q,w are some polynomials we want to transform into their 905 903 // intvec representation 906 904 ideal G = p,q,w; … … 918 916 ASSUME:  basering is a Letterplace ring 919 917 @*  all rows of each intmat correspond to a Letterplace monomial 920 @*  if you specify a different degree bound degbound, 918 @*  if you specify a different degree bound degbound, 921 919 @* degbound <= attrib(basering,uptodeg) holds 922 920 NOTE:  If L is the list returned, then L[1] is an integer corresponding to the … … 1023 1021 int i,r; 1024 1022 intvec P,H; 1025 for (i = 1; i <= size(L); i++) 1023 for (i = 1; i <= size(L); i++) 1026 1024 {P[i] = ncols(L[i]); 1027 1025 if (P[i] == 1) {if (isInMat(H,L[i]) > 0) {ERROR("Quotient algebra is trivial");}} … … 1031 1029 intmat S; int sd,ld; intvec V; 1032 1030 sd = P[1]; ld = P[1]; 1033 for (i = 2; i <= size(P); i++) 1031 for (i = 2; i <= size(P); i++) 1034 1032 {if (P[i] < sd) {sd = P[i];} 1035 1033 if (P[i] > ld) {ld = P[i];} … … 1086 1084 if (size(#) > 0) {if (typeof(#[1])=="int"){if (#[1] > 0) {degbound = #[1];}}} 1087 1085 intvec P,H; int i; 1088 for (i = 1; i <= size(L); i++) 1086 for (i = 1; i <= size(L); i++) 1089 1087 {P[i] = ncols(L[i]); 1090 1088 if (P[i] == 1) {if ( isInMat(H,L[i]) > 0) {ERROR("Quotient algebra is trivial");}} … … 1094 1092 checkAssumptions(degbound,L); 1095 1093 if (degbound == 0) 1096 {int sd; 1094 {int sd; 1097 1095 intmat S; 1098 1096 sd = P[1]; 1099 1097 for (i = 2; i <= size(P); i++) {if (P[i] < sd) {sd = P[i];}} 1100 sd = (sd  1); 1098 sd = (sd  1); 1101 1099 if (sd == 0) { for (i = 1; i <= size(L); i++){if (ncols(L[i]) == 1){S = createStartMat1(n,L[i]); break;}}} 1102 1100 else {S = createStartMat(sd,n);} … … 1104 1102 for (i = 1; i <= sd; i++) {H = H,(n^i);} 1105 1103 for (i = 1; i <= nrows(S); i++) 1106 {intvec St = S[i,1..ncols(S)]; 1104 {intvec St = S[i,1..ncols(S)]; 1107 1105 H = findHCoeff(St,n,L,P,H); 1108 1106 kill St; 1109 1107 } 1110 return(H); 1108 return(H); 1111 1109 } 1112 1110 else 1113 {for (i = 1; i <= size(P); i++) 1111 {for (i = 1; i <= size(P); i++) 1114 1112 {if (P[i] > degbound) {ERROR("degreebound is too small, GB contains elements of higher degree");}} 1115 int sd; 1113 int sd; 1116 1114 intmat S; 1117 1115 sd = P[1]; 1118 1116 for (i = 2; i <= size(P); i++) {if (P[i] < sd) {sd = P[i];}} 1119 sd = (sd  1); 1117 sd = (sd  1); 1120 1118 if (sd == 0) { for (i = 1; i <= size(L); i++){if (ncols(L[i]) == 1){S = createStartMat1(n,L[i]); break;}}} 1121 1119 else {S = createStartMat(sd,n);} … … 1123 1121 for (i = 1; i <= sd; i++) {H = H,(n^i);} 1124 1122 for (i = 1; i <= nrows(S); i++) 1125 {intvec St = S[i,1..ncols(S)]; 1123 {intvec St = S[i,1..ncols(S)]; 1126 1124 H = findHCoeff(St,n,L,P,H,degbound); 1127 1125 kill St; 1128 1126 } 1129 return(H); 1127 return(H); 1130 1128 } 1131 1129 } … … 1169 1167 if (size(#) > 0) {if (typeof(#[1])=="int"){if (#[1] > 0) {degbound = #[1];}}} 1170 1168 intvec P,H; int i; 1171 for (i = 1; i <= size(L); i++) 1169 for (i = 1; i <= size(L); i++) 1172 1170 {P[i] = ncols(L[i]); 1173 1171 if (P[i] == 1) {if ( isInMat(H,L[i]) > 0) {ERROR("Quotient algebra is trivial");}} … … 1177 1175 checkAssumptions(degbound,L); 1178 1176 if (degbound == 0) 1179 {int sd; int dimen = 1; 1177 {int sd; int dimen = 1; 1180 1178 intmat S; 1181 1179 sd = P[1]; 1182 1180 for (i = 2; i <= size(P); i++) {if (P[i] < sd) {sd = P[i];}} 1183 sd = (sd  1); 1181 sd = (sd  1); 1184 1182 if (sd == 0) { for (i = 1; i <= size(L); i++){if (ncols(L[i]) == 1){S = createStartMat1(n,L[i]); break;}}} 1185 1183 else {S = createStartMat(sd,n);} … … 1187 1185 for (i = 1; i <= sd; i++) {dimen = dimen +(n^i);} 1188 1186 for (i = 1; i <= nrows(S); i++) 1189 {intvec St = S[i,1..ncols(S)]; 1187 {intvec St = S[i,1..ncols(S)]; 1190 1188 dimen = dimen + findDimen(St,n,L,P); 1191 1189 kill St; 1192 1190 } 1193 return(dimen); 1191 return(dimen); 1194 1192 } 1195 1193 else 1196 {for (i = 1; i <= size(P); i++) 1194 {for (i = 1; i <= size(P); i++) 1197 1195 {if (P[i] > degbound) {ERROR("degreebound is too small, GB contains elements of higher degree");}} 1198 int sd; int dimen = 1; 1196 int sd; int dimen = 1; 1199 1197 intmat S; 1200 1198 sd = P[1]; 1201 1199 for (i = 2; i <= size(P); i++) {if (P[i] < sd) {sd = P[i];}} 1202 sd = (sd  1); 1200 sd = (sd  1); 1203 1201 if (sd == 0) { for (i = 1; i <= size(L); i++){if (ncols(L[i]) == 1){S = createStartMat1(n,L[i]); break;}}} 1204 1202 else {S = createStartMat(sd,n);} … … 1206 1204 for (i = 1; i <= sd; i++) {dimen = dimen +(n^i);} 1207 1205 for (i = 1; i <= nrows(S); i++) 1208 {intvec St = S[i,1..ncols(S)]; 1206 {intvec St = S[i,1..ncols(S)]; 1209 1207 dimen = dimen + findDimen(St,n,L,P, degbound); 1210 1208 kill St; … … 1316 1314 int i; 1317 1315 intvec P,H; 1318 for (i = 1; i <= size(L); i++) 1316 for (i = 1; i <= size(L); i++) 1319 1317 {P[i] = ncols(L[i]); 1320 1318 if (P[i] == 1) {if (isInMat(H,L[i]) > 0) {ERROR("Quotient algebra is trivial");}} … … 1332 1330 if (intvec(S) == 0) {return(list (intvec(0)));} 1333 1331 for (i = 1; i <= nrows(S); i++) 1334 {intvec St = S[i,1..ncols(S)]; 1332 {intvec St = S[i,1..ncols(S)]; 1335 1333 M = M + findmistletoes(St,n,L,P); 1336 1334 kill St; … … 1339 1337 } 1340 1338 else 1341 {for (i = 1; i <= size(P); i++) 1339 {for (i = 1; i <= size(P); i++) 1342 1340 {if (P[i] > degbound) {ERROR("degreebound is too small, GB contains elements of higher degree");}} 1343 1341 intmat S; int sd; … … 1349 1347 if (intvec(S) == 0) {return(list (intvec(0)));} 1350 1348 for (i = 1; i <= nrows(S); i++) 1351 {intvec St = S[i,1..ncols(S)]; 1349 {intvec St = S[i,1..ncols(S)]; 1352 1350 M = M + findmistletoes(St,n,L,P,degbound); 1353 1351 kill St; … … 1397 1395 int i,dimen; list R; 1398 1396 intvec P,H; 1399 for (i = 1; i <= size(L); i++) 1397 for (i = 1; i <= size(L); i++) 1400 1398 {P[i] = ncols(L[i]); 1401 1399 if (P[i] == 1) {if (isInMat(H,L[i]) > 0) {ERROR("Quotient algebra is trivial, dimension equals zero");}} … … 1405 1403 checkAssumptions(degbound,L); 1406 1404 if (degbound == 0) 1407 {int sd; dimen = 1; 1405 {int sd; dimen = 1; 1408 1406 intmat S; 1409 1407 sd = P[1]; 1410 1408 for (i = 2; i <= size(P); i++) {if (P[i] < sd) {sd = P[i];}} 1411 sd = (sd  1); 1409 sd = (sd  1); 1412 1410 if (sd == 0) { for (i = 1; i <= size(L); i++){if (ncols(L[i]) == 1){S = createStartMat1(n,L[i]); break;}}} 1413 1411 else {S = createStartMat(sd,n);} … … 1416 1414 R[1] = dimen; 1417 1415 for (i = 1; i <= nrows(S); i++) 1418 {intvec St = S[i,1..ncols(S)]; 1416 {intvec St = S[i,1..ncols(S)]; 1419 1417 R = findMisDim(St,n,L,P,R); 1420 1418 kill St; 1421 1419 } 1422 return(R); 1420 return(R); 1423 1421 } 1424 1422 else 1425 {for (i = 1; i <= size(P); i++) 1423 {for (i = 1; i <= size(P); i++) 1426 1424 {if (P[i] > degbound) {ERROR("degreebound is too small, GB contains elements of higher degree");}} 1427 int sd; dimen = 1; 1425 int sd; dimen = 1; 1428 1426 intmat S; 1429 1427 sd = P[1]; 1430 1428 for (i = 2; i <= size(P); i++) {if (P[i] < sd) {sd = P[i];}} 1431 sd = (sd  1); 1429 sd = (sd  1); 1432 1430 if (sd == 0) { for (i = 1; i <= size(L); i++){if (ncols(L[i]) == 1){S = createStartMat1(n,L[i]); break;}}} 1433 1431 else {S = createStartMat(sd,n);} … … 1436 1434 R[1] = dimen; 1437 1435 for (i = 1; i <= nrows(S); i++) 1438 {intvec St = S[i,1..ncols(S)]; 1436 {intvec St = S[i,1..ncols(S)]; 1439 1437 R = findMisDim(St,n,L,P,R,degbound); 1440 1438 kill St; 1441 1439 } 1442 return(R); 1440 return(R); 1443 1441 } 1444 1442 } … … 1484 1482 if (size(#) > 0) {if (typeof(#[1])=="int"){if (#[1] > 0) {degbound = #[1];}}} 1485 1483 intvec P,H; int i; list R; 1486 for (i = 1; i <= size(L); i++) 1484 for (i = 1; i <= size(L); i++) 1487 1485 {P[i] = ncols(L[i]); 1488 1486 if (P[i] == 1) {if ( isInMat(H,L[i]) > 0) {ERROR("Quotient algebra is trivial");}} … … 1492 1490 checkAssumptions(degbound,L); 1493 1491 if (degbound == 0) 1494 {int sd; 1492 {int sd; 1495 1493 intmat S; 1496 1494 sd = P[1]; 1497 1495 for (i = 2; i <= size(P); i++) {if (P[i] < sd) {sd = P[i];}} 1498 sd = (sd  1); 1496 sd = (sd  1); 1499 1497 if (sd == 0) { for (i = 1; i <= size(L); i++){if (ncols(L[i]) == 1){S = createStartMat1(n,L[i]); break;}}} 1500 1498 else {S = createStartMat(sd,n);} … … 1503 1501 R[1] = H; kill H; 1504 1502 for (i = 1; i <= nrows(S); i++) 1505 {intvec St = S[i,1..ncols(S)]; 1503 {intvec St = S[i,1..ncols(S)]; 1506 1504 R = findHCoeffMis(St,n,L,P,R); 1507 1505 kill St; 1508 1506 } 1509 return(R); 1507 return(R); 1510 1508 } 1511 1509 else 1512 {for (i = 1; i <= size(P); i++) 1510 {for (i = 1; i <= size(P); i++) 1513 1511 {if (P[i] > degbound) {ERROR("degreebound is too small, GB contains elements of higher degree");}} 1514 int sd; 1512 int sd; 1515 1513 intmat S; 1516 1514 sd = P[1]; 1517 1515 for (i = 2; i <= size(P); i++) {if (P[i] < sd) {sd = P[i];}} 1518 sd = (sd  1); 1516 sd = (sd  1); 1519 1517 if (sd == 0) { for (i = 1; i <= size(L); i++){if (ncols(L[i]) == 1){S = createStartMat1(n,L[i]); break;}}} 1520 1518 else {S = createStartMat(sd,n);} … … 1523 1521 R[1] = H; kill H; 1524 1522 for (i = 1; i <= nrows(S); i++) 1525 {intvec St = S[i,1..ncols(S)]; 1523 {intvec St = S[i,1..ncols(S)]; 1526 1524 R = findHCoeffMis(St,n,L,P,R,degbound); 1527 1525 kill St; 1528 1526 } 1529 return(R); 1527 return(R); 1530 1528 } 1531 1529 } … … 1579 1577 def R = makeLetterplaceRing(5); // constructs a Letterplace ring 1580 1578 setring R; // sets basering to Letterplace ring 1581 ideal G = x(1)*x(2), y(1)*y(2),x(1)*y(2)*x(3); // ideal G contains a 1579 ideal G = x(1)*x(2), y(1)*y(2),x(1)*y(2)*x(3); // ideal G contains a 1582 1580 //Groebner basis 1583 1581 lpDHilbert(G,5,2); // invokes procedure with degree bound 5 and 2 variables … … 1622 1620 def R = makeLetterplaceRing(5); // constructs a Letterplace ring 1623 1621 setring R; // sets basering to Letterplace ring 1624 ideal G = x(1)*x(2), y(1)*y(2),x(1)*y(2)*x(3); // ideal G contains a 1622 ideal G = x(1)*x(2), y(1)*y(2),x(1)*y(2)*x(3); // ideal G contains a 1625 1623 //Groebner basis 1626 1624 lpDHilbertSickle(G,5,2); //invokes procedure with degree bound 5 and 2 variables … … 1702 1700 PURPOSE:Computing the Kdimension of a factor algebra, given via an ideal 1703 1701 ASSUME:  basering is a Letterplace ring 1704 @*  if you specify a different degree bound degbound, 1702 @*  if you specify a different degree bound degbound, 1705 1703 @* degbound <= attrib(basering,uptodeg) holds. 1706 1704 NOTE:  If degbound is set, there will be a degree bound added. 0 means no … … 1782 1780 PURPOSE:Computing the mistletoes of K[X]/<G> 1783 1781 ASSUME:  basering is a Letterplace ring. 1784 @*  if you specify a different degree bound degbound, 1782 @*  if you specify a different degree bound degbound, 1785 1783 @* degbound <= attrib(basering,uptodeg) holds. 1786 1784 NOTE:  If degbound is set, there will be a degree bound added. 0 means no … … 1820 1818 PURPOSE:Computing the Kdimension and the mistletoes 1821 1819 ASSUME:  basering is a Letterplace ring. 1822 @*  if you specify a different degree bound degbound, 1820 @*  if you specify a different degree bound degbound, 1823 1821 @* degbound <= attrib(basering,uptodeg) holds. 1824 1822 NOTE:  If L is the list returned, then L[1] is an integer, the Kdimension, … … 1859 1857 PURPOSE:Computing the Hilbert series and the mistletoes 1860 1858 ASSUME:  basering is a Letterplace ring. 1861 @*  if you specify a different degree bound degbound, 1859 @*  if you specify a different degree bound degbound, 1862 1860 @* degbound <= attrib(basering,uptodeg) holds. 1863 1861 NOTE:  If L is the list returned, then L[1] is an intvec, corresponding to the … … 1898 1896 "USAGE: sickle(G[,m, d, h, degbound]); G an ideal; m,d,h,degbound optional 1899 1897 @* integers 1900 RETURN: A list 1898 RETURN: A list 1901 1899 PURPOSE:Allowing the user to access all procs with one command 1902 1900 ASSUME:  basering is a Letterplace ring. 1903 @*  if you specify a different degree bound degbound, 1901 @*  if you specify a different degree bound degbound, 1904 1902 @* degbound <= attrib(basering,uptodeg) holds. 1905 1903 NOTE: The returned object will always be a list, but the entries of the … … 2009 2007 setring R; 2010 2008 ideal I = y(1)*x(2)*y(3)  z(1)*y(2)*z(3), x(1)*y(2)*x(3)  z(1)*x(2)*y(3), 2011 z(1)*x(2)*z(3)  y(1)*z(2)*x(3), x(1)*x(2)*x(3) + y(1)*y(2)*y(3) + 2009 z(1)*x(2)*z(3)  y(1)*z(2)*x(3), x(1)*x(2)*x(3) + y(1)*y(2)*y(3) + 2012 2010 z(1)*z(2)*z(3) + x(1)*y(2)*z(3); 2013 2011 option(prot); … … 2025 2023 setring R; 2026 2024 ideal I = y(1)*x(2)*y(3)  z(1)*y(2)*z(3), x(1)*y(2)*z(3)  z(1)*x(2)*y(3), 2027 z(1)*x(2)*z(3)  y(1)*z(2)*x(3), x(1)*x(2)*x(3) + y(1)*y(2)*y(3) + 2025 z(1)*x(2)*z(3)  y(1)*z(2)*x(3), x(1)*x(2)*x(3) + y(1)*y(2)*y(3) + 2028 2026 z(1)*z(2)*z(3) + x(1)*y(2)*z(3); 2029 2027 option(prot); … … 2058 2056 def R = makeLetterplaceRing(d); 2059 2057 setring R; 2060 ideal I = 2058 ideal I = 2061 2059 z(1)*z(2)*z(3)*z(4) + y(1)*x(2)*y(3)*x(4)  x(1)*y(2)*y(3)*x(4)  3*z(1)*y(2)*x(3)*z(4), x(1)*x(2)*x(3) + y(1)*x(2)*y(3)  x(1)*y(2)*x(3), z(1)*y(2)*x(3)x(1)*y(2)*z(3) + z(1)*x(2)*z(3); 2062 2060 option(prot);
Note: See TracChangeset
for help on using the changeset viewer.