Changeset 0be039 in git
- Timestamp:
- Mar 16, 2018, 6:27:45 PM (5 years ago)
- Branches:
- (u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
- Children:
- 52ac0882b123798821765bb16d5ba4b371ced4cd
- Parents:
- 95a42a2dacdcadb5c004cb3520b5c252dfe8e784df09c0184ffc4aaf31c02b8691e68734f25fc3b3
- Location:
- Singular/LIB
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/fpadim.lib
rdf09c0 r0be039 2378 2378 return (words); 2379 2379 } 2380 example { 2380 example 2381 { 2381 2382 "EXAMPLE:"; echo = 2; 2382 2383 ring r = 0,(a,b,c),dp; … … 2399 2400 return(ivL2lpI(ivMaxIdeal(d, donly))); 2400 2401 } 2401 example { 2402 example 2403 { 2402 2404 "EXAMPLE:"; echo = 2; 2403 2405 ring r = 0,(a,b,c),dp; … … 2489 2491 return(I); 2490 2492 } 2491 example { 2493 example 2494 { 2492 2495 "EXAMPLE:"; echo = 2; 2493 2496 ring r = 0,(x,y),dp; -
Singular/LIB/fpaprops.lib
rdf09c0 r0be039 19 19 PROCEDURES: 20 20 lpNoetherian(<GB>); check whether A/<GB> is (left/right) noetherian 21 lpIsSemiPrime(<GB>); check whether A/< GB> is semi prime22 lpIsPrime(<GB>); check whether A/< GB> is prime21 lpIsSemiPrime(<GB>); check whether A/<LM(GB)> is semi prime 22 lpIsPrime(<GB>); check whether A/<LM(GB)> is prime 23 23 lpGkDim(<GB>); compute the Gelfand Kirillov dimension of A/<GB> 24 24 lpGlDimBound(<GB>); compute an upper bound for the global dimension of A/<GB> … … 37 37 @* 2 right noetherian 38 38 @* 3 noetherian 39 PURPOSE: Check whether R/<G> is (left/right) noetherian, where R is the basering39 PURPOSE: Check whether A/<G> is (left/right) noetherian 40 40 ASSUME: - basering is a Letterplace ring 41 41 @* - G is a Groebner basis … … 108 108 return (3 - inFlag - outFlag); 109 109 } 110 example { 110 example 111 { 111 112 "EXAMPLE:"; echo = 2; 112 113 ring r = 0,(x,y),dp; … … 198 199 "USAGE: lpIsSemiPrime(G); G an ideal in a Letterplace ring 199 200 RETURN: boolean 200 PURPOSE: Check whether R/<G> is semi prime, where R is the basering201 PURPOSE: Check whether A/<LM(G)> is semi prime, that is when p * (A/<LM(G)>) * p != 0 for all p in (A/<LM(G)> - {0}). 201 202 ASSUME: - basering is a Letterplace ring 202 203 - G is a Groebner basis … … 249 250 return (1); 250 251 } 251 example { 252 example 253 { 252 254 "EXAMPLE:"; echo = 2; 253 255 ring r = 0,(x1,x2),dp; … … 298 300 "USAGE: lpIsPrime(G); G an ideal in a Letterplace ring 299 301 RETURN: boolean 300 PURPOSE: Check whether R/<G> is prime, where R is the basering302 PURPOSE: Check whether A/<LM(G)> is prime, that is when p1 * (A/<LM(G)>) * p2 != 0 for all p1, p2 in (A/<LM(G)> - {0}). 301 303 ASSUME: - basering is a Letterplace ring 302 304 - G is a Groebner basis … … 362 364 return (1); 363 365 } 364 example { 366 example 367 { 365 368 "EXAMPLE:"; echo = 2; 366 369 ring r = 0,(x,y),dp; … … 681 684 return (UG); 682 685 } 683 example { 686 example 687 { 684 688 "EXAMPLE:"; echo = 2; 685 689 ring r = 0,(x,y,z),dp; … … 1047 1051 for (int j = 1; j <= size(ivfi); j++) { 1048 1052 int varindex = ivfi[j]; 1049 int subindex = lpIndexOf(s1, var(varindex)); 1050 if (subindex > 0) { 1051 s2[subindex] = lpNF(s2[subindex],G); 1052 fis = lpMult(fis, s2[subindex]); 1053 } else { 1054 fis = lpMult(fis, lpNF(iv2lp(varindex),G)); 1055 } 1056 /*fis = lpNF(fis,G);*/ 1057 kill varindex; kill subindex; 1053 if (varindex > 0) { 1054 int subindex = lpIndexOf(s1, var(varindex)); 1055 if (subindex > 0) { 1056 s2[subindex] = lpNF(s2[subindex],G); 1057 fis = lpMult(fis, s2[subindex]); 1058 } else { 1059 fis = lpMult(fis, lpNF(iv2lp(varindex),G)); 1060 } 1061 /*fis = lpNF(fis,G);*/ 1062 kill subindex; 1063 } 1064 kill varindex; 1058 1065 } kill j; 1059 1066 kill ivfi; … … 1065 1072 return (fs); 1066 1073 } 1067 example { 1074 example 1075 { 1076 "EXAMPLE:"; echo = 2; 1068 1077 //////// EXAMPLE A //////// 1069 1078 ring r = 0,(x,y,z),dp; … … 1144 1153 for (int j = 1; j <= size(ivfi); j++) { 1145 1154 int varindex = ivfi[j]; 1146 int subindex = lpIndexOf(s1, var(varindex)); 1147 if (subindex > 0) { 1148 tmpDegBound = tmpDegBound + deg(s2[subindex]); 1149 } else { 1150 tmpDegBound = tmpDegBound + 1; 1151 } 1152 kill varindex; kill subindex; 1155 if (varindex > 0) { 1156 int subindex = lpIndexOf(s1, var(varindex)); 1157 if (subindex > 0) { 1158 tmpDegBound = tmpDegBound + deg(s2[subindex]); 1159 } else { 1160 tmpDegBound = tmpDegBound + 1; 1161 } 1162 kill subindex; 1163 } 1164 kill varindex; 1153 1165 } kill j; 1154 1166 if (tmpDegBound > maxDegBound) { … … 1160 1172 // increase degbound by 50% when ideal is provided 1161 1173 // needed for lpNF 1162 maxDegBound = maxDegBound + maxDegBound/2;1174 maxDegBound = maxDegBound + (maxDegBound div 2); 1163 1175 1164 1176 return (maxDegBound); 1165 1177 } 1166 example { 1178 example 1179 { 1167 1180 // see lpSubstitute() 1168 1181 } … … 1187 1200 return (maxDegBound); 1188 1201 } 1189 example { 1202 example 1203 { 1190 1204 // see lpSubstitute() 1191 1205 } -
Singular/LIB/freegb.lib
r95a42a2 r0be039 51 51 LIB "qhmoduli.lib"; // for Max 52 52 LIB "bfun.lib"; // for inForm 53 LIB "fpadim.lib"; // for intvec conversion 53 54 54 55 proc tstfreegb() … … 3278 3279 } 3279 3280 3281 proc lpDivision(poly p, ideal I) 3282 "ASSUME: I is a Groebner basis G = {g1,...,gN}, the original ring of the Letterplace ring has the name 'r' and no variable is called 'tag_i' for i in 1...N 3283 RETURN: list L 3284 NOTE: - L[1] NF(p,I) 3285 - L[2] list of expressions [i,l_{ij},r_{ij}] with \sum_{i,j} l_{ij} g_i r_{ij} = p - NF(p,I) 3286 " 3287 { 3288 if (p == 0 || size(I) == 0) { 3289 list L = 0; 3290 list empty; 3291 L[2] = empty; 3292 return (L); 3293 } 3294 poly pNF = lpNF(p,I); 3295 p = p - pNF; 3296 3297 // make new ring 3298 def save = basering; 3299 int norigvars = nvars(r); 3300 string tagvarstr = "(tag_1"; 3301 for (int i = 2; i <= size(I); i++) { 3302 tagvarstr = tagvarstr + ",tag_" + string(i); 3303 } kill i; 3304 tagvarstr = tagvarstr + ")"; 3305 string field = string(ringlist(r)[1]); 3306 execute("ring @tags = " + field + "," + tagvarstr + ",dp;"); 3307 ring @tagged = (r + @tags); 3308 def @R = makeLetterplaceRing(attrib(save,"uptodeg")); setring @R; 3309 3310 // restore vars 3311 poly p = imap(save, p); 3312 poly pNF = imap(save, pNF); 3313 ideal I = imap(save, I); 3314 for (int i = 1; i <= size(I); i++) { 3315 I[i] = I[i] - var(norigvars + i); 3316 } kill i; 3317 3318 list summands; 3319 list L = pNF; 3320 poly pTaggedNF = lpNF(p,I); 3321 pTaggedNF = pTaggedNF * leadcoef(p); // somehow pTaggedNF gets normalized 3322 for (int i = 1; i <= size(pTaggedNF); i++) { 3323 intvec iv = lp2iv(pTaggedNF[i]); 3324 for (int j = 1; j <= size(iv); j++) { 3325 if (iv[j] > norigvars) { 3326 intvec left; 3327 intvec right; 3328 if (j > 1) { 3329 left = iv[1..(j-1)]; 3330 } 3331 if (j < size(iv)) { 3332 right = iv[(j+1)..size(iv)]; 3333 } 3334 list summand = (iv[j] - norigvars), leadcoef(pTaggedNF[i])*iv2lp(left), iv2lp(right); 3335 summands = insert(summands, summand, size(summands)); 3336 3337 kill left; 3338 kill right; 3339 kill summand; 3340 break; 3341 } 3342 } kill j; 3343 kill iv; 3344 } kill i; 3345 3346 L[2] = summands; 3347 3348 setring save; 3349 list L = imap(@R,L); 3350 return (L); 3351 } 3352 3353 proc lpGBPres2Poly(list L, ideal I) 3354 "ASSUME: L is a valid Groebner presentation as for example the result of lpDivision 3355 RETURN: poly 3356 NOTE: computes p = \sum_{i,j} l_{ij} g_i r_{ij} + NF(p,I) = \sum_{i} L[2][i][2] I[L[2][i][1]] L[2][i][3] + L[1] 3357 " 3358 { 3359 poly p; 3360 for (int i = 1; i <= size(L[2]); i++) { 3361 p = p + lpMult(lpMult(L[2][i][2], I[L[2][i][1]]), L[2][i][3]); 3362 } 3363 p = p + L[1]; 3364 return (p); 3365 } 3366 3280 3367 //procedures to convert monomials into the DVec representation, all static 3281 3368 ////////////////////////////////////////////////////////
Note: See TracChangeset
for help on using the changeset viewer.