Changeset d2b2a7 in git for Singular/LIB/poly.lib
- Timestamp:
- May 5, 1998, 1:55:40 PM (26 years ago)
- Branches:
- (u'spielwiese', 'ec94ef7a30b928574c0c3daf41f6804dff5f6b69')
- Children:
- 97f92aa6d280f6022eaae47195ccc02503ccb984
- Parents:
- 4996f5286c7671191ad22e654499fd8b752fe4f0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/poly.lib
r4996f52 rd2b2a7 1 // $Id: poly.lib,v 1.1 1 1998-04-06 17:59:38 obachmanExp $1 // $Id: poly.lib,v 1.12 1998-05-05 11:55:33 krueger Exp $ 2 2 //system("random",787422842); 3 3 //(GMG, last modified 22.06.96) … … 5 5 /////////////////////////////////////////////////////////////////////////////// 6 6 7 version="$Id: poly.lib,v 1.1 1 1998-04-06 17:59:38 obachmanExp $";7 version="$Id: poly.lib,v 1.12 1998-05-05 11:55:33 krueger Exp $"; 8 8 info=" 9 9 LIBRARY: poly.lib PROCEDURES FOR MANIPULATING POLYS, IDEALS, MODULES … … 30 30 31 31 proc cyclic (int n) 32 USAGE: cyclic(n); n integer32 "USAGE: cyclic(n); n integer 33 33 RETURN: ideal of cyclic n-roots from 1-st n variables of basering 34 34 EXAMPLE: example cyclic; shows examples 35 " 35 36 { 36 37 //----------------------------- procedure body -------------------------------- … … 58 59 59 60 proc katsura 60 USAGE: katsura([n]); n integer61 "USAGE: katsura([n]); n integer 61 62 RETURN: katsura(n) : n-th katsura ideal of newly created and set ring 62 63 (32003, x(0..n), dp) 63 64 katsura() : katsura ideal of basering 64 65 EXAMPLE: example katsura; shows examples 66 " 65 67 { 66 68 if ( size(#) == 1 && typeof(#[1]) == "int") … … 111 113 112 114 proc freerank 113 USAGE: freerank(M[,any]); M=poly/ideal/vector/module/matrix115 "USAGE: freerank(M[,any]); M=poly/ideal/vector/module/matrix 114 116 COMPUTE: rank of module presented by M in case it is free. By definition this 115 117 is vdim(coker(M)/m*coker(M)) if coker(M) is free, where m = maximal … … 124 126 //betti(0) ist -1 statt 0 125 127 EXAMPLE: example freerank; shows examples 128 " 126 129 { 127 130 int rk; … … 148 151 149 152 proc is_homog (id) 150 USAGE: is_homog(id); id poly/ideal/vector/module/matrix153 "USAGE: is_homog(id); id poly/ideal/vector/module/matrix 151 154 RETURN: integer which is 1 if input is homogeneous (resp. weighted homogeneous 152 155 if the monomial ordering consists of one block of type ws,Ws,wp or Wp, … … 157 160 //*** ergaenzen, wenn Matrizen-Spalten Gewichte haben 158 161 EXAMPLE: example is_homog; shows examples 162 " 159 163 { 160 164 //----------------------------- procedure body -------------------------------- … … 186 190 187 191 proc is_zero 188 USAGE: is_zero(M[,any]); M=poly/ideal/vector/module/matrix192 "USAGE: is_zero(M[,any]); M=poly/ideal/vector/module/matrix 189 193 RETURN: integer, 1 if coker(M)=0 resp. 0 if coker(M)!=0, where M is considered 190 194 as matrix … … 193 197 L[2] = dim(M) 194 198 EXAMPLE: example is_zero; shows examples 199 " 195 200 { 196 201 int d=dim(std(#[1])); … … 211 216 212 217 proc maxcoef (f) 213 USAGE: maxcoef(f); f poly/ideal/vector/module/matrix218 "USAGE: maxcoef(f); f poly/ideal/vector/module/matrix 214 219 RETURN: maximal length of coefficient of f of type int (by counting the 215 220 length of the string of each coefficient) 216 221 EXAMPLE: example maxcoef; shows examples 222 " 217 223 { 218 224 //----------------------------- procedure body -------------------------------- … … 247 253 248 254 proc maxdeg (id) 249 USAGE: maxdeg(id); id poly/ideal/vector/module/matrix255 "USAGE: maxdeg(id); id poly/ideal/vector/module/matrix 250 256 RETURN: int/intmat, each component equals maximal degree of monomials in the 251 257 corresponding component of id, independent of ring ordering … … 255 261 an option for computing weighted degrees 256 262 EXAMPLE: example maxdeg; shows examples 263 " 257 264 { 258 265 //-------- subprocedure to find maximal degree of given component ---------- … … 300 307 301 308 proc maxdeg1 (id,list #) 302 USAGE: maxdeg1(id[,v]); id=poly/ideal/vector/module/matrix, v=intvec309 "USAGE: maxdeg1(id[,v]); id=poly/ideal/vector/module/matrix, v=intvec 303 310 RETURN: integer, maximal [weighted] degree of monomials of id independent of 304 311 ring ordering, maxdeg1 of i-th variable is v[i] (default: v=1..1). … … 307 314 maxdeg is faster 308 315 EXAMPLE: example maxdeg1; shows examples 316 " 309 317 { 310 318 //-------- subprocedure to find maximal degree of given component ---------- … … 381 389 382 390 proc mindeg (id) 383 USAGE: mindeg(id); id poly/ideal/vector/module/matrix391 "USAGE: mindeg(id); id poly/ideal/vector/module/matrix 384 392 RETURN: minimal degree/s of monomials of id, independent of ring ordering 385 393 (mindeg of each variable is 1) of type int if id of type poly, else … … 388 396 has an option for computing weighted degrees. 389 397 EXAMPLE: example mindeg; shows examples 398 " 390 399 { 391 400 //--------- subprocedure to find minimal degree of given component --------- … … 434 443 435 444 proc mindeg1 (id, list #) 436 USAGE: mindeg1(id[,v]); id=poly/ideal/vector/module/matrix, v=intvec445 "USAGE: mindeg1(id[,v]); id=poly/ideal/vector/module/matrix, v=intvec 437 446 RETURN: integer, minimal [weighted] degree of monomials of id independent of 438 447 ring ordering, mindeg1 of i-th variable is v[i] (default v=1..1). … … 441 450 mindeg is faster. 442 451 EXAMPLE: example mindeg1; shows examples 452 " 443 453 { 444 454 //--------- subprocedure to find minimal degree of given component --------- … … 514 524 515 525 proc normalize (id) 516 USAGE: normalize(id); id=poly/vector/ideal/module526 "USAGE: normalize(id); id=poly/vector/ideal/module 517 527 RETURN: object of same type with leading coefficient equal to 1 518 528 EXAMPLE: example normalize; shows an example 529 " 519 530 { 520 531 return(simplify(id,1)); … … 543 554 //////////////////////////////////////////////////////////////////////////////// 544 555 proc rad_con (poly g,ideal I) 545 USAGE: rad_con(<poly>,<ideal>);556 " USAGE: rad_con(<poly>,<ideal>); 546 557 RETURNS: 1 (TRUE) (type <int>) if <poly> is contained in the radical of 547 558 <ideal>, 0 (FALSE) (type <int>) otherwise 548 559 EXAMPLE: example rad_con; shows an example 560 " 549 561 { def br=basering; 550 562 int n=nvars(br); … … 582 594 583 595 proc lcm (ideal i) 584 USAGE: lcm(i); i ideal596 "USAGE: lcm(i); i ideal 585 597 RETURN: poly = lcm(i[1],...,i[size(i)]) 586 598 NOTE: 587 599 EXAMPLE: example lcm; shows an example 600 " 588 601 { 589 602 int k,j; … … 636 649 637 650 proc content(f) 638 USAGE: content(f); f polynomial/vector651 "USAGE: content(f); f polynomial/vector 639 652 RETURN: number, the content (greatest common factor of coefficients) 640 653 of the polynomial/vector f 641 654 EXAMPLE: example content; shows an example 655 " 642 656 { 643 657 return(leadcoef(f)/leadcoef(cleardenom(f)));
Note: See TracChangeset
for help on using the changeset viewer.