Changeset 35f23d in git
 Timestamp:
 Dec 18, 2000, 2:20:12 PM (22 years ago)
 Branches:
 (u'jengelhdatetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '00e2e9c41af3fde1273eb3633f4c0c7c3db2579d')
 Children:
 bef194c40c7211201f3f9a4d7e603ecf1724d415
 Parents:
 e702a986aff8bbd94084d372e0fdda3ca1652064
 Location:
 Singular/LIB
 Files:

 1 added
 2 edited
Legend:
 Unmodified
 Added
 Removed

Singular/LIB/rinvar.lib
re702a98 r35f23d 1 // rinvar.lib 2 // Invariants of reductive groups 3 // 4 // Implementation by : Thomas Bayer 5 // Current Adress: 6 // Institut fuer Informatik, Technische Universitaet Muenchen 7 // www: http://wwwmayr.informatik.tumuenchen.de/personen/bayert/ 8 // email : bayert@in.tum.de 9 // 10 // Last change 10.12.2000 11 // 12 // written in the frame of the diploma thesis (advisor: Prof. GertMartin Greuel) 13 // "Computations of moduli spaces of semiquasihomogenous singularities and an 14 // implementation in Singular" 15 // Arbeitsgruppe Algebraische Geometrie, Fachbereich Mathematik, 16 // Universitaet Kaiserslautern 17 /////////////////////////////////////////////////////////////////////////////// 18 19 version="$Id: rinvar.lib,v 1.2 20001211 13:15:38 Singular Exp $"; 1 /////////////////////////////////////////////////////////////////////////////// 2 version="Id: rinvar.lib,v 1.0 2000/12/10 17:32:15 Singular Exp $"; 20 3 info=" 21 4 LIBRARY: rinvar.lib PROCEDURES FOR INVARIANT RINGS OF REDUCTIVE GROUPS … … 41 24 "; 42 25 26 // NOTE: This library has been written in the frame of the diploma thesis 27 // 'Computing moduli spaces of semiquasihomogeneous singularites and an 28 // implementation in Singular', Arbeitsgruppe Algebraische Geometrie, 29 // Fachbereich Mathematik, University Kaiserslautern, 30 // Advisor: Prof. GertMartin Greuel 31 32 43 33 LIB "presolve.lib"; 44 34 LIB "elim.lib"; … … 49 39 proc EquationsOfEmbedding(ideal embedding, int nrs) 50 40 "USAGE: EquationsOfEmbedding(embedding, s); ideal embedding; int s; 51 PUR OPSE: compute the ideal of the variety parameterized by 'embedding' by41 PURPOSE: compute the ideal of the variety parameterized by 'embedding' by 52 42 implicitation and change the variables to the old ones. 53 43 RETURN: ideal … … 79 69 proc ImageGroup(ideal Grp, ideal Gaction) 80 70 "USAGE: ImageGroup(G, action); ideal G, action; 81 PUR OPSE: compute the ideal of the image of G in GL(m,K) induced by the linear71 PURPOSE: compute the ideal of the image of G in GL(m,K) induced by the linear 82 72 action 'action', where G is an algebraic group and 'action' defines 83 73 an action of G on K^m (size(action) = m). … … 95 85 K[t_1,...,t_m] > K[s_1,...,s_r,t_1,...,t_m]/G 96 86 t_i > f_i(s_1,...,s_r,t_1,...,t_m) 87 97 88 EXAMPLE: example ImageGroup; shows an example 98 89 " … … 207 198 proc HilbertWeights(ideal I, wt) 208 199 "USAGE: HilbertWeights(I, w); ideal I, intvec wt 209 PUR OPSE: compute the weights of the "slack" varaibles needed for the200 PURPOSE: compute the weights of the "slack" varaibles needed for the 210 201 computation of the algebraic relations of the generators of 'I' s.t. 211 202 the Hilbert driven 'std' can be used. … … 226 217 proc HilbertSeries(ideal I, wt) 227 218 "USAGE: HilbertSeries(I, w); ideal I, intvec wt 228 PUR OPSE: compute the polynomial p of the Hilbert Series,represented by p/q, of219 PURPOSE: compute the polynomial p of the Hilbert Series,represented by p/q, of 229 220 the ring K[t_1,...,t_m,y_1,...,y_r]/I1 where 'w' are the weights of 230 221 the variables, computed, e.g., by 'HilbertWeights', 'I1' is of the … … 251 242 proc HilbertSeries1(wt) 252 243 "USAGE: HilbertSeries1(wt); ideal I, intvec wt 253 PUR OPSE: compute the polynomial p of the Hilbert Series represented by p/q of244 PURPOSE: compute the polynomial p of the Hilbert Series represented by p/q of 254 245 the ring K[t_1,...,t_m,y_1,...,y_r]/I where I is a complete inter 255 246 section and the generator I[i] has degree wt[i] 256 247 RETURN: poly 248 EXAMPLE: 257 249 " 258 250 { … … 280 272 proc ImageVariety(ideal I, F, list #) 281 273 "USAGE: ImageVariety(ideal I, F [, w]);ideal I; F is a list/ideal, intvec w. 282 PUR OPSE: compute the Zariski closure of the image of the variety of I under274 PURPOSE: compute the Zariski closure of the image of the variety of I under 283 275 the morphism F. 284 276 NOTE: if 'I' and 'F' are quasihomogenous w.r.t. 'w' then the Hilbertdriven … … 366 358 proc LinearizeAction(ideal Grp, Gaction, int nrs) 367 359 "USAGE: LinearizeAction(G,action,r); ideal G, action; int r 368 PUR OPSE: linearize the group action 'action' and find an equivariant embedding369 of K^m where m = size(action).360 PURPOSE: linearize the group action 'action' and find an equivariant 361 embedding of K^m where m = size(action). 370 362 ASSUME: G contains only variables var(1..r) (r = nrs) 371 363 basering = K[s(1..r),t(1..m)], K = Q or K = Q(a) and minpoly != 0. 372 RETURN: polynomial ring contianing the ideals 'actionid', 'embedid','groupid'364 RETURN: polynomial ring contianing the ideals 'actionid','embedid','groupid' 373 365  'actionid' is the ideal defining the linearized action of G 374  'embedid' is a parameterization of an equivariant embedding (closed)366  'embedid' is a parameterization of an equivariant embedding 375 367  'groupid' is the ideal of G in the new ring 376 368 NOTE: set printlevel > 0 to see a trace … … 511 503 proc LinearActionQ(Gaction, int nrs) 512 504 "USAGE: LinearActionQ(action,nrs,nrt); ideal action, int nrs 513 PUR OPSE: check if the action defined by 'action' is linear w.r.t. the variables505 PURPOSE: check if the action defined by 'action' is linear wrt. the variables 514 506 var(nrs + 1...nvars(basering)). 515 507 RETURN: 0 action not linear … … 526 518 loop = 1; 527 519 i = 1; 528 while(loop) 529 { 520 while(loop){ 530 521 if(deg(Gaction[i], wt) > 1) { loop = 0; } 531 else 532 { 522 else { 533 523 i++; 534 524 if(i > ncols(Gaction)) { loop = 0;} … … 549 539 proc LinearCombinationQ(ideal I, poly f) 550 540 "USAGE: LinearCombination(I, f); ideal I, poly f 551 PUR OPSE: test if f can be written as a linear combination of the generators of I.552 RETURN: 0 fis not a linear combination553 1 fis a linear combination541 PURPOSE: test if f can be written as a linear combination of the gens. of I 542 RETURN: 0 'f' is not a linear combination 543 1 'f' is a linear combination 554 544 " 555 545 { … … 567 557 loop = 1; 568 558 i = 1; 569 while(loop) 570 { // look for a linear relation containing Y(nr) 571 if(deg(imageid[i]) == 1) 572 { 559 while(loop) { // look for a linear relation containing Y(nr) 560 if(deg(imageid[i]) == 1) { 573 561 coMx = coef(imageid[i], var(sizeJ)); 574 if(coMx[1,1] == var(sizeJ)) 575 { 562 if(coMx[1,1] == var(sizeJ)) { 576 563 relation = imageid[i]; 577 564 loop = 0; 578 565 } 579 566 } 580 else 581 { 567 else { 582 568 i++; 583 569 if(i > ncols(imageid)) { loop = 0;} … … 591 577 proc InvariantRing(ideal G, ideal action, list #) 592 578 "USAGE: InvariantRing(G, Gact [, opt]); ideal G, Gact; int opt 593 PUR OPSE: compute generators of the invariant ring of G w.r.t. the action 'Gact'579 PURPOSE: compute generators of the invariant ring of G wrt. the action 'Gact' 594 580 ASSUME: G is a finite group and 'Gact' is a linear action. 595 581 RETURN: polynomial ring over a simple extension of the groundfield of the … … 598 584  'invars' contains the algebragenerators of the invariant ring 599 585  'groupid' is the ideal of G in the new ring 600  'newA' if the minpoly changes this is the new representation of the601 algebraic number, otherwise it is set to 'a'.586  'newA' if the minpoly changes this is the new representation of 587 the algebraic number, otherwise it is set to 'a'. 602 588 NOTE: the delivered ring might have a different minimal polynomial 603 589 EXAMPLE: example InvariantRing; shows an example … … 649 635 export(RORN); 650 636 ideal groupid = std(id); 637 kill(id); 651 638 attrib(groupid, "isSB", 1); 652 639 ideal action = actionid; … … 713 700 proc InvariantQ(poly f, ideal G, action) 714 701 "USAGE: InvariantQ(f, G, action); poly f; ideal G, action 715 PUR OPSE: check if the polynomial f is invariant w.r.t. G where G acts via702 PURPOSE: check if the polynomial f is invariant w.r.t. G where G acts via 716 703 'action' on K^m. 717 704 ASSUME: basering = K[s_1,...,s_m,t_1,...,t_m] where K = Q of K = Q(a) and … … 738 725 proc MinimalDecomposition(poly f, int nrs, int nrt) 739 726 "USAGE: MinimalDecomposition(f,a,b); poly f; int a, b. 740 PUR OPSE: decompose f as a sum M[1,1]*M[2,1] + ... + M[1,r]*M[2,r] where M[1,i]741 contains only s(1..a), M[2,i] contains only t(1...b) s .t. r is minimal742 ASSUME: f polynomial in K[s(1..a),t(1..b)], 727 PURPOSE: decompose f as a sum M[1,1]*M[2,1] + ... + M[1,r]*M[2,r] where M[1,i] 728 contains only s(1..a), M[2,i] contains only t(1...b) st. r is minimal 729 ASSUME: f polynomial in K[s(1..a),t(1..b)],K = Q or K = Q(a) and minpoly != 0 743 730 RETURN: 2 x r matrix M s.t. f = M[1,1]*M[2,1] + ... + M[1,r]*M[2,r] 744 731 EXAMPLE: example MinimalDecomposition; … … 834 821 proc NullCone(ideal G, action) 835 822 "USAGE: NullCone(G, action); ideal G, action 836 PUR OPSE: compute the ideal of the nullcone of the linear action of G on K^n,823 PURPOSE: compute the ideal of the nullcone of the linear action of G on K^n, 837 824 given by 'action', by means of Deksen's algorithm 838 825 ASSUME: basering = K[s(1..r),t(1..n)], K = Q or K = Q(a) and minpoly != 0, … … 840 827 'action' is a linear group action of G on K^n (n = ncols(action)) 841 828 RETURN: ideal of the nullcone of G. 842 NOTE: the generators of the nullcone are homogenous, but i .g. not invariant829 NOTE: the generators of the nullcone are homogenous, but ig. not invariant 843 830 EXAMPLE: example NullCone; shows an example 844 831 " … … 909 896 proc ReynoldsOperator(ideal Grp, ideal Gaction, list #) 910 897 "USAGE: ReynoldsOperator(G, action [, opt); ideal G, action; int opt 911 PUR OPSE: compute the Reynolds operator of the group G which act via 'action'898 PURPOSE: compute the Reynolds operator of the group G which act via 'action' 912 899 RETURN: polynomial ring R over a simple extension of the groundfield of the 913 900 basering (the extension might be trivial), containing a list … … 920 907 basering does not contain a parameter then 'newA' = 'a'. 921 908 ASSUME: basering = K[s(1..r),t(1..n)], K = Q or K = Q(a') and minpoly != 0, 922 G is the ideal of a finite group in K[s(1..r)], 909 G is the ideal of a finite group in K[s(1..r)],'action' is a linear 923 910 group action of G 924 911 EXAMPLE: example ReynoldsOperator; shows an example … … 968 955 proc ReynoldsImage(list reynoldsOp, poly f) 969 956 "USAGE: ReynoldsImage(RO, f); list RO, poly f 970 PUR OPSE: compute the Reynolds image of the polynomial f where RO represents957 PURPOSE: compute the Reynolds image of the polynomial f where RO represents 971 958 the Reynolds operator 972 959 RETURN: poly … … 987 974 static proc SimplifyCoefficientMatrix(matrix coefMatrix) 988 975 "USAGE: SimplifyCoefficientMatrix(M); M matrix coming from coef(...) 989 PUR OPSE: simplify the matrix, i.e. find linear dependencies among the columns976 PURPOSE: simplify the matrix, i.e. find linear dependencies among the columns 990 977 RETURN: matrix M, f = M[1,1]*M[2,1] + ... + M[1,n]*M[2,n] 991 978 " … … 1022 1009 1023 1010 proc SimplifyIdeal(ideal I, list #) 1024 "USAGE: SimplifyIdeal(I [,m, name]); ideal I; int m, string name "1011 "USAGE: SimplifyIdeal(I [,m, name]); ideal I; int m, string name 1025 1012 PURPOSE: simplify ideal I to the ideal I', do not change the names of the 1026 1013 first m variables, new ideal I' might contain less variables. … … 1028 1015 RETURN: list 1029 1016 _[1] ideal I' 1030 _[2] ideal representing a map phi to a ring with probably less vars. s.t.1031 phi(I) = I'1017 _[2] ideal representing a map phi to a ring with probably less 1018 varsiables s.t. phi(I) = I' 1032 1019 _[3] list of variables 1033 1020 _[4] list from 'elimpart' 1021 NOTE: 1034 1022 " 1035 1023 { … … 1043 1031 mapId = sList[5]; 1044 1032 1045 if(size(#) > 0) 1046 { 1033 if(size(#) > 0) { 1047 1034 m = #[1]; 1048 1035 nameCMD = #[2]; … … 1050 1037 else { m = 0;} // nvars(basering); 1051 1038 k = 0; 1052 for(i = 1; i <= nvars(basering); i++) 1053 { 1054 if(sList[4][i] != 0) 1055 { 1039 for(i = 1; i <= nvars(basering); i++) { 1040 if(sList[4][i] != 0) { 1056 1041 k++; 1057 1042 if(k <= m) { mId[i] = sList[4][i]; } … … 1072 1057 static proc TransferIdeal(R, string name, poly newA) 1073 1058 " USAGE: TransferIdeal(R, name, newA); ring R, string name, poly newA 1074 PUR OPSE: Maps an ideal with name 'name' in R to the basering, s.t. all1059 PURPOSE: Maps an ideal with name 'name' in R to the basering, s.t. all 1075 1060 variables are fixed but par(1) is replaced by 'newA'. 1076 1061 RETURN: ideal 1077 NOTE: this is used to transfor an idealif the minimal polynomial has changed1062 NOTE: this is used to transfor ideals if the minimal polynomial has changed 1078 1063 " 1079 1064 { … … 1095 1080 { 1096 1081 poly f = 1; 1097 for(int i = 1; i <= size(index); i++) 1098 {1082 1083 for(int i = 1; i <= size(index); i++) { 1099 1084 f = f * var(index[i]); 1100 1085 } 
Singular/LIB/zeroset.lib
re702a98 r35f23d 1 // Zeroset.lib 2 // Algorithms for finding the zeroset of a zerodim. ideal in Q(a)[x_1,..x_n], 3 // Roots and Factorization of univariate polynomials over Q(a)[t] 4 // where a is an algebric number 5 // 6 // Implementation by : Thomas Bayer 7 // Current Adress: 8 // Institut fuer Informatik, Technische Universitaet Muenchen 9 // www: http://wwwmayr.informatik.tumuenchen.de/personen/bayert/ 10 // email : bayert@in.tum.de 11 // 12 // Last change 10.12.2000 13 // 14 // written in the frame of the diploma thesis (advisor: Prof. GertMartin Greuel) 15 // "Computations of moduli spaces of semiquasihomogenous singularities and an 16 // implementation in Singular" 17 // Arbeitsgruppe Algebraische Geometrie, Fachbereich Mathematik, 18 // Universitaet Kaiserslautern 19 /////////////////////////////////////////////////////////////////////////////// 20 21 version="$Id: zeroset.lib,v 1.2 20001211 13:15:38 Singular Exp $"; 1 /////////////////////////////////////////////////////////////////////////////// 2 version="Id: zeroset.lib,v 1.0 2000/05/19 12:32:15 Singular Exp $"; 22 3 info=" 23 4 LIBRARY: zeroset.lib PROCEDURES FOR ROOTS AND FACTORIZATION 24 5 25 AUTHOR: Thomas Bayer, email: tbayer@mathematik.unikl.de6 AUTHOR: Thomas Bayer, email: bayert@in.tum.de 26 7 27 8 PROCEDURES: 9 28 10 EGCD(f, g) gcd over an algebraic extension field of Q 29 11 Factor(f) factorization of f over an algebraic extension field 30 InvertNumber(c) inverts an element of an alge nraic extension field12 InvertNumber(c) inverts an element of an algebraic extension field 31 13 LinearZeroSet(I) find the linear (partial) solution of I 32 14 Quotient(f, g) quotient q of f w.r.t. g (in f = q*g + remainder) 33 15 Remainder(f,g) remainder of the division of f by g 34 16 Roots(f) computes all roots of f in an extension field of Q 35 SQFRNorm(f) norm of f (f must be square free)17 SQFRNorm(f) norm of f (f must be squarefree) 36 18 ZeroSet(I) zeroset of the 0dim. ideal I 37 19 38 SUBPROCEDURES: 20 SUB PROCEDURES: 21 39 22 EGCDMain(f, g) gcd over an algebraic extension field of Q 40 23 FactorMain(f) factorization of f over an algebraic extension field 41 InvertNumberMain(c) inverts an element of an alge nraic extension field24 InvertNumberMain(c) inverts an element of an algebraic extension field 42 25 QuotientMain(f, g) quotient of f w.r.t. g 43 26 RemainderMain(f,g) remainder of the division of f by g 44 RootsMain(f) computes all roots of f, 45 SQFRNormMain(f) norm of f (f must be square free)27 RootsMain(f) computes all roots of f,might extend the groundfield 28 SQFRNormMain(f) norm of f (f must be squarefree) 46 29 ContainedQ(data, f) f in data ? 47 30 SameQ(a, b) a == b (list a,b) … … 60 43 "; 61 44 62 LIB "primitiv.lib"; 63 LIB "primdec.lib"; 45 // NOTE: This library has been written in the frame of the diploma thesis 46 // 'Computing moduli spaces of semiquasihomogeneous singularites and an 47 // implementation in Singular', Arbeitsgruppe Algebraische Geometrie, 48 // Fachbereich Mathematik, University Kaiserslautern, 49 // Advisor: Prof. GertMartin Greuel 64 50 65 51 // note : return a ring : ring need not be exported !!! 66 52 67 // Ar tihmetic in Q(a)[x] without builtin procedures53 // Arithmetic in Q(a)[x] without builtin procedures 68 54 // assume basering = Q[x,a] and minpoly is represented by mpoly(a). 69 55 // the algorithms are taken from "Polynomial Algorithms in Computer Algebra", … … 72 58 73 59 // To do : 74 // square free factorization60 // squarefree factorization 75 61 // multiplicities 76 62 77 63 // Improvement : 78 64 // a main problem is the growth of the coefficients. Try Roots(x7  1) 79 // ret rurn ideal mpoly !65 // return ideal mpoly ! 80 66 // mpoly is not monic, comes from primitive_extra 81 67 82 // IMPLEMENTATION 68 // IMPLEMENTATION (last change: 10.12.2000) 83 69 // 84 70 // In procedures with name 'procname'Main a polynomial ring over a simple … … 86 72 // 'mpoly' (attribute "isSB"). The arithmetic in the extension field is 87 73 // implemented in the procedures in the procedures 'MultPolys' (multiplication) 88 // and 'InvertNumber' (inversion). After addition and sub straction one should74 // and 'InvertNumber' (inversion). After addition and subtraction one should 89 75 // apply 'SimplifyPoly' to the result to reduce the result w.r.t. 'mpoly'. 90 // This is done by reducing each coefficient sep erately, which is more76 // This is done by reducing each coefficient separately, which is more 91 77 // efficient for polynomials with many terms. 92 78 79 80 LIB "primitiv.lib"; 81 LIB "primdec.lib"; 93 82 94 83 /////////////////////////////////////////////////////////////////////////////// … … 96 85 proc Roots(poly f) 97 86 "USAGE: Roots(f); poly f 98 PUR OPSE: compute all roots of f in a finite extension of the groundfield87 PURPOSE: compute all roots of f in a finite extension of the groundfield 99 88 without multiplicities. 100 89 RETURN: ring, a polynomial ring over an extension field of the ground field, … … 174 163 proc RootsMain(poly f) 175 164 "USAGE: RootsMain(f); poly f 176 PUR OPSE: compute all roots of f in a finite extension of the groundfield165 PURPOSE: compute all roots of f in a finite extension of the groundfield 177 166 without multiplicities. 178 167 RETURN: list, all entries are polynomials 179 168 _[1] = roots of f, each entry is a polynomial 180 _[2] = 'newA'  if the groundfield is Q(a') and the extension field is Q(a), then181 'newA' is the representation of a' in Q(a)169 _[2] = 'newA'  if the groundfield is Q(a') and the extension field 170 is Q(a), then 'newA' is the representation of a' in Q(a) 182 171 _[3] = minpoly of the algebraic extension of the groundfield 183 172 ASSUME: basering = Q[x,a] 184 173 ideal mpoly must be defined, it might be 0 ! 185 NOTE: might change tehideal mpoly !!174 NOTE: might change the ideal mpoly !! 186 175 EXAMPLE: example Roots; shows an example 187 176 " … … 315 304 proc ZeroSet(ideal I, list #) 316 305 "USAGE: ZeroSetMain(ideal I [, int opt]); ideal I, int opt 317 PUR OPSE: compute the zeroset of the zerodim. ideal I, in a finite extension306 PURPOSE: compute the zeroset of the zerodim. ideal I, in a finite extension 318 307 of the groundfield. 319 308 RETURN: ring, a polynomial ring over an extension field of the ground field, … … 327 316 'newA' = 'a' (default). 328 317  'id' is the ideal 'I' in Q(a)[x_1,...] (a' substituted by 'newA') 329 ASSUME: dim(I) = 0, and ground field to be Q or a simple extension of Q given330 by a minpoly.318 ASSUME: dim(I) = 0, and ground field to be Q or a simple extension of Q 319 given by a minpoly. 331 320 OPTIONS: opt = 0 no primary decomposition (default) 332 321 opt > 0 primary decomposition 333 NOTE: If I contains an algebraic number (parameter) then 'I' must be transformed334 w.r.t. 'newA' in the new ring.322 NOTE: If I contains an algebraic number (parameter) then 'I' must be 323 transformed w.r.t. 'newA' in the new ring. 335 324 EXAMPLE: example ZeroSet; shows an example 336 325 " … … 420 409 polynomial in Q[a]. 421 410 RETURN: poly 1/f 422 ASSUME: basering = Q[x_1,...,x_n,a], ideal 'mpoly' must be defined and != 0 !411 ASSUME: basering = Q[x_1,...,x_n,a], ideal 'mpoly' must be defined and != 0 423 412 " 424 413 { … … 459 448 proc LeadTerm(poly f, int i) 460 449 "USAGE: LeadTerm(f); poly f, int i 461 PUR OPSE: compute the leading coef and term of f w.r.t var(i), where the last450 PURPOSE: compute the leading coef and term of f w.r.t var(i), where the last 462 451 ring variable is treated as a parameter. 463 452 RETURN: list of polynomials … … 480 469 proc Quotient(poly f, poly g) 481 470 "USAGE: Quotient(f, g); poly f, g; 482 PUR OPSE: compute the quotient q and remainder r s.t. f = g*q + r, deg(r) < g471 PURPOSE: compute the quotient q and remainder r s.t. f = g*q + r, deg(r) < g 483 472 RETURN: list of polynomials 484 473 _[1] = quotient q … … 514 503 proc QuotientMain(poly f, poly g) 515 504 "USAGE: QuotientMain(f, g); poly f, g 516 PUR OPSE: compute the quotient q and remainder r s.t. f = g*q + r, deg(r) < g505 PURPOSE: compute the quotient q and remainder r s.t. f = g*q + r, deg(r) < g 517 506 RETURN: list of polynomials 518 507 _[1] = quotient q … … 538 527 proc Remainder(poly f, poly g) 539 528 "USAGE: Remainder(f, g); poly f, g 540 PUR OPSE: compute the remainder of the division of f by g, i.e. a polynomial r529 PURPOSE: compute the remainder of the division of f by g, i.e. a polynomial r 541 530 s.t. f = g*q + r, deg(r) < g. 542 531 RETURN: poly … … 568 557 proc RemainderMain(poly f, poly g) 569 558 "USAGE: RemainderMain(f, g); poly f, g 570 PUR OPSE: compute the remainder r s.t. f = g*q + r, deg(r) < g559 PURPOSE: compute the remainder r s.t. f = g*q + r, deg(r) < g 571 560 RETURN: poly 572 561 ASSUME: basering = Q[x,a] and ideal 'mpoly' is defined (it might be 0), … … 590 579 proc EGCD(poly f, poly g) 591 580 "USAGE: EGCDMain(f, g); poly f, g 592 PUR OPSE: compute the polynomial gcd of f and g over Q(a)[x]593 RETURN: poly h s .t. h is a greatest common divisor of f and g (not nec. monic)581 PURPOSE: compute the polynomial gcd of f and g over Q(a)[x] 582 RETURN: poly h st. h is a greatest common divisor of f and g (not nec. monic) 594 583 ASSUME: basering = Q(a)[t] 595 584 EXAMPLE: example EGCD; shows an example … … 620 609 proc EGCDMain(poly f, poly g) 621 610 "USAGE: EGCDMain(f, g); poly f, g 622 PUR OPSE: compute the polynomial gcd of f and g over Q(a)[x]611 PURPOSE: compute the polynomial gcd of f and g over Q(a)[x] 623 612 RETURN: poly 624 613 ASSUME: basering = Q[x,a] and ideal 'mpoly' is defined (it might be 0), … … 646 635 proc MEGCD(poly f, poly g, int varIndex) 647 636 "USAGE: MEGCD(f, g, i); poly f, g; int i 648 PUR OPSE: compute the polynomial gcd of f and g in the i'th variable637 PURPOSE: compute the polynomial gcd of f and g in the i'th variable 649 638 RETURN: poly 650 ASSUME: f, g are polynomials in var(i), 639 ASSUME: f, g are polynomials in var(i),last variable is the algebraic number 651 640 EXAMPLE: example MEGCD; shows an example 652 641 " … … 681 670 proc SQFRNorm(poly f) 682 671 "USAGE: SQFRNorm(f); poly f 683 PUR OPSE: compute the norm of the squarefree polynomial f in Q(a)[x].672 PURPOSE: compute the norm of the squarefree polynomial f in Q(a)[x]. 684 673 RETURN: list 685 674 _[1] = squarefree norm of g (poly) … … 713 702 proc SQFRNormMain(poly f) 714 703 "USAGE: SQFRNorm(f); poly f 715 PUR OPSE: compute the norm of the squarefree polynomial f in Q(a)[x].704 PURPOSE: compute the norm of the squarefree polynomial f in Q(a)[x]. 716 705 RETURN: list 717 706 _[1] = squarefree norm of g (poly) … … 763 752 proc Factor(poly f) 764 753 "USAGE: Factor(f); poly f 765 PUROPSE: compute the factorization of the squarefree poly f over Q(a)[t], minpoly = p(a). 754 PURPOSE: compute the factorization of the squarefree poly f over Q(a)[t], 755 where minpoly = p(a). 766 756 RETURN: list 767 757 _[1] = factors (monic), first entry is the leading coefficient 768 758 _[2] = multiplicities (not yet) 769 ASSUME: basering must be the univariate polynomial ring over a field which is Q770 or a simple extension of Q given by a minpoly.759 ASSUME: basering must be the univariate polynomial ring over a field which 760 is Q or a simple extension of Q given by a minpoly. 771 761 NOTE: if basering = Q[t] then this is the builtin 'factorize'. 772 762 EXAMPLE: example Factor; shows an example … … 799 789 proc FactorMain(poly f) 800 790 "USAGE: FactorMain(f); poly f 801 PUROPSE: compute the factorization of the squarefree poly f over Q(a)[t], minpoly = p(a). 791 PURPOSE: compute the factorization of the squarefree poly f over Q(a)[t], 792 where minpoly = p(a). 802 793 RETURN: list 803 794 _[1] = factors, first is a constant … … 854 845 proc ZeroSetMain(ideal I, int primDecQ) 855 846 "USAGE: ZeroSetMain(ideal I, int opt); ideal I, int opt 856 PUR OPSE: compute the zeroset of the zerodim. ideal I, in a simple extension847 PURPOSE: compute the zeroset of the zerodim. ideal I, in a simple extension 857 848 of the groundfield. 858 849 RETURN: list … … 865 856 remains unchanged then 'newA' = 'a'. If the basering does not 866 857 contain a parameter then 'newA' = 'a' (default). 867 _[3] = 'mpoly' (ideal), the minimal polynomial of the simple extension868 of the ground field.858 _[3] = 'mpoly' (ideal), the minimal polynomial of the simple 859 extension of the ground field. 869 860 ASSUME: basering = K[x_1,x_2,...,x_n] where K = Q or a simple extension of Q 870 861 given by a minpoly. … … 944 935 proc ZeroSetMainWork(ideal id, intvec wt, int sVars) 945 936 "USAGE: ZeroSetMainWork(I, wt, sVars); 946 PUR OPSE: compute the zeroset of the zerodim. ideal I, in a finite extension937 PURPOSE: compute the zeroset of the zerodim. ideal I, in a finite extension 947 938 of the groundfield (without multiplicities). 948 939 RETURN: list, all entries are polynomials 949 940 _[1] = zeros, each entry is an ideal 950 _[2] = newA; if the groundfield is Q(a') this is the rep. of a' w .r.t.a941 _[2] = newA; if the groundfield is Q(a') this is the rep. of a' wrt a 951 942 _[3] = minpoly of the algebraic extension of the groundfield (ideal) 952 943 _[4] = name of algebraic number (default = 'a') … … 1108 1099 proc NonLinearZeroSetMain(ideal I, intvec wt) 1109 1100 "USAGE: ZeroSetMainWork(I, wt, sVars); 1110 PUR OPSE: solves the (nonlinear) univariate polynomials in I1101 PURPOSE: solves the (nonlinear) univariate polynomials in I 1111 1102 of the groundfield (without multiplicities). 1112 1103 RETURN: list, all entries are polynomials … … 1196 1187 static proc ExtendSolutions(list solutions, list newSolutions) 1197 1188 "USAGE: ExtendSolutions(sols, newSols); list sols, newSols; 1198 PUR OPSE: extend the entries of 'sols' by the entries of 'newSols',1189 PURPOSE: extend the entries of 'sols' by the entries of 'newSols', 1199 1190 each entry of 'newSols' is a number. 1200 1191 RETURN: list … … 1234 1225 RETURN: list 1235 1226 PURPOSE: create a list of solutions of size n, each entry of 'sol2' must 1236 have size n. 'sol1' is one partial solution (from 'LinearZeroSetMain')1237 'sol2' is a list of partial solutions (from 'NonLinearZeroSetMain')1227 have size n. 'sol1' is one partial solution (from LinearZeroSetMain) 1228 'sol2' is a list of partial solutions (from NonLinearZeroSetMain) 1238 1229 ASSUME: 'sol2' is not empty 1239 1230 NOTE: used by 'ZeroSetMainWork' … … 1255 1246 static proc SubsMapIdeal(list sol, list index, int opt) 1256 1247 "USAGE: SubsMapIdeal(sol,index,opt); list sol, index; int opt; 1257 PUR OPSE: built an ideal I as follows.1248 PURPOSE: built an ideal I as follows. 1258 1249 if i is contained in 'index' then set I[i] = sol[i] 1259 1250 if i is not contained in 'index' then … … 1285 1276 proc SimplifyZeroset(data) 1286 1277 "USAGE: SimplifyZeroset(data); list data 1287 PUR OPSE: reduce the entries of the elements of 'data' w.r.t. the ideal 'mpoly'1278 PURPOSE: reduce the entries of the elements of 'data' w.r.t. the ideal 'mpoly' 1288 1279 'data' is a list of ideals/lists. 1289 1280 RETURN: list … … 1306 1297 proc Variables(poly f, int n) 1307 1298 "USAGE: Variables(f,n); poly f; int n; 1308 PUR OPSE: list of variables among var(1),...,var(n) which occur in f.1299 PURPOSE: list of variables among var(1),...,var(n) which occur in f. 1309 1300 RETURN: list 1310 1301 ASSUME: n <= nvars(basering) … … 1325 1316 proc ContainedQ(data, f, list #) 1326 1317 "USAGE: ContainedQ(data, f [, opt]); list data; f is of any type, int opt 1327 PUR OPSE: test if 'f' is an element of 'data'.1318 PURPOSE: test if 'f' is an element of 'data'. 1328 1319 RETURN: int 1329 1320 0 if 'f' not contained in 'data' … … 1356 1347 proc SameQ(a, b) 1357 1348 "USAGE: SameQ(a, b); list/intvec a, b; 1358 PUR OPSE: test a == b elementwise, i.e., a[i] = b[i].1349 PURPOSE: test a == b elementwise, i.e., a[i] = b[i]. 1359 1350 RETURN: int 1360 1351 0 if a != b … … 1384 1375 static proc SimplifyPoly(poly f) 1385 1376 "USAGE: SimplifyPoly(f); poly f 1386 PUR OPSE: reduces the coefficients of f w.r.t. the ideal 'moly' if they contain1377 PURPOSE: reduces the coefficients of f w.r.t. the ideal 'moly' if they contain 1387 1378 the algebraic number 'a'. 1388 1379 RETURN: poly … … 1409 1400 static proc SimplifyData(data) 1410 1401 "USAGE: SimplifyData(data); ideal/list data; 1411 PUR OPSE: reduces the entries of 'data' w.r.t. the ideal 'mpoly' if they contain1412 the algebraic number 'a'1402 PURPOSE: reduces the entries of 'data' w.r.t. the ideal 'mpoly' if they 1403 contain the algebraic number 'a'. 1413 1404 RETURN: ideal/list 1414 1405 ASSUME: basering = Q[x_1,...,x_n,a] … … 1433 1424 static proc TransferRing(R) 1434 1425 "USAGE: TransferRing(R); 1435 PUR OPSE: creates a new ring containing the same variables as R, but without1426 PURPOSE: creates a new ring containing the same variables as R, but without 1436 1427 parameters. If R contains a parameter then this parameter is added 1437 as the last variable and 'minpoly' is represented by the ideal 'mpoly'1438 If the basering does not contain a parameter then 'a' is added and1439 'mpoly' = 0.1428 as the last variable and 'minpoly' is represented by the ideal 1429 'mpoly'. If the basering does not contain a parameter then 'a' will 1430 be added and 'mpoly' = 0. 1440 1431 RETURN: ring 1441 1432 ASSUME: R = K[x_1,...,x_n] where K = Q or K = Q(a). … … 1467 1458 static proc NewBaseRing() 1468 1459 "USAGE: NewBaseRing(); 1469 PUR OPSE: creates a new ring, the last variable is added as a parameter.1460 PURPOSE: creates a new ring, the last variable is added as a parameter. 1470 1461 minpoly is set to mpoly[1]. 1471 1462 RETURN: ring … … 1508 1499 ring S1 = 0, (s(1..3)), lp; 1509 1500 ideal I = s(2)*s(3), s(1)^2*s(2)+s(1)^2*s(3)1, s(1)^2*s(3)^2s(3), s(2)^4s(3)^4+s(1)^2, s(1)^4+s(2)^3s(3)^3, s(3)^5s(1)^2*s(3); 1510 ideal mpoly = std(0);1511 1501 1512 1502 // order = 10 1513 1503 ring S2 = 0, (s(1..5)), lp; 1514 1504 ideal I = s(2)+s(3)s(5), s(4)^2s(5), s(1)*s(5)+s(3)*s(4)s(4)*s(5), s(1)*s(4)+s(3)s(5), s(3)^22*s(3)*s(5), s(1)*s(3)s(1)*s(5)+s(4)*s(5), s(1)^2+s(4)^22*s(5), s(1)+s(5)^3, s(3)*s(5)^2+s(4)s(5)^3, s(1)*s(5)^21; 1515 ideal mpoly = std(0);1516 1505 1517 1506 //order = 126 1518 1507 ring S3 = 0, (s(1..5)), lp; 1519 1508 ideal I = s(3)*s(4), s(2)*s(4), s(1)*s(3), s(1)*s(2), s(3)^3+s(4)^31, s(2)^3+s(4)^31, s(1)^3s(4)^3, s(4)^4s(4), s(1)*s(4)^3s(1), s(5)^71; 1520 ideal mpoly = std(0);1521 1509 1522 1510 // order = 192 1523 1511 ring S4 = 0, (s(1..4)), lp; 1524 1512 ideal I = s(2)*s(3)^2*s(4)+s(1)*s(3)*s(4)^2, s(2)^2*s(3)*s(4)+s(1)*s(2)*s(4)^2, s(1)*s(3)^3+s(2)*s(4)^3, s(1)*s(2)*s(3)^2+s(1)^2*s(3)*s(4), s(1)^2*s(3)^2s(2)^2*s(4)^2, s(1)*s(2)^2*s(3)+s(1)^2*s(2)*s(4), s(1)^3*s(3)+s(2)^3*s(4), s(2)^4s(3)^4, s(1)*s(2)^3+s(3)*s(4)^3, s(1)^2*s(2)^2s(3)^2*s(4)^2, s(1)^3*s(2)+s(3)^3*s(4), s(1)^4s(4)^4, s(3)^5*s(4)s(3)*s(4)^5, s(3)^8+14*s(3)^4*s(4)^4+s(4)^81, 15*s(2)*s(3)*s(4)^7s(1)*s(4)^8+s(1), 15*s(3)^4*s(4)^5+s(4)^9s(4), 16*s(3)*s(4)^9s(3)*s(4), 16*s(2)*s(4)^9s(2)*s(4), 16*s(1)*s(3)*s(4)^8s(1)*s(3), 16*s(1)*s(2)*s(4)^8s(1)*s(2), 16*s(1)*s(4)^1015*s(2)*s(3)*s(4)16*s(1)*s(4)^2, 16*s(1)^2*s(4)^915*s(1)*s(2)*s(3)16*s(1)^2*s(4), 16*s(4)^13+15*s(3)^4*s(4)16*s(4)^5; 1525 ideal mpoly = std(0);1526 1513 1527 1514 ring R = (0,a), (x,y,z), lp; … … 1529 1516 ideal I1 = x2  1/2, a*z  1, y  2; 1530 1517 ideal I2 = x3  1/2, a*z2  3, y  2*a; 1531 1532 1518 */ 1519 1520 1521 1522 1523 1524 1525 1526
Note: See TracChangeset
for help on using the changeset viewer.