Changeset 9f79aa in git
- Timestamp:
- Aug 27, 1999, 4:14:21 PM (25 years ago)
- Branches:
- (u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
- Children:
- 34e5b70c93d1bcb01424a357ccf699f0141d25c4
- Parents:
- 2244d82c47e474fe1afdfedde1939f9d8ff39771
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/finvar.lib
r2244d82 r9f79aa 1 // $Id: finvar.lib,v 1.2 0 1999-07-30 10:37:56 obachmanExp $1 // $Id: finvar.lib,v 1.21 1999-08-27 14:14:21 Singular Exp $ 2 2 // author: Agnes Eileen Heydtmann, email:agnes@math.uni-sb.de 3 3 // last change: 98/11/05 4 ////////////////////////////////////////////////////////////////////////////// 5 version="$Id: finvar.lib,v 1.2 0 1999-07-30 10:37:56 obachmanExp $"4 /////////////////////////////////////////////////////////////////////////////// 5 version="$Id: finvar.lib,v 1.21 1999-08-27 14:14:21 Singular Exp $" 6 6 info=" 7 7 LIBRARY: finvar.lib LIBRARY TO CALCULATE INVARIANT RINGS & MORE … … 43 43 secondary_and_irreducibles_no_molien() s.i. & irreducible s.i., without M.s. 44 44 secondary_not_cohen_macaulay() s.i. when invariant ring not Cohen-Macaulay 45 algebra_containment() query of algebra containment 46 module_containment() query of module containment 45 47 orbit_variety() ideal of the orbit variety 46 48 relative_orbit_variety() ideal of a relative orbit variety … … 64 66 LIB "elim.lib"; 65 67 LIB "general.lib"; 66 LIB "algebra.lib"; 68 67 69 /////////////////////////////////////////////////////////////////////////////// 68 70 // Checks whether the last parameter, being a matrix, is among the previous … … 77 79 return(1); 78 80 } 79 ////////////////////////////////////////////////////////////////////////////// 81 /////////////////////////////////////////////////////////////////////////////// 80 82 81 83 proc cyclotomic (int i) … … 127 129 print(cyclotomic(25)); 128 130 } 129 //////////////////////////////////////////////////////////////////////////////130 131 131 132 proc group_reynolds (list #) … … 139 140 characteristic is >0, minpoly==0 and the finite group non-cyclic the 140 141 second list element is an <int> giving the lowest common multiple of 141 the matrix group elements (used in molien); in general all other list 142 elements are nxn <matrices> listing all elements of the finite group 142 the matrix group elements' order (used in molien); in general all 143 other list elements are nxn <matrices> listing all elements of the 144 finite group 143 145 DISPLAY: information if v does not equal 0 144 146 THEORY: The entire matrix group is generated by getting all left products of … … 146 148 (or the generators themselves during the first run). All the ones that 147 149 have been generated before are thrown out and the program terminates 148 when no new elements were found in one run. Additionally each time149 a new group element is found the corresponding ring mapping of which150 the Reynolds operator is made up is generated. They are stored in the151 rowsof the first return value.150 when no new elements found in one run. Additionally each time a new 151 group element is found the corresponding ring mapping of which the 152 Reynolds operator is made up is generated. They are stored in the rows 153 of the first return value. 152 154 EXAMPLE: example group_reynolds; shows an example 153 155 " 154 { int ch=char(basering); // the existance of the Reynolds operator155 // is dependent on the characteristic of156 // the base field157 int gen_num; // number of generators156 { int ch=char(basering); // the existance of the Reynolds operator 157 // is dependent on the characteristic of 158 // the base field 159 int gen_num; // number of generators 158 160 //------------------------ making sure the input is okay --------------------- 159 161 if (typeof(#[size(#)])=="int") … … 170 172 } 171 173 if (typeof(#[1])<>"matrix") 172 { "ERROR: the parameters must be a list of matrices and maybe an <int>";174 { "ERROR: The parameters must be a list of matrices and maybe an <int>"; 173 175 return(); 174 176 } … … 189 191 // operator - 190 192 matrix G(1)=#[1]; // G(k) are elements of the group - 191 if (ch<>0 && minpoly==0 && gen_num<>1) // finding out of which order the group193 if (ch<>0 && minpoly==0 && gen_num<>1) // finding out of which order the group 192 194 { matrix I=diag(1,n); // element is 193 195 matrix TEST=G(1); … … 207 209 // procedure 208 210 if (not(typeof(#[j])=="matrix")) 209 { "ERROR: the parameters must be a list of matrices and maybe an <int>";211 { "ERROR: The parameters must be a list of matrices and maybe an <int>"; 210 212 return(); 211 213 } … … 246 248 for (m=g-j+1;m<=g;m++) 247 249 { for (k=1;k<=i;k++) 248 { l ++;250 { l=l+1; 249 251 matrix P(l)=G(k)*G(m); // possible new element 250 252 } … … 256 258 g++; 257 259 matrix G(g)=P(k); // a new group element - 258 if (ch<>0 && minpoly==0 && i<>1) // finding out of which order the group260 if (ch<>0 && minpoly==0 && i<>1) // finding out of which order the group 259 261 { TEST=G(g); // element is 260 262 o2=1; … … 282 284 ""; 283 285 } 284 REY=transpose(REY); // when we evaluate the Reynolds operator286 REY=transpose(REY); // when we evaluate the Reynolds operator 285 287 // later on, we actually want 1xn 286 288 // matrices … … 316 318 } 317 319 example 318 { "EXAMPLE: Sturmfels: Algorithms in Invariant Theory 2.3.7:"; echo=2;320 { "EXAMPLE: Sturmfels: Algorithms in Invariant Theory 2.3.7:"; echo=2; 319 321 ring R=0,(x,y,z),dp; 320 322 matrix A[3][3]=0,1,0,-1,0,0,0,0,-1; … … 334 336 return(i); 335 337 } 336 ////////////////////////////////////////////////////////////////////////////// 338 /////////////////////////////////////////////////////////////////////////////// 337 339 338 340 proc molien (list #) 339 341 "USAGE: molien(G1,G2,...[,ringname,lcm,flags]); 340 G1,G2,...: nxn <matrices> generating a finite matrix group, ringname:341 a <string> giving a name for a new ring of characteristic 0 for the342 Molien series in case of prime characteristic, lcm: an <int> giving343 the lowest common multiple of the elements' orders in case of prime344 characteristic, minpoly==0 and a non-cyclic group, flags: an optional345 <intvec> with three components: if the first element is not equal to 0346 characteristic 0 is simulated, i.e. the Molien series is computed as347 if the base field were characteristic 0 (the user must choose a field348 of large characteristic, e.g. 32003), the second component should349 give the size of intervals between canceling common factors in the350 expansion of the Molien series, 0 (the default) means only once after351 generating all terms, in prime characteristic also a negative number352 can be given to indicate that common factors should always be canceled353 when the expansion is simple (the root of the extension field does not354 occur among the coefficients)342 G1,G2,...: nxn <matrices>, all elements of a finite matrix group, 343 ringname: a <string> giving a name for a new ring of characteristic 0 344 for the Molien series in case of prime characteristic, lcm: an <int> 345 giving the lowest common multiple of the elements' orders in case of 346 prime characteristic, minpoly==0 and a non-cyclic group, flags: an 347 optional <intvec> with three components: if the first element is not 348 equal to 0 characteristic 0 is simulated, i.e. the Molien series is 349 computed as if the base field were characteristic 0 (the user must 350 choose a field of large prime characteristic, e.g. 32003), the second 351 component should give the size of intervals between canceling common 352 factors in the expansion of the Molien series, 0 (the default) means 353 only once after generating all terms, in prime characteristic also a 354 negative number can be given to indicate that common factors should 355 always be canceled when the expansion is simple (the root of the 356 extension field does not occur among the coefficients) 355 357 ASSUME: n is the number of variables of the basering, G1,G2... are the group 356 358 elements generated by group_reynolds(), lcm is the second return value … … 391 393 { int r=#[size(#)-1]; 392 394 if (typeof(#[size(#)-2])<>"string") 393 { "ERROR: in characteristic p>0 a <string> must be given for the name of a new";395 { "ERROR: In characteristic p>0 a <string> must be given for the name of a new"; 394 396 " ring where the Molien series can be stored"; 395 397 return(); … … 406 408 else 407 409 { if (typeof(#[size(#)-1])<>"string") 408 { "ERROR: in characteristic p>0 a <string> must be given for the name of a new";410 { "ERROR: In characteristic p>0 a <string> must be given for the name of a new"; 409 411 " ring where the Molien series can be stored"; 410 412 return(); … … 670 672 // { break; 671 673 // } 672 // k ++;674 // k=k+1; 673 675 // } 674 676 setring `newring`; … … 902 904 (or the generators themselves during the first run). All the ones that 903 905 have been generated before are thrown out and the program terminates 904 when no new elements were found in one run. Additionally each time905 a new group element is found the corresponding ring mapping of which906 the Reynolds operator is made up is generated. They are stored in the907 rows of the first return value. In characteristic 0 the terms908 1/det(1-xE) is computed whenever a new element E is found. In prime909 characteristic a Brauer lift is involved and the terms are only910 computed after the entire matrix group is generated (to avoid the911 modular case). The returned matrix gives enumerator and denominator of912 the expandedversion where common factors have been canceled.906 when are no new elements found in one run. Additionally each time a 907 new group element is found the corresponding ring mapping of which the 908 Reynolds operator is made up is generated. They are stored in the rows 909 of the first return value. In characteristic 0 the terms 1/det(1-xE) 910 is computed whenever a new element E is found. In prime characteristic 911 a Brauer lift is involved and the terms are only computed after the 912 entire matrix group is generated (to avoid the modular case). The 913 returned matrix gives enumerator and denominator of the expanded 914 version where common factors have been canceled. 913 915 EXAMPLE: example reynolds_molien; shows an example 914 916 " … … 1096 1098 { l=0; // l is the number of products we get in 1097 1099 // one going 1098 for (m=g-j+1;m<=g;m ++)1100 for (m=g-j+1;m<=g;m=m+1) 1099 1101 { for (k=1;k<=i;k++) 1100 1102 { l++; … … 1242 1244 // new term of the Molien series 1243 1245 i=1; 1244 for (int j=2;j<=gen_num;j++) // this loop adds the parameters to the1246 for (int j=2;j<=gen_num;j++) // this loop adds the parameters to the 1245 1247 { // group, leaving out doubles and 1246 1248 // checking whether the parameters are … … 1434 1436 next run of partial_molien 1435 1437 THEORY: The following calculation is implemented: 1436 @format 1437 (1+a1x+a2x^2+...+anx^n)/(1+b1x+b2x^2+...+bmx^m)=(1+(a1-b1)x+... 1438 (1+b1x+b2x^2+...+bmx^m) 1439 ----------------------- 1440 (a1-b1)x+(a2-b2)x^2+... 1441 (a1-b1)x+b1(a1-b1)x^2+... 1442 @end format 1438 (1+a1x+a2x^2+...+anx^n)/(1+b1x+b2x^2+...+bmx^m)=(1+(a1-b1)x+... 1439 (1+b1x+b2x^2+...+bmx^m) 1440 ----------------------- 1441 (a1-b1)x+(a2-b2)x^2+... 1442 (a1-b1)x+b1(a1-b1)x^2+... 1443 1443 EXAMPLE: example partial_molien; shows an example 1444 1444 " … … 1480 1480 poly A(2)=fetch(br,A(2)); // fetching A(2) and M[1,2] into R 1481 1481 poly den=fetch(br,A(1)); 1482 for (int i=1; i<=n; i++) // getting n terms and adding them up1482 for (int i=1; i<=n; i++) // getting n terms and adding them up 1483 1483 { min=lead(A(2)); 1484 1484 A(1)=A(1)+min; … … 1508 1508 p(1); 1509 1509 } 1510 ///////////////////////////////////////////////////////////////////////////////1511 1510 1512 1511 proc evaluate_reynolds (matrix REY, ideal I) … … 1557 1556 print(evaluate_reynolds(L[1],I)); 1558 1557 } 1559 ///////////////////////////////////////////////////////////////////////////////1560 1558 1561 1559 proc invariant_basis (int g,list #) … … 1605 1603 ideal mon=imap(br,mon); 1606 1604 poly P=0; 1607 for (i=m;i>=1;i =i-1)1605 for (i=m;i>=1;i--) 1608 1606 { P=P+p(i)*mon[i]; // P is the general polynomial 1609 1607 } … … 1757 1755 example 1758 1756 { "EXAMPLE: Sturmfels: Algorithms in Invariant Theory 2.3.7:"; echo=2; 1759 ring R=0,(x,y,z),dp;1760 matrix A[3][3]=0,1,0,-1,0,0,0,0,-1;1761 intvec flags=0,1,0;1762 matrix REY,M=reynolds_molien(A,flags);1763 flags=8,6;1764 print(invariant_basis_reynolds(REY,6,flags));1757 ring R=0,(x,y,z),dp; 1758 matrix A[3][3]=0,1,0,-1,0,0,0,0,-1; 1759 intvec flags=0,1,0; 1760 matrix REY,M=reynolds_molien(A,flags); 1761 flags=8,6; 1762 print(invariant_basis_reynolds(REY,6,flags)); 1765 1763 } 1766 1764 1767 1765 /////////////////////////////////////////////////////////////////////////////// 1768 // This procedure generates linearly independent invariant polynomials of degree1769 // d that do not reduce to 0 modulo the primary invariants. It does this by1770 // applying the Reynolds operator to the monomials returned by kbase(sP,d). The1771 // result is used when computing secondary invariants.1766 // This procedure generates linearly independent invariant polynomials of 1767 // degree d that do not reduce to 0 modulo the primary invariants. It does this 1768 // by applying the Reynolds operator to the monomials returned by kbase(sP,d). 1769 // The result is used when computing secondary invariants. 1772 1770 /////////////////////////////////////////////////////////////////////////////// 1773 1771 proc sort_of_invariant_basis (ideal sP,matrix REY,int d,int step_fac) 1774 1772 { ideal mon=kbase(sP,d); 1775 int DEGB =degBound;1773 int DEGB=degBound; 1776 1774 degBound=d; 1777 1775 int j=ncols(mon); … … 2064 2062 generated by the previously found invariants (see paper \"Generating a 2065 2063 Noetherian Normalization of the Invariant Ring of a Finite Group\" by 2066 Decker, Heydtmann, Schreyer (199 7) to appear in JSC).2064 Decker, Heydtmann, Schreyer (1998)). 2067 2065 EXAMPLE: example primary_char0; shows an example 2068 2066 " 2069 2067 { degBound=0; 2070 2068 if (char(basering)<>0) 2071 { "ERROR: primary_char0 should only be used with rings of characteristic 0.";2069 { "ERROR: primary_char0 should only be used with rings of characteristic 0."; 2072 2070 return(); 2073 2071 } … … 2207 2205 generated by the previously found invariants (see paper \"Generating a 2208 2206 Noetherian Normalization of the Invariant Ring of a Finite Group\" by 2209 Decker, Heydtmann, Schreyer (199 7) to appear in JSC).2207 Decker, Heydtmann, Schreyer (1998)). 2210 2208 EXAMPLE: example primary_charp; shows an example 2211 2209 " … … 2332 2330 } 2333 2331 example 2334 { "EXAMPLE: Sturmfels: Algorithms in Invariant Theory 2.3.7 (changed to char 3)";echo=2;2332 { "EXAMPLE: Sturmfels: Algorithms in Invariant Theory 2.3.7 (changed into char 3)"; echo=2; 2335 2333 ring R=3,(x,y,z),dp; 2336 2334 matrix A[3][3]=0,1,0,-1,0,0,0,0,-1; … … 2359 2357 generated by the previously found invariants (see paper \"Generating a 2360 2358 Noetherian Normalization of the Invariant Ring of a Finite Group\" by 2361 Decker, Heydtmann, Schreyer (199 7) to appear in JSC).2359 Decker, Heydtmann, Schreyer (1998)). 2362 2360 EXAMPLE: example primary_char0_no_molien; shows an example 2363 2361 " … … 2479 2477 } 2480 2478 example 2481 { "EXAMPLE: Sturmfels: Algorithms in Invariant Theory 2.3.7:"; echo=2;2479 { "EXAMPLE: Sturmfels: Algorithms in Invariant Theory 2.3.7:"; echo=2; 2482 2480 ring R=0,(x,y,z),dp; 2483 2481 matrix A[3][3]=0,1,0,-1,0,0,0,0,-1; … … 2486 2484 print(l[1]); 2487 2485 } 2488 ///////////////////////////////////////////////////////////////////////////////2489 2486 2490 2487 proc primary_charp_no_molien (matrix REY, list #) … … 2502 2499 generated by the previously found invariants (see paper \"Generating a 2503 2500 Noetherian Normalization of the Invariant Ring of a Finite Group\" by 2504 Decker, Heydtmann, Schreyer (199 7) to appear in JSC).2501 Decker, Heydtmann, Schreyer (1998)). 2505 2502 EXAMPLE: example primary_charp_no_molien; shows an example 2506 2503 " … … 2623 2620 } 2624 2621 example 2625 { "EXAMPLE: Sturmfels: Algorithms in Invariant Theory 2.3.7 (changed to char 3)"; echo=2;2622 { "EXAMPLE: Sturmfels: Algorithms in Invariant Theory 2.3.7 (changed into char 3)"; echo=2; 2626 2623 ring R=3,(x,y,z),dp; 2627 2624 matrix A[3][3]=0,1,0,-1,0,0,0,0,-1; … … 2643 2640 generated by the previously found invariants (see paper \"Generating a 2644 2641 Noetherian Normalization of the Invariant Ring of a Finite Group\" by 2645 Decker, Heydtmann, Schreyer (199 7) to appear in JSC). No Reynolds2642 Decker, Heydtmann, Schreyer (1998)). No Reynolds 2646 2643 operator or Molien series is used. 2647 2644 EXAMPLE: example primary_charp_without; shows an example … … 2764 2761 } 2765 2762 example 2766 { "EXAMPLE:";echo=2;2763 { "EXAMPLE:" echo=2; 2767 2764 ring R=2,(x,y,z),dp; 2768 2765 matrix A[3][3]=0,1,0,-1,0,0,0,0,-1; … … 2793 2790 RETURN: primary invariants (type <matrix>) of the invariant ring and if 2794 2791 computable Reynolds operator (type <matrix>) and Molien series (type 2795 <matrix>), if the first flag is 1 and we are in the non-modular case 2796 then an <intvec> is returned giving some of the degrees where no 2797 non-trivial homogeneous invariants can be found 2792 <matrix>) or ring name (type string) where the Molien series 2793 can be found in the char p case; if the first flag is 1 and we are in 2794 the non-modular case then an <intvec> is returned giving some of the 2795 degrees where no non-trivial homogeneous invariants can be found 2798 2796 THEORY: Bases of homogeneous invariants are generated successively and those 2799 2797 are chosen as primary invariants that lower the dimension of the ideal 2800 2798 generated by the previously found invariants (see paper \"Generating a 2801 2799 Noetherian Normalization of the Invariant Ring of a Finite Group\" by 2802 Decker, Heydtmann, Schreyer (199 7) to appear in JSC).2800 Decker, Heydtmann, Schreyer (1998)). 2803 2801 EXAMPLE: example primary_invariants; shows an example 2804 2802 " … … 3196 3194 linear combinations are chosen as primary invariants that lower the 3197 3195 dimension of the ideal generated by the previously found invariants 3198 (see \"Generating a Noetherian Normalization of the Invariant Ring 3199 of a Finite Group\" by Decker, Heydtmann, Schreyer (1997) to appear in 3200 JSC). 3196 (see \"Generating a Noetherian Normalization of the Invariant Ring of 3197 a Finite Group\" by Decker, Heydtmann, Schreyer (1998)). 3201 3198 EXAMPLE: example primary_char0_random; shows an example 3202 3199 " … … 3320 3317 } 3321 3318 example 3322 { "EXAMPLE: Sturmfels: Algorithms in Invariant Theory 2.3.7:"; echo=2;3319 { "EXAMPLE: Sturmfels: Algorithms in Invariant Theory 2.3.7:"; echo=2; 3323 3320 ring R=0,(x,y,z),dp; 3324 3321 matrix A[3][3]=0,1,0,-1,0,0,0,0,-1; … … 3344 3341 linear combinations are chosen as primary invariants that lower the 3345 3342 dimension of the ideal generated by the previously found invariants 3346 (see \"Generating a Noetherian Normalization of the Invariant Ring 3347 of a Finite Group\" by Decker, Heydtmann, Schreyer (1997) to appear in 3348 JSC). 3343 (see \"Generating a Noetherian Normalization of the Invariant Ring of 3344 a Finite Group\" by Decker, Heydtmann, Schreyer (1998)). 3349 3345 EXAMPLE: example primary_charp_random; shows an example 3350 3346 " … … 3474 3470 } 3475 3471 example 3476 { "EXAMPLE: Sturmfels: Algorithms in Invariant Theory 2.3.7 (changed to char 3)"; echo=2;3472 { "EXAMPLE: Sturmfels: Algorithms in Invariant Theory 2.3.7 (changed into char 3)"; echo=2; 3477 3473 ring R=3,(x,y,z),dp; 3478 3474 matrix A[3][3]=0,1,0,-1,0,0,0,0,-1; … … 3501 3497 linear combinations are chosen as primary invariants that lower the 3502 3498 dimension of the ideal generated by the previously found invariants 3503 (see \"Generating a Noetherian Normalization of the Invariant Ring 3504 of a Finite Group\" by Decker, Heydtmann, Schreyer (1997) to appear in 3505 JSC). 3499 (see \"Generating a Noetherian Normalization of the Invariant Ring of 3500 a Finite Group\" by Decker, Heydtmann, Schreyer (1998)). 3506 3501 EXAMPLE: example primary_char0_no_molien_random; shows an example 3507 3502 " … … 3626 3621 } 3627 3622 example 3628 { "EXAMPLE: Sturmfels: Algorithms in Invariant Theory 2.3.7:"; 3623 { "EXAMPLE: Sturmfels: Algorithms in Invariant Theory 2.3.7:"; echo=2; 3629 3624 ring R=0,(x,y,z),dp; 3630 3625 matrix A[3][3]=0,1,0,-1,0,0,0,0,-1; … … 3649 3644 linear combinations are chosen as primary invariants that lower the 3650 3645 dimension of the ideal generated by the previously found invariants 3651 (see \"Generating a Noetherian Normalization of the Invariant Ring 3652 of a Finite Group\" by Decker, Heydtmann, Schreyer (1997) to appear in 3653 JSC). 3646 (see \"Generating a Noetherian Normalization of the Invariant Ring of 3647 a Finite Group\" by Decker, Heydtmann, Schreyer (1998)). 3654 3648 EXAMPLE: example primary_charp_no_molien_random; shows an example 3655 3649 " … … 3774 3768 } 3775 3769 example 3776 { "EXAMPLE: Sturmfels: Algorithms in Invariant Theory 2.3.7 (changed to char 3)"; echo=2;3770 { "EXAMPLE: Sturmfels: Algorithms in Invariant Theory 2.3.7 (changed into char 3)"; echo=2; 3777 3771 ring R=3,(x,y,z),dp; 3778 3772 matrix A[3][3]=0,1,0,-1,0,0,0,0,-1; … … 3794 3788 linear combinations are chosen as primary invariants that lower the 3795 3789 dimension of the ideal generated by the previously found invariants 3796 (see \"Generating a Noetherian Normalization of the Invariant Ring 3797 of a Finite Group\" by Decker, Heydtmann, Schreyer (1997) to appear in3798 JSC). No Reynoldsoperator or Molien series is used.3790 (see \"Generating a Noetherian Normalization of the Invariant Ring of 3791 a Finite Group\" by Decker, Heydtmann, Schreyer (1998)). No Reynolds 3792 operator or Molien series is used. 3799 3793 EXAMPLE: example primary_charp_without_random; shows an example 3800 3794 " … … 3926 3920 } 3927 3921 example 3928 { 3922 { "EXAMPLE:"; echo=2; 3929 3923 ring R=2,(x,y,z),dp; 3930 3924 matrix A[3][3]=0,1,0,-1,0,0,0,0,-1; … … 3963 3957 linear combinations are chosen as primary invariants that lower the 3964 3958 dimension of the ideal generated by the previously found invariants 3965 (see \"Generating a Noetherian Normalization of the Invariant Ring 3966 of a Finite Group\" by Decker, Heydtmann, Schreyer (1997) to appear in 3967 JSC). 3959 (see \"Generating a Noetherian Normalization of the Invariant Ring of 3960 a Finite Group\" by Decker, Heydtmann, Schreyer (1998)). 3968 3961 EXAMPLE: example primary_invariants_random; shows an example 3969 3962 " … … 4046 4039 { " We are dealing with the non-modular case."; 4047 4040 } 4048 molien(L[2..size(L)],newring,intvec(0,interval,v)); 4041 if (typeof(L[2])=="int") 4042 { molien(L[3..size(L)],newring,L[2],intvec(0,interval,v)); 4043 } 4044 else 4045 { molien(L[2..size(L)],newring,intvec(0,interval,v)); 4046 } 4049 4047 matrix P=primary_charp_random(L[1],newring,max,v); 4050 4048 return(P,L[1],newring); … … 4115 4113 list L=group_reynolds(#[1..gen_num],v); 4116 4114 string newring="aksldfalkdsflkj"; 4117 molien(L[2..size(L)],newring,intvec(1,interval,v)); 4115 if (typeof(L[2])=="int") 4116 { molien(L[3..size(L)],newring,L[2],intvec(0,interval,v)); 4117 } 4118 else 4119 { molien(L[2..size(L)],newring,intvec(0,interval,v)); 4120 } 4118 4121 matrix P=primary_charp_random(L[1],newring,max,v); 4119 4122 return(P,L[1],newring); … … 4131 4134 } 4132 4135 example 4133 { "EXAMPLE: Sturmfels: Algorithms in Invariant Theory 2.3.7:"; 4136 { "EXAMPLE: Sturmfels: Algorithms in Invariant Theory 2.3.7:"; echo=2; 4134 4137 ring R=0,(x,y,z),dp; 4135 4138 matrix A[3][3]=0,1,0,-1,0,0,0,0,-1; … … 4201 4204 } 4202 4205 example 4203 { 4206 { "EXAMPLE:"; echo=2; 4204 4207 intvec dv=5,5,5,10,10; 4205 4208 print(power_products(dv,10)); … … 4224 4227 of monomials) of the basering modulo the primary invariants, mapping 4225 4228 those to invariants with the Reynolds operator and using these images 4226 or their power products s . t.they are linearly independent modulo4227 primary invariants (see paper \"Some Algorithms in Invariant Theory of4228 Finite Groups\" by Kemper and Steel (1997)).4229 or their power products such that they are linearly independent modulo 4230 the primary invariants (see paper \"Some Algorithms in Invariant 4231 Theory of Finite Groups\" by Kemper and Steel (1997)). 4229 4232 EXAMPLE: example secondary_char0; shows an example 4230 4233 " … … 4425 4428 REY is the 1st return value of group_reynolds(), reynolds_molien() or 4426 4429 the second one of primary_invariants(), `ringname` is a ring of 4427 char 0 that has been created by molien() or reynolds_molien() 4428 orprimary_invariants()4430 char 0 that has been created by molien() or reynolds_molien() or 4431 primary_invariants() 4429 4432 RETURN: secondary invariants of the invariant ring (type <matrix>) and 4430 4433 irreducible secondary invariants (type <matrix>) … … 4433 4436 monomials) of the basering modulo primary invariants, mapping those 4434 4437 to invariants with the Reynolds operator and using these images or 4435 their power products s . t. they are linearly independent modulo the4436 primary invariants (see paper \"Some Algorithms in Invariant Theory of4437 Finite Groups\" by Kemper and Steel (1997)).4438 their power products such that they are linearly independent modulo 4439 the primary invariants (see paper \"Some Algorithms in Invariant 4440 Theory of Finite Groups\" by Kemper and Steel (1997)). 4438 4441 EXAMPLE: example secondary_charp; shows an example 4439 4442 " … … 4629 4632 } 4630 4633 example 4631 { "EXAMPLE: Sturmfels: Algorithms in Invariant Theory 2.3.7 (changed to char 3)"; echo=2;4634 { "EXAMPLE: Sturmfels: Algorithms in Invariant Theory 2.3.7 (changed into char 3)"; echo=2; 4632 4635 ring R=3,(x,y,z),dp; 4633 4636 matrix A[3][3]=0,1,0,-1,0,0,0,0,-1; … … 4653 4656 DISPLAY: information if v does not equal 0 4654 4657 THEORY: Secondary invariants are calculated by finding a basis (in terms of 4655 monomials) of the basering modulo primary invariants, mapping those 4656 toinvariants with the Reynolds operator and using these images as4658 monomials) of the basering modulo primary invariants, mapping those to 4659 invariants with the Reynolds operator and using these images as 4657 4660 candidates for secondary invariants. 4658 4661 EXAMPLE: example secondary_no_molien; shows an example … … 4809 4812 DISPLAY: information if v does not equal 0 4810 4813 THEORY: Secondary invariants are calculated by finding a basis (in terms of 4811 monomials) of the basering modulo primary invariants, mapping those 4812 to invariants with the Reynolds operator and using these images or4813 their power products s.t.they are linearly independent modulo the4814 monomials) of the basering modulo primary invariants, mapping those to 4815 invariants with the Reynolds operator and using these images or their 4816 power products such that they are linearly independent modulo the 4814 4817 primary invariants (see paper \"Some Algorithms in Invariant Theory of 4815 4818 Finite Groups\" by Kemper and Steel (1997)). … … 5003 5006 DISPLAY: information if v does not equal 0 5004 5007 THEORY: Secondary invariants are generated following \"Generating Invariant 5005 Rings of Finite Groups over Arbitrary Fields\" by Kemper (1996, to 5006 appear in JSC). 5008 Rings of Finite Groups over Arbitrary Fields\" by Kemper (1996). 5007 5009 EXAMPLE: example secondary_not_cohen_macaulay; shows an example 5008 5010 " … … 5080 5082 ""; 5081 5083 } 5082 matrix trivialS=secondary_charp(P,REY,"alskdfalkdsj",v); 5084 matrix trivialS, trivialSI=secondary_charp(P,REY,"alskdfalkdsj",v); 5085 kill trivialSI; 5083 5086 kill alskdfalkdsj; 5084 5087 // now we have those secondary invariants … … 5096 5099 ideal B; 5097 5100 for (i=1;i<=gen_num;i++) 5098 { B=ideal(matrix(maxideal(1))*transpose(#[i])); 5101 { B=ideal(matrix(maxideal(1))*transpose(#[i])); // image of the various 5099 5102 // variables under the i-th generator - 5100 5103 f=br,B; // the corresponding mapping - … … 5135 5138 // invariants 5136 5139 for (i=1; i<=m;i++) 5137 { S[1,i]=S[1,i]/leadcoef(S[1,i]); // making elements nice5140 { S[1,i]=S[1,i]/leadcoef(S[1,i]); // making elements nice 5138 5141 } 5139 5142 S=sort(ideal(S))[1]; … … 5155 5158 } 5156 5159 example 5157 { 5160 { "EXAMPLE:"; echo=2; 5158 5161 ring R=2,(x,y,z),dp; 5159 5162 matrix A[3][3]=0,1,0,-1,0,0,0,0,-1; … … 5177 5180 not even be attempted to compute the Reynolds operator or Molien 5178 5181 series), the second component should give the size of intervals 5179 between canceling common factors in the expansion of Molien series, 5180 0(the default) means only once after generating all terms, in prime5182 between canceling common factors in the expansion of Molien series, 0 5183 (the default) means only once after generating all terms, in prime 5181 5184 characteristic also a negative number can be given to indicate that 5182 5185 common factors should always be canceled when the expansion is simple 5183 5186 (the root of the extension field occurs not among the coefficients) 5184 RETURN: primary and secondary invariants (both of type matrix) generating the5185 invariant ring with respect to the matrix group generated by the5187 RETURN: primary and secondary invariants (both of type <matrix>) generating 5188 the invariant ring with respect to the matrix group generated by the 5186 5189 matrices in the input and irreducible secondary invariants (type 5187 5190 <matrix>) if the Molien series was available … … 5190 5193 THEORY: Bases of homogeneous invariants are generated successively and those 5191 5194 are chosen as primary invariants that lower the dimension of the ideal 5192 generated by the previously found invariants (see paper\"Generating a5195 generated by the previously found invariants (see \"Generating a 5193 5196 Noetherian Normalization of the Invariant Ring of a Finite Group\" by 5194 Decker, Heydtmann, Schreyer (199 7) to appear in JSC). In the5197 Decker, Heydtmann, Schreyer (1998)). In the 5195 5198 non-modular case secondary invariants are calculated by finding a 5196 5199 basis (in terms of monomials) of the basering modulo the primary … … 5200 5203 Theory of Finite Groups\" by Kemper and Steel (1997)). In the modular 5201 5204 case they are generated according to \"Generating Invariant Rings of 5202 Finite Groups over Arbitrary Fields\" by Kemper (1996, to appear in 5203 JSC). 5205 Finite Groups over Arbitrary Fields\" by Kemper (1996). 5204 5206 EXAMPLE: example invariant_ring; shows an example 5205 5207 " … … 5256 5258 { " We are dealing with the non-modular case."; 5257 5259 } 5258 molien(L[3..size(L)],newring,L[2],intvec(0,interval,v)); 5260 if (typeof(L[2])=="int") 5261 { molien(L[3..size(L)],newring,L[2],intvec(0,interval,v)); 5262 } 5263 else 5264 { molien(L[2..size(L)],newring,intvec(0,interval,v)); 5265 } 5259 5266 matrix P=primary_charp(L[1],newring,v); 5260 5267 matrix S,IS=secondary_charp(P,L[1],newring,v); … … 5339 5346 list L=group_reynolds(#[1..gen_num],v); 5340 5347 string newring="aksldfalkdsflkj"; 5341 molien(L[2..size(L)],newring,intvec(1,interval,v)); 5348 if (typeof(L[2])=="int") 5349 { molien(L[3..size(L)],newring,L[2],intvec(1,interval,v)); 5350 } 5351 else 5352 { molien(L[2..size(L)],newring,intvec(1,interval,v)); 5353 } 5342 5354 matrix P=primary_charp(L[1],newring,v); 5343 5355 matrix S,IS=secondary_charp(P,L[1],newring,v); … … 5360 5372 } 5361 5373 example 5362 { "EXAMPLE: Sturmfels: Algorithms in Invariant Theory 2.3.7:"; 5363 echo=2; 5374 { "EXAMPLE: Sturmfels: Algorithms in Invariant Theory 2.3.7:"; echo=2; 5364 5375 ring R=0,(x,y,z),dp; 5365 5376 matrix A[3][3]=0,1,0,-1,0,0,0,0,-1; … … 5376 5387 where -|r| to |r| is the range of coefficients of random 5377 5388 combinations of bases elements that serve as primary invariants, 5378 flags: an optional <intvec> with three entries: if the first equals 5379 0,the program attempts to compute the Molien series and Reynolds5389 flags: an optional <intvec> with three entries: if the first equals 0, 5390 the program attempts to compute the Molien series and Reynolds 5380 5391 operator, if it equals 1, the program is told that the Molien series 5381 5392 should not be computed, if it equals -1 characteristic 0 is simulated, 5382 5393 i.e. the Molien series is computed as if the base field were 5383 5394 characteristic 0 (the user must choose a field of large prime 5384 characteristic, e.g. 32003) and if the first one is anything else, it5395 characteristic, e.g. 32003) and if the first one is anything else, 5385 5396 then the characteristic of the base field divides the group order 5386 5397 (i.e. we will not even attempt to compute the Reynolds operator or 5387 5398 Molien series), the second component should give the size of intervals 5388 5399 between canceling common factors in the expansion of the Molien 5389 series, 5390 0 (the default) means only once after generating all terms, in prime5391 characteristic also a negative number can be given to indicate that5392 common factors should always be canceled when the expansion is simple5393 (the root of the extension field occurs notamong the coefficients)5394 RETURN: primary and secondary invariants (both of type matrix) generating the5400 series, 0 (the default) means only once after generating all terms, 5401 in prime characteristic also a negative number can be given to 5402 indicate that common factors should always be canceled when the 5403 expansion is simple (the root of the extension field does not occur 5404 among the coefficients) 5405 RETURN: primary and secondary invariants (both of type <matrix>) generating 5395 5406 invariant ring with respect to the matrix group generated by the 5396 5407 matrices in the input and irreducible secondary invariants (type … … 5482 5493 { " We are dealing with the non-modular case."; 5483 5494 } 5484 molien(L[3..size(L)],newring,L[2],intvec(0,interval,v)); 5495 if (typeof(L[2])=="int") 5496 { molien(L[3..size(L)],newring,L[2],intvec(0,interval,v)); 5497 } 5498 else 5499 { molien(L[2..size(L)],newring,intvec(0,interval,v)); 5500 } 5485 5501 matrix P=primary_charp_random(L[1],newring,max,v); 5486 5502 matrix S,IS=secondary_charp(P,L[1],newring,v); … … 5519 5535 matrix P=primary_charp_without_random(#[1..gen_num],max,v); 5520 5536 matrix S=secondary_not_cohen_macaulay(P,#[1..gen_num],v); 5521 return( L[1],S);5537 return(P,S); 5522 5538 } 5523 5539 } … … 5565 5581 list L=group_reynolds(#[1..gen_num],v); 5566 5582 string newring="aksldfalkdsflkj"; 5567 molien(L[2..size(L)],newring,intvec(1,v)); 5583 if (typeof(L[2])=="int") 5584 { molien(L[3..size(L)],newring,L[2],intvec(mol_flag,interval,v)); 5585 } 5586 else 5587 { molien(L[2..size(L)],newring,intvec(mol_flag,interval,v)); 5588 } 5568 5589 matrix P=primary_charp_random(L[1],newring,max,v); 5569 5590 matrix S,IS=secondary_charp(P,L[1],newring,v); … … 5593 5614 print(S); 5594 5615 print(IS); 5616 } 5617 /////////////////////////////////////////////////////////////////////////////// 5618 5619 proc algebra_containment (poly p, ideal A) 5620 "USAGE: algebra_containment(p,A); p <poly>, A <ideal> giving generators, say 5621 f1,...,fm, subalgebra of the basering 5622 RETURN: 1 (TRUE) (type <int>) if p is contained in the subalgebra K[f1,...,fm] 5623 0 (FALSE) (type <int>) if p is not contained 5624 DISPLAY: a representation of p in terms of algebra generators fi=y(i) if p 5625 is contained in the subalgebra, provided printlevel>=1 5626 (default: printlevel=0) 5627 THEORY: The ideal of algebraic relations of the algebra generators f1,...,fm 5628 given by A is computed introducing new variables y(i) and the product 5629 order with x(i) >> y(i) where x(i) are the variable of the basering. 5630 p reduces to a polynomial only in the y(i) <=> p is contained in the 5631 subring generated by the polynomials f1,...,fm in A. 5632 EXAMPLE: example algebra_containment; shows an example 5633 " 5634 { int DEGB = degBound; 5635 degBound=0; 5636 def br=basering; 5637 int n=nvars(br); 5638 int m=ncols(A); 5639 string mp=string(minpoly); 5640 execute "ring R=("+charstr(br)+"),(x(1..n),y(1..m)),(dp(n),dp(m));"; 5641 execute "minpoly=number("+mp+");"; 5642 ideal vars=x(1..n); 5643 map emb=br,vars; 5644 ideal A=ideal(emb(A)); 5645 poly check=emb(p); 5646 for (int i=1;i<=m;i++) 5647 { A[i]=A[i]-y(i); 5648 } 5649 A=std(A); 5650 check=reduce(check,A); 5651 degBound = DEGB; 5652 if( sum(leadexp(check),1..n) == 0 ) 5653 { dbprint(printlevel-voice+2,"// "+string(check)); 5654 return(1); 5655 } 5656 else 5657 { return(0); 5658 } 5659 } 5660 example 5661 { "EXAMPLE: Sturmfels: Algorithms in Invariant Theory 2.3.7:"; echo=2; 5662 ring R=0,(x,y,z),dp; 5663 matrix A[1][7]=x2+y2,z2,x4+y4,1,x2z-1y2z,xyz,x3y-1xy3; 5664 poly p1=x10z3-x8y2z3+2x6y4z3-2x4y6z3+x2y8z3-y10z3+x6z4+3x4y2z4+3x2y4z4+y6z4; 5665 printlevel=2; 5666 algebra_containment(p1,A); 5667 poly p2=z; 5668 algebra_containment(p2,A); 5669 } 5670 /////////////////////////////////////////////////////////////////////////////// 5671 5672 proc module_containment(poly p, matrix P, matrix S) 5673 "USAGE: module_containment(p,P,S); p <poly>, P <ideal>, generators of an 5674 algebra, S <ideal>, generators of a module over the algebra generated 5675 by P 5676 ASSUME: ncols(P)=number of variables in the basering and the generators in P 5677 RETURNS: 1 (TRUE) (type <int>) if p is contained in the module 5678 0 (FALSE) type <int>) if p is not contained 5679 DISPLAY: the representation of p in terms of algebra generators P[i]=z(i) and 5680 module generators S[j]=y(j) if p is contained in the module 5681 THEORY: The ideal of algebraic relations of all the generators p1,...,pn, 5682 s1,...,st given by P and S is computed introducing new variables y(j), 5683 z(i) and the product order: x^a*y^b*z^c > x^d*y^e*z^f if x^a > x^d 5684 with respect to the lp ordering or else if z^c > z^f with respect to 5685 the dp ordering or else if y^b > y^e with respect to the lp ordering 5686 again. p reduces to a polynomial only in the y(j) and z(i), linear in 5687 the z(i) <=> p is contained in the module. 5688 EXAMPLE: example module_containment; shows an example 5689 " 5690 { def br=basering; 5691 int DEGB=degBound; 5692 degBound=0; 5693 int n=nvars(br); 5694 if (ncols(P)==n) 5695 { int m=ncols(S); 5696 string mp=string(minpoly); 5697 execute "ring R=("+charstr(br)+"),(x(1..n),y(1..m),z(1..n)),(lp(n),dp(m),lp(n));"; 5698 execute "minpoly=number("+mp+");"; 5699 ideal vars=x(1..n); 5700 map emb=br,vars; 5701 matrix P=emb(P); 5702 matrix S=emb(S); 5703 ideal check=emb(p); 5704 ideal I; 5705 for (int i=1;i<=m;i++) 5706 { I[i]=S[1,i]-y(i); 5707 } 5708 for (i=1;i<=n;i++) 5709 { I[m+i]=P[1,i]-z(i); 5710 } 5711 I=std(I); 5712 check[1]=reduce(check[1],I); 5713 I=elim(check,1,n); // checking whether all variables from 5714 if (I[1]<>0) // the former ring have disappeared 5715 { dbprint(printlevel-voice+2,"// "+string(check)); 5716 return(1); 5717 } 5718 else 5719 { return(0); 5720 } 5721 } 5722 else 5723 { "ERROR: the first ideal must have nvars(basering) entries"; 5724 return(); 5725 } 5726 } 5727 example 5728 { "EXAMPLE: Sturmfels: Algorithms in Invariant Theory 2.3.7:"; echo=2; 5729 ring R=0,(x,y,z),dp; 5730 matrix P[1][3]=x2+y2,z2,x4+y4; 5731 matrix S[1][4]=1,x2z-1y2z,xyz,x3y-1xy3; 5732 poly p1=x10z3-x8y2z3+2x6y4z3-2x4y6z3+x2y8z3-y10z3+x6z4+3x4y2z4+3x2y4z4+y6z4; 5733 printlevel=2; 5734 module_containment(p1,P,S); 5735 poly p2=z; 5736 module_containment(p2,P,S); 5595 5737 } 5596 5738 /////////////////////////////////////////////////////////////////////////////// … … 5689 5831 J=std(J); 5690 5832 ideal vars; 5691 //for (i=1;i<=n;i ++)5833 //for (i=1;i<=n;i=i+1) 5692 5834 //{ vars[i]=0; 5693 5835 //} … … 5772 5914 print(image_of_variety(I,F)); 5773 5915 } 5774 ///////////////////////////////////////////////////////////////////////////////
Note: See TracChangeset
for help on using the changeset viewer.