Changeset 6691c7 in git


Ignore:
Timestamp:
Oct 15, 2010, 1:22:02 PM (14 years ago)
Author:
Wolfram Decker <decker@…>
Branches:
(u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
Children:
fa932acebab34d79952f33e66135a857adfb0248
Parents:
a7856c6b936881a3ab41d46e27dbe1e57518bda6
Message:
revised docu

git-svn-id: file:///usr/local/Singular/svn/trunk@13503 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/sagbi.lib

    ra7856c r6691c7  
    33category="Commutative Algebra";
    44info="
    5 LIBRARY: sagbi.lib  Compute SAGBI basis (subalgebra bases analogous to
    6                     Groebner bases for ideals) of a subalgebra
     5LIBRARY: sagbi.lib  Compute SAGBI basis (subalgebra bases analogous to Groebner bases for ideals) of a subalgebra
    76AUTHORS: Jan Hackfeld,     Jan.Hackfeld@rwth-aachen.de
    87         Gerhard Pfister,  pfister@mathematik.uni-kl.de
     
    1110OVERVIEW:
    1211SAGBI stands for 'subalgebra bases analogous to Groebner bases for ideals'.
    13 It is an important tool in working with finitely presented subalgebras,
    14 many properties of SAGBI bases are analogously important to Groebner bases
    15 of ideals. Note, that due to absence of Noetherian property, SAGBI basis
    16 of a finite number of generators of a subalgebra may be infinite.
    17 Hence we provide procedures, which perform a given number of steps in
    18 computations.
    19 
    20 Guide: new implementations of sagbi, sagbiPart, sagbiReduce, sagbiSPoly
    21 as well as algebraicDependence by Jan Hackfeld do not support computations
    22 over a quotient ring yet. On the contrary, sagbiReduction and sagbiNF do
    23 work over any ring.
     12SAGBI bases provide important tools for working with finitely presented
     13subalgebras of a polynomial ring. Note that in contrast to Groebner
     14bases, SAGBI bases may be infinite.
     15
     16REFERENCES:
     17Ana Bravo: Some Facts About Canonical Subalgebra Bases,
     18MSRI Publications  51, p. 247-254
    2419
    2520PROCEDURES:
    26  sagbiSPoly(A [,r,m]);      computes SAGBI S-polynomials of A
    27  sagbiNF(id,dom,k[,n]);     computes SAGBI normal form of id wrt dom
     21 sagbiSPoly(A [,r,m]); computes SAGBI S-polynomials of A
    2822 sagbiReduce(I,A [,t,mt]);  performs subalgebra reduction of I by A
    29  sagbiReduction(I,A [,n]);  performs subalgebra reduction of I by A in a
    30                             quotient ring
    31  sagbi(A [,m,t]);           computes SAGBI basis for A
    32  sagbiPart(A,k[,m]);        computes partial SAGBI basis for A
    33  algebraicDependence(I,it); performs iterations of SAGBI for algebraic
    34                             dependencies of I
     23 sagbi(A [,m,t]);      computes SAGBI basis for A
     24 sagbiPart(A,k[,m]);   computes partial SAGBI basis for A
     25 algebraicDependence(I,it); performs iterations of SAGBI for algebraic dependencies of I
    3526
    3627SEE ALSO: algebra_lib
    3728";
    3829
    39 
    40 //AUXILIARY PROCEDURES:
    41 //uniqueVariableName(s)              adds character "@" at the beginning of
    42 //                                   string s until this is a unique new
    43 //                                   variable name
    44 //extendRing(r, ...)                 creates a new ring, which is an extension
    45 //                                   of r
    46 //stdKernPhi(kernNew, kernOld,...)   computes Groebner basis of kernNew+kernOld
    47 //spolynomialsGB(A,...)              computes the SAGBI S-polynomials of the
    48 //                                   subalgebra defined by the generators in A
    49 //                                   using Groebner bases
    50 //spolynomialsToric(A)               computes the SAGBI S-polynomials of the
    51 //                                   subalgebra defined by the generators in A
    52 //                                   using toric.lib
    53 //reductionGB(ideal F, ideal A,....) performs subalgebra reduction of F by A
    54 //reduceByMonomials(A)               performs subalgebra reduction of all
    55 //                                   polynomials in A by the subset of
    56 //                                   monomials
    57 
    58 LIB "elim.lib"; //for nselect
    59 LIB "toric.lib"; //for toric_ideal
     30LIB "elim.lib";
     31LIB "toric.lib";
    6032LIB "algebra.lib";
    6133//////////////////////////////////////////////////////////////////////////////
    6234
    63 
    64 //static
    65 proc tst_sagbi()
    66 {
    67   example sagbiSPoly;
    68   example sagbiNF;
    69   example sagbiReduce;
    70   example sagbiReduction;
    71   example sagbi;
    72   example sagbiPart;
    73   example algebraicDependence;
    74 }
    75 
    7635static proc assumeQring()
    7736{
     
    8544static proc uniqueVariableName (string variableName)
    8645{
    87   //Adds character "@" at the beginning of variableName until this name is
    88   //unique (not contained in the names of the ring variables or description
    89   //of the coefficient field)
     46  //Adds character "@" at the beginning of variableName until this name ist unique
     47  //(not contained in the names of the ring variables or description of the coefficient field)
    9048  string ringVars = charstr(basering) + "," + varstr(basering);
    9149  while (find(ringVars,variableName) <> 0)
     
    9755
    9856static proc extendRing(r, ideal leadTermsAlgebra, int method) {
    99   /* Extends ring r with additional variables. If k=ncols(leadTermsAlgebra)
    100    * and r contains already m additional variables @y, the procedure adds
    101    * k-m variables @y(m+1)...@y(k) to the ring.
     57  /* Extends ring r with additional variables. If k=ncols(leadTermsAlgebra) and
     58   * r contains already m additional variables @y, the procedure adds k-m variables
     59   * @y(m+1)...@y(k) to the ring.
    10260   * The monomial ordering of the extended ring depends on method.
    103    * Important: When calling this function, the basering (where algebra is
    104    * defined) has to be active
     61   * Important: When calling this function, the basering (where algebra is defined) has to be active
    10562   */
    10663  def br=basering;
     
    10865  ideal varsBasering=maxideal(1);
    10966  int numTotalAdditionalVars=ncols(leadTermsAlgebra);
    110   string variableName=uniqueVariableName("@y"); //get a variable name
    111                                                 //different from existing
    112                                                 //variables
    113 
    114   //-------- extend current baserring r with new variables @y, one for each
    115   //         new element in ideal algebra  -------------
     67  string variableName=uniqueVariableName("@y"); //get a variable name different from existing variables
     68
     69  //-------- extend current baserring r with new variables @y, one for each new element in ideal algebra  -------------
    11670  list l = ringlist(r);
    11771  for (i=nvars(r)-nvars(br)+1; i<=numTotalAdditionalVars;i++)
     
    12781    }
    12882    else
    129     {        //overwrite existing order for @y(i) to only get one block for
    130              //the @y
     83    {        //overwrite existing order for @y(i) to only get one block for the @y
    13184      l[3][size(l[3])-1]=list("dp",intvec(1:numTotalAdditionalVars));
    13285    }
     
    14295
    14396
    144 static proc stdKernPhi(ideal kernNew, ideal kernOld, ideal leadTermsAlgebra,
    145                        int method)
    146 {
    147   /* Computes Groebner basis of kernNew+kernOld, where kernOld already is a
    148    * Groebner basis and kernNew contains elements of the form
    149    * @y(i)-leadTermsAlgebra[i] added to it.
     97static proc stdKernPhi(ideal kernNew, ideal kernOld, ideal leadTermsAlgebra,int method)
     98{
     99  /* Computes Groebner basis of kernNew+kernOld, where kernOld already is a Groebner basis
     100   * and kernNew contains elements of the form @y(i)-leadTermsAlgebra[i] added to it.
    150101   * The techniques chosen is specified by the integer method
    151102   */
     
    157108    kern=kernOld+kernNew;
    158109    kern=std(kern);
    159     //kern=std(kernOld,kernNew); //Found bug using this method. TODO Change
    160     //if bug is removed
    161     //this call of std return Groebner Basis of ideal kernNew+kernOld given
    162     //that kernOld is a Groebner basis
     110    //kern=std(kernOld,kernNew); //Found bug using this method. TODO Change if bug is removed
     111    //this call of std return Groebner Basis of ideal kernNew+kernOld given that kernOld is a Groebner basis
    163112  }
    164113  if (method==1)
     
    173122static proc spolynomialsGB(ideal algebra,r,int method)
    174123{
    175   /* This procedure does the actual S-polynomial calculation using Groebner
    176    * basis methods and is called by the procedures sagbiSPoly, sagbi and
    177    * sagbiPart. As this procedure is called at each step of the SAGBI
    178    * construction algorithm, we can reuse the information already calculated
     124  /* This procedure does the actual S-polynomial calculation using Groebner basis methods and is
     125   * called by the procedures sagbiSPoly,sagbi and sagbiPart. As this procedure is called
     126   * at each step of the SAGBI construction algorithm, we can reuse the information already calculated
    179127   * which is contained in the ring r. This is done in the following order
    180    * 1. If r already contain m additional variables and m'=number of elements
    181    *    in algebra, extend r with variables @y(m+1),...,@y(m')
    182    * 2. Transfer all objects to this ring, kernOld=kern is the Groebnerbasis
    183    *    already computed
    184    * 3. Define ideal kernNew containing elements of the form
    185    *    leadTermsAlgebra(m+1)-@y(m+1),...,leadTermsAlgebra(m')-@y(m')
     128   * 1. If r already contain m additional variables and m'=number of elements in algebra, extend r with variables @y(m+1),...,@y(m')
     129   * 2. Transfer all objects to this ring, kernOld=kern is the Groebnerbasis already computed
     130   * 3. Define ideal kernNew containing elements of the form leadTermsAlgebra(m+1)-@y(m+1),...,leadTermsAlgebra(m')-@y(m')
    186131   * 4. Compute Groebnerbasis of kernOld+kernNew
    187132   * 5. Compute the new algebraic relations
     
    190135  ideal varsBasering=maxideal(1);
    191136  ideal leadTermsAlgebra=lead(algebra);
    192   //save leading terms as ordering in ring extension may not be compatible
    193   //with ordering in basering
     137  //save leading terms as ordering in ring extension may not be compatible with ordering in basering
    194138  int numGenerators=ncols(algebra);
    195139
    196   def rNew=extendRing(r,leadTermsAlgebra,method); // important: br has to be
    197                                                   // active here
     140  def rNew=extendRing(r,leadTermsAlgebra,method); // important: br has to be active here
    198141  setring r;
    199   if (!defined(kern)) // only true for first run of spolynomialGB in sagbi
    200                       // construction algorithms
     142  if (!defined(kern)) //only true for first run of spolynomialGB in sagbi construction algorithms
    201143  {
    202144    ideal kern=0;
     
    204146  }
    205147  setring rNew;
    206   //-------------------------- transfer object to new ring rNew ---------------
     148  //-------------------------- transfer object to new ring rNew ----------------------------------------
    207149  ideal varsBasering=fetch(br,varsBasering);
    208150  ideal kernOld,algebraicRelationsOld;
    209   kernOld=fetch(r,kern); //kern is Groebner basis of the kernel of the map
    210                          //Phi:r->K[x_1,...,x_n], x(i)->x(i),@y(i)
    211                          //       ->leadTermsAlgebra(i)
     151  kernOld=fetch(r,kern); //kern is Groebner basis of the kernel of the map Phi:r->K[x_1,...,x_n], x(i)->x(i), @y(i)->leadTermsAlgebra(i)
    212152  algebraicRelationsOld=fetch(r,algebraicRelations);
    213153  ideal leadTermsAlgebra=fetch(br,leadTermsAlgebra);
    214154  ideal listOfVariables=maxideal(1);
    215   //-----------------------define kernNew containing elements to be added to
    216   //                       the ideal kern -------------
     155  //-----------------------define kernNew containing elements to be added to the ideal kern -------------
    217156  ideal kernNew;
    218157  for (int i=nvars(r)-nvars(br)+1; i<=numGenerators; i++)
    219158  {
    220     kernNew[i-nvars(r)+nvars(br)]=
    221       leadTermsAlgebra[i]-listOfVariables[i+nvars(br)];
    222   }
    223   //-------------------------- calulate kernel of Phi depending on method
    224   //                           choosen -----------------------
     159    kernNew[i-nvars(r)+nvars(br)]=leadTermsAlgebra[i]-listOfVariables[i+nvars(br)];
     160  }
     161  //-------------------------- calulate kernel of Phi depending on method choosen -----------------------
    225162
    226163  attrib(kernOld,"isSB",1);
    227164  ideal kern=stdKernPhi(kernNew,kernOld,leadTermsAlgebra,method);
    228   //-------------------------- calulate algebraic relations -------------------
     165  //-------------------------- calulate algebraic relations -----------------------
    229166  ideal algebraicRelations=nselect(kern,1..nvars(br));
    230167  attrib(algebraicRelationsOld,"isSB",1);
    231168  ideal algebraicRelationsNew=reduce(algebraicRelations,algebraicRelationsOld);
    232   /*        algebraicRelationsOld is a groebner basis by construction (as
    233    *        variable ordering is block ordering we have an elemination
    234    *        ordering for the varsBasering)
     169  /*        algebraicRelationsOld is a groebner basis by construction (as variable ordering is
     170   *        block ordering we have an elemination ordering for the varsBasering)
    235171   *        Therefore, to only get the new algebraic relations, calculate
    236    *        <algebraicRelations>\<algebraicRelationsOld> using groebner
    237    *        reduction
     172   *        <algebraicRelations>\<algebraicRelationsOld> using groebner reduction
    238173   */
    239174  kill kernOld,kernNew,algebraicRelationsOld,listOfVariables;
     
    244179
    245180static proc spolynomialsToric(ideal algebra) {
    246   /* This procedure does the actual S-polynomial calculation using toric.lib
    247    * for computation of a Groebner basis for the toric ideal kern(phi), where
     181  /* This procedure does the actual S-polynomial calculation using toric.lib for
     182   * computation of a Groebner basis for the toric ideal kern(phi), where
    248183   * phi:K[y_1,...,y_m]->K[x_1,...,x_n], y_i->leadmonom(algebra[i])
    249184   * By suitable substitutions we obtain the kernel of the map
     
    269204    }
    270205  }
    271   //The columns of the matrix A are now the exponent vectors of the leadings
    272   //monomials in algebra.
     206  //The columns of the matrix A are now the exponent vectors of the leadings monomials in algebra.
    273207  intmat A[n][m]=intmat(tempVec,n,m);
    274208  //Create the preimage ring K[@y(1),...,@y(m)], where m=ncols(algebra).
     
    291225    if (leadCoefficients[i]!=0)
    292226    {
    293       algebraicRelations=subst(algebraicRelations,var(i),
    294                                1/leadCoefficients[i]*var(i));
     227      algebraicRelations=subst(algebraicRelations,var(i),1/leadCoefficients[i]*var(i));
    295228    }
    296229  }
     
    300233
    301234
    302 static proc reductionGB(ideal F, ideal algebra,r, int tailreduction,
    303                         int method,int parRed)
    304 {
    305   /* This procedure does the actual SAGBI/subalgebra reduction using Groebner
    306    * basis methods and is called by the procedures sagbiReduce, sagbi and
    307    * sagbiPart
    308    * If r already is an extension of the basering and contains the ideal kern
    309    * needed for the subalgebra reduction, the reduction can be started
    310    * directly, at each reduction step using the fact that
     235static proc reductionGB(ideal F, ideal algebra,r, int tailreduction,int method,int parRed)
     236{
     237  /* This procedure does the actual SAGBI/subalgebra reduction using Groebner basis methods and is
     238   * called by the procedures sagbiReduce,sagbi and sagbiPart
     239   * If r already is an extension of the basering and contains the ideal kern needed for the subalgebra reduction,
     240   * the reduction can be started directly, at each reduction step using the fact that
    311241   * p=reduce(leadF,kern) in K[@y(1),...,@y(m)] <=> leadF in K[lead(algebra)]
    312242   * Otherwise some precomputation has to be done, outlined below.
     
    319249  if (numVarsBasering==nvars(r))
    320250  {
    321     /* Case that ring r is the same ring as the basering. Using proc
    322      * extendRing, stdKernPhi one construct the extension of the current
    323      * baserring with new variables @y, one for each element in ideal algebra
    324      * and calculates the kernel of Phi, where
    325      * Phi: r---->br, x_i-->x_i, y_i-->f_i, algebra={f_1,...f_m},
    326      * br=K[x1,...,x_n] und r=K[x1,...x_n,@y1,...@y_m]
    327      * This is similarly done (however step by step for each run of the
    328      * SAGBI construction algorithm) in the procedure spolynomialsGB
     251    /* Case that ring r is the same ring as the basering. Using proc extendRing, stdKernPhi
     252     * one construct the extension of the current baserring with new variables @y, one for each element
     253     * in ideal algebra and calculates the kernel of Phi, where
     254     * Phi: r---->br, x_i-->x_i, y_i-->f_i, algebra={f_1,...f_m}, br=K[x1,...,x_n] und r=K[x1,...x_n,@y1,...@y_m]
     255     * This is similarly done (however step by step for each run of the SAGBI construction algorithm) in the procedure spolynomialsGB
    329256     */
    330257    ideal leadTermsAlgebra=lead(algebra);
     
    348275  poly p,normalform,leadF;
    349276  intvec tempExp;
    350   //------------------algebraic reduction for each polynomial F[i] ------------
     277  //------------------algebraic reduction for each polynomial F[i] ---------------------------------------
    351278  for (i=1; i<=ncols(F);i++)
    352279  {
     
    355282    {
    356283      leadF=lead(F[i]);
    357       if(leadmonom(leadF)==1) { //K is always contained in the subalgebra,
    358                                 //thus the remainder is zero in this case
     284      if(leadmonom(leadF)==1) { //K is always contained in the subalgebra, thus the remainder is zero in this case
    359285        if (parRed) { break; }
    360286        else { F[i]=0; break; }
    361287      }
    362       //note: as the ordering in br and r might not be compatible it can be
    363       //that lead(F[i]) in r is different from lead(F[i]) in br. To take the
    364       //"correct" leading term therefore take lead(F[i]) in br and transfer
    365       //it to the extension r
     288      //note: as the ordering in br and r might not be compatible it can be that lead(F[i]) in r is
     289      //different from lead(F[i]) in br. To take the "correct" leading term therefore take lead(F[i])
     290      //in br and transfer it to the extension r
    366291      setring r;
    367292      leadF=fetch(br,leadF);
    368293      p=reduce(leadF,kern);
    369294      if (leadmonom(p)<varsBasering[numVarsBasering])
    370       {        //as choosen ordering is a block ordering,
    371                //lm(p) in K[y_1...y_m] is equivalent to lm(p)<x_n
     295      {        //as choosen ordering is a block ordering, lm(p) in K[y_1...y_m] is equivalent to lm(p)<x_n
    372296        //Needs to be changed, if no block ordering is used!
    373297        setring br;
     
    398322
    399323static proc reduceByMonomials(ideal algebra)
    400 /* This procedures uses the sagbiReduce procedure to reduce all polynomials
    401  * in algebra, which are not monomials, by the subset of all monomials.
     324/*This procedures uses the sagbiReduce procedure to reduce all polynomials in algebra, which
     325 * are not monomials, by the subset of all monomials.
    402326 */
    403327{
     
    416340    }
    417341  }
    418   //Monomials now contains the subset of all monomials in algebra, algebra
    419   //contains the non-monomials.
     342  //Monomials now contains the subset of all monomials in algebra, algebra contains the non-monomials.
    420343  if(size(monomials)>0)
    421344  {
     
    435358
    436359static proc sagbiConstruction(ideal algebra, int iterations, int tailreduction, int method,int parRed)
    437 /* This procedure is the SAGBI construction algorithm and does the actual
    438  * computation both for the procedure sagbi and sagbiPart.
    439  * - If the sagbi procedure calls this procedure, iterations==-1 and this
    440  *   procedure only stops if all S-Polynomials reduce to zero (criterion for
    441  *   termination of SAGBI construction algorithm).
    442  * - If the sagbiPart procedure calls this procedure, iterations>=0 and
    443  *   iterations specifies the number of iterations. A degree boundary is not
    444  *   used here.
    445  * Note that parRed is used for testing a special modification and can be
    446  * ignored (assume parRed==0).
     360/* This procedure is the SAGBI construction algorithm and does the actual computation both for
     361 * the procedure sagbi and sagbiPart.
     362 * - If the sagbi procedure calls this procedure, iterations==-1 and this procedure only stops
     363 *   if all S-Polynomials reduce to zero (criterion for termination of SAGBI construction algorithm).
     364 * - If the sagbiPart procedure calls this procedure, iterations>=0 and iterations specifies the
     365 *   number of iterations. A degree boundary is not used here.
     366 * Note that parRed is used for testing a special modification and can be ignored (assume parRed==0).
    447367 */
    448368{
     
    464384    iterations=1;
    465385  }
    466   ideal P=1; //note: P is initialized this way, so that the while loop is
    467              //entered. P gets overriden there, anyhow.
     386  ideal P=1; //note: P is initialized this way, so that the while loop is entered. P gets overriden there, anyhow.
    468387  ideal varsBasering=maxideal(1);
    469388  map phi;
     
    478397    phi=r,varsBasering,algebra;
    479398    spolynomialsNew=simplify(phi(algebraicRelationsNew),6);
    480     //By construction spolynomialsNew only contains the spolynomials, that
    481     //have not already been calculated in the steps before.
     399    //By construction spolynomialsNew only contains the spolynomials, that have not already
     400    //been calculated in the steps before.
    482401    P=reductionGB(spolynomialsNew,algebra,r,tailreduction,method,parRed);
    483402    if (parRed)
     
    495414    if (parRed==0)
    496415    {
    497       P=reduceByMonomials(P);  //Reducing with monomials is cheap and can
    498                                //only result in less terms
    499       P=simplify(simplify(P,3),4); //Avoid that zeros are added to the bases
    500                                    //or one element in P more than once
     416      P=reduceByMonomials(P);  //Reducing with monomials is cheap and can only result in less terms
     417      P=simplify(simplify(P,3),4); //Avoid that zeros are added to the bases or one element in P more than once
    501418    }
    502419    else
     
    504421      P=simplify(P,6);
    505422    }
    506     algebra=algebra,P;         //Note that elements and order of elements must
    507                                //in algebra must not be changed, otherwise the
    508                                //already calculated
    509     //ideal in r will give wrong results. Thus it is important to use a komma
    510     //here.
     423    algebra=algebra,P;         //Note that elements and order of elements must in algebra must not be changed, otherwise the already calculated
     424    //ideal in r will give wrong results. Thus it is important to use a komma here.
    511425    i=i+step;
    512426  }
     
    516430    {
    517431      dbprint(4-voice,
    518               "//SAGBI construction algorithm terminated after "
    519               +string(i-1)+" iterations, as all SAGBI S-polynomials reduced"
    520               +" to 0. //Returned generators therefore are a SAGBI basis.");
     432              "//SAGBI construction algorithm terminated after "+string(i-1)+" iterations, as all SAGBI S-polynomials reduced to 0.
     433//Returned generators therefore are a SAGBI basis.");
    521434    }
    522435    else
    523436    {
    524437      dbprint(4-voice,
    525               "//SAGBI construction algorithm stopped as it reached the limit"
    526               +" of "+string(iterations)+" iterations. //In general the"
    527               +" returned generators are no SAGBI basis for the given"
    528               +" algebra.");
     438              "//SAGBI construction algorithm stopped as it reached the limit of "+string(iterations)+" iterations.
     439//In general the returned generators are no SAGBI basis for the given algebra.");
    529440    }
    530441  }
     
    540451
    541452proc sagbiSPoly(ideal algebra,list #)
    542 "USAGE:   sagbiSPoly(A[, returnRing, meth]);  A is an ideal, returnRing and
    543                                               meth are integers.
     453"USAGE:   sagbiSPoly(A[, returnRing, meth]);  A is an ideal, returnRing and meth are integers.
    544454RETURN:   ideal or ring
    545455ASSUME: basering is not a qring
    546 PURPOSE: Returns SAGBI S-polynomials of the leading terms of given ideal A if
    547          returnRing=0.
     456PURPOSE: Returns SAGBI S-polynomials of the leading terms of a given ideal A if returnRing=0.
    548457@*       Otherwise returns a new ring containing the ideals algebraicRelations
    549458@*       and spolynomials, where these objects are explained by their name.
     
    649558PURPOSE:
    650559@format
    651     The optional argument tr=tailred determines whether tail reduction will
    652     be performed.
     560    The optional argument tr=tailred determines whether tail reduction will be performed.
    653561     - If (tailred=0), no tail reduction is done.
    654562     - If (tailred<>0), tail reduction is done.
     
    732640  ideal P=p1,p2;
    733641  //---------------------------------------------
    734   //SAGBI reduction of polynomial p1 by algebra A. Default call, that is, no
    735   //tail-reduction is done.
     642  //SAGBI reduction of polynomial p1 by algebra A. Default call, that is, no tail-reduction is done.
    736643  sagbiReduce(p1,A);
    737644  //---------------------------------------------
    738   //SAGBI reduction of set of polynomials P by algebra A, now tail-reduction
    739   //is done.
     645  //SAGBI reduction of set of polynomials P by algebra A, now tail-reduction is done.
    740646  sagbiReduce(P,A,1);
    741647}
     
    745651RETURN: ideal, a SAGBI basis for A
    746652ASSUME: basering is not a qring
    747 PURPOSE: Computes a SAGBI basis for the subalgebra given by the generators
    748          in A.
     653PURPOSE: Computes a SAGBI basis for the subalgebra given by the generators in A.
    749654@format
    750     The optional argument tr=tailred determines whether tail reduction will
    751     be performed.
     655    The optional argument tr=tailred determines whether tail reduction will be performed.
    752656     - If (tailred=0), no tail reduction is performed,
    753657     - If (tailred<>0), tail reduction is performed.
     
    812716RETURN: ideal
    813717ASSUME: basering is not a qring
    814 PURPOSE: Performs k iterations of the SAGBI construction algorithm for the
    815          subalgebra given by the generators given by A.
     718PURPOSE: Performs k iterations of the SAGBI construction algorithm for the subalgebra given by the generators given by A.
    816719@format
    817      The optional argument tr=tailred determines if tail reduction will be
    818      performed.
     720     The optional argument tr=tailred determines if tail reduction will be performed.
    819721     - If (tailred=0), no tail reduction is performed,
    820722     - If (tailred<>0), tail reduction is performed.
     
    890792RETURN: ring
    891793ASSUME: basering is not a qring
    892 PURPOSE: In @code{it} iterations, compute algebraic dependencies between
    893          elements of I
     794PURPOSE: In @code{it} iterations, compute algebraic dependencies between elements of I
    894795EXAMPLE: example algebraicDependence; shows an example"
    895796{
     
    1042943
    1043944  //In quotient rings, SINGULAR, usually does not reduce polynomials w.r.t the
    1044   //quotient ideal,therefore we should first  reduce ,when it is necessary for
    1045   //computations, to have a uniquely determined representant for each
    1046   //equivalent class, which is the case of this algorithm.
     945  //quotient ideal,therefore we should first  reduce ,when it is necessary for computations,
     946  // to have a uniquely determined representant for each equivalent
     947  //class,which is the case of this algorithm.
    1047948
    1048949  if(b !=0) //means that the basering is a quotient ring
     
    1096997
    1097998    //------------- change the basering bsr to bsr[@(0),...,@(z)] ----------
    1098     execute("ring s=("+charstr(basering)+"),("+varstr(basering)
    1099             +",@(0..z)),dp;");
    1100     // Ev hier die Reihenfolge der Vars aendern. Dazu muss unten aber
    1101     // entsprechend geaendert werden:
    1102     //  execute("ring s="+charstr(basering)+",(@(0..z),"
    1103     //          +varstr(basering)+"),dp;");
     999    execute("ring s=("+charstr(basering)+"),("+varstr(basering)+",@(0..z)),dp;");
     1000    // Ev hier die Reihenfolge der Vars aendern. Dazu muss unten aber entsprechend
     1001    // geaendert werden:
     1002    //  execute("ring s="+charstr(basering)+",(@(0..z),"+varstr(basering)+"),dp;");
    11041003
    11051004    //constructs the leading ideal of dom=(p-@(0),dom[1]-@(1),...,dom[z]-@(z))
     
    11211020    if(choose==2)
    11221021    {
    1123       ideal kern= nselect(groebner(dom),1..n);//"nselect" is combinatorial
    1124                                          //command which uses the internal
    1125                                          //command "simplify"
     1022      ideal kern= nselect(groebner(dom),1..n);//"nselect" is combinatorial command
     1023                                         //which uses the internal command
     1024                                         // "simplify"
    11261025    }
    11271026
     
    11701069
    11711070proc sagbiNF(id,ideal dom,int k,list#)
    1172 "USAGE: sagbiNF(id,dom,k[,n]); id either poly or ideal,dom ideal, k and n
    1173         positive intergers.
     1071"USAGE: sagbiNF(id,dom,k[,n]); id either poly or ideal,dom ideal, k and n positive intergers.
    11741072RETURN: same as type of id; ideal or polynomial.
    11751073PURPOSE:
Note: See TracChangeset for help on using the changeset viewer.