Changeset e0e0e2 in git for Singular/LIB/finvar.lib
- Timestamp:
- Dec 14, 2007, 11:12:31 AM (16 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 4f818c4604d3f8dd7bb40260971c1bdd9f709746
- Parents:
- d617b278e0d4576d32b4c6f260fd73bae2daa907
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/finvar.lib
rd617b27 re0e0e2 1 1 /////////////////////////////////////////////////////////////////////////////// 2 version="$Id: finvar.lib,v 1.7 0 2007-12-12 15:02:46king Exp $"2 version="$Id: finvar.lib,v 1.71 2007-12-14 10:12:31 king Exp $" 3 3 category="Invariant theory"; 4 4 info=" … … 6947 6947 6948 6948 proc secondary_not_cohen_macaulay (matrix P, list #) 6949 "USAGE: secondary_not_cohen_macaulay(P,G1,G2,...[,v ]);6949 "USAGE: secondary_not_cohen_macaulay(P,G1,G2,...[,v,h]); 6950 6950 P: a 1xn <matrix> with primary invariants, G1,G2,...: nxn <matrices> 6951 generating a finite matrix group, v : anoptional <int>6951 generating a finite matrix group, v,h: optional <int> 6952 6952 ASSUME: n is the number of variables of the basering 6953 6953 RETURN: secondary invariants of the invariant ring (type <matrix>) … … 6955 6955 THEORY: Secondary invariants are generated following \"Generating Invariant 6956 6956 Rings of Finite Groups over Arbitrary Fields\" by Kemper (1996). 6957 Hilbert driven computation is used if h does not equal 0 6957 6958 EXAMPLE: example secondary_not_cohen_macaulay; shows an example 6958 6959 " 6959 6960 { int i, j; 6961 int v, useH; 6960 6962 degBound=0; 6961 6963 def br=basering; … … 6966 6968 if (size(#)>0) // checking input and setting verbose 6967 6969 { if (typeof(#[size(#)])=="int") 6968 { int gen_num=size(#)-1; 6970 { if ((size(#)>1) and (typeof(#[size(#)-1])=="int")) 6971 { int gen_num=size(#)-2; 6972 v=#[size(#)-1]; 6973 useH=#[size(#)]; 6974 } 6975 else 6976 { int gen_num=size(#)-1; 6977 v=#[size(#)]; 6978 } 6969 6979 if (gen_num==0) 6970 6980 { "ERROR: There are no generators of the finite matrix group given."; 6971 6981 return(); 6972 6982 } 6973 int v=#[size(#)];6974 6983 for (i=1;i<=gen_num;i++) 6975 6984 { if (typeof(#[i])<>"matrix") … … 6984 6993 } 6985 6994 else 6986 { int v=0; 6987 int gen_num=size(#); 6995 { int gen_num=size(#); 6988 6996 for (i=1;i<=gen_num;i++) 6989 6997 { if (typeof(#[i])<>"matrix") … … 7010 7018 { ""; 7011 7019 } 7012 ring alskdfalkdsj=0,x,dp;7013 matrix M[1][2]=1,(1-x)^n;7014 export alskdfalkdsj;7015 export M; // we look at our primary invariants as7016 setring br; // such of the subgroup that only7017 matrix REY=matrix(maxideal(1)); // contains the identity, this means that7020 // ring alskdfalkdsj=0,x,dp; 7021 // matrix M[1][2]=1,(1-x)^n; 7022 // export alskdfalkdsj; 7023 // export M; // we look at our primary invariants as 7024 // setring br; // such of the subgroup that only 7025 // matrix REY=matrix(maxideal(1)); // contains the identity, this means that 7018 7026 // ch does not divide the order anymore, 7019 7027 // this means that we can make use of the … … 7025 7033 // ones from the bigger group 7026 7034 if (v) 7027 { " The procedure secondary_charp() is called to calculate secondary invariants"; 7028 " of the invariant ring of the trivial group with respect to the primary"; 7029 " invariants found previously."; 7035 { " First, get secondary invariants for the trivial action, with respect to"; 7036 " the primary invariants found previously. By the graded Nakayama lemma,"; 7037 " this means to compute the standard monomials for the ideal generated by"; 7038 " the primary invariants."; 7030 7039 ""; 7031 7040 } 7032 matrix trivialS, trivialIS=secondary_charp(P,REY,"alskdfalkdsj",v); 7033 kill trivialIS; 7034 kill alskdfalkdsj; 7041 ideal GP = groebner(ideal(P)); 7042 if (dim(GP)<>0) 7043 { "ERROR: The ideal spanned by primary invariants of a finite group"; 7044 " always is of dimension zero."; 7045 return(); 7046 } 7047 matrix trivialS = matrix(kbase(GP));// , trivialIS=secondary_charp(P,REY,"alskdfalkdsj",v); 7048 // kill trivialIS; 7049 // kill alskdfalkdsj; 7035 7050 // now we have those secondary invariants 7036 7051 int k=ncols(trivialS); // k is the number of the secondary … … 7057 7072 // module M(2)=syz(M(1)); // nres(M(1),2)[2]; 7058 7073 // option(set,save_opts); 7074 if (v) 7075 { "Syzygies of the \"trivial\" secondaries"; } 7059 7076 module M(2)=nres(M(1),2)[2]; 7060 7077 int m=ncols(M(2)); // number of generators of the module … … 7063 7080 // the algebra A^k where A denote the subalgebra of the usual polynomial 7064 7081 // ring, generated by the primary invariants 7065 string mp=string(minpoly); // generating a ring where we can do 7066 // elimination 7067 execute("ring R=("+charstr(br)+"),(x(1..n),y(1..n),h),dp;"); 7068 execute("minpoly=number("+mp+");"); 7069 // map f=br,maxideal(1); // canonical mapping 7070 matrix M[k][m+k*n]; 7071 M[1..k,1..m]=matrix(fetch(br,M(2))); // will contain a module - 7082 7083 // generate a ring where we can do elimination 7084 // in order to make it weighted homogeneous, we choose appropriate weights 7085 if (v) 7086 { "By elimination: Intersect with the invariant ring"; } 7087 intvec dv = degvec(ideal(P)),1; 7088 ring newR = char(br), (y(1..n),h),(a(dv),dp); 7089 def R = br + newR; 7090 setring R; 7072 7091 matrix P=fetch(br,P); // primary invariants in the new ring 7092 ideal ElimP; 7073 7093 for (i=1;i<=n;i++) 7094 { ElimP[i]=y(i)-P[1,i]; } 7095 def RHilb = newR+br; // the new variables only appear linearly, so that block order wouldn't hurt 7096 setring RHilb; 7097 ideal ElimP=imap(R,ElimP); 7098 intvec EPvec = hilb(groebner(ElimP),1,degvec(maxideal(1))); 7099 setring R; 7100 ideal GElimP = std(ElimP,EPvec,degvec(maxideal(1))); 7101 attrib(GElimP,"isSB",1); 7102 int newN = ncols(GElimP); 7103 matrix M[k][m+k*newN]; 7104 M[1..k,1..m]=matrix(imap(br,M(2))); // will contain a module - 7105 for (i=1;i<=newN;i++) 7074 7106 { for (j=1;j<=k;j++) 7075 { M[j,m+(i-1)*k+j]=y(i)-P[1,i]; 7076 } 7077 } 7078 M=elim(module(M),1,n); // eliminating x(1..n), std-calculation 7079 // is done internally - 7080 M=homog(module(M),h); // homogenize for 'minbase' 7107 { M[j,m+(i-1)*k+j]=GElimP[i]; // y(i)-P[1,i]; 7108 } 7109 } 7110 7111 if (not useH) 7112 { M=elim(module(M),1,n); // eliminating x(1..n), std-calculation 7113 // is done internally - 7114 M=homog(module(M),h); // homogenize for 'minbase' 7115 } 7116 else 7117 { 7118 // Manually, as long as Hilbert driven eliminations are not supported for modules. 7119 // ----- Compute the Hilbert function, using an "easy" ordering ---- 7120 if (v) 7121 { " Compute Hilbert Function"; } 7122 setring RHilb; 7123 matrix M=imap(R,M); 7124 module GM=groebner(module(M)); 7125 intvec hv = hilb(GM,1,degvec(maxideal(1))); 7126 setring R; 7127 module GM=imap(RHilb,GM); 7128 kill RHilb; 7129 // ----- Hilbert driven standard basis is hopefully reasonably fast ---- 7130 if (v) 7131 { " Hilbert driven standard basis computation"; } 7132 module MGb = std(module(GM),hv,degvec(maxideal(1))); 7133 ideal vars; 7134 vars[n]=0; 7135 vars=vars,y(1..n),h; 7136 map emb=R,vars; 7137 module MElim=emb(MGb); 7138 MGb = MGb - MElim; 7139 for (j=1;j<=ncols(MGb);j++) 7140 { if (MGb[j]<>0) 7141 { MElim[j]=0; 7142 } 7143 } 7144 M=homog(module(MElim),h); // homogenize for 'minbase' 7145 } 7146 7081 7147 M=minbase(module(M)); 7082 setring br; 7083 ideal substitute=maxideal(1),ideal(P),1; 7084 f=R,substitute; // replacing y(1..n) by primary 7148 ideal substitute; 7149 for (i=1;i<=n;i++) 7150 { substitute[i]=var(i); 7151 } 7152 substitute = substitute,ideal(P),1; 7153 map f=R,substitute; // replacing y(1..n) by primary 7085 7154 // invariants and h by 1 - 7086 M(2)=f(M); // M(2) is the new module 7087 m=ncols(M(2)); 7155 M=f(M); // we can't directly map from R to br 7156 setring br; // if there is a minpoly. 7157 module M(3)=imap(R,M); // M(2) is the new module 7158 m=ncols(M(3)); 7088 7159 matrix S[1][m]; 7089 S=matrix(trivialS)*matrix(M( 2)); // S now contains the secondary7160 S=matrix(trivialS)*matrix(M(3)); // S now contains the secondary 7090 7161 // invariants 7091 7162 for (i=1; i<=m;i++)
Note: See TracChangeset
for help on using the changeset viewer.