Changeset e39e193 in git
- Timestamp:
- Nov 14, 2018, 5:40:40 PM (5 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 93386435caf06320aebf4d6af894bff6839db8b4
- Parents:
- ecdeb553994eac8047af1b1065f7154fe0c5a0c5
- Location:
- Singular
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/fpaprops.lib
recdeb5 re39e193 767 767 w_overlap = w_overlap[1 .. (l-2)*lV]; 768 768 } 769 if (v_overlap == w_overlap && !lp divides(G, v * lpVarAt(w, l - 1))) {769 if (v_overlap == w_overlap && !lpLmDivides(G, v * lpVarAt(w, l - 1))) { 770 770 UG[i,j] = 1; 771 771 } … … 808 808 } 809 809 810 static proc lpVarAt(poly p, int pos) {811 return (system("lpVarAt", p, pos));812 }813 814 810 static proc lpStandardWords(ideal G, int length) 815 811 "ASSUME: G is simplified … … 822 818 ideal words = maxideal(length); 823 819 for (int i = ncols(words); i >= 1; i--) { 824 if (lp divides(G, words[i])) {820 if (lpLmDivides(G, words[i])) { 825 821 words = delete(words, i); 826 822 } … … 867 863 } kill i; 868 864 return (words); 869 }870 871 proc lpdivides(ideal I, poly p) {872 for (int i = 1; i <= ncols(I); i++) {873 if (system("lpdivides", I[i], p)) {874 return (1);875 }876 } kill i;877 return (0);878 865 } 879 866 -
Singular/LIB/freegb.lib
recdeb5 re39e193 32 32 33 33 isVar(p); check whether p is a power of a single variable 34 35 lpLmDivides(ideal I, poly p) tests if there is a polynomial q in I with LM(q)|LM(p) 36 lpVarAt(poly p, int pos) returns the variable (as a poly) at position pos of the poly p 34 37 35 38 SEE ALSO: fpadim_lib, fpaprops_lib, fpalgebras_lib, LETTERPLACE … … 354 357 poly i = 1; 355 358 isVar(i); 359 } 360 361 proc lpLmDivides(ideal I, poly p) 362 "USAGE: lpLmDivides(I); I an ideal 363 RETURN: boolean 364 ASSUME: basering is a Letterplace ring 365 PURPOSE: tests if there is a polynomial q in I with LM(q)|LM(p) 366 EXAMPLE: example lpLmDivides; shows examples 367 " 368 { 369 for (int i = 1; i <= ncols(I); i++) { 370 if (system("lpLmDivides", I[i], p)) { 371 return (1); 372 } 373 } kill i; 374 return (0); 375 } 376 example 377 { 378 "EXAMPLE:"; echo = 2; 379 ring r = 0,(x,y),dp; 380 def R = makeLetterplaceRing(5); 381 setring R; 382 poly p = x*y*y; 383 lpLmDivides(y*y, p); 384 lpLmDivides(y*x, p); 385 lpLmDivides(ideal(y*y, y*x), p); 386 } 387 388 proc lpVarAt(poly p, int pos) 389 "USAGE: lpVarAt(p, pos); p a poly, pos an int 390 RETURN: poly 391 ASSUME: basering is a Letterplace ring 392 PURPOSE: returns the variable (as a poly) at position pos of the poly p 393 EXAMPLE: example lpVarAt; shows examples 394 " 395 { 396 return (system("lpVarAt", p, pos)); 397 } 398 example 399 { 400 "EXAMPLE:"; echo = 2; 401 ring r = 0,(x,y),dp; 402 def R = makeLetterplaceRing(5); 403 setring R; 404 poly p = y*y*x; 405 lpVarAt(p, 3); 356 406 } 357 407 -
Singular/extra.cc
recdeb5 re39e193 1211 1211 /*==================== divide-test for freeGB =================*/ 1212 1212 #ifdef HAVE_SHIFTBBA 1213 if (strcmp(sys_cmd, "lp divides") == 0)1213 if (strcmp(sys_cmd, "lpLmDivides") == 0) 1214 1214 { 1215 1215 const short t[]={2,POLY_CMD,POLY_CMD};
Note: See TracChangeset
for help on using the changeset viewer.