Changeset f9ca02 in git
- Timestamp:
- Sep 27, 2010, 12:21:25 PM (13 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '0604212ebb110535022efecad887940825b97c3f')
- Children:
- 59a7ca1a2295e730269784972ec5b06a44bed680
- Parents:
- d8423632ac2a14a2b19b324e619be2d5757af760
- Location:
- Singular/LIB
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/assprimeszerodim.lib
rd84236 rf9ca02 106 106 if(status(l(i), "read", "ready")) 107 107 { 108 P = read(l(i)); // read the result from l(i) 108 //--- read the result from l(i) --- 109 P = read(l(i)); 109 110 CO1[index] = P[1]; 110 111 CO2[index] = bigint(P[2]); … … 123 124 } 124 125 } 125 if(k == n) // k describes the number of closed links 126 //--- k describes the number of closed links --- 127 if(k == n) 126 128 { 127 129 j++; 128 130 } 129 i_sleep = system("sh", "sleep "+string(t)); // sleep for t seconds 131 //--- sleep for t seconds --- 132 i_sleep = system("sh", "sleep "+string(t)); 130 133 } 131 134 } … … 359 362 for(i = 1; i <= n; i++) 360 363 { 361 if(status(l(i), "read", "ready")) // ask if link l(i) is ready otherwise sleep for t seconds 364 //--- ask if link l(i) is ready otherwise sleep for t seconds --- 365 if(status(l(i), "read", "ready")) 362 366 { 363 P = read(l(i)); // read the result from l(i) 367 //--- read the result from l(i) --- 368 P = read(l(i)); 364 369 CO1[index] = P[1]; 365 370 CO2[index] = bigint(P[2]); … … 378 383 } 379 384 } 380 if(k == n) // k describes the number of closed links 385 //--- k describes the number of closed links --- 386 if(k == n) 381 387 { 382 388 j++; … … 683 689 { 684 690 //=== computes a poly F in Z/q1[T] such that <F>=kernel(Z/q1[T]--->Z/q1[vars(basering)]) 685 //=== mapping T to p1 and test if d=deg(squarefreepart(F)), q1 a prime randomly cho osen691 //=== mapping T to p1 and test if d=deg(squarefreepart(F)), q1 a prime randomly chosen 686 692 //=== If not choose randomly another prime q2 and another linear form p2 and 687 693 //=== computes a poly F in Z/q2[T] such that <F>=kernel(Z/q2[T]--->Z/q2[vars(basering)]) … … 742 748 static proc zeroRadP(ideal I, int p) 743 749 { 744 //=== computes F=(F_1,...,F_n) such that <F_i>=IZ/p[x_1,...,x_n] intersected with Z/p[x_i], F_i monic 750 //=== computes F=(F_1,...,F_n) such that <F_i>=IZ/p[x_1,...,x_n] intersected 751 //=== with Z/p[x_i], F_i monic 745 752 def R0 = basering; 746 753 list ringL = ringlist(R0); -
Singular/LIB/primdecint.lib
rd84236 rf9ca02 9 9 @* S. Steidel steidel@mathematik.uni-kl.de 10 10 11 NOTE:11 OVERVIEW: 12 12 13 13 A library for computing the primary decomposition of an ideal in the polynomial … … 25 25 26 26 //////////////////////////////////////////////////////////////////////////////// 27 28 27 29 28 proc primdecZ(ideal I, list #) … … 42 41 if(size(I)==0){return(list(ideal(0),ideal(0)));} 43 42 44 45 43 //-------------------- Initialize optional parameters ------------------------ 46 44 if(size(#) > 0) … … 109 107 //=== computes the primes occuring in a generator of I intersect Z 110 108 111 112 113 109 list L = primefactors(q); 114 110 115 116 117 111 list A; 118 119 112 ideal J = imap(R,J); 120 113 121 122 123 114 for(j=1;j<=size(L[3]);j++) 124 115 { 125 116 if(L[3][j] > 1){ ex = 1; break; } 126 127 117 } 128 118 … … 164 154 for(i = 1; i <= n; i++) 165 155 { 166 if(status(l(i), "read", "ready")) // ask if link l(i) is ready otherwise sleep for t seconds 156 //=== ask if link l(i) is ready otherwise sleep for t seconds 157 if(status(l(i), "read", "ready")) 167 158 { 168 A[size(A)+1] = read(l(i)); // read the result from l(i) 159 //=== read the result from l(i) 160 A[size(A)+1] = read(l(i)); 169 161 170 162 if(j <= size(L[3])) … … 182 174 } 183 175 } 184 if(k_link == n) // k_link describes the number of closed links 176 //=== k_link describes the number of closed links 177 if(k_link == n) 185 178 { 186 179 j++; … … 197 190 } 198 191 } 199 200 192 201 193 setring R; … … 368 360 pr[size(pr)+1]=M[i]; 369 361 } 370 371 362 } 372 363 return(pr); … … 900 891 901 892 static proc modp(ideal J, int p, int nu) 902 903 { 904 893 { 894 //=== computes the minimal associated primes (if nu > 1) resp. the primary 895 //=== decomposition (else) of J in Z/p and maps the result back to the basering 905 896 def R = basering; 906 907 897 list rp = ringlist(R); 908 898 rp[1] = p; … … 915 905 list A = minAssGTZ(J); 916 906 setring R; 917 918 907 list A = imap(Rp,A); 919 920 908 return(list(A,p,nu)); 921 922 } 923 909 } 924 910 else 925 926 { 927 911 { 928 912 list A = primdecGTZ(J); 929 930 913 setring R; 931 932 914 list A = imap(Rp,A); 933 934 915 return(list(A,p,nu)); 935 936 } 937 938 } 939 916 } 917 } 940 918 941 919 //////////////////////////////////////////////////////////////////////////////// … … 943 921 static proc coefPrimeZ(ideal I) 944 922 { 945 //=== computes the primes occur ning in the product of the leading coefficients of I923 //=== computes the primes occuring in the product of the leading coefficients of I 946 924 number h=1; 947 925 int i; … … 963 941 static proc coefZ(ideal I) 964 942 { 965 //assume ===IQ[variables]=<g_1,...,g_s>, Groebner basis, g_i in Z[variables]966 967 968 943 //=== assume IQ[variables]=<g_1,...,g_s>, Groebner basis, g_i in Z[variables] 944 //=== computes an integer h such that 945 //=== <g_1,...,g_s>Z[variables]:h^infinity = IQ[variables] intersected with Z[variables] 946 //=== returns a list with IQ[variables] intersected with Z[variables] and h 969 947 int h=1; 970 948 int i,e; … … 1098 1076 rl[1]=0; 1099 1077 def Shelp =ring(rl); 1100 1101 1078 } 1102 1079 poly h=1; … … 1150 1127 while(size(reduce(J,stdZ(I)))!=0) 1151 1128 { 1152 1153 1154 1129 I=J; 1130 J=quotientOneZ(I,h); 1131 J=normalizeZ(J); 1155 1132 } 1156 1133 return(J); … … 1161 1138 static proc prepareQuotientring (int nnp) 1162 1139 { 1163 //=== this is from primdec.lib, it is static there, should be imported later if it is no more static 1140 //=== this is from primdec.lib, it is static there, should be imported later 1141 //=== if it is no more static 1164 1142 ideal @ih,@jh; 1165 1143 int npar=npars(basering); … … 1177 1155 for(@n=2;@n<=nnp;@n++) 1178 1156 { 1179 quotring=quotring+",var("+string(@n)+")";1180 @jh=@jh+var(@n);1157 quotring=quotring+",var("+string(@n)+")"; 1158 @jh=@jh+var(@n); 1181 1159 } 1182 1160 quotring=quotring+"),(C,lp);"; 1183 1161 1184 1162 return(quotring); 1185 1186 1163 } 1187 1164 … … 1190 1167 static proc maxIndependSet (ideal j) 1191 1168 { 1192 1193 //=== this is from primdec.lib, it is static there, should be imported laterif it is no more static1169 //=== this is from primdec.lib, it is static there, should be imported later 1170 //=== if it is no more static 1194 1171 int n,k,di; 1195 1172 … … 1243 1220 static proc quotientOneZ(ideal I, poly f) 1244 1221 { 1245 //=== this is needed because quotient(I,f) does not work properly, should be replaced by quotient later 1222 //=== this is needed because quotient(I,f) does not work properly, should be 1223 //=== replaced by quotient later 1246 1224 def R=basering; 1247 1225 int i; 1248 1226 ideal K=intersectZ(I,ideal(f)); 1249 //=== K[i]/f; does not work in rings with integer! This should b yreplaced later1227 //=== K[i]/f; does not work in rings with integer! This should be replaced later 1250 1228 execute("ring Rhelp=0,("+varstr(R)+"),dp;"); 1251 1229 ideal K=imap(R,K); … … 1264 1242 static proc quotientZ(ideal I, ideal J) 1265 1243 { 1266 //=== this is needed because quotient(I,J) does not work properly, should be replaced by quotient later 1244 //=== this is needed because quotient(I,J) does not work properly, should be 1245 //=== replaced by quotient later 1267 1246 int i; 1268 1247 ideal K=quotientOneZ(I,J[1]); … … 1278 1257 static proc reduceZ(poly f, ideal I) 1279 1258 { 1280 //=== this is needed because reduce(f,I) does not work properly, should be replaced by reduce later 1259 //=== this is needed because reduce(f,I) does not work properly, should be 1260 //=== replaced by reduce later 1281 1261 if(f==0){return(f);} 1282 1262 def R=basering; … … 1297 1277 if(m!=0) 1298 1278 { 1299 n=leadcoef(f) mod leadcoef(I[j]); 1300 if(n==0) 1301 { 1302 f=f-leadcoef(f)/leadcoef(I[j])*m*I[j]; 1303 if(f==0){setring R;return(0);} 1304 i=0; 1305 break; 1306 } 1307 if(n!=leadcoef(f)) 1308 { 1309 f=f+(n-leadcoef(f))/leadcoef(I[j])*m*I[j]; 1310 i=0; 1311 break; 1312 } 1313 1314 } 1279 n=leadcoef(f) mod leadcoef(I[j]); 1280 if(n==0) 1281 { 1282 f=f-leadcoef(f)/leadcoef(I[j])*m*I[j]; 1283 if(f==0){setring R;return(0);} 1284 i=0; 1285 break; 1286 } 1287 if(n!=leadcoef(f)) 1288 { 1289 f=f+(n-leadcoef(f))/leadcoef(I[j])*m*I[j]; 1290 i=0; 1291 break; 1292 } 1293 } 1315 1294 } 1316 1295 } … … 1325 1304 { 1326 1305 //=== this is needed because we want the leading coefficients to be positive 1327 //=== otherwhise reduce gives wrong results! 1306 //=== otherwhise reduce gives wrong results! should be replaced later by std 1328 1307 I=simplify(I,2); 1329 1308 I=normalizeZ(I); … … 1341 1320 /////////////////////////////////////////////////////////////////////////////// 1342 1321 1343 proc intersectZ(ideal I, ideal J) 1344 { 1345 //=== this is needed because intersect(I,J) does not work, should be replaced by intersect later 1322 static proc intersectZ(ideal I, ideal J) 1323 { 1324 //=== this is needed because intersect(I,J) does not work, should be replaced 1325 //=== by intersect later 1346 1326 def R = basering; 1347 1327 execute("ring S=integer,(t,"+varstr(R)+"),(dp(1),dp(nvars(R)));"); … … 1393 1373 1394 1374 /* 1395 examples 1375 Examples: 1396 1376 1397 1377 //=== IQ[a,b,c,d,e,f,g] intersect Z[a,b,c,d,e,f,g] = I (takes some time) -
Singular/LIB/surfacesignature.lib
rd84236 rf9ca02 1 // 1 /////////////////////////////////////////////////////////////////////////////// 2 2 version="$Id$"; 3 3 category="Singularities"; 4 4 info=" 5 LIBRARY: surfacesignature.lib signature of surface singularity5 LIBRARY: surfacesignature.lib signature of surface singularity 6 6 7 7 AUTHORS: Gerhard Pfister pfister@mathematik.uni-kl.de … … 29 29 30 30 /////////////////////////////////////////////////////////////////////////////// 31 //------- sigma(z^N + f) in terms of Puiseux pairs of f for f irreducible ---- 31 //------- sigma(z^N + f) in terms of Puiseux pairs of f for f irreducible ----- 32 32 33 33 static proc exponentSequence(poly f)
Note: See TracChangeset
for help on using the changeset viewer.