Changeset bb7da7 in git for Singular/LIB/ring.lib
 Timestamp:
 Dec 31, 2000, 2:57:42 AM (23 years ago)
 Branches:
 (u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
 Children:
 7475b3f24ca6afbd3348db584a349bd5fd87f23d
 Parents:
 ff8d25468b2f699e6c418ba14d9c0e1019b263e5
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

Singular/LIB/ring.lib
rff8d25 rbb7da7 1 1 //(GMG, last modified 03.11.95) 2 2 /////////////////////////////////////////////////////////////////////////////// 3 version="$Id: ring.lib,v 1.1 4 20001222 14:33:13greuel Exp $";3 version="$Id: ring.lib,v 1.15 20001231 01:57:42 greuel Exp $"; 4 4 category="General purpose"; 5 5 info=" … … 32 32 The new ring differs from the old ring only in the characteristic. 33 33 If, say, (newr,c) = (\"R\",\"0,A\") and the ring r exists, the new 34 basering will have name R characteristic 0 and one parameter A.34 basering will have name R, characteristic 0 and one parameter A. 35 35 RETURN: No return value 36 36 NOTE: Works for qrings if map from old_char to new_char is implemented 37 37 This proc uses 'execute' or calls a procedure using 'execute'. 38 38 If you use it in your own proc, let the local names of your proc 39 start with @ (see the file HelpForProc)39 start with @. 40 40 EXAMPLE: example changechar; shows an example 41 41 " … … 89 89 NOTE: This proc uses 'execute' or calls a procedure using 'execute'. 90 90 If you use it in your own proc, let the local names of your proc 91 start with @ (see the file HelpForProc)91 start with @. 92 92 EXAMPLE: example changeord; shows an example 93 93 " … … 147 147 This proc uses 'execute' or calls a procedure using 'execute'. 148 148 If you use it in your own proc, let the local names of your proc 149 start with @ (see the file HelpForProc)149 start with @. 150 150 EXAMPLE: example changevar; shows an example 151 151 " … … 210 210 This proc uses 'execute' or calls a procedure using 'execute'. 211 211 If you use it in your own proc, let the local names of your proc 212 start with @ (see the file HelpForProc)212 start with @. 213 213 EXAMPLE: example defring; shows an example 214 214 " … … 325 325 CREATE: Define a ring with name `na` which extends the ring r by adding n new 326 326 variables in front of [after, if i!=0] the old variables and make it 327 the basering [default: (i,r)=(0,basering)] 328  The characteristic is the characteristic of r 329 327 the basering [default: (i,r)=(0,basering)]. 328 @*  The characteristic is the characteristic of r. 329 @*  The new vars are derived from va. If va is a single letter, say 330 330 va=\"T\", and if n<=26 then T and the following n1 letters from 331 331 T..Z..T (resp. T(1..n) if n>26) are taken as additional variables. 332 332 If va is a single letter followed by (, say va=\"x(\", the new 333 variables are x(1),...,x(n) 334 335 an ordering derived from `o` [and iv] 336 333 variables are x(1),...,x(n). 334 @*  The ordering is the product ordering between the ordering of r and 335 an ordering derived from `o` [and iv]. 336 @*  If o contains a 'c' or a 'C' in front resp. at the end this is 337 337 taken for the whole ordering in front resp. at the end. If o does 338 338 not contain a 'c' or a 'C' the same rule applies to ordstr(r). 339 340 like \"ds\" or \"dp(2),wp(1,2,3),Ds(2)\" or \"ds(a),dp(b),ls\" if a and b341 a re globally (!) defined integers and if a+b+1<=n339 @*  If no intvec iv is given, or if iv=0, o may be any allowed ordstr, 340 like \"ds\" or \"dp(2),wp(1,2,3),Ds(2)\" or \"ds(a),dp(b),ls\" if 341 a and b are globally (!) defined integers and if a+b+1<=n. 342 342 If, however, a and b are local to a proc calling extendring, the 343 343 intvec iv must be used to let extendring know the values of a and b 344  If an intvec iv !=0 is given, iv[1],iv[2],... is taken for the 1st, 345 2nd,... block of o, if o contains no substring \"w\" or \"W\" i.e. no 346 weighted ordering (in the above case o=\"ds,dp,ls\" and iv=a,b). 344 @*  If an intvec iv !=0 is given, iv[1],iv[2],... is taken for the 345 1st, 2nd,... block of o, if o contains no substring \"w\" or \"W\" 346 i.e. no weighted ordering (in the above case o=\"ds,dp,ls\" 347 and iv=a,b). 347 348 If o contains a weighted ordering (only one (!) weighted block is 348 349 allowed) iv[1] is taken as size for the weightvector, the next … … 392 393 if( typeof(#[1])=="intvec" and #[1]!=0 ) 393 394 { 394 @k=n; 395 @k=n; //@k counts no of vars not yet ordered 395 396 @w=find(o,"w")+find(o,"W");o=o+" "; 396 397 if( @w!=0 ) … … 448 449 ring r=0,(x,y,z),ds; 449 450 show(r);""; 450 // no intvec given, no blocksize given: blocksize is derived from no of vars451 //blocksize is derived from no of vars: 451 452 int t=5; 452 453 extendring("R1",t,"a","dp"); //t global: "dp" > "dp(5)" … … 455 456 show(R2);""; 456 457 457 //no intvec given, blocksize given: given blocksize is used 458 //no intvec given, blocksize given: given blocksize is used: 458 459 extendring("R3",4,"T(","dp(2)",0,r); // "dp(2)" > "dp(2)" 459 460 show(R3);""; … … 461 462 //intvec given: weights and blocksize is derived from given intvec 462 463 //(no specification of a blocksize in the given ordstr is allowed!) 463 //if intvec does not cover all given blocks, the last block is used for464 // the remaining variables, if intvec has too many components, the last465 // ones are ignored464 //if intvec does not cover all given blocks, the last block is used 465 //for the remaining variables, if intvec has too many components, 466 //the last ones are ignored 466 467 intvec v=3,2,3,4,1,3; 467 468 extendring("R4",10,"A","ds,ws,Dp,dp",v,0,r); … … 493 494 The 3rd argument is useful in order to avoid conflicts of names, the 494 495 empty string is allowed 495 CAUTION: fetchall does not work inside a procedure 496 //***at the moment it does not work if R contains a map496 CAUTION: fetchall does not work inside a procedure. 497 It does not work if R contains a map. 497 498 EXAMPLE: example fetchall; shows an example 498 499 " … … 510 511 example 511 512 { "EXAMPLE:"; echo=2; 512 // Th is example is not executedsince fetchall does not work in a procedure;513 // (and hence not in the example procedure). Just try the following commands:;513 // The example is not shown since fetchall does not work in a procedure; 514 // (and hence not in the example procedure). Try the following commands: 514 515 // ring R=0,(x,y,z),dp; 515 516 // ideal j=x,y2,z2; … … 517 518 // j; print(M); 518 519 // ring S=0,(a,b,c),ds; 519 // fetchall(R); //map from R to S: x>a, y>b, z>c;520 // fetchall(R); //map from R to S: x>a, y>b, z>c; 520 521 // names(S); 521 522 // j; print(M); 522 // fetchall(S,"1"); // identity map of S: copy objects, change names;523 // fetchall(S,"1"); //identity map of S: copy objects, change names 523 524 // names(S); 524 525 // kill R,S; … … 539 540 empty string is allowed 540 541 CAUTION: imapall does not work inside a procedure 541 //***at the moment it does not work if R contains a map542 It does not work if R contains a map 542 543 EXAMPLE: example imapall; shows an example 543 544 " … … 555 556 example 556 557 { "EXAMPLE:"; echo = 2; 557 // Th is example is not executedsince imapall does not work in a procedure558 // (and hence not in the example procedure). Just try the following commands:558 // The example is not shown since imapall does not work in a procedure 559 // (and hence not in the example procedure). Try the following commands: 559 560 // ring R=0,(x,y,z,u),dp; 560 561 // ideal j=x,y,z,u2+ux+z; … … 562 563 // j; print(M); 563 564 // ring S=0,(a,b,c,x,z,y),ds; 564 // imapall(R); //map from R to S: x>x, y>y, z>z, u>0565 // imapall(R); //map from R to S: x>x, y>y, z>z, u>0 565 566 // names(S); 566 567 // j; print(M); 567 // imapall(S,"1"); //identity map of S: copy objects, change names568 // imapall(S,"1"); //identity map of S: copy objects, change names 568 569 // names(S); 569 570 // kill R,S; … … 578 579 names are the same as in R. If, say, f is a poly in R and the 3rd 579 580 argument is the string \"R\", then f is maped to f_R etc. 580 RETURN: no return value 581 RETURN: no return value. 581 582 NOTE: This procedure has the same effect as defining a map, say psi, by 582 583 map psi=R,i; and then applying psi to all objects of R. In particular, … … 585 586 mapall may be combined with copyring to change vars for all objects. 586 587 The 3rd argument is useful in order to avoid conflicts of names, the 587 empty string is allowed 588 CAUTION: mapall does not work inside a procedure 588 empty string is allowed. 589 CAUTION: mapall does not work inside a procedure. 589 590 EXAMPLE: example mapall; shows an example 590 591 " … … 602 603 example 603 604 { "EXAMPLE:"; echo = 2; 604 // Th is example is not executedsince mapall does not work in a procedure605 // (and hence not in the example procedure). Just try the following commands:605 // The example is not shown since mapall does not work in a procedure 606 // (and hence not in the example procedure). Try the following commands: 606 607 // ring R=0,(x,y,z),dp; 607 608 // ideal j=x,y,z; … … 610 611 // ring S=0,(a,b,c),ds; 611 612 // ideal i=c,a,b; 612 // mapall(R,i); //map from R to S: x>c, y>a, z>b613 // mapall(R,i); //map from R to S: x>c, y>a, z>b 613 614 // names(S); 614 // j; print(M); phi; // phi is a map fromR to S: x>c2, y>a2, z>b2615 // j; print(M); phi; //phi maps R to S: x>c2, y>a2, z>b2 615 616 // ideal i1=a2,a+b,1; 616 // mapall(R,i1,\"\"); //map from R to S: x>a2, y>a+b, z>1617 // mapall(R,i1,\"\"); //map from R to S: x>a2, y>a+b, z>1 617 618 // names(S); 618 619 // j_; print(M_); phi_; 619 // changevar(\"T\",\"x()\",R); // 620 // mapall(R,maxideal(1)); //identity map from R to T620 // changevar(\"T\",\"x()\",R); //change vars in R and call result T 621 // mapall(R,maxideal(1)); //identity map from R to T 621 622 // names(T); 622 623 // j; print(M); phi; … … 737 738 setring s; 738 739 ideal i = a2+b3+c5; 739 changevar("S","x,y,z"); //set S (change vars of s to x,y,z)the basering740 changevar("S","x,y,z"); //change vars of sand make S the basering 740 741 qring qS =std(fetch(s,i)); //create qring of S mod i (maped to S) 741 changevar("T","d,e,f,g,h",t); // set T (change vars of t to d..h)the basering742 changevar("T","d,e,f,g,h",t); //change vars of t and make T the basering 742 743 qring qT=std(d2+e2f3); //create qring of T mod d2+e2f3 743 744 ringtensor("Q",s,qS,t,qT);
Note: See TracChangeset
for help on using the changeset viewer.