Changeset 35f23d in git


Ignore:
Timestamp:
Dec 18, 2000, 2:20:12 PM (22 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '00e2e9c41af3fde1273eb3633f4c0c7c3db2579d')
Children:
bef194c40c7211201f3f9a4d7e603ecf1724d415
Parents:
e702a986aff8bbd94084d372e0fdda3ca1652064
Message:
*hannes?tbayer: lib revisited


git-svn-id: file:///usr/local/Singular/svn/trunk@4925 2c84dea3-7e68-4137-9b89-c4e89433aadc
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.tu-muenchen.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. Gert-Martin 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 2000-12-11 13:15:38 Singular Exp $";
     1///////////////////////////////////////////////////////////////////////////////
     2version="Id: rinvar.lib,v 1.0 2000/12/10 17:32:15 Singular Exp $";
    203info="
    214LIBRARY:  rinvar.lib      PROCEDURES FOR INVARIANT RINGS OF REDUCTIVE GROUPS
     
    4124";
    4225
     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. Gert-Martin Greuel
     31
     32
    4333LIB "presolve.lib";
    4434LIB "elim.lib";
     
    4939proc EquationsOfEmbedding(ideal embedding, int nrs)
    5040"USAGE:   EquationsOfEmbedding(embedding, s); ideal embedding; int s;
    51 PUROPSE: compute the ideal of the variety parameterized by 'embedding' by
     41PURPOSE: compute the ideal of the variety parameterized by 'embedding' by
    5242         implicitation and change the variables to the old ones.
    5343RETURN:  ideal
     
    7969proc ImageGroup(ideal Grp, ideal Gaction)
    8070"USAGE:   ImageGroup(G, action); ideal G, action;
    81 PUROPSE: compute the ideal of the image of G in GL(m,K) induced by the linear
     71PURPOSE: compute the ideal of the image of G in GL(m,K) induced by the linear
    8272         action 'action', where G is an algebraic group and 'action' defines
    8373         an action of G on K^m (size(action) = m).
     
    9585  K[t_1,...,t_m] --> K[s_1,...,s_r,t_1,...,t_m]/G
    9686    t_i    --> f_i(s_1,...,s_r,t_1,...,t_m)
     87
    9788EXAMPLE: example ImageGroup; shows an example
    9889"
     
    207198proc HilbertWeights(ideal I, wt)
    208199"USAGE:   HilbertWeights(I, w); ideal I, intvec wt
    209 PUROPSE: compute the weights of the "slack" varaibles needed for the
     200PURPOSE: compute the weights of the "slack" varaibles needed for the
    210201         computation of the algebraic relations of the generators of 'I' s.t.
    211202         the Hilbert driven 'std' can be used.
     
    226217proc HilbertSeries(ideal I, wt)
    227218"USAGE:   HilbertSeries(I, w); ideal I, intvec wt
    228 PUROPSE: compute the polynomial p of the Hilbert Series,represented by p/q, of
     219PURPOSE: compute the polynomial p of the Hilbert Series,represented by p/q, of
    229220         the ring K[t_1,...,t_m,y_1,...,y_r]/I1 where 'w' are the weights of
    230221         the variables, computed, e.g., by 'HilbertWeights', 'I1' is of the
     
    251242proc HilbertSeries1(wt)
    252243"USAGE:   HilbertSeries1(wt); ideal I, intvec wt
    253 PUROPSE: compute the polynomial p of the Hilbert Series represented by p/q of
     244PURPOSE: compute the polynomial p of the Hilbert Series represented by p/q of
    254245         the ring K[t_1,...,t_m,y_1,...,y_r]/I where I is a complete inter-
    255246         section and the generator I[i] has degree wt[i]
    256247RETURN:  poly
     248EXAMPLE:
    257249"
    258250{
     
    280272proc ImageVariety(ideal I, F, list #)
    281273"USAGE:   ImageVariety(ideal I, F [, w]);ideal I; F is a list/ideal, intvec w.
    282 PUROPSE: compute the Zariski closure of the image of the variety of I under
     274PURPOSE: compute the Zariski closure of the image of the variety of I under
    283275         the morphism F.
    284276NOTE:    if 'I' and 'F' are quasihomogenous w.r.t. 'w' then the Hilbert-driven
     
    366358proc LinearizeAction(ideal Grp, Gaction, int nrs)
    367359"USAGE:   LinearizeAction(G,action,r); ideal G, action; int r
    368 PUROPSE: linearize the group action 'action' and find an equivariant embedding
    369          of K^m where m = size(action).
     360PURPOSE: linearize the group action 'action' and find an equivariant
     361         embedding of K^m where m = size(action).
    370362ASSUME:  G contains only variables var(1..r) (r = nrs)
    371363basering = 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'
     364RETURN:  polynomial ring contianing the ideals 'actionid','embedid','groupid'
    373365         - '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
    375367         - 'groupid' is the ideal of G in the new ring
    376368NOTE:    set printlevel > 0 to see a trace
     
    511503proc LinearActionQ(Gaction, int nrs)
    512504"USAGE:   LinearActionQ(action,nrs,nrt); ideal action, int nrs
    513 PUROPSE: check if the action defined by 'action' is linear w.r.t. the variables
     505PURPOSE: check if the action defined by 'action' is linear wrt. the variables
    514506         var(nrs + 1...nvars(basering)).
    515507RETURN:  0 action not linear
     
    526518  loop = 1;
    527519  i = 1;
    528   while(loop)
    529   {
     520  while(loop){
    530521    if(deg(Gaction[i], wt) > 1) { loop = 0; }
    531     else
    532     {
     522    else {
    533523      i++;
    534524      if(i > ncols(Gaction)) { loop = 0;}
     
    549539proc LinearCombinationQ(ideal I, poly f)
    550540"USAGE:   LinearCombination(I, f); ideal I, poly f
    551 PUROPSE: test if f can be written as a linear combination of the generators of I.
    552 RETURN:  0 f is not a linear combination
    553          1 f is a linear combination
     541PURPOSE: test if f can be written as a linear combination of the gens. of I
     542RETURN:  0 'f' is not a linear combination
     543         1 'f' is a linear combination
    554544"
    555545{
     
    567557  loop = 1;
    568558  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) {
    573561      coMx = coef(imageid[i], var(sizeJ));
    574       if(coMx[1,1] == var(sizeJ))
    575       {
     562      if(coMx[1,1] == var(sizeJ)) {
    576563        relation = imageid[i];
    577564        loop = 0;
    578565      }
    579566    }
    580     else
    581     {
     567    else {
    582568      i++;
    583569      if(i > ncols(imageid)) { loop = 0;}
     
    591577proc InvariantRing(ideal G, ideal action, list #)
    592578"USAGE:   InvariantRing(G, Gact [, opt]); ideal G, Gact; int opt
    593 PUROPSE: compute generators of the invariant ring of G w.r.t. the action 'Gact'
     579PURPOSE: compute generators of the invariant ring of G wrt. the action 'Gact'
    594580ASSUME:  G is a finite group and 'Gact' is a linear action.
    595581RETURN:  polynomial ring over a simple extension of the groundfield of the
     
    598584         - 'invars' contains the algebra-generators of the invariant ring
    599585         - 'groupid' is the ideal of G in the new ring
    600          - 'newA' if the minpoly changes this is the new representation of the
    601            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'.
    602588NOTE:    the delivered ring might have a different minimal polynomial
    603589EXAMPLE: example InvariantRing; shows an example
     
    649635        export(RORN);
    650636        ideal groupid = std(id);
     637                                kill(id);
    651638        attrib(groupid, "isSB", 1);
    652639        ideal action = actionid;
     
    713700proc InvariantQ(poly f, ideal G, action)
    714701"USAGE:   InvariantQ(f, G, action); poly f; ideal G, action
    715 PUROPSE: check if the polynomial f is invariant w.r.t. G where G acts via
     702PURPOSE: check if the polynomial f is invariant w.r.t. G where G acts via
    716703         'action' on K^m.
    717704ASSUME:  basering = K[s_1,...,s_m,t_1,...,t_m] where K = Q of K = Q(a) and
     
    738725proc MinimalDecomposition(poly f, int nrs, int nrt)
    739726"USAGE:   MinimalDecomposition(f,a,b); poly f; int a, b.
    740 PUROPSE: 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 minimal
    742 ASSUME:  f polynomial in K[s(1..a),t(1..b)], K = Q or K = Q(a) and minpoly != 0
     727PURPOSE: 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
     729ASSUME:  f polynomial in K[s(1..a),t(1..b)],K = Q or K = Q(a) and minpoly != 0
    743730RETURN:  2 x r matrix M s.t.  f = M[1,1]*M[2,1] + ... + M[1,r]*M[2,r]
    744731EXAMPLE: example MinimalDecomposition;
     
    834821proc NullCone(ideal G, action)
    835822"USAGE:   NullCone(G, action); ideal G, action
    836 PUROPSE: compute the ideal of the nullcone of the linear action of G on K^n,
     823PURPOSE: compute the ideal of the nullcone of the linear action of G on K^n,
    837824         given by 'action', by means of Deksen's algorithm
    838825ASSUME:  basering = K[s(1..r),t(1..n)], K = Q or K = Q(a) and minpoly != 0,
     
    840827         'action' is a linear group action of G on K^n (n = ncols(action))
    841828RETURN:  ideal of the nullcone of G.
    842 NOTE:    the generators of the nullcone are homogenous, but i.g. not invariant
     829NOTE:    the generators of the nullcone are homogenous, but ig. not invariant
    843830EXAMPLE: example NullCone; shows an example
    844831"
     
    909896proc ReynoldsOperator(ideal Grp, ideal Gaction, list #)
    910897"USAGE:   ReynoldsOperator(G, action [, opt); ideal G, action; int opt
    911 PUROPSE: compute the Reynolds operator of the group G which act via 'action'
     898PURPOSE: compute the Reynolds operator of the group G which act via 'action'
    912899RETURN:  polynomial ring R over a simple extension of the groundfield of the
    913900         basering (the extension might be trivial), containing a list
     
    920907           basering does not contain a parameter then 'newA' = 'a'.
    921908ASSUME:  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)], 'action' is a linear
     909         G is the ideal of a finite group in K[s(1..r)],'action' is a linear
    923910         group action of G
    924911EXAMPLE: example ReynoldsOperator; shows an example
     
    968955proc ReynoldsImage(list reynoldsOp, poly f)
    969956"USAGE:   ReynoldsImage(RO, f); list RO, poly f
    970 PUROPSE: compute the Reynolds image of the polynomial f where RO represents
     957PURPOSE: compute the Reynolds image of the polynomial f where RO represents
    971958         the Reynolds operator
    972959RETURN:  poly
     
    987974static proc SimplifyCoefficientMatrix(matrix coefMatrix)
    988975"USAGE:   SimplifyCoefficientMatrix(M); M matrix coming from coef(...)
    989 PUROPSE: simplify the matrix, i.e. find linear dependencies among the columns
     976PURPOSE: simplify the matrix, i.e. find linear dependencies among the columns
    990977RETURN:  matrix M, f = M[1,1]*M[2,1] + ... + M[1,n]*M[2,n]
    991978"
     
    10221009
    10231010proc 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
    10251012PURPOSE: simplify ideal I to the ideal I', do not change the names of the
    10261013         first m variables, new ideal I' might contain less variables.
     
    10281015RETURN: list
    10291016  _[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'
    10321019  _[3] list of variables
    10331020  _[4] list from 'elimpart'
     1021NOTE:
    10341022"
    10351023{
     
    10431031  mapId = sList[5];
    10441032
    1045   if(size(#) > 0)
    1046   {
     1033  if(size(#) > 0) {
    10471034    m = #[1];
    10481035    nameCMD = #[2];
     
    10501037  else { m = 0;} // nvars(basering);
    10511038  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) {
    10561041      k++;
    10571042      if(k <= m) { mId[i] = sList[4][i]; }
     
    10721057static proc TransferIdeal(R, string name, poly newA)
    10731058" USAGE:  TransferIdeal(R, name, newA); ring R, string name, poly newA
    1074 PUROPSE: Maps an ideal with name 'name' in R to the basering, s.t. all
     1059PURPOSE: Maps an ideal with name 'name' in R to the basering, s.t. all
    10751060         variables are fixed but par(1) is replaced by 'newA'.
    10761061RETURN:  ideal
    1077 NOTE:    this is used to transfor an ideal if the minimal polynomial has changed
     1062NOTE:    this is used to transfor ideals if the minimal polynomial has changed
    10781063"
    10791064{
     
    10951080{
    10961081  poly f = 1;
    1097   for(int i = 1; i <= size(index); i++)
    1098   {
     1082
     1083  for(int i = 1; i <= size(index); i++) {
    10991084    f = f * var(index[i]);
    11001085  }
  • Singular/LIB/zeroset.lib

    re702a98 r35f23d  
    1 // Zeroset.lib
    2 // Algorithms for finding the zero-set of a zero-dim. 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.tu-muenchen.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. Gert-Martin 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 2000-12-11 13:15:38 Singular Exp $";
     1///////////////////////////////////////////////////////////////////////////////
     2version="Id: zeroset.lib,v 1.0 2000/05/19 12:32:15 Singular Exp $";
    223info="
    234LIBRARY:  zeroset.lib      PROCEDURES FOR ROOTS AND FACTORIZATION
    245
    25 AUTHOR:   Thomas Bayer,    email: tbayer@mathematik.uni-kl.de
     6AUTHOR:   Thomas Bayer,    email: bayert@in.tum.de
    267
    278PROCEDURES:
     9
    2810 EGCD(f, g)    gcd over an algebraic extension field of Q
    2911 Factor(f)    factorization of f over an algebraic extension field
    30  InvertNumber(c)  inverts an element of an algenraic extension field
     12 InvertNumber(c)  inverts an element of an algebraic extension field
    3113 LinearZeroSet(I)  find the linear (partial) solution of I
    3214 Quotient(f, g)    quotient q  of f w.r.t. g (in f = q*g + remainder)
    3315 Remainder(f,g)    remainder of the division of f by g
    3416 Roots(f)    computes all roots of f in an extension field of Q
    35  SQFRNorm(f)    norm of f (f must be squarefree)
     17 SQFRNorm(f)    norm of f (f must be square-free)
    3618 ZeroSet(I)    zero-set of the 0-dim. ideal I
    3719
    38  SUBPROCEDURES:
     20SUB PROCEDURES:
     21
    3922 EGCDMain(f, g)    gcd over an algebraic extension field of Q
    4023 FactorMain(f)    factorization of f over an algebraic extension field
    41  InvertNumberMain(c)  inverts an element of an algenraic extension field
     24 InvertNumberMain(c)  inverts an element of an algebraic extension field
    4225 QuotientMain(f, g)  quotient of f w.r.t. g
    4326 RemainderMain(f,g)  remainder of the division of f by g
    44  RootsMain(f)    computes all roots of f, might extend the groundfield
    45  SQFRNormMain(f)  norm of f (f must be squarefree)
     27 RootsMain(f)    computes all roots of f,might extend the groundfield
     28 SQFRNormMain(f)  norm of f (f must be square-free)
    4629 ContainedQ(data, f)  f in data ?
    4730 SameQ(a, b)    a == b (list a,b)
     
    6043";
    6144
    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. Gert-Martin Greuel
    6450
    6551// note : return a ring : ring need not be exported !!!
    6652
    67 // Artihmetic in Q(a)[x] without built-in procedures
     53// Arithmetic in Q(a)[x] without built-in procedures
    6854// assume basering = Q[x,a] and minpoly is represented by mpoly(a).
    6955// the algorithms are taken from "Polynomial Algorithms in Computer Algebra",
     
    7258
    7359// To do :
    74 // squarefree factorization
     60// square-free factorization
    7561// multiplicities
    7662
    7763// Improvement :
    7864// a main problem is the growth of the coefficients. Try Roots(x7 - 1)
    79 // retrurn ideal mpoly !
     65// return ideal mpoly !
    8066// mpoly is not monic, comes from primitive_extra
    8167
    82 // IMPLEMENTATION
     68// IMPLEMENTATION (last change: 10.12.2000)
    8369//
    8470// In procedures with name 'proc-name'Main a polynomial ring over a simple
     
    8672// 'mpoly' (attribute "isSB"). The arithmetic in the extension field is
    8773// implemented in the procedures in the procedures 'MultPolys' (multiplication)
    88 // and 'InvertNumber' (inversion). After addition and substraction one should
     74// and 'InvertNumber' (inversion). After addition and subtraction one should
    8975// apply 'SimplifyPoly' to the result to reduce the result w.r.t. 'mpoly'.
    90 // This is done by reducing each coefficient seperately, which is more
     76// This is done by reducing each coefficient separately, which is more
    9177// efficient for polynomials with many terms.
    9278
     79
     80LIB "primitiv.lib";
     81LIB "primdec.lib";
    9382
    9483///////////////////////////////////////////////////////////////////////////////
     
    9685proc Roots(poly f)
    9786"USAGE:   Roots(f); poly f
    98 PUROPSE: compute all roots of f in a finite extension of the groundfield
     87PURPOSE: compute all roots of f in a finite extension of the groundfield
    9988         without multiplicities.
    10089RETURN:  ring, a polynomial ring over an extension field of the ground field,
     
    174163proc RootsMain(poly f)
    175164"USAGE:   RootsMain(f); poly f
    176 PUROPSE: compute all roots of f in a finite extension of the groundfield
     165PURPOSE: compute all roots of f in a finite extension of the groundfield
    177166         without multiplicities.
    178167RETURN:  list, all entries are polynomials
    179168  _[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), then
    181          '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)
    182171  _[3] = minpoly of the algebraic extension of the groundfield
    183172ASSUME:  basering = Q[x,a]
    184173   ideal mpoly must be defined, it might be 0 !
    185 NOTE: might change teh ideal mpoly !!
     174NOTE:    might change the ideal mpoly !!
    186175EXAMPLE: example  Roots; shows an example
    187176"
     
    315304proc ZeroSet(ideal I, list #)
    316305"USAGE:   ZeroSetMain(ideal I [, int opt]); ideal I, int opt
    317 PUROPSE: compute the zero-set of the zero-dim. ideal I, in a finite extension
     306PURPOSE: compute the zero-set of the zero-dim. ideal I, in a finite extension
    318307         of the groundfield.
    319308RETURN:  ring, a polynomial ring over an extension field of the ground field,
     
    327316           'newA' = 'a' (default).
    328317   - '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 given
    330          by a minpoly.
     318ASSUME:  dim(I) = 0, and ground field to be Q or a simple extension of Q
     319         given by a minpoly.
    331320OPTIONS: opt = 0 no primary decomposition (default)
    332321   opt > 0 primary decomposition
    333 NOTE:    If I contains an algebraic number (parameter) then 'I' must be transformed
    334          w.r.t. 'newA' in the new ring.
     322NOTE:    If I contains an algebraic number (parameter) then 'I' must be
     323         transformed w.r.t. 'newA' in the new ring.
    335324EXAMPLE: example ZeroSet; shows an example
    336325"
     
    420409         polynomial in Q[a].
    421410RETURN:  poly 1/f
    422 ASSUME:  basering = Q[x_1,...,x_n,a], ideal 'mpoly' must be defined and != 0 !
     411ASSUME:  basering = Q[x_1,...,x_n,a], ideal 'mpoly' must be defined and != 0
    423412"
    424413{
     
    459448proc LeadTerm(poly f, int i)
    460449"USAGE:   LeadTerm(f); poly f, int i
    461 PUROPSE: compute the leading coef and term of f w.r.t var(i), where the last
     450PURPOSE: compute the leading coef and term of f w.r.t var(i), where the last
    462451         ring variable is treated as a parameter.
    463452RETURN:  list of polynomials
     
    480469proc Quotient(poly f, poly g)
    481470"USAGE:   Quotient(f, g); poly f, g;
    482 PUROPSE: compute the quotient q and remainder r s.t. f = g*q + r, deg(r) < g
     471PURPOSE: compute the quotient q and remainder r s.t. f = g*q + r, deg(r) < g
    483472RETURN:  list of polynomials
    484473         _[1] = quotient  q
     
    514503proc QuotientMain(poly f, poly g)
    515504"USAGE:   QuotientMain(f, g); poly f, g
    516 PUROPSE: compute the quotient q and remainder r s.t. f = g*q + r, deg(r) < g
     505PURPOSE: compute the quotient q and remainder r s.t. f = g*q + r, deg(r) < g
    517506RETURN:  list of polynomials
    518507         _[1] = quotient  q
     
    538527proc Remainder(poly f, poly g)
    539528"USAGE:   Remainder(f, g); poly f, g
    540 PUROPSE: compute the remainder of the division of f by g, i.e. a polynomial r
     529PURPOSE: compute the remainder of the division of f by g, i.e. a polynomial r
    541530         s.t. f = g*q + r, deg(r) < g.
    542531RETURN:  poly
     
    568557proc RemainderMain(poly f, poly g)
    569558"USAGE:   RemainderMain(f, g); poly f, g
    570 PUROPSE: compute the remainder r s.t. f = g*q + r, deg(r) < g
     559PURPOSE: compute the remainder r s.t. f = g*q + r, deg(r) < g
    571560RETURN:  poly
    572561ASSUME:  basering = Q[x,a] and ideal 'mpoly' is defined (it might be 0),
     
    590579proc EGCD(poly f, poly g)
    591580"USAGE:   EGCDMain(f, g); poly f, g
    592 PUROPSE: 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)
     581PURPOSE: compute the polynomial gcd of f and g over Q(a)[x]
     582RETURN:  poly h st. h is a greatest common divisor of f and g (not nec. monic)
    594583ASSUME:  basering = Q(a)[t]
    595584EXAMPLE: example  EGCD; shows an example
     
    620609proc EGCDMain(poly f, poly g)
    621610"USAGE:   EGCDMain(f, g); poly f, g
    622 PUROPSE: compute the polynomial gcd of f and g over Q(a)[x]
     611PURPOSE: compute the polynomial gcd of f and g over Q(a)[x]
    623612RETURN:  poly
    624613ASSUME:  basering = Q[x,a] and ideal 'mpoly' is defined (it might be 0),
     
    646635proc MEGCD(poly f, poly g, int varIndex)
    647636"USAGE:   MEGCD(f, g, i); poly f, g; int i
    648 PUROPSE: compute  the polynomial gcd of f and g in the i'th variable
     637PURPOSE: compute  the polynomial gcd of f and g in the i'th variable
    649638RETURN:  poly
    650 ASSUME:  f, g are polynomials in var(i), last variable is the algebraic number
     639ASSUME:  f, g are polynomials in var(i),last variable is the algebraic number
    651640EXAMPLE: example  MEGCD; shows an example
    652641"
     
    681670proc SQFRNorm(poly f)
    682671"USAGE:   SQFRNorm(f); poly f
    683 PUROPSE: compute the norm of the squarefree polynomial f in Q(a)[x].
     672PURPOSE: compute the norm of the squarefree polynomial f in Q(a)[x].
    684673RETURN:  list
    685674         _[1] = squarefree norm of g (poly)
     
    713702proc SQFRNormMain(poly f)
    714703"USAGE:   SQFRNorm(f); poly f
    715 PUROPSE: compute the norm of the squarefree polynomial f in Q(a)[x].
     704PURPOSE: compute the norm of the squarefree polynomial f in Q(a)[x].
    716705RETURN:  list
    717706         _[1] = squarefree norm of g (poly)
     
    763752proc Factor(poly f)
    764753"USAGE:   Factor(f); poly f
    765 PUROPSE: compute the factorization of the squarefree poly f over Q(a)[t], minpoly  = p(a).
     754PURPOSE: compute the factorization of the squarefree poly f over Q(a)[t],
     755         where minpoly  = p(a).
    766756RETURN:  list
    767757         _[1] = factors (monic), first entry is the leading coefficient
    768758         _[2] = multiplicities (not yet)
    769 ASSUME:  basering must be the univariate polynomial ring over a field which is Q
    770          or a simple extension of Q given by a minpoly.
     759ASSUME:  basering must be the univariate polynomial ring over a field which
     760         is Q or a simple extension of Q given by a minpoly.
    771761NOTE:    if basering = Q[t] then this is the built-in 'factorize'.
    772762EXAMPLE: example  Factor; shows an example
     
    799789proc FactorMain(poly f)
    800790"USAGE:   FactorMain(f); poly f
    801 PUROPSE: compute the factorization of the squarefree poly f over Q(a)[t], minpoly  = p(a).
     791PURPOSE: compute the factorization of the squarefree poly f over Q(a)[t],
     792         where minpoly  = p(a).
    802793RETURN:  list
    803794         _[1] = factors, first is a constant
     
    854845proc ZeroSetMain(ideal I, int primDecQ)
    855846"USAGE:   ZeroSetMain(ideal I, int opt); ideal I, int opt
    856 PUROPSE: compute the zero-set of the zero-dim. ideal I, in a simple extension
     847PURPOSE: compute the zero-set of the zero-dim. ideal I, in a simple extension
    857848         of the groundfield.
    858849RETURN:  list
     
    865856                remains unchanged then 'newA' = 'a'. If the basering does not
    866857                contain a parameter then 'newA' = 'a' (default).
    867          _[3] = 'mpoly' (ideal), the minimal polynomial of the simple extension
    868                 of the ground field.
     858         _[3] = 'mpoly' (ideal), the minimal polynomial of the simple
     859                extension of the ground field.
    869860ASSUME: basering = K[x_1,x_2,...,x_n] where K = Q or a simple extension of Q
    870861        given by a minpoly.
     
    944935proc ZeroSetMainWork(ideal id, intvec wt, int sVars)
    945936"USAGE:   ZeroSetMainWork(I, wt, sVars);
    946 PUROPSE: compute the zero-set of the zero-dim. ideal I, in a finite extension
     937PURPOSE: compute the zero-set of the zero-dim. ideal I, in a finite extension
    947938         of the groundfield (without multiplicities).
    948939RETURN:  list, all entries are polynomials
    949940         _[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. a
     941         _[2] = newA; if the groundfield is Q(a') this is the rep. of a' wrt a
    951942         _[3] = minpoly of the algebraic extension of the groundfield (ideal)
    952943         _[4] = name of algebraic number (default = 'a')
     
    11081099proc NonLinearZeroSetMain(ideal I, intvec wt)
    11091100"USAGE:   ZeroSetMainWork(I, wt, sVars);
    1110 PUROPSE: solves the (nonlinear) univariate polynomials in I
     1101PURPOSE: solves the (nonlinear) univariate polynomials in I
    11111102         of the groundfield (without multiplicities).
    11121103RETURN:  list, all entries are polynomials
     
    11961187static proc ExtendSolutions(list solutions, list newSolutions)
    11971188"USAGE:   ExtendSolutions(sols, newSols); list sols, newSols;
    1198 PUROPSE: extend the entries of 'sols' by the entries of 'newSols',
     1189PURPOSE: extend the entries of 'sols' by the entries of 'newSols',
    11991190         each entry of 'newSols' is a number.
    12001191RETURN:  list
     
    12341225RETURN:  list
    12351226PURPOSE: 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)
    12381229ASSUME:  'sol2' is not empty
    12391230NOTE:   used by 'ZeroSetMainWork'
     
    12551246static proc SubsMapIdeal(list sol, list index, int opt)
    12561247"USAGE:   SubsMapIdeal(sol,index,opt); list sol, index; int opt;
    1257 PUROPSE: built an ideal I as follows.
     1248PURPOSE: built an ideal I as follows.
    12581249         if i is contained in 'index' then set I[i] = sol[i]
    12591250         if i is not contained in 'index' then
     
    12851276proc SimplifyZeroset(data)
    12861277"USAGE:   SimplifyZeroset(data); list data
    1287 PUROPSE: reduce the entries of the elements of 'data' w.r.t. the ideal 'mpoly'
     1278PURPOSE: reduce the entries of the elements of 'data' w.r.t. the ideal 'mpoly'
    12881279         'data' is a list of ideals/lists.
    12891280RETURN:  list
     
    13061297proc Variables(poly f, int n)
    13071298"USAGE:   Variables(f,n); poly f; int n;
    1308 PUROPSE: list of variables among var(1),...,var(n) which occur in f.
     1299PURPOSE: list of variables among var(1),...,var(n) which occur in f.
    13091300RETURN:  list
    13101301ASSUME:  n <= nvars(basering)
     
    13251316proc ContainedQ(data, f, list #)
    13261317"USAGE:    ContainedQ(data, f [, opt]); list data; f is of any type, int opt
    1327 PUROPSE:  test if 'f' is an element of 'data'.
     1318PURPOSE:  test if 'f' is an element of 'data'.
    13281319RETURN:   int
    13291320          0 if 'f' not contained in 'data'
     
    13561347proc SameQ(a, b)
    13571348"USAGE:    SameQ(a, b); list/intvec a, b;
    1358 PUROPSE:  test a == b elementwise, i.e., a[i] = b[i].
     1349PURPOSE:  test a == b elementwise, i.e., a[i] = b[i].
    13591350RETURN:   int
    13601351          0 if a != b
     
    13841375static proc SimplifyPoly(poly f)
    13851376"USAGE:   SimplifyPoly(f); poly f
    1386 PUROPSE: reduces the coefficients of f w.r.t. the ideal 'moly' if they contain
     1377PURPOSE: reduces the coefficients of f w.r.t. the ideal 'moly' if they contain
    13871378         the algebraic number 'a'.
    13881379RETURN:  poly
     
    14091400static proc SimplifyData(data)
    14101401"USAGE:   SimplifyData(data); ideal/list data;
    1411 PUROPSE: reduces the entries of 'data' w.r.t. the ideal 'mpoly' if they contain
    1412          the algebraic number 'a'
     1402PURPOSE: reduces the entries of 'data' w.r.t. the ideal 'mpoly' if they
     1403         contain the algebraic number 'a'.
    14131404RETURN:  ideal/list
    14141405ASSUME:  basering = Q[x_1,...,x_n,a]
     
    14331424static proc TransferRing(R)
    14341425"USAGE:   TransferRing(R);
    1435 PUROPSE: creates a new ring containing the same variables as R, but without
     1426PURPOSE: creates a new ring containing the same variables as R, but without
    14361427         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 and
    1439          '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.
    14401431RETURN:  ring
    14411432ASSUME:  R = K[x_1,...,x_n] where K = Q or K = Q(a).
     
    14671458static proc NewBaseRing()
    14681459"USAGE:   NewBaseRing();
    1469 PUROPSE: creates a new ring, the last variable is added as a parameter.
     1460PURPOSE: creates a new ring, the last variable is added as a parameter.
    14701461         minpoly is set to mpoly[1].
    14711462RETURN:  ring
     
    15081499ring S1 = 0, (s(1..3)), lp;
    15091500ideal I = s(2)*s(3), s(1)^2*s(2)+s(1)^2*s(3)-1, s(1)^2*s(3)^2-s(3), s(2)^4-s(3)^4+s(1)^2, s(1)^4+s(2)^3-s(3)^3, s(3)^5-s(1)^2*s(3);
    1510 ideal mpoly = std(0);
    15111501
    15121502// order = 10
    15131503ring S2 = 0, (s(1..5)), lp;
    15141504ideal I = s(2)+s(3)-s(5), s(4)^2-s(5), s(1)*s(5)+s(3)*s(4)-s(4)*s(5), s(1)*s(4)+s(3)-s(5), s(3)^2-2*s(3)*s(5), s(1)*s(3)-s(1)*s(5)+s(4)*s(5), s(1)^2+s(4)^2-2*s(5), -s(1)+s(5)^3, s(3)*s(5)^2+s(4)-s(5)^3, s(1)*s(5)^2-1;
    1515 ideal mpoly = std(0);
    15161505
    15171506//order = 126
    15181507ring S3 =  0, (s(1..5)), lp;
    15191508ideal I = s(3)*s(4), s(2)*s(4), s(1)*s(3), s(1)*s(2), s(3)^3+s(4)^3-1, s(2)^3+s(4)^3-1, s(1)^3-s(4)^3, s(4)^4-s(4), s(1)*s(4)^3-s(1), s(5)^7-1;
    1520 ideal mpoly = std(0);
    15211509
    15221510// order = 192
    15231511ring S4 = 0, (s(1..4)), lp;
    15241512ideal 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)^2-s(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)^4-s(3)^4, s(1)*s(2)^3+s(3)*s(4)^3, s(1)^2*s(2)^2-s(3)^2*s(4)^2, s(1)^3*s(2)+s(3)^3*s(4), s(1)^4-s(4)^4, s(3)^5*s(4)-s(3)*s(4)^5, s(3)^8+14*s(3)^4*s(4)^4+s(4)^8-1, 15*s(2)*s(3)*s(4)^7-s(1)*s(4)^8+s(1), 15*s(3)^4*s(4)^5+s(4)^9-s(4), 16*s(3)*s(4)^9-s(3)*s(4), 16*s(2)*s(4)^9-s(2)*s(4), 16*s(1)*s(3)*s(4)^8-s(1)*s(3), 16*s(1)*s(2)*s(4)^8-s(1)*s(2), 16*s(1)*s(4)^10-15*s(2)*s(3)*s(4)-16*s(1)*s(4)^2, 16*s(1)^2*s(4)^9-15*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);
    15261513
    15271514ring R = (0,a), (x,y,z), lp;
     
    15291516ideal I1 = x2 - 1/2, a*z - 1, y - 2;
    15301517ideal I2 = x3 - 1/2, a*z2 - 3, y - 2*a;
    1531 
    15321518*/
     1519
     1520
     1521
     1522
     1523
     1524
     1525
     1526
Note: See TracChangeset for help on using the changeset viewer.