Changeset 858cae in git for Singular/LIB/sagbi.lib


Ignore:
Timestamp:
Apr 8, 2011, 8:51:59 PM (13 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '2a584933abf2a2d3082034c7586d38bb6de1a30a')
Children:
2272157187c82cb5bd15a8c9b7faff7e3b064132
Parents:
1c4a19588a624228427528fb3b86f2eb66646188
Message:
fix format

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

Legend:

Unmodified
Added
Removed
  • Singular/LIB/sagbi.lib

    r1c4a19 r858cae  
    1515
    1616REFERENCES:
    17 Ana Bravo: Some Facts About Canonical Subalgebra Bases, 
     17Ana Bravo: Some Facts About Canonical Subalgebra Bases,
    1818MSRI Publications  51, p. 247-254
    1919
     
    137137   */
    138138  int ppl = printlevel-voice+3; //variable for additional printlevel-dependend information
    139   dbprint(ppl,"//Spoly-1- initialisation and precomputation"); 
     139  dbprint(ppl,"//Spoly-1- initialisation and precomputation");
    140140  def br=basering;
    141141  ideal varsBasering=maxideal(1);
     
    169169  }
    170170  //--------------- calculate kernel of Phi depending on method choosen ---------------
    171   dbprint(ppl,"//Spoly-2- Groebner basis computation"); 
     171  dbprint(ppl,"//Spoly-2- Groebner basis computation");
    172172  attrib(kernOld,"isSB",1);
    173173  ideal kern=stdKernPhi(kernNew,kernOld,leadTermsAlgebra,method);
    174   dbprint(ppl-2,"//Spoly-2-1- ideal kern",kern);       
     174  dbprint(ppl-2,"//Spoly-2-1- ideal kern",kern);
    175175  //-------------------------- calulate algebraic relations -----------------------
    176   dbprint(ppl,"//Spoly-3- computing new algebraic relations"); 
     176  dbprint(ppl,"//Spoly-3- computing new algebraic relations");
    177177  ideal algebraicRelations=nselect(kern,1..nvars(br));
    178178  attrib(algebraicRelationsOld,"isSB",1);
     
    201201   */
    202202  int ppl = printlevel-voice+3; //variable for additional printlevel-dependend information
    203   dbprint(ppl,"//Spoly-1- initialisation and precomputation"); 
     203  dbprint(ppl,"//Spoly-1- initialisation and precomputation");
    204204  def br=basering;
    205205  int m=ncols(algebra);
     
    241241  ideal algebraicRelations=toric_ideal(A,"ect");
    242242  //Suitable substitution
    243         dbprint(ppl,"//Spoly-3- substitutions");       
     243        dbprint(ppl,"//Spoly-3- substitutions");
    244244  ideal leadCoefficients=fetch(br,leadCoefficients);
    245245  for (i=1; i<=m; i++)
     
    250250    }
    251251  }
    252         dbprint(ppl-2,"//Spoly-3-1- algebraic relations",algebraicRelations);   
     252        dbprint(ppl-2,"//Spoly-3-1- algebraic relations",algebraicRelations);
    253253  export algebraicRelations;
    254254  return(rNew);
     
    268268   * algebraicDependence causes this procedure to be called with parRed<>0. The only difference when parRed<>0
    269269   * is that the reduction algorithms returns the non-zero constants it attains (instead of just returning zero as the
    270         * correct remainder), as they will be expressions in parameters for an algebraic dependence.
     270        * correct remainder), as they will be expressions in parameters for an algebraic dependence.
    271271   */
    272272  int ppl = printlevel-voice+3; //variable for additional printlevel-dependend information
    273   dbprint(ppl,"//Red-1- initialisation and precomputation");   
     273  dbprint(ppl,"//Red-1- initialisation and precomputation");
    274274  def br=basering;
    275275  int numVarsBasering=nvars(br);
     
    279279  if (numVarsBasering==nvars(r))
    280280  {
    281                 dbprint(ppl-1,"//Red-1-1- Groebner basis computation");
     281                dbprint(ppl-1,"//Red-1-1- Groebner basis computation");
    282282    /* Case that ring r is the same ring as the basering. Using proc extendRing,
    283283     * stdKernPhi
     
    315315  for (i=1; i<=ncols(F);i++)
    316316  {
    317                 dbprint(ppl-1,"//Red-2-"+string(i)+"- starting with new polynomial");
    318                 dbprint(ppl-2,"//Red-2-"+string(i)+"-1- Polynomial before reduction",F[i]);
     317                dbprint(ppl-1,"//Red-2-"+string(i)+"- starting with new polynomial");
     318                dbprint(ppl-2,"//Red-2-"+string(i)+"-1- Polynomial before reduction",F[i]);
    319319    normalform=0;
    320320    while (F[i]!=0)
     
    325325      //K is always contained in the subalgebra,
    326326      //thus the remainder is zero in this case
    327         if (parRed) 
    328         { 
    329                                 //If parRed<>0 save non-zero constants the reduction algorithms attains.
    330                                         break;
    331                                 }
    332         else 
    333         { 
    334                                         F[i]=0;
    335                                         break;
    336                                 }
     327        if (parRed)
     328        {
     329                                //If parRed<>0 save non-zero constants the reduction algorithms attains.
     330                                        break;
     331                                }
     332        else
     333        {
     334                                        F[i]=0;
     335                                        break;
     336                                }
    337337      }
    338338      //note: as the ordering in br and r might not be compatible
     
    423423 *   and iterations specifies the
    424424 *   number of iterations. A degree boundary is not used here.
    425  * When this method is called via the procedures sagbi and sagbiPart the integer parRed 
    426  * will always be zero. Only the procedure algebraicDependence calls this procedure with 
    427  * parRed<>0. The only difference when parRed<>0 is that the reduction algorithms returns 
    428  * the non-zero constants it attains (instead of just returning zero as the correct 
    429  * remainder), as they will be expressions in parameters for an algebraic dependence. 
     425 * When this method is called via the procedures sagbi and sagbiPart the integer parRed
     426 * will always be zero. Only the procedure algebraicDependence calls this procedure with
     427 * parRed<>0. The only difference when parRed<>0 is that the reduction algorithms returns
     428 * the non-zero constants it attains (instead of just returning zero as the correct
     429 * remainder), as they will be expressions in parameters for an algebraic dependence.
    430430 * These constants are saved in the ideal reducedParameters.
    431431 */
    432432{
    433433  int ppl = printlevel-voice+3; //variable for additional printlevel-dependend information
    434   dbprint(ppl,"// -0- initialisation and precomputation");     
     434  dbprint(ppl,"// -0- initialisation and precomputation");
    435435  def br=basering;
    436436  int i=1;
     
    874874RETURN: ring
    875875ASSUME: basering is not a qring
    876 PURPOSE: Returns a ring containing the ideal @code{algDep}, which contains possibly 
    877 @*              some algebraic dependencies of the elements of I obtained through @code{it}
    878 @*              iterations of the SAGBI construction algorithms. See the example on how
    879 @*              to access these objects.
     876PURPOSE: Returns a ring containing the ideal @code{algDep}, which contains possibly
     877@*                 some algebraic dependencies of the elements of I obtained through @code{it}
     878@*                 iterations of the SAGBI construction algorithms. See the example on how
     879@*                 to access these objects.
    880880EXAMPLE: example algebraicDependence; shows an example"
    881881{
    882         assumeQring();
    883         int ppl = printlevel-voice+3; //variable for additional printlevel-dependend information
    884   dbprint(ppl,"//AlgDep-1- initialisation and precomputation"); 
     882        assumeQring();
     883        int ppl = printlevel-voice+3; //variable for additional printlevel-dependend information
     884  dbprint(ppl,"//AlgDep-1- initialisation and precomputation");
    885885  def br=basering;
    886886  int i;
    887887  I=simplify(I,2); //avoid that I contains zeros
    888888
    889         //Create two polynomial rings, which both are extensions of the current basering.
     889        //Create two polynomial rings, which both are extensions of the current basering.
    890890  //The first ring will contain the additional paramteres @c(1),...,@c(m), the second one
    891891  //will contain the additional variables @c(1),...,@c(m), where m=ncols(I).
     
    953953  //         }
    954954
    955         //Compute a partial SAGBI basis of the algebra generated by I[1]-@c(1),...,I[m]-@c(m),
     955        //Compute a partial SAGBI basis of the algebra generated by I[1]-@c(1),...,I[m]-@c(m),
    956956  //where the @c(n) are parameters
    957957  ideal I=fetch(br,I);
     
    961961    algebra[i]=I[i]-par(i);
    962962  }
    963   dbprint(ppl,"//AlgDep-2- call of SAGBI construction algorithm");     
     963  dbprint(ppl,"//AlgDep-2- call of SAGBI construction algorithm");
    964964  algebra=sagbiConstruction(algebra, iterations,0,0,1);
    965   dbprint(ppl,"//AlgDep-3- postprocessing of results"); 
     965  dbprint(ppl,"//AlgDep-3- postprocessing of results");
    966966  int j=1;
    967967  //If K[x_1,...,x_n] was the basering, then algebra is in K(@c(1),...,@c(m))[x_1,...x_n]. We intersect
     
    985985  for (i=1; i<=ncols(algDep); i++)
    986986  {
    987                 if(leadmonom(algDep[i])==1)
    988                 {
    989                                 algDep[i]=0;
    990                 }
    991         }
    992         algDep=simplify(algDep,2);
     987                if(leadmonom(algDep[i])==1)
     988                {
     989                                algDep[i]=0;
     990                }
     991        }
     992        algDep=simplify(algDep,2);
    993993  export algDep,algebra;
    994994  setring br;
     
    10181018  /* performs subalgebra interreduction of a set of subalgebra generators */
    10191019  int ppl = printlevel-voice+3; //variable for additional printlevel-dependend information
    1020   dbprint(ppl,"//Interred-1- starting interreduction"); 
     1020  dbprint(ppl,"//Interred-1- starting interreduction");
    10211021  ideal J,B;
    10221022  int i,j,k;
     
    10311031  }
    10321032  I=simplify(I,2);
    1033   dbprint(ppl,"//Interred-2- interreduction completed");       
     1033  dbprint(ppl,"//Interred-2- interreduction completed");
    10341034  return(I);
    10351035}
Note: See TracChangeset for help on using the changeset viewer.