Changeset 70d85d9 in git
- Timestamp:
- Jun 24, 2016, 2:21:15 PM (8 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 49b1d561b337477d7c4460a18a597959bfa826b4
- Parents:
- c8c67bfd5037e9cdc3f9c852fe5185ed2085fae2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/finvar.lib
rc8c67b r70d85d9 1 1 ////////////////////////////////////////////////////////////////////////////// 2 version="version finvar.lib 4.0. 1.1 Dec_2104"; // $Id$2 version="version finvar.lib 4.0.3.2 June_2016 "; // $Id$ 3 3 category="Invariant theory"; 4 4 info=" … … 101 101 " 102 102 { if (i<=0) 103 { "ERROR: the input should be > 0."; 104 return(); 105 } 103 { ERROR("the input should be > 0"); } 106 104 poly v1=var(1); 107 105 if (i==1) 108 { return(v1-1); // 1-st cyclotomic polynomial 109 } 106 { return(v1-1); } // 1-st cyclotomic polynomial 110 107 poly min=v1^i-1; 111 108 matrix s[1][2]; … … 172 169 if (typeof(#[size(#)])=="int") 173 170 { if (size(#)==1) 174 { "ERROR: there are no matrices given among the parameters"; 175 return(); 176 } 171 { ERROR("there are no matrices given among the parameters"); } 177 172 int v=#[size(#)]; 178 173 gen_num=size(#)-1; … … 183 178 } 184 179 if (typeof(#[1])<>"matrix") 185 { "ERROR: The parameters must be a list of matrices and maybe an <int>"; 186 return(); 187 } 180 { ERROR("The parameters must be a list of matrices and maybe an <int>"); } 188 181 int n=nrows(#[1]); 189 182 if (n<>nvars(basering)) 190 { "ERROR: the number of variables of the basering needs to be the same"; 191 " as the dimension of the matrices"; 192 return(); 193 } 183 { ERROR("the number of variables of the basering needs to be the same as the dimension of the matrices"); } 194 184 if (n<>ncols(#[1])) 195 { "ERROR: matrices need to be square and of the same dimensions"; 196 return(); 197 } 185 { ERROR("matrices need to be square and of the same dimensions"); } 198 186 matrix vars=matrix(maxideal(1)); // creating an nx1-matrix containing the 199 187 vars=transpose(vars); // variables of the ring - … … 220 208 // procedure 221 209 if (not(typeof(#[j])=="matrix")) 222 { "ERROR: The parameters must be a list of matrices and maybe an <int>"; 223 return(); 224 } 210 { ERROR("The parameters must be a list of matrices and maybe an <int>"); } 225 211 if ((n!=nrows(#[j])) or (n!=ncols(#[j]))) 226 { "ERROR: matrices need to be square and of the same dimensions"; 227 return(); 228 } 212 { ERROR("matrices need to be square and of the same dimensions"); } 229 213 if (unique(G(1..i),#[j])) 230 214 { i++; … … 390 374 { int mol_flag=#[size(#)][1]; 391 375 if (#[size(#)][2]<0 && (ch==0 or (ch<>0 && mol_flag<>0))) 392 { "ERROR: the second component of <intvec> should be >=0" 393 return(); 394 } 376 { ERROR("the second component of <intvec> should be >=0"); } 395 377 int interval=#[size(#)][2]; 396 378 int v=#[size(#)][3]; 397 379 } 398 380 else 399 { "ERROR: <intvec> should have three components"; 400 return(); 401 } 381 { ERROR("<intvec> should have three components"); } 402 382 if (ch<>0) 403 383 { if (typeof(#[size(#)-1])=="int") 404 384 { int r=#[size(#)-1]; 405 385 if (typeof(#[size(#)-2])<>"string") 406 { "ERROR: In characteristic p>0 a <string> must be given for the name of a new"; 407 " ring where the Molien series can be stored"; 408 return(); 409 } 386 { ERROR("In characteristic p>0 a <string> must be given for the name of a new ring where the Molien series can be stored"); } 410 387 else 411 388 { if (#[size(#)-2]=="") 412 { "ERROR: <string> may not be empty"; 413 return(); 414 } 389 { ERROR("<string> may not be empty"); } 415 390 string newring=#[size(#)-2]; 416 391 g=size(#)-3; … … 419 394 else 420 395 { if (typeof(#[size(#)-1])<>"string") 421 { "ERROR: In characteristic p>0 a <string> must be given for the name of a new"; 422 " ring where the Molien series can be stored"; 423 return(); 424 } 396 { ERROR("In characteristic p>0 a <string> must be given for the name of a new ring where the Molien series can be stored"); } 425 397 else 426 398 { if (#[size(#)-1]=="") 427 { "ERROR: <string> may not be empty"; 428 return(); 429 } 399 { ERROR("<string> may not be empty"); } 430 400 string newring=#[size(#)-1]; 431 401 g=size(#)-2; … … 446 416 { int r=#[size(#)]; 447 417 if (typeof(#[size(#)-1])<>"string") 448 { "ERROR: in characteristic p>0 a <string> must be given for the name of a new"; 449 " ring where the Molien series can be stored"; 418 { ERROR("in characteristic p>0 a <string> must be given for the name of a new ring where the Molien series can be stored"); 450 419 return(); 451 420 } 452 421 else 453 422 { if (#[size(#)-1]=="") 454 { "ERROR: <string> may not be empty"; 455 return(); 456 } 423 { ERROR("<string> may not be empty"); } 457 424 string newring=#[size(#)-1]; 458 425 g=size(#)-2; … … 461 428 else 462 429 { if (typeof(#[size(#)])<>"string") 463 { "ERROR: in characteristic p>0 a <string> must be given for the name of a new"; 464 " ring where the Molien series can be stored"; 465 return(); 466 } 430 { ERROR("in characteristic p>0 a <string> must be given for the name of a new ring where the Molien series can be stored"); } 467 431 else 468 432 { if (#[size(#)]=="") 469 { "ERROR: <string> may not be empty"; 470 return(); 471 } 433 { ERROR("<string> may not be empty"); } 472 434 string newring=#[size(#)]; 473 435 g=size(#)-1; … … 482 444 if (ch<>0) 483 445 { if ((g div r)*r<>g) 484 { "ERROR: <int> should divide the group order." 485 return(); 486 } 446 { ERROR("<int> should divide the group order."); } 487 447 } 488 448 if (ch<>0) … … 518 478 //---------------------------------------------------------------------------- 519 479 if (not(typeof(#[1])=="matrix")) 520 { "ERROR: the parameters must be a list of matrices and maybe an <intvec>"; 521 return(); 522 } 480 { ERROR("the parameters must be a list of matrices and maybe an <intvec>"); } 523 481 int n=nrows(#[1]); 524 482 if (n<>nvars(br)) 525 { "ERROR: the number of variables of the basering needs to be the same"; 526 " as the dimension of the square matrices"; 527 return(); 528 } 483 { ERROR("the number of variables of the basering needs to be the same as the dimension of the square matrices"); } 529 484 if (v && voice<>2) 530 485 { ""; … … 551 506 for (int j=1;j<=g;j++) 552 507 { if (not(typeof(#[j])=="matrix")) 553 { "ERROR: the parameters must be a list of matrices and maybe an <intvec>"; 554 return(); 555 } 508 { ERROR("the parameters must be a list of matrices and maybe an <intvec>"); } 556 509 if ((n<>nrows(#[j])) or (n<>ncols(#[j]))) 557 { "ERROR: matrices need to be square and of the same dimensions"; 558 return(); 559 } 510 { ERROR("matrices need to be square and of the same dimensions"); } 560 511 p=det(I-v1*#[j]); // denominator of new term - 561 512 M[1,1]=M[1,1]*p+M[1,2]; // expanding M[1,1]/M[1,2] + 1/p … … 648 599 { setring br; 649 600 if (not(typeof(#[i])=="matrix")) 650 { "ERROR: the parameters must be a list of matrices and maybe an <intvec>"; 651 return(); 652 } 601 { ERROR("the parameters must be a list of matrices and maybe an <intvec>"); } 653 602 if ((n<>nrows(#[i])) or (n<>ncols(#[i]))) 654 { "ERROR: matrices need to be square and of the same dimensions"; 655 return(); 656 } 603 { ERROR("matrices need to be square and of the same dimensions"); } 657 604 setring bre; 658 605 p=det(xI-f2(G(i))); // characteristic polynomial of G(i) … … 809 756 { setring br; 810 757 if (not(typeof(#[i])=="matrix")) 811 { "ERROR: the parameters must be a list of matrices and maybe an <intvec>"; 812 return(); 813 } 758 { ERROR("the parameters must be a list of matrices and maybe an <intvec>"); } 814 759 if ((n<>nrows(#[i])) or (n<>ncols(#[i]))) 815 { "ERROR: matrices need to be square and of the same dimensions"; 816 return(); 817 } 760 { ERROR("matrices need to be square and of the same dimensions"); } 818 761 string stM(i)=string(#[i]); 819 762 for (j=1;j<=size(stM(i));j++) … … 936 879 { int mol_flag=#[size(#)][1]; 937 880 if (#[size(#)][2]<0 && (ch==0 or (ch<>0 && mol_flag<>0))) 938 { "ERROR: the second component of the <intvec> should be >=0"; 939 return(); 940 } 881 { ERROR("the second component of the <intvec> should be >=0"); } 941 882 int interval=#[size(#)][2]; 942 883 int v=#[size(#)][3]; 943 884 } 944 885 else 945 { "ERROR: <intvec> should have three components"; 946 return(); 947 } 886 { ERROR("<intvec> should have three components"); } 948 887 if (ch<>0) 949 888 { if (typeof(#[size(#)-1])<>"string") 950 { "ERROR: in characteristic p a <string> must be given for the name"; 951 " of a new ring where the Molien series can be stored"; 952 return(); 953 } 889 { ERROR("in characteristic p a <string> must be given for the name of a new ring where the Molien series can be stored"); } 954 890 else 955 891 { if (#[size(#)-1]=="") 956 { "ERROR: <string> may not be empty"; 957 return(); 958 } 892 { ERROR("<string> may not be empty"); } 959 893 string newring=#[size(#)-1]; 960 894 gen_num=size(#)-2; … … 971 905 if (ch<>0) 972 906 { if (typeof(#[size(#)])<>"string") 973 { "ERROR: in characteristic p a <string> must be given for the name"; 974 " of a new ring where the Molien series can be stored"; 975 return(); 976 } 907 { ERROR("in characteristic p a <string> must be given for the name of a new ring where the Molien series can be stored"); } 977 908 else 978 909 { if (#[size(#)]=="") 979 { "ERROR: <string> may not be empty"; 980 return(); 981 } 910 { ERROR("<string> may not be empty"); } 982 911 string newring=#[size(#)]; 983 912 gen_num=size(#)-1; … … 1029 958 if (ch==0) 1030 959 { if (typeof(#[1])<>"matrix") 1031 { "ERROR: the parameters must be a list of matrices and maybe an <intvec>"; 1032 return(); 1033 } 960 { ERROR("the parameters must be a list of matrices and maybe an <intvec>"); } 1034 961 int n=nrows(#[1]); 1035 962 if (n<>nvars(br)) 1036 { "ERROR: the number of variables of the basering needs to be the same"; 1037 " as the dimension of the matrices"; 1038 return(); 1039 } 963 { ERROR("the number of variables of the basering needs to be the same as the dimension of the matrices"); } 1040 964 if (n<>ncols(#[1])) 1041 { "ERROR: matrices need to be square and of the same dimensions"; 1042 return(); 1043 } 965 { ERROR("matrices need to be square and of the same dimensions"); } 1044 966 matrix vars=matrix(maxideal(1)); // creating an nx1-matrix containing the 1045 967 vars=transpose(vars); // variables of the ring - … … 1066 988 // procedure 1067 989 if (not(typeof(#[j])=="matrix")) 1068 { "ERROR: the parameters must be a list of matrices and maybe an <intvec>"; 1069 return(); 1070 } 990 { ERROR("the parameters must be a list of matrices and maybe an <intvec>"); } 1071 991 if ((n!=nrows(#[j])) or (n!=ncols(#[j]))) 1072 { "ERROR: matrices need to be square and of the same dimensions"; 1073 return(); 1074 } 992 { ERROR("matrices need to be square and of the same dimensions"); } 1075 993 if (unique(G(1..i),#[j])) 1076 994 { i++; … … 1189 1107 else // if ch<>0 and mol_flag<>0 1190 1108 { if (typeof(#[1])<>"matrix") 1191 { "ERROR: the parameters must be a list of matrices and maybe an <intvec>"; 1192 return(); 1193 } 1109 { ERROR("the parameters must be a list of matrices and maybe an <intvec>"); } 1194 1110 int n=nrows(#[1]); 1195 1111 if (n<>nvars(br)) 1196 { "ERROR: the number of variables of the basering needs to be the same"; 1197 " as the dimension of the matrices"; 1198 return(); 1199 } 1112 { ERROR("the number of variables of the basering needs to be the same as the dimension of the matrices"); } 1200 1113 if (n<>ncols(#[1])) 1201 { "ERROR: matrices need to be square and of the same dimensions"; 1202 return(); 1203 } 1114 { ERROR("matrices need to be square and of the same dimensions"); } 1204 1115 matrix vars=matrix(maxideal(1)); // creating an nx1-matrix containing the 1205 1116 vars=transpose(vars); // variables of the ring - … … 1264 1175 setring br; 1265 1176 if (not(typeof(#[j])=="matrix")) 1266 { "ERROR: the parameters must be a list of matrices and maybe an <intvec>"; 1267 return(); 1268 } 1177 { ERROR("the parameters must be a list of matrices and maybe an <intvec>"); } 1269 1178 if ((n!=nrows(#[j])) or (n!=ncols(#[j]))) 1270 { "ERROR: matrices need to be square and of the same dimensions"; 1271 return(); 1272 } 1179 { ERROR("matrices need to be square and of the same dimensions"); } 1273 1180 if (unique(G(1..i),#[j])) 1274 1181 { i++; … … 1461 1368 // the intermediate result 1462 1369 if (char(basering)<>0) 1463 { "ERROR: you have to change to a basering of characteristic 0, one in"; 1464 " which the Molien series is defined"; 1465 } 1370 { ERROR("you have to change to a basering of characteristic 0, one in which the Molien series is defined"); } 1466 1371 if (ncols(M)==2 && nrows(M)==1 && n>0 && size(#)<2) 1467 1372 { def br=basering; // keeping track of the old ring … … 1469 1374 matrix s=slead(M); 1470 1375 if (s[1,1]<>1 || s[1,2]<>1) 1471 { "ERROR: the constant terms of enumerator and denominator are not 1"; 1472 return(); 1473 } 1376 { ERROR("the constant terms of enumerator and denominator are not 1"); } 1474 1377 1475 1378 if (size(#)==0) … … 1483 1386 } // with its smallest term 1484 1387 else 1485 { "ERROR: <poly> as third parameter expected"; 1486 return(); 1487 } 1388 { ERROR("<poly> as third parameter expected"); } 1488 1389 } 1489 1390 poly A(1)=M[1,2]; // denominator of Molien series (for now) … … 1509 1410 } 1510 1411 else 1511 { "ERROR: the first parameter has to be a 1x2-matrix, i.e. the matrix"; 1512 " returned by the procedure 'reynolds_molien', the second one"; 1513 " should be > 0 and there should be no more than 3 parameters;" 1514 return(); 1412 { ERROR("the first parameter has to be a 1x2-matrix, i.e. the matrix 1413 returned by the procedure 'reynolds_molien', the second one 1414 should be > 0 and there should be no more than 3 parameters;)"; 1515 1415 } 1516 1416 } … … 1561 1461 } 1562 1462 else 1563 { "ERROR: the number of columns in the <matrix> should be the same as the";1564 " number of variables in the basering; in fact it should be first";1565 " return value of group_reynolds() or reynolds_molien().";1463 { ERROR("the number of columns in the <matrix> should be the same as the 1464 number of variables in the basering; in fact it should be first 1465 return value of group_reynolds() or reynolds_molien()."); 1566 1466 return(); 1567 1467 } … … 1589 1489 " 1590 1490 { if (g<=0) 1591 { "ERROR: the first parameter should be > 0";1491 { ERROR("the first parameter should be > 0"); 1592 1492 return(); 1593 1493 } … … 1608 1508 } 1609 1509 else 1610 { "ERROR: the number of variables of the base ring needs to be the same"; 1611 " as the dimension of the square matrices"; 1612 return(); 1613 } 1510 { ERROR("the number of variables of the base ring needs to be the same as the dimension of the square matrices"); } 1614 1511 } 1615 1512 else 1616 { "ERROR: the last parameters should be a list of matrices"; 1617 return(); 1618 } 1513 { ERROR("the last parameters should be a list of matrices"); } 1619 1514 } 1620 1515 //---------------------------------------------------------------------------- … … 1730 1625 } 1731 1626 if (ncols(REY)<>nvars(basering)) 1732 { "ERROR: the number of columns in the <matrix> should be the same as the"; 1733 " number of variables in the basering; in fact it should be first"; 1734 " return value of group_reynolds() or reynolds_molien()."; 1735 return(); 1627 { ERROR("the number of columns in the <matrix> should be the same as the 1628 number of variables in the basering; in fact it should be first 1629 return value of group_reynolds() or reynolds_molien()."); 1736 1630 } 1737 1631 //---------------------------------------------------------------------------- … … 2098 1992 { degBound=0; 2099 1993 if (char(basering)<>0) 2100 { "ERROR: primary_char0 should only be used with rings of characteristic 0."; 2101 return(); 2102 } 1994 { ERROR("primary_char0 should only be used with rings of characteristic 0."); } 2103 1995 //----------------- checking input and setting verbose mode ------------------ 2104 1996 if (size(#)>1) 2105 { "ERROR: primary_char0 can only have three parameters."; 2106 return(); 2107 } 1997 { ERROR("primary_char0 can only have three parameters."); } 2108 1998 if (size(#)==1) 2109 1999 { if (typeof(#[1])<>"int") 2110 { "ERROR: The third parameter should be of type <int>."; 2111 return(); 2112 } 2000 { ERROR("The third parameter should be of type <int>."); } 2113 2001 else 2114 { int v=#[1]; 2115 } 2002 { int v=#[1]; } 2116 2003 } 2117 2004 else 2118 { int v=0; 2119 } 2005 { int v=0; } 2120 2006 int n=nvars(basering); // n is the number of variables, as well 2121 2007 // as the size of the matrices, as well … … 2123 2009 // we should get 2124 2010 if (ncols(REY)<>n) 2125 { "ERROR: First parameter ought to be the Reynolds operator." 2126 return(); 2127 } 2011 { ERROR("First parameter ought to be the Reynolds operator."); } 2128 2012 if (ncols(M)<>2 or nrows(M)<>1) 2129 { "ERROR: Second parameter ought to be the Molien series." 2130 return(); 2131 } 2013 { ERROR("Second parameter ought to be the Molien series."); } 2132 2014 //---------------------------------------------------------------------------- 2133 2015 if (v && voice<>2) … … 2242 2124 // ---------------- checking input and setting verbose mode ------------------- 2243 2125 if (char(basering)==0) 2244 { "ERROR: primary_charp should only be used with rings of characteristic p>0."; 2245 return(); 2246 } 2126 { ERROR("primary_charp should only be used with rings of characteristic p>0"); } 2247 2127 if (size(#)>1) 2248 { "ERROR: primary_charp can only have three parameters."; 2249 return(); 2250 } 2128 { ERROR("primary_charp can only have three parameters"); } 2251 2129 if (size(#)==1) 2252 2130 { if (typeof(#[1])<>"int") 2253 { "ERROR: The third parameter should be of type <int>."; 2254 return(); 2255 } 2131 { ERROR("The third parameter should be of type <int>"); } 2256 2132 else 2257 { int v=#[1]; 2258 } 2133 { int v=#[1]; } 2259 2134 } 2260 2135 else 2261 { int v=0; 2262 } 2136 { int v=0; } 2263 2137 def br=basering; 2264 2138 int n=nvars(br); // n is the number of variables, as well … … 2267 2141 // we should get 2268 2142 if (ncols(REY)<>n) 2269 { "ERROR: First parameter ought to be the Reynolds operator." 2270 return(); 2271 } 2143 { ERROR("First parameter ought to be the Reynolds operator"): } 2272 2144 if (typeof(`ring_name`)<>"ring") 2273 { "ERROR: Second parameter ought to be ring where "; 2274 " the Molien series is stored."; 2275 return(); 2276 } 2145 { ERROR("Second parameter ought to be ring where the Molien series is stored"); } 2277 2146 //---------------------------------------------------------------------------- 2278 2147 if (v && voice<>2) … … 2397 2266 //-------------- checking input and setting verbose mode --------------------- 2398 2267 if (char(basering)<>0) 2399 { "ERROR: primary_char0_no_molien should only be used with rings of"; 2400 " characteristic 0."; 2401 return(); 2402 } 2268 { ERROR("primary_char0_no_molien should only be used with rings of characteristic 0"); } 2403 2269 if (size(#)>1) 2404 { "ERROR: primary_char0_no_molien can only have two parameters."; 2405 return(); 2406 } 2270 { ERROR("primary_char0_no_molien can only have two parameters"); } 2407 2271 if (size(#)==1) 2408 2272 { if (typeof(#[1])<>"int") 2409 { "ERROR: The second parameter should be of type <int>."; 2410 return(); 2411 } 2273 { ERROR("The second parameter should be of type <int>"); } 2412 2274 else 2413 { int v=#[1]; 2414 } 2275 { int v=#[1]; } 2415 2276 } 2416 2277 else … … 2422 2283 // we should get 2423 2284 if (ncols(REY)<>n) 2424 { "ERROR: First parameter ought to be the Reynolds operator." 2425 return(); 2426 } 2285 { ERROR("First parameter ought to be the Reynolds operator"); } 2427 2286 //---------------------------------------------------------------------------- 2428 2287 if (v && voice<>2) … … 2540 2399 //----------------- checking input and setting verbose mode ------------------ 2541 2400 if (char(basering)==0) 2542 { "ERROR: primary_charp_no_molien should only be used with rings of"; 2543 " characteristic p>0."; 2544 return(); 2545 } 2401 { ERROR("primary_charp_no_molien should only be used with rings of characteristic p>0"); } 2546 2402 if (size(#)>1) 2547 { "ERROR: primary_charp_no_molien can only have two parameters."; 2548 return(); 2549 } 2403 { ERROR("primary_charp_no_molien can only have two parameters"); } 2550 2404 if (size(#)==1) 2551 2405 { if (typeof(#[1])<>"int") 2552 { "ERROR: The second parameter should be of type <int>."; 2553 return(); 2554 } 2406 { ERROR("The second parameter should be of type <int>"); } 2555 2407 else 2556 2408 { int v=#[1]; } … … 2564 2416 // we should get 2565 2417 if (ncols(REY)<>n) 2566 { "ERROR: First parameter ought to be the Reynolds operator." 2567 return(); 2568 } 2418 { ERROR("First parameter ought to be the Reynolds operator"): } 2569 2419 //---------------------------------------------------------------------------- 2570 2420 if (v && voice<>2) … … 2680 2530 //--------------------- checking input and setting verbose mode -------------- 2681 2531 if (char(basering)==0) 2682 { "ERROR: primary_charp_without should not be used with rings of"; 2683 " characteristic 0."; 2684 return(); 2685 } 2532 { ERROR("primary_charp_without should not be used with rings of characteristic 0"); } 2686 2533 if (size(#)==0) 2687 { "ERROR: There are no parameters."; 2688 return(); 2689 } 2534 { ERROR("There are no parameters"); } 2690 2535 if (typeof(#[size(#)])=="int") 2691 2536 { int v=#[size(#)]; 2692 2537 int gen_num=size(#)-1; 2693 2538 if (gen_num==0) 2694 { "ERROR: There are no generators of a finite matrix group given."; 2695 return(); 2696 } 2539 { ERROR("There are no generators of a finite matrix group given"); } 2697 2540 } 2698 2541 else … … 2707 2550 { if (typeof(#[i])=="matrix") 2708 2551 { if (nrows(#[i])<>n or ncols(#[i])<>n) 2709 { "ERROR: The number of variables of the base ring needs to be the same"; 2710 " as the dimension of the square matrices"; 2711 return(); 2712 } 2552 { ERROR("The number of variables of the base ring needs to be the same as the dimension of the square matrices"); } 2713 2553 } 2714 2554 else 2715 { "ERROR: The first parameters should be a list of matrices"; 2716 return(); 2717 } 2555 { ERROR("The first parameters should be a list of matrices"); } 2718 2556 } 2719 2557 //---------------------------------------------------------------------------- … … 2837 2675 // ----------------- checking input and setting flags ------------------------ 2838 2676 if (size(#)==0) 2839 { "ERROR: There are no parameters."; 2840 return(); 2841 } 2677 { ERROR("There are no parameters"); } 2842 2678 int ch=char(basering); // the algorithms depend very much on the 2843 2679 // characteristic of the ground field … … 2850 2686 if (typeof(#[size(#)])=="intvec") 2851 2687 { if (size(#[size(#)])<>3) 2852 { "ERROR: <intvec> should have three entries."; 2853 return(); 2854 } 2688 { ERROR("<intvec> should have three entries"); } 2855 2689 gen_num=size(#)-1; 2856 2690 mol_flag=#[size(#)][1]; 2857 2691 if (#[size(#)][2]<0 && (ch==0 or (ch<>0 && mol_flag==-1))) 2858 { "ERROR: the second component of <intvec> should be >=0"; 2859 return(); 2860 } 2692 { ERROR("the second component of <intvec> should be >=0"); } 2861 2693 int interval=#[size(#)][2]; 2862 2694 v=#[size(#)][3]; 2863 2695 if (gen_num==0) 2864 { "ERROR: There are no generators of a finite matrix group given."; 2865 return(); 2866 } 2696 { ERROR("There are no generators of a finite matrix group given"); } 2867 2697 } 2868 2698 else … … 2875 2705 { if (typeof(#[i])=="matrix") 2876 2706 { if (nrows(#[i])<>n or ncols(#[i])<>n) 2877 { "ERROR: The number of variables of the base ring needs to be the same"; 2878 " as the dimension of the square matrices"; 2879 return(); 2707 { ERROR("The number of variables of the base ring needs to be the same 2708 as the dimension of the square matrices"); 2880 2709 } 2881 2710 } 2882 2711 else 2883 { "ERROR: The first parameters should be a list of matrices"; 2884 return(); 2885 } 2712 { ERROR("The first parameters should be a list of matrices"); } 2886 2713 } 2887 2714 //---------------------------------------------------------------------------- … … 2901 2728 if (minpoly==0) 2902 2729 { if (v) 2903 { " We are dealing with the non-modular case."; 2904 } 2730 { " We are dealing with the non-modular case."; } 2905 2731 if (typeof(L[2])=="int") 2906 2732 { molien(L[3..size(L)],newring,L[2],intvec(mol_flag,interval,v)); … … 2922 2748 list l=primary_charp_no_molien(L[1],v); 2923 2749 if (size(l)==2) 2924 { return(l[1],L[1],l[2]); 2925 } 2750 { return(l[1],L[1],l[2]); } 2926 2751 else 2927 { return(l[1],L[1]); 2928 } 2752 { return(l[1],L[1]); } 2929 2753 } 2930 2754 } … … 2972 2796 if (mol_flag==-1) 2973 2797 { if (ch==0) 2974 { "ERROR: Characteristic 0 can only be simulated in characteristic p>>0."; 2975 return(); 2976 } 2798 { ERROR("Characteristic 0 can only be simulated in characteristic p>>0"); } 2977 2799 list L=group_reynolds(#[1..gen_num],v); 2978 2800 string newring="aksldfalkdsflkj"; … … 2983 2805 else // the user specified that the 2984 2806 { if (ch==0) // characteristic divides the group order 2985 { "ERROR: The characteristic cannot divide the group order when it is 0."; 2986 return(); 2987 } 2807 { ERROR("The characteristic cannot divide the group order when it is 0"); } 2988 2808 if (v) 2989 2809 { ""; … … 3233 3053 { degBound=0; 3234 3054 if (char(basering)<>0) 3235 { "ERROR: primary_char0_random should only be used with rings of"; 3236 " characteristic 0."; 3237 return(); 3238 } 3055 { ERROR("primary_char0_random should only be used with rings of characteristic 0"); } 3239 3056 //----------------- checking input and setting verbose mode ------------------ 3240 3057 if (size(#)>1) 3241 { "ERROR: primary_char0_random can only have four parameters."; 3242 return(); 3243 } 3058 { ERROR("primary_char0_random can only have four parameters"); } 3244 3059 if (size(#)==1) 3245 3060 { if (typeof(#[1])<>"int") 3246 { "ERROR: The fourth parameter should be of type <int>."; 3247 return(); 3248 } 3061 { ERROR("The fourth parameter should be of type <int>"); } 3249 3062 else 3250 { int v=#[1]; 3251 } 3063 { int v=#[1]; } 3252 3064 } 3253 3065 else 3254 { int v=0; 3255 } 3066 { int v=0; } 3256 3067 int n=nvars(basering); // n is the number of variables, as well 3257 3068 // as the size of the matrices, as well … … 3259 3070 // we should get 3260 3071 if (ncols(REY)<>n) 3261 { "ERROR: First parameter ought to be the Reynolds operator." 3262 return(); 3263 } 3072 { ERROR("First parameter ought to be the Reynolds operator"); } 3264 3073 if (ncols(M)<>2 or nrows(M)<>1) 3265 { "ERROR: Second parameter ought to be the Molien series." 3266 return(); 3267 } 3074 { ERROR("Second parameter ought to be the Molien series"); } 3268 3075 //---------------------------------------------------------------------------- 3269 3076 if (v && voice<>2) … … 3381 3188 // ---------------- checking input and setting verbose mode ------------------ 3382 3189 if (char(basering)==0) 3383 { "ERROR: primary_charp_random should only be used with rings of"; 3384 " characteristic p>0."; 3385 return(); 3386 } 3190 { ERROR("primary_charp_random should only be used with rings of characteristic p>0"); } 3387 3191 if (size(#)>1) 3388 { "ERROR: primary_charp_random can only have four parameters."; 3389 return(); 3390 } 3192 { ERROR("primary_charp_random can only have four parameters"); } 3391 3193 if (size(#)==1) 3392 3194 { if (typeof(#[1])<>"int") 3393 { "ERROR: The fourth parameter should be of type <int>."; 3394 return(); 3395 } 3195 { ERROR("The fourth parameter should be of type <int>"); } 3396 3196 else 3397 { int v=#[1]; 3398 } 3197 { int v=#[1]; } 3399 3198 } 3400 3199 else … … 3407 3206 // we should get 3408 3207 if (ncols(REY)<>n) 3409 { "ERROR: First parameter ought to be the Reynolds operator." 3410 return(); 3411 } 3208 { ERROR("First parameter ought to be the Reynolds operator"); } 3412 3209 if (typeof(`ring_name`)<>"ring") 3413 { "ERROR: Second parameter ought to the name of a ring where the Molien"; 3414 " is stored."; 3415 return(); 3416 } 3210 { EROOR("Second parameter ought to the name of a ring where the Molien is stored"); } 3417 3211 //---------------------------------------------------------------------------- 3418 3212 if (v && voice<>2) … … 3536 3330 //-------------- checking input and setting verbose mode --------------------- 3537 3331 if (char(basering)<>0) 3538 { "ERROR: primary_char0_no_molien_random should only be used with rings of"; 3539 " characteristic 0."; 3540 return(); 3541 } 3332 { ERROR("primary_char0_no_molien_random should only be used with rings of characteristic 0"); } 3542 3333 if (size(#)>1) 3543 { "ERROR: primary_char0_no_molien_random can only have three parameters."; 3544 return(); 3545 } 3334 { ERROR("primary_char0_no_molien_random can only have three parameters"); } 3546 3335 if (size(#)==1) 3547 3336 { if (typeof(#[1])<>"int") 3548 { "ERROR: The third parameter should be of type <int>."; 3549 return(); 3550 } 3337 { ERROR("The third parameter should be of type <int>"); } 3551 3338 else 3552 { int v=#[1]; 3553 } 3339 { int v=#[1]; } 3554 3340 } 3555 3341 else … … 3561 3347 // we should get 3562 3348 if (ncols(REY)<>n) 3563 { "ERROR: First parameter ought to be the Reynolds operator." 3564 return(); 3565 } 3349 { ERROR("First parameter ought to be the Reynolds operator"); } 3566 3350 //---------------------------------------------------------------------------- 3567 3351 if (v && voice<>2) … … 3683 3467 //----------------- checking input and setting verbose mode ------------------ 3684 3468 if (char(basering)==0) 3685 { "ERROR: primary_charp_no_molien_random should only be used with rings of"; 3686 " characteristic p>0."; 3687 return(); 3688 } 3469 { ERROR("primary_charp_no_molien_random should only be used with rings of characteristic p>0"); } 3689 3470 if (size(#)>1) 3690 { "ERROR: primary_charp_no_molien_random can only have three parameters."; 3691 return(); 3692 } 3471 { ERROR("primary_charp_no_molien_random can only have three parameters"); } 3693 3472 if (size(#)==1) 3694 3473 { if (typeof(#[1])<>"int") 3695 { "ERROR: The third parameter should be of type <int>."; 3696 return(); 3697 } 3474 { ERROR("The third parameter should be of type <int>"); } 3698 3475 else 3699 { int v=#[1]; 3700 } 3476 { int v=#[1]; } 3701 3477 } 3702 3478 else … … 3708 3484 // we should get 3709 3485 if (ncols(REY)<>n) 3710 { "ERROR: First parameter ought to be the Reynolds operator." 3711 return(); 3712 } 3486 { ERROR("First parameter ought to be the Reynolds operator"); } 3713 3487 //---------------------------------------------------------------------------- 3714 3488 if (v && voice<>2) … … 3828 3602 //--------------------- checking input and setting verbose mode -------------- 3829 3603 if (char(basering)==0) 3830 { "ERROR: primary_charp_without_random should only be used with rings of"; 3831 " characteristic 0."; 3832 return(); 3833 } 3604 { ERROR("primary_charp_without_random should only be used with rings of characteristic 0"); } 3834 3605 if (size(#)<2) 3835 { "ERROR: There are too few parameters."; 3836 return(); 3837 } 3606 { ERROR("There are too few parameters"); } 3838 3607 if (typeof(#[size(#)])=="int" && typeof(#[size(#)-1])=="int") 3839 3608 { int v=#[size(#)]; … … 3841 3610 int gen_num=size(#)-2; 3842 3611 if (gen_num==0) 3843 { "ERROR: There are no generators of a finite matrix group given."; 3844 return(); 3845 } 3612 { ERROR("There are no generators of a finite matrix group given"); } 3846 3613 } 3847 3614 else … … 3852 3619 } 3853 3620 else 3854 { "ERROR: The last parameter should be an <int>."; 3855 return(); 3856 } 3621 { ERROR("The last parameter should be an <int>"); } 3857 3622 } 3858 3623 int n=nvars(basering); // n is the number of variables, as well … … 3863 3628 { if (typeof(#[i])=="matrix") 3864 3629 { if (nrows(#[i])<>n or ncols(#[i])<>n) 3865 { "ERROR: The number of variables of the base ring needs to be the same"; 3866 " as the dimension of the square matrices"; 3867 return(); 3630 { ERROR("The number of variables of the base ring needs to be the same 3631 as the dimension of the square matrices"); 3868 3632 } 3869 3633 } 3870 3634 else 3871 { "ERROR: The first parameters should be a list of matrices"; 3872 return(); 3873 } 3635 { ERROR("The first parameters should be a list of matrices"); } 3874 3636 } 3875 3637 //---------------------------------------------------------------------------- … … 3996 3758 // ----------------- checking input and setting flags ------------------------ 3997 3759 if (size(#)<2) 3998 { "ERROR: There are too few parameters."; 3999 return(); 4000 } 3760 { ERROR("There are too few parameters"); } 4001 3761 int ch=char(basering); // the algorithms depend very much on the 4002 3762 // characteristic of the ground field … … 4009 3769 if (typeof(#[size(#)])=="intvec" && typeof(#[size(#)-1])=="int") 4010 3770 { if (size(#[size(#)])<>3) 4011 { "ERROR: <intvec> should have three entries."; 4012 return(); 4013 } 3771 { ERROR("<intvec> should have three entries"); } 4014 3772 gen_num=size(#)-2; 4015 3773 mol_flag=#[size(#)][1]; 4016 3774 if (#[size(#)][2]<0 && (ch==0 or (ch<>0 && mol_flag<>0))) 4017 { "ERROR: the second component of <intvec> should be >=0"; 4018 return(); 4019 } 3775 { ERROR("the second component of <intvec> should be >=0"); } 4020 3776 int interval=#[size(#)][2]; 4021 3777 v=#[size(#)][3]; 4022 3778 int max=#[size(#)-1]; 4023 3779 if (gen_num==0) 4024 { "ERROR: There are no generators of a finite matrix group given."; 4025 return(); 4026 } 3780 { ERROR("There are no generators of a finite matrix group given"); } 4027 3781 } 4028 3782 else … … 4035 3789 } 4036 3790 else 4037 { "ERROR: If the two last parameters are not <int> and <intvec>, the last"; 4038 " parameter should be an <int>."; 4039 return(); 3791 { ERROR("If the two last parameters are not <int> and <intvec>, the last 3792 parameter should be an <int>"); 4040 3793 } 4041 3794 } … … 4043 3796 { if (typeof(#[i])=="matrix") 4044 3797 { if (nrows(#[i])<>n or ncols(#[i])<>n) 4045 { "ERROR: The number of variables of the base ring needs to be the same"; 4046 " as the dimension of the square matrices"; 4047 return(); 3798 { ERROR("The number of variables of the base ring needs to be the same 3799 as the dimension of the square matrices"); 4048 3800 } 4049 3801 } 4050 3802 else 4051 { "ERROR: The first parameters should be a list of matrices"; 4052 return(); 4053 } 3803 { ERROR("The first parameters should be a list of matrices"); } 4054 3804 } 4055 3805 //---------------------------------------------------------------------------- … … 4140 3890 if (mol_flag==-1) 4141 3891 { if (ch==0) 4142 { "ERROR: Characteristic 0 can only be simulated in characteristic p>>0."; 4143 return(); 4144 } 3892 { ERROR("Characteristic 0 can only be simulated in characteristic p>>0"); } 4145 3893 list L=group_reynolds(#[1..gen_num],v); 4146 3894 string newring="aksldfalkdsflkj"; … … 4156 3904 else // the user specified that the 4157 3905 { if (ch==0) // characteristic divides the group order 4158 { "ERROR: The characteristic cannot divide the group order when it is 0."; 4159 return(); 4160 } 3906 { ERROR("The characteristic cannot divide the group order when it is 0"); } 4161 3907 if (v) 4162 3908 { ""; … … 4196 3942 { ring R=0,x,dp; 4197 3943 if (d<=0) 4198 { "ERROR: The <int> may not be <= 0"; 4199 return(); 4200 } 3944 { ERROR("The <int> may not be <= 0"); } 4201 3945 int d_neu,j,nc; 4202 3946 int s=size(deg_vec); … … 4205 3949 for (int i=1;i<=s;i++) 4206 3950 { if (i<0) 4207 { "ERROR: The entries of <intvec> may not be <= 0"; 4208 return(); 4209 } 3951 { ERROR("The entries of <intvec> may not be <= 0"); } 4210 3952 d_neu=d-deg_vec[i]; 4211 3953 if (d_neu>0) … … 4268 4010 //----------------- checking input and setting verbose mode ------------------ 4269 4011 if (char(br)<>0) 4270 { "ERROR: secondary_char0 should only be used with rings of characteristic 0."; 4271 return(); 4272 } 4012 { ERROR("secondary_char0 should only be used with rings of characteristic 0"); } 4273 4013 int i; 4274 4014 if (size(#)>0) … … 4288 4028 // we should get 4289 4029 if (ncols(P)<>n) 4290 { "ERROR: The first parameter ought to be the matrix of the primary"; 4291 " invariants." 4292 return(); 4293 } 4030 { ERROR("The first parameter ought to be the matrix of the primary invariants"); } 4294 4031 if (ncols(REY)<>n) 4295 { "ERROR: The second parameter ought to be the Reynolds operator." 4296 return(); 4297 } 4032 { ERROR("The second parameter ought to be the Reynolds operator"); } 4298 4033 if (ncols(M)<>2 or nrows(M)<>1) 4299 { "ERROR: The third parameter ought to be the Molien series." 4300 return(); 4301 } 4034 { ERROR("The third parameter ought to be the Molien series"); } 4302 4035 if (v && voice==2) 4303 4036 { ""; … … 4502 4235 //----------------- checking input and setting verbose mode ------------------ 4503 4236 if (char(br)<>0) 4504 { "ERROR: secondary_char0 can only be used with rings of characteristic 0."; 4505 " Try secondary_charp"; 4506 return(); 4507 } 4237 { ERROR("secondary_char0 can only be used with rings of characteristic 0. 4238 Try secondary_charp"); } 4508 4239 int i; 4509 4240 if (size(#)>0) 4510 4241 { if (typeof(#[1])=="int") 4511 { int v=#[1]; 4512 } 4242 { int v=#[1]; } 4513 4243 else 4514 { int v=0; 4515 } 4244 { int v=0; } 4516 4245 } 4517 4246 else 4518 { int v=0; 4519 } 4247 { int v=0; } 4520 4248 if (size(#)>0) 4521 4249 { if (typeof(#[size(#)])=="string") … … 4531 4259 } 4532 4260 else 4533 { "ERROR: If the last optional parameter is a string, it should be \"old\"."; 4534 return(matrix(ideal()),matrix(ideal())); 4535 } 4261 { ERROR("If the last optional parameter is a string, it should be \"old\""); } 4536 4262 } 4537 4263 } … … 4541 4267 // we should get 4542 4268 if (ncols(P)<>n) 4543 { "ERROR: The first parameter ought to be the matrix of the primary"; 4544 " invariants."; 4545 return(); 4546 } 4269 { ERROR("The first parameter ought to be the matrix of the primary invariants"); } 4547 4270 if (ncols(REY)<>n) 4548 { "ERROR: The second parameter ought to be the Reynolds operator."; 4549 return(); 4550 } 4271 { ERROR("The second parameter ought to be the Reynolds operator"); } 4551 4272 if (ncols(M)<>2 or nrows(M)<>1) 4552 { "ERROR: The third parameter ought to be the Molien series."; 4553 return(); 4554 } 4273 { ERROR("The third parameter ought to be the Molien series"); } 4555 4274 if (v && voice==2) 4556 4275 { ""; … … 4954 4673 //----------------- checking input and setting verbose mode ------------------ 4955 4674 if (char(br)<>0) 4956 { "ERROR: irred_secondary_char0 can only be used with rings of characteristic 0."; 4957 " Try irred_secondary_charp"; 4958 return(); 4959 } 4675 { ERROR("irred_secondary_char0 can only be used with rings of characteristic 0. 4676 Try irred_secondary_charp"); } 4960 4677 int i; 4961 4678 if (size(#)>0) … … 4978 4695 } 4979 4696 else 4980 { "ERROR: If the last optional parameter is a string, it should be \"PP\"."; 4981 return(matrix(ideal()),matrix(ideal())); 4982 } 4697 { ERROR("If the last optional parameter is a string, it should be \"PP\""); } 4983 4698 } 4984 4699 } … … 4988 4703 // we should get 4989 4704 if (ncols(P)<>n) 4990 { "ERROR: The first parameter ought to be the matrix of the primary"; 4991 " invariants." 4992 return(); 4993 } 4705 { ERROR("The first parameter ought to be the matrix of the primary invariants"); } 4994 4706 if (ncols(REY)<>n) 4995 { "ERROR: The second parameter ought to be the Reynolds operator." 4996 return(); 4997 } 4707 { ERROR("The second parameter ought to be the Reynolds operator"); } 4998 4708 if (ncols(M)<>2 or nrows(M)<>1) 4999 { "ERROR: The third parameter ought to be the Molien series." 5000 return(); 5001 } 4709 { ERROR("The third parameter ought to be the Molien series"); } 5002 4710 if (v && voice==2) 5003 4711 { ""; … … 5432 5140 //---------------- checking input and setting verbose mode ------------------- 5433 5141 if (char(br)==0) 5434 { "ERROR: secondary_charp should only be used with rings of characteristic p>0."; 5435 return(); 5436 } 5142 { ERROR("secondary_charp should only be used with rings of characteristic p>0"); } 5437 5143 int i; 5438 5144 if (size(#)>0) … … 5452 5158 // we should get 5453 5159 if (ncols(P)<>n) 5454 { "ERROR: The first parameter ought to be the matrix of the primary"; 5455 " invariants." 5456 return(); 5457 } 5160 { ERROR("The first parameter ought to be the matrix of the primary invariants"); } 5458 5161 if (ncols(REY)<>n) 5459 { "ERROR: The second parameter ought to be the Reynolds operator." 5460 return(); 5461 } 5162 { ERROR("The second parameter ought to be the Reynolds operator"); } 5462 5163 if (typeof(`ring_name`)<>"ring") 5463 { "ERROR: The <string> should give the name of the ring where the Molien." 5464 " series is stored."; 5465 return(); 5466 } 5164 { ERROR("The <string> should give the name of the ring where the Molien series is stored"); } 5467 5165 if (v && voice==2) 5468 5166 { ""; … … 5676 5374 //---------------- checking input and setting verbose mode ------------------- 5677 5375 if (char(br)==0) 5678 { "ERROR: secondary_charp should only be used with rings of characteristic p>0."; 5679 return(); 5680 } 5376 { ERROR("secondary_charp should only be used with rings of characteristic p>0"); } 5681 5377 int i; 5682 5378 if (size(#)>0) 5683 5379 { if (typeof(#[size(#)])=="int") 5684 { int v=#[size(#)]; 5685 } 5380 { int v=#[size(#)]; } 5686 5381 else 5687 { int v=0; 5688 } 5382 { int v=0; } 5689 5383 } 5690 5384 else 5691 { int v=0; 5692 } 5385 { int v=0; } 5693 5386 if (size(#)>0) 5694 5387 { if (typeof(#[size(#)])=="string") … … 5704 5397 } 5705 5398 else 5706 { "ERROR: If the last optional parameter is a string, it should be \"old\"."; 5707 return(matrix(ideal()),matrix(ideal())); 5708 } 5399 { ERROR("If the last optional parameter is a string, it should be \"old\""); } 5709 5400 } 5710 5401 } … … 5714 5405 // we should get 5715 5406 if (ncols(P)<>n) 5716 { "ERROR: The first parameter ought to be the matrix of the primary"; 5717 " invariants." 5718 return(); 5719 } 5407 { ERROR("The first parameter ought to be the matrix of the primary invariants"); } 5720 5408 if (ncols(REY)<>n) 5721 { "ERROR: The second parameter ought to be the Reynolds operator." 5722 return(); 5723 } 5409 { ERROR("The second parameter ought to be the Reynolds operator"); } 5724 5410 if (typeof(`ring_name`)<>"ring") 5725 { "ERROR: The <string> should give the name of the ring where the Molien." 5726 " series is stored."; 5727 return(); 5728 } 5411 { ERROR("The <string> should give the name of the ring where the Molien series is stored"); } 5729 5412 if (v && voice==2) 5730 5413 { ""; … … 6138 5821 } 6139 5822 else 6140 { "ERROR: the third parameter should be an <intvec>"; 6141 return(); 6142 } 5823 { ERROR("the third parameter should be an <intvec>"); } 6143 5824 } 6144 5825 int v=#[size(#)]; … … 6151 5832 } 6152 5833 else 6153 { "ERROR: the third parameter should be an <intvec>"; 6154 return(); 6155 } 5834 { ERROR("the third parameter should be an <intvec>"); } 6156 5835 } 6157 5836 else 6158 { "ERROR: wrong list of parameters"; 6159 return(); 6160 } 5837 { ERROR("wrong list of parameters"); } 6161 5838 } 6162 5839 } 6163 5840 else 6164 5841 { if (size(#)>2) 6165 { "ERROR: there are too many parameters"; 6166 return(); 6167 } 5842 { ERROR("there are too many parameters"); } 6168 5843 int v=0; 6169 5844 } … … 6173 5848 // we should get 6174 5849 if (ncols(P)<>n) 6175 { "ERROR: The first parameter ought to be the matrix of the primary"; 6176 " invariants." 6177 return(); 6178 } 5850 { ERROR("The first parameter ought to be the matrix of the primary invariants"); } 6179 5851 if (ncols(REY)<>n) 6180 { "ERROR: The second parameter ought to be the Reynolds operator."; 6181 return(); 6182 } 5852 { ERROR("The second parameter ought to be the Reynolds operator"); } 6183 5853 if (char(br)<>0) 6184 5854 { if (nrows(REY) mod char(br) == 0) 6185 { "ERROR: We need to be in the non-modular case."; 6186 return(); 6187 } 5855 { ERROR("We need to be in the non-modular case"); } 6188 5856 } 6189 5857 else 6190 { "WARNING: In char 0, secondary_char0 should be faster .";5858 { "WARNING: In char 0, secondary_char0 should be faster"; 6191 5859 } 6192 5860 if (v && voice==2) … … 6388 6056 { if (size(#)==2) 6389 6057 { if (typeof(#[size(#)-1])=="intvec") 6390 { intvec deg_vec=#[size(#)-1]; 6391 } 6058 { intvec deg_vec=#[size(#)-1]; } 6392 6059 else 6393 { "ERROR: the third parameter should be an <intvec>"; 6394 return(); 6395 } 6060 { ERROR("the third parameter should be an <intvec>"); } 6396 6061 } 6397 6062 int v=#[size(#)]; … … 6404 6069 } 6405 6070 else 6406 { "ERROR: the third parameter should be an <intvec>"; 6407 return(); 6408 } 6071 { ERROR("the third parameter should be an <intvec>"); } 6409 6072 } 6410 6073 else 6411 { "ERROR: wrong list of parameters"; 6412 return(); 6413 } 6074 { ERROR("wrong list of parameters"); } 6414 6075 } 6415 6076 } 6416 6077 else 6417 6078 { if (size(#)>2) 6418 { "ERROR: there are too many parameters"; 6419 return(); 6420 } 6079 { ERROR("there are too many parameters"); } 6421 6080 int v=0; 6422 6081 } … … 6426 6085 // we should get 6427 6086 if (ncols(P)<>n) 6428 { "ERROR: The first parameter ought to be the matrix of the primary"; 6429 " invariants." 6430 return(); 6431 } 6087 { ERROR("The first parameter ought to be the matrix of the primary invariants"); } 6432 6088 if (ncols(REY)<>n) 6433 { "ERROR: The second parameter ought to be the Reynolds operator."; 6434 return(); 6435 } 6089 { ERROR("The second parameter ought to be the Reynolds operator"); } 6436 6090 if (char(br)<>0) 6437 6091 { if (nrows(REY) mod char(br) == 0) 6438 { "ERROR: We need to be in the non-modular case."; 6439 return(); 6440 } 6092 { ERROR("We need to be in the non-modular case"); } 6441 6093 } 6442 6094 else 6443 { "WARNING: In char 0, secondary_char0 should be faster .";6095 { "WARNING: In char 0, secondary_char0 should be faster"; 6444 6096 } 6445 6097 if (v && voice==2) … … 6791 6443 { if (size(#)==2) 6792 6444 { if (typeof(#[size(#)-1])=="intvec") 6793 { intvec deg_vec=#[size(#)-1]; 6794 } 6445 { intvec deg_vec=#[size(#)-1]; } 6795 6446 else 6796 { "ERROR: the third parameter should be an <intvec>"; 6797 return(); 6798 } 6447 { ERROR("the third parameter should be an <intvec>"); } 6799 6448 } 6800 6449 int v=#[size(#)]; … … 6807 6456 } 6808 6457 else 6809 { "ERROR: the third parameter should be an <intvec>"; 6810 return(); 6811 } 6458 { ERROR("the third parameter should be an <intvec>"); } 6812 6459 } 6813 6460 else 6814 { "ERROR: wrong list of parameters"; 6815 return(); 6816 } 6461 { ERROR("wrong list of parameters"); } 6817 6462 } 6818 6463 } 6819 6464 else 6820 6465 { if (size(#)>2) 6821 { "ERROR: there are too many parameters"; 6822 return(); 6823 } 6466 { ERROR("there are too many parameters"); } 6824 6467 int v=0; 6825 6468 } … … 6829 6472 // we should get 6830 6473 if (ncols(P)<>n) 6831 { "ERROR: The first parameter ought to be the matrix of the primary"; 6832 " invariants." 6833 return(); 6834 } 6474 { ERROR("The first parameter ought to be the matrix of the primary invariants"); } 6835 6475 if (ncols(REY)<>n) 6836 { "ERROR: The second parameter ought to be the Reynolds operator."; 6837 return(); 6838 } 6476 { ERROR("The second parameter ought to be the Reynolds operator"); } 6839 6477 if (char(br)<>0) 6840 6478 { if (nrows(REY) mod char(br) == 0) 6841 { "ERROR: We need to be in the non-modular case."; 6842 return(); 6843 } 6479 { ERROR("We need to be in the non-modular case"); } 6844 6480 } 6845 6481 if (v && voice==2) 6846 { ""; 6847 } 6482 { ""; } 6848 6483 if (defined(deg_vec)<>voice) 6849 { intvec deg_vec; 6850 } 6484 { intvec deg_vec; } 6851 6485 int l=1; 6852 6486 … … 6863 6497 int Max = vdim(sP); 6864 6498 if (Max<0) 6865 { ERROR("The first parameter ought to be a matrix of primary invariants .");6499 { ERROR("The first parameter ought to be a matrix of primary invariants"); 6866 6500 } 6867 6501 ideal sIS = sP; // sIS will be a Groebner basis up to degree d of P+irred. sec. inv. … … 6982 6616 v=#[size(#)]; 6983 6617 if (gen_num==0) 6984 { "ERROR: There are no generators of the finite matrix group given."; 6985 return(); 6986 } 6618 { ERROR("There are no generators of the finite matrix group given"); } 6987 6619 for (i=1;i<=gen_num;i++) 6988 6620 { if (typeof(#[i])<>"matrix") 6989 { "ERROR: These parameters should be generators of the finite matrix group."; 6990 return(); 6991 } 6621 { ERROR("These parameters should be generators of the finite matrix group"); } 6992 6622 if ((n<>nrows(#[i])) or (n<>ncols(#[i]))) 6993 { "ERROR: matrices need to be square and of the same dimensions"; 6994 return(); 6995 } 6623 { ERROR("matrices need to be square and of the same dimensions"); } 6996 6624 } 6997 6625 } … … 7000 6628 for (i=1;i<=gen_num;i++) 7001 6629 { if (typeof(#[i])<>"matrix") 7002 { "ERROR: These parameters should be generators of the finite matrix group."; 7003 return(); 7004 } 6630 { ERROR("These parameters should be generators of the finite matrix group"); } 7005 6631 if ((n<>nrows(#[i])) or (n<>ncols(#[i]))) 7006 { "ERROR: matrices need to be square and of the same dimensions"; 7007 return(); 7008 } 6632 { ERROR("matrices need to be square and of the same dimensions"); } 7009 6633 } 7010 6634 } 7011 6635 } 7012 6636 else 7013 { "ERROR: There are no generators of the finite matrix group given."; 7014 return(); 7015 } 6637 { ERROR("There are no generators of the finite matrix group given"); } 7016 6638 if (ncols(P)<>n) 7017 { "ERROR: The first parameter ought to be the matrix of the primary"; 7018 " invariants." 7019 return(); 7020 } 6639 { ERROR("The first parameter ought to be the matrix of the primary invariants"); } 7021 6640 if (v && voice==2) 7022 6641 { ""; … … 7045 6664 ideal GP = groebner(ideal(P)); 7046 6665 if (dim(GP)<>0) 7047 { "ERROR: The ideal spanned by primary invariants of a finite group"; 7048 " always is of dimension zero."; 7049 return(); 7050 } 6666 { ERROR("The ideal spanned by primary invariants of a finite group always is of dimension zero"); } 7051 6667 matrix trivialS = matrix(kbase(GP));// , trivialIS=secondary_charp(P,REY,"alskdfalkdsj",v); 7052 6668 // kill trivialIS; … … 7200 6816 " 7201 6817 { if (size(#)==0) 7202 { "ERROR: There are no generators given."; 7203 return(); 7204 } 6818 { ERROR("There are no generators given"); } 7205 6819 int ch=char(basering); // the algorithms depend very much on the 7206 6820 // characteristic of the ground field - … … 7214 6828 if (typeof(#[size(#)])=="intvec") 7215 6829 { if (size(#[size(#)])<>3) 7216 { "ERROR: The <intvec> should have three entries."; 7217 return(); 7218 } 6830 { ERROR("The <intvec> should have three entries"); } 7219 6831 gen_num=size(#)-1; 7220 6832 mol_flag=#[size(#)][1]; 7221 6833 if (#[size(#)][2]<0 && (ch==0 or (ch<>0 && mol_flag<>0))) 7222 { "ERROR: the second component of <intvec> should be >=0"; 7223 return(); 7224 } 6834 { ERROR("the second component of <intvec> should be >=0"); } 7225 6835 int interval=#[size(#)][2]; 7226 6836 v=#[size(#)][3]; … … 7333 6943 if (mol_flag==-1) 7334 6944 { if (ch==0) 7335 { "ERROR: Characteristic 0 can only be simulated in characteristic p>>0. 7336 "; 7337 return(); 7338 } 6945 { ERROR("Characteristic 0 can only be simulated in characteristic p>>0"); } 7339 6946 list L=group_reynolds(#[1..gen_num],v); 7340 6947 string newring="aksldfalkdsflkj"; … … 7352 6959 else // the user specified that the 7353 6960 { if (ch==0) // characteristic divides the group order 7354 { "ERROR: The characteristic cannot divide the group order when it is 0. 7355 "; 7356 return(); 7357 } 6961 { ERROR("The characteristic cannot divide the group order when it is 0"); } 7358 6962 if (v) 7359 { ""; 7360 } 6963 { ""; } 7361 6964 matrix P=primary_charp_without(#[1..gen_num],v); 7362 6965 matrix S=secondary_not_cohen_macaulay(P,#[1..gen_num],v); … … 7407 7010 " 7408 7011 { if (size(#)<2) 7409 { "ERROR: There are too few parameters."; 7410 return(); 7411 } 7012 { ERROR("There are too few parameters"); } 7412 7013 int ch=char(basering); // the algorithms depend very much on the 7413 7014 // characteristic of the ground field … … 7421 7022 if (typeof(#[size(#)])=="intvec" && typeof(#[size(#)-1])=="int") 7422 7023 { if (size(#[size(#)])<>3) 7423 { "ERROR: <intvec> should have three entries."; 7424 return(); 7425 } 7024 { ERROR("<intvec> should have three entries"); } 7426 7025 gen_num=size(#)-2; 7427 7026 mol_flag=#[size(#)][1]; 7428 7027 if (#[size(#)][2]<0 && (ch==0 or (ch<>0 && mol_flag<>0))) 7429 { "ERROR: the second component of <intvec> should be >=0"; 7430 return(); 7431 } 7028 { ERROR("the second component of <intvec> should be >=0"); } 7432 7029 int interval=#[size(#)][2]; 7433 7030 v=#[size(#)][3]; 7434 7031 int max=#[size(#)-1]; 7435 7032 if (gen_num==0) 7436 { "ERROR: There are no generators of a finite matrix group given."; 7437 return(); 7438 } 7033 { ERROR("There are no generators of a finite matrix group given"); } 7439 7034 } 7440 7035 else … … 7447 7042 } 7448 7043 else 7449 { "ERROR: If the two last parameters are not <int> and <intvec>, the last"; 7450 " parameter should be an <int>."; 7451 return(); 7452 } 7044 { ERROR("If the two last parameters are not <int> and <intvec>, the last parameter should be an <int>"); } 7453 7045 } 7454 7046 for (int i=1;i<=gen_num;i++) 7455 7047 { if (typeof(#[i])=="matrix") 7456 7048 { if (nrows(#[i])<>n or ncols(#[i])<>n) 7457 { "ERROR: The number of variables of the base ring needs to be the same"; 7458 " as the dimension of the square matrices"; 7459 return(); 7460 } 7049 { ERROR("The number of variables of the base ring needs to be the same as the dimension of the square matrices"); } 7461 7050 } 7462 7051 else 7463 { "ERROR: The first parameters should be a list of matrices"; 7464 return(); 7465 } 7052 { ERROR("The first parameters should be a list of matrices"); } 7466 7053 } 7467 7054 //---------------------------------------------------------------------------- … … 7566 7153 if (mol_flag==-1) 7567 7154 { if (ch==0) 7568 { "ERROR: Characteristic 0 can only be simulated in characteristic p>>0. 7569 "; 7570 return(); 7571 } 7155 { ERROR("Characteristic 0 can only be simulated in characteristic p>>0"); } 7572 7156 list L=group_reynolds(#[1..gen_num],v); 7573 7157 string newring="aksldfalkdsflkj"; 7574 7158 if (typeof(L[2])=="int") 7575 { molien(L[3..size(L)],newring,L[2],intvec(mol_flag,interval,v)); 7576 } 7159 { molien(L[3..size(L)],newring,L[2],intvec(mol_flag,interval,v)); } 7577 7160 else 7578 { molien(L[2..size(L)],newring,intvec(mol_flag,interval,v)); 7579 } 7161 { molien(L[2..size(L)],newring,intvec(mol_flag,interval,v)); } 7580 7162 matrix P=primary_charp_random(L[1],newring,max,v); 7581 7163 matrix S,IS=secondary_charp(P,L[1],newring,v); … … 7585 7167 else // the user specified that the 7586 7168 { if (ch==0) // characteristic divides the group order 7587 { "ERROR: The characteristic cannot divide the group order when it is 0. 7588 "; 7589 return(); 7590 } 7169 { ERROR("The characteristic cannot divide the group order when it is 0"); } 7591 7170 if (v) 7592 { ""; 7593 } 7171 { ""; } 7594 7172 matrix P=primary_charp_without_random(#[1..gen_num],max,v); 7595 7173 matrix S=secondary_not_cohen_macaulay(P,#[1..gen_num],v); … … 7620 7198 " 7621 7199 { if (newring=="") 7622 { "ERROR: the second parameter may not be an empty <string>"; 7623 return(); 7624 } 7200 { ERROR("the second parameter may not be an empty <string>"); } 7625 7201 if (nrows(F)==1) 7626 7202 { def br=basering; … … 7650 7226 } 7651 7227 else 7652 { "ERROR: the <matrix> may only have one row"; 7653 return(); 7654 } 7228 { ERROR("the <matrix> may only have one row"); } 7655 7229 } 7656 7230 example … … 7726 7300 } 7727 7301 else 7728 { "ERROR: the third parameter may either be empty or a <string>."; 7729 return(); 7730 } 7302 { ERROR("the third parameter may either be empty or a <string>."); } 7731 7303 } 7732 7304 degBound=0; … … 7810 7382 } 7811 7383 else 7812 { "ERROR: the <matrix> may only have one row"; 7813 return(); 7814 } 7384 { ERROR("the <matrix> may only have one row"); } 7815 7385 } 7816 7386 example … … 7849 7419 " 7850 7420 { if (newring=="") 7851 { "ERROR: the third parameter may not be empty a <string>"; 7852 return(); 7853 } 7421 { ERROR("the third parameter may not be empty a <string>"); } 7854 7422 degBound=0; 7855 7423 if (nrows(F)==1) … … 7900 7468 } 7901 7469 else 7902 { "ERROR: the <matrix> may only have one row"; 7903 return(); 7904 } 7470 { ERROR("the <matrix> may only have one row"); } 7905 7471 } 7906 7472 … … 7946 7512 } 7947 7513 else 7948 { "ERROR: the <matrix> may only have one row"; 7949 return(); 7950 } 7514 { ERROR("the <matrix> may only have one row"); } 7951 7515 } 7952 7516 example … … 8021 7585 mon=simplify(mon,2); // remove 0 8022 7586 if (not homog(sum(mon))) 8023 { "ERROR: Monomials in the first parameter must be of the same degree."; 8024 return(); 8025 } 7587 { ERROR("Monomials in the first parameter must be of the same degree."); } 8026 7588 int k,k2; 8027 7589 for (k=1;k<=ncols(mon);k++) 8028 7590 { if (leadmonom(mon[k])!=mon[k]) 8029 { "ERROR: The first parameter must be formed by monomials."; 8030 return(); 8031 } 7591 { ERROR("The first parameter must be formed by monomials."); } 8032 7592 } 8033 7593 for (k2=1;k2<=size(M);k2++) 8034 7594 { if (typeof(M[k2])!="ideal") 8035 { "ERROR: The second parameter must be a list of ideals providing a "; 8036 " permutation of the ring variables."; 8037 return(); 8038 } 7595 { ERROR("The second parameter must be a list of ideals providing a permutation of the ring variables"); } 8039 7596 if ((ncols(M[k2])!=nvars(basering)) 8040 7597 or (ncols(M[k2])!=ncols(simplify(M[k2],6))) 8041 7598 or (M[k2][1]==0)) 8042 { "ERROR: The second parameter must be a list of ideals providing a "; 8043 " permutation of the ring variables."; 8044 return(); 8045 } 7599 { ERROR("The second parameter must be a list of ideals providing a permutation of the ring variables"); } 8046 7600 for (k=1;k<=ncols(M[k2]);k++) 8047 7601 { if ((leadmonom(M[k2][k])!=M[k2][k]) or (deg(M[k2][k])!=1)) 8048 { "ERROR: The second parameter must be a list of ideals providing a "; 8049 " permutation of the ring variables."; 8050 return(); 8051 } 7602 { ERROR("The second parameter must be a list of ideals providing a permutation of the ring variables"); } 8052 7603 } 8053 7604 } … … 8187 7738 //----------------- checking input and setting verbose mode ------------------ 8188 7739 if (size(#)==0) 8189 { "ERROR: There are no parameters given."; 8190 return(); 8191 } 7740 { ERROR("There are no parameters given"); } 8192 7741 if (typeof(#[size(#)])=="int") 8193 7742 { int v=#[size(#)]; … … 8202 7751 for (i=1;i<=size(GEN);i++) 8203 7752 { if (typeof(GEN[i])!="list") 8204 { "ERROR: The permutation group must be given by generators in"; 8205 " disjoint cycle presentation"; 8206 return(); 8207 } 7753 { ERROR("The permutation group must be given by generators in disjoint cycle presentation"); } 8208 7754 for (j=1;j<=size(GEN[i]);j++) 8209 7755 { if (typeof(GEN[i][j])!="list") 8210 { "ERROR: The permutation group must be given by generators in"; 8211 " disjoint cycle presentation"; 8212 return(); 8213 } 7756 { ERROR("The permutation group must be given by generators in disjoint cycle presentation"); } 8214 7757 for (k=1;k<=size(GEN[i][j]);k++) 8215 7758 { if (typeof(GEN[i][j][k])!="int") 8216 { "ERROR: The permutation group must be given by generators in"; 8217 " disjoint cycle presentation"; 8218 return(); 8219 } 7759 { ERROR("The permutation group must be given by generators in disjoint cycle presentation"); } 8220 7760 } 8221 7761 } 8222 7762 TST=sort(sum(sum(GEN[i])))[1]; 8223 7763 if (TST[1]<=0) 8224 { "ERROR: The permutation group must be given by generators in"; 8225 " disjoint cycle presentation"; 8226 return(); 8227 } 7764 { ERROR("The permutation group must be given by generators in disjoint cycle presentation"); } 8228 7765 for (k2=1;k2<size(TST);k2++) 8229 7766 { if ((TST[k2]==TST[k2+1]) or (TST[k2+1]>nvars(basering))) 8230 { "ERROR: The permutation group must be given by generators in"; 8231 " disjoint cycle presentation"; 8232 return(); 8233 } 7767 { ERROR("The permutation group must be given by generators in disjoint cycle presentation"); } 8234 7768 } 8235 7769 }
Note: See TracChangeset
for help on using the changeset viewer.