Changeset 2eb456 in git for Singular/LIB
- Timestamp:
- Jan 7, 2001, 3:08:19 AM (23 years ago)
- Branches:
- (u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b4f17ed1d25f93d46dbe29e4b499baecc2fd51bb')
- Children:
- 90611c96f29bf20282ba8567dc61e6aa0533155e
- Parents:
- 96388596a33e9e3d07d36f23dbbc7ee977b0506d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/algebra.lib
r963885 r2eb456 1 1 /////////////////////////////////////////////////////////////////////////////// 2 version="$Id: algebra.lib,v 1. 7 2000-12-22 13:34:59 greuel Exp $";2 version="$Id: algebra.lib,v 1.8 2001-01-07 02:08:19 greuel Exp $"; 3 3 category="Commutative Algebra"; 4 4 info=" 5 5 LIBRARY: algebra.lib Compute with Algbras and Algebra Maps 6 6 AUTHORS: Gert-Martin Greuel, greuel@mathematik.uni-kl.de, 7 8 7 @* Agnes Eileen Heydtmann, agnes@math.uni-sb.de, 8 @* Gerhard Pfister, pfister@mathematik.uni-kl.de 9 9 10 10 PROCEDURES: … … 30 30 31 31 proc algebra_containment (poly p, ideal A, list #) 32 "USAGE: algebra_containment(p,A[,k]); p poly, A ideal, k integer 33 A = A[1],...,A[m] generators of subalgebra of the basering 34 RETURN: - k=0 (or if k is not given) an integer: 35 1 : if p is contained in the subalgebra K[A[1],...,A[m]] 36 0 : if p is not contained in K[A[1],...,A[m]] 37 - k=1: a list, say l, of size 2, l[1] integer, l[2] ring, satisfying 32 "USAGE: algebra_containment(p,A[,k]); p poly, A ideal, k integer. 33 @* A = A[1],...,A[m] generators of subalgebra of the basering 34 RETURN: 35 @format 36 - k=0 (or if k is not given) an integer: 37 1 : if p is contained in the subalgebra K[A[1],...,A[m]] 38 0 : if p is not contained in K[A[1],...,A[m]] 39 - k=1 : a list, say l, of size 2, l[1] integer, l[2] ring, satisfying 38 40 l[1]=1 if p is in the subalgebra K[A[1],...,A[m]] and then the ring 39 41 l[2] contains poly check = h(y(1),...,y(m)) if p=h(A[1],...,A[m]) … … 42 44 the nonlinear relation p = h(x,A[1],...,A[m]) where 43 45 x = x(1),...,x(n) denote the variables of the basering 46 @end format 44 47 DISPLAY: if k=0 and printlevel >= voice+1 (default) display the poly check 45 NOTE: The proc inSubring uses different algorithm which is sometimes faster 48 NOTE: The proc inSubring uses a different algorithm which is sometimes 49 faster. 46 50 THEORY: The ideal of algebraic relations of the algebra generators A[1],..., 47 51 A[m] is computed introducing new variables y(i) and the product … … 91 95 dbprint(printlevel-voice+3," 92 96 // 'algebra_containment' created a ring as 2nd element of the list. 93 // This ring contains the poly check which defines the algebraic relation. 94 // To access to the ring and see check you must give the ring a name, e.g.: 95 def S = l[2]; setring S; check; 97 // The ring contains the poly check which defines the algebraic relation. 98 // To access to the ring and see check you must give the ring a name, 99 // e.g.: 100 def S = l[2]; setring S; check; 96 101 "); 97 102 return(l); … … 104 109 ideal A=x2+y2,z2,x4+y4,1,x2z-1y2z,xyz,x3y-1xy3; 105 110 poly p1=z; 106 poly p2= x10z3-x8y2z3+2x6y4z3-2x4y6z3+x2y8z3-y10z3+x6z4+3x4y2z4+3x2y4z4+y6z4;107 111 poly p2= 112 x10z3-x8y2z3+2x6y4z3-2x4y6z3+x2y8z3-y10z3+x6z4+3x4y2z4+3x2y4z4+y6z4; 108 113 algebra_containment(p1,A); 109 114 algebra_containment(p2,A); … … 118 123 proc module_containment(poly p, ideal P, ideal S, list #) 119 124 "USAGE: module_containment(p,P,M[,k]); p poly, P ideal, M ideal, k int 120 121 125 @* P = P[1],...,P[n] generators of a subalgebra of the basering, 126 @* M = M[1],...,M[m] generators of a module over the subalgebra K[P] 122 127 ASSUME: ncols(P) = nvars(basering), the P[i] are algebraically independent 123 RETURN: - k=0 (or if k is not given), an integer: 128 RETURN: 129 @format 130 - k=0 (or if k is not given), an integer: 124 131 1 : if p is contained in the module <M[1],...,M[m]> over K[P] 125 132 0 : if p is not contained in <M[1],...,M[m]> … … 132 139 the nonlinear relation p = h(x,M[1],...,M[m],P[1],...,P[n]) where 133 140 x = x(1),...,x(n) denote the variables of the basering 141 @end format 134 142 DISPLAY: the polynomial h(y(1),...,y(m),z(1),...,z(n)) if k=0, resp. 135 a comment how to access the relation check if k=1, 136 pr ovided printlevel >= voice+1 (default)143 a comment how to access the relation check if k=1, provided 144 printlevel >= voice+1 (default). 137 145 THEORY: The ideal of algebraic relations of all the generators p1,...,pn, 138 146 s1,...,st given by P and S is computed introducing new variables y(j), … … 184 192 export check; 185 193 dbprint(printlevel-voice+3," 186 // 'module_containment' created a ring as 2nd element of the list. 187 // This ring contains the poly check which defines the algebraic relation for p 188 // To access to the ring and see check you must give the ring a name, e.g.: 194 // 'module_containment' created a ring as 2nd element of the list. The 195 // ring contains the poly check which defines the algebraic relation 196 // for p. To access to the ring and see check you must give the ring 197 // a name, e.g.: 189 198 def S = l[2]; setring S; check; 190 199 "); … … 203 212 ideal P = x2+y2,z2,x4+y4; //algebra generators 204 213 ideal M = 1,x2z-1y2z,xyz,x3y-1xy3; //module generators 205 poly p1=x10z3-x8y2z3+2x6y4z3-2x4y6z3+x2y8z3-y10z3+x6z4+3x4y2z4+3x2y4z4+y6z4; 214 poly p1= 215 x10z3-x8y2z3+2x6y4z3-2x4y6z3+x2y8z3-y10z3+x6z4+3x4y2z4+3x2y4z4+y6z4; 206 216 module_containment(p1,P,M); 207 217 poly p2=z; … … 215 225 proc inSubring(poly p, ideal I) 216 226 "USAGE: inSubring(p,i); p poly, i ideal 217 RETURN: a list, say l,of size 2, l[1] integer, l[2] string 227 RETURN: 228 @format 229 a list l of size 2, l[1] integer, l[2] string 218 230 l[1]=1 iff p is in the subring generated by i=i[1],...,i[k], 219 231 and then l[2] = y(0)-h(y(1),...,y(k)) if p = h(i[1],...,i[k]) … … 221 233 and then l[2] = h(y(0),y(1),...,y(k) where p satisfies the 222 234 nonlinear relation h(p,i[1],...,i[k])=0. 235 @end format 223 236 NOTE: the proc algebra_containment tests the same with a different 224 237 algorithm, which is often faster … … 273 286 proc algDependent( ideal A, list # ) 274 287 "USAGE: algDependent(f[,c]); f ideal (say, f = f1,...,fm), c integer 275 RETURN: a list, say l, of size 2, l[1] integer, l[2] ring: 276 l[1] = 1 if f1,...,fm are algebraic dependent, 0 if not 277 l[2] is a ring with variables x(1),...,x(n),y(1),...,y(m) if the 278 basering has n variables. It contains the ideal 'ker', depending 279 only on the y(i) and generating the algebraic relations between the 280 f[i], i.e. substituting y(i) by fi yields 0. Of course, ker is 281 nothing but the kernel of the ring map 288 RETURN: 289 @format 290 a list l of size 2, l[1] integer, l[2] ring: 291 - l[1] = 1 if f1,...,fm are algebraic dependent, 0 if not 292 - l[2] is a ring with variables x(1),...,x(n),y(1),...,y(m) if the 293 basering has n variables. It contains the ideal 'ker', depending 294 only on the y(i) and generating the algebraic relations between the 295 f[i], i.e. substituting y(i) by fi yields 0. Of course, ker is 296 nothing but the kernel of the ring map 282 297 K[y(1),...,y(m)] ---> basering, y(i) --> fi. 283 Three different algorithms are used depending on c = 1,2,3. 298 @end format 299 NOTE: Three different algorithms are used depending on c = 1,2,3. 284 300 If c is not given or c=0, a heuristically best method is choosen. 285 301 The basering may be a quotient ring. … … 374 390 export(ker); 375 391 dbprint(printlevel-voice+3," 376 // The 2nd element of the list, say l, is a ring with variables x(1),...,x(n), 377 // y(1),...,y(m) if the basering has n variables and the ideal is f[1],...,f[m] 378 // It contains the ideal ker only depending on the y(i) and generating the 379 // relations between the f[i], i.e. substituting y(i) by f[i] yields 0. 380 // To access to the ring and see ker you must give the ring a name, e.g.: 381 def S = l[2]; setring S; ker; 392 // The 2nd element of the list l is a ring with variables x(1),...,x(n), 393 // and y(1),...,y(m) if the basering has n variables and if the ideal 394 // is f[1],...,f[m]. The ring contains the ideal ker which depends only 395 // on the y(i) and generates the relations between the f[i]. 396 // I.e. substituting y(i) by f[i] yields 0. 397 // To access to the ring and see ker you must give the ring a name, 398 // e.g.: 399 def S = l[2]; setring S; ker; 382 400 "); 383 401 return (L); … … 398 416 proc alg_kernel( map phi, pr, list #) 399 417 "USAGE: alg_kernel(phi,pr[,s,c]); phi map to basering, pr preimage ring, 400 s string (name of kernel in pr), c integer 401 RETURN: a string, the kernel of phi as string 402 If, moreover, a string s is given, the algorithm creates, in pr,403 the kernel of phi with name equal tos.418 s string (name of kernel in pr), c integer. 419 RETURN: a string, the kernel of phi as string. 420 If, moreover, a string s is given, the algorithm creates, in the 421 preimage ring pr the kernel of phi with name s. 404 422 Three differnt algorithms are used depending on c = 1,2,3. 405 423 If c is not given or c=0, a heuristically best method is choosen. 406 424 (alogrithm 1 uses the preimage command) 407 NOTE: The basering may be a quotient ring. 425 NOTE: Since the kernel of phi lives in pr, it cannot be returned to the 426 basering. If s is given, the user has access to it in pr via s. 427 The basering may be a quotient ring. 408 428 EXAMPLE: example alg_kernel; shows an example 409 429 " … … 455 475 ring s = 0,(x,y,z,u,v,w),dp; 456 476 ideal I = x-w,u2w+1,yz-v; 457 map phi = r,I; 458 alg_kernel(phi,r); 477 map phi = r,I; // a map from r to s: 478 alg_kernel(phi,r); // a,b,c ---> x-w,u2w+1,yz-v 459 479 460 480 ring S = 0,(a,b,c),ds; … … 462 482 qring Q = std(x-y); 463 483 ideal i = x, y, x2-y3; 464 map phi = S,i; // a map to a quotient ring 465 alg_kernel(phi,S,"ker",3); // uses algorithm 3 466 setring S; // you have access to kernel in preimage 467 // setring preimage(phi); ## wenn realisiert ## 484 map phi = S,i; // a map to a quotient ring 485 alg_kernel(phi,S,"ker",3); // uses algorithm 3 486 setring S; // you have access to kernel in preimage 468 487 ker; 469 488 } … … 472 491 proc is_injective( map phi, pr,list #) 473 492 "USAGE: is_injective(phi[,c,s]); phi map, pr reimage ring, c int, s string 474 RETURN: - 1 (type int) if phi is injective, 0 if not (if s is not given). 475 - If s is given, return a list, say l, of size 2, l[1] int, l[2] ring: 476 l[1] = 1 if phi is injective, 0 if not 493 RETURN: 494 @format 495 - 1 (type int) if phi is injective, 0 if not (if s is not given). 496 - If s is given, return a list l of size 2, l[1] int, l[2] ring: 497 l[1] is 1 if phi is injective, 0 if not 477 498 l[2] is a ring with variables x(1),...,x(n),y(1),...,y(m) if the 478 499 basering has n variables and the map m components, it contains the 479 500 ideal 'ker', depending only on the y(i), the kernel of the given map 480 Three differnt algorithms are used depending on c = 1,2,3. 501 @end format 502 NOTE: Three differnt algorithms are used depending on c = 1,2,3. 481 503 If c is not given or c=0, a heuristically best method is choosen. 482 NOTE:The basering may be a quotient ring. However, if the preimage ring is504 The basering may be a quotient ring. However, if the preimage ring is 483 505 a quotient ring, say pr = P/I, consider phi as a map from P and then 484 506 the algorithm returns 1 if the kernel of phi is 0 mod I. … … 535 557 { 536 558 dbprint(printlevel-voice+3," 537 // The 2nd element of the list is a ring with variables x(1),...,x(n),y(1), 538 // ...,y(m) if the basering has n variables and the map is, say, F[1],...,F[m]. 559 // The 2nd element of the list is a ring with variables x(1),...,x(n), 560 // y(1),...,y(m) if the basering has n variables and the map is 561 // F[1],...,F[m]. 539 562 // It contains the ideal ker, the kernel of the given map y(i) --> F[i]. 540 // To access to the ring and see ker you must give the ring a name, e.g.: 563 // To access to the ring and see ker you must give the ring a name, 564 // e.g.: 541 565 def S = l[2]; setring S; ker; 542 566 "); … … 546 570 example 547 571 { "EXAMPLE:"; echo = 2; 548 int p = printlevel; printlevel = 1;572 int p = printlevel; 549 573 ring r = 0,(a,b,c),ds; 550 574 ring s = 0,(x,y,z,u,v,w),dp; … … 559 583 def S = l[2]; setring S; 560 584 ker; 561 562 printlevel = p; 563 } 585 } 564 586 /////////////////////////////////////////////////////////////////////////////// 565 587 … … 637 659 To interprete this for local/mixed orderings, or for quotient rings 638 660 type help is_surjective; and help is_injective; 639 DISPLAY: Comment if printlevel >= voice-1 (default)661 DISPLAY: A comment if printlevel >= voice-1 (default) 640 662 EXAMPLE: example is_bijective; shows an example 641 663 " … … 731 753 proc noetherNormal(ideal i, list #) 732 754 "USAGE: noetherNormal(id[,p]); id ideal, p integer 733 RETURN: a list of two ideals, say I,J: I is generated by a subset of the 734 variables with size(I) = dim(id) and J defines a map (coordinate 735 change in the basering), such that, if we define map phi=basering,J; 736 then k[var(1),...,var(n)]/phi(id) is finite over k[I] 755 RETURN: 756 @format 757 a list l two ideals, say I,J: 758 - I is generated by a subset of the variables with size(I) = dim(id) 759 - J defines a map (coordinate change in the basering), such that: 760 if we define map phi=basering,J; 761 then k[var(1),...,var(n)]/phi(id) is finite over k[I]. 737 762 If p is given, 0<=p<=100, a sparse coordinate change with p percent 738 763 of the matrix entries being 0 (default: p=0 i.e. dense) 739 NOTE: designed for characteristic 0, works also in char k > 0 if it 740 terminates, may result in an infinite loop in small characteristic 764 @end format 765 NOTE: Designed for characteristic 0.It works also in char k > 0 if it 766 terminates,but may result in an infinite loop in small characteristic 741 767 EXAMPLE: example noetherNormal; shows an example 742 768 " … … 838 864 proc finitenessTest(ideal i,list #) 839 865 "USAGE: finitenessTest(J[,v]); J ideal, v intvec (say v1,...,vr with vi>0) 840 RETURN: a list, say l, with l[1] integer, l[2], l[3], l[4] ideals 841 l[1] = 1 if var(v1),...,var(vr) are in l[2] and 0 else 842 l[2] (resp. l[3]) contains those variables which occur, (resp. occur 843 not) as pure power in the leading term of one of the generators of J, 844 l[4] contains those J[i] for which the leading term is a pure power 845 of a variable (which is then in l[2]) 866 RETURN: 867 @format 868 a list l with l[1] integer, l[2], l[3], l[4] ideals 869 - l[1] = 1 if var(v1),...,var(vr) are in l[2] and 0 else 870 - l[2] (resp. l[3]) contains those variables which occur, 871 (resp. occur not) as pure power in the leading term of one of the 872 generators of J, 873 - l[4] contains those J[i] for which the leading term is a pure power 874 of a variable (which is then in l[2]) 846 875 (default: v = [1,2,..,nvars(basering)]) 876 @end format 847 877 THEORY: If J is a standard basis of an ideal generated by x_1 - f_1(y),..., 848 878 x_n - f_n with y_j ordered lexicographically and y_j >> x_i, then, 849 if y_i appears as pure power in the leading term of J[k] ,J[k] defines879 if y_i appears as pure power in the leading term of J[k]. J[k] defines 850 880 an integral relation for y_i over the y_(i+1),... and the f's. 851 881 Moreover, in this situation, if l[2] = y_1,...,y_r, then K[y_1,...y_r] … … 915 945 proc mapIsFinite(map phi, R, list #) 916 946 "USAGE: mapIsFinite(phi,R[,J]); R a ring, phi: R ---> basering a map 917 [J an ideal in the basering, J = 0 if not given]947 J an ideal in the basering, J = 0 if not given 918 948 RETURN: 1 if R ---> basering/J is finite and 0 else 919 949 EXAMPLE: example mapIsFinite; shows an example
Note: See TracChangeset
for help on using the changeset viewer.