Changeset 8b368ff in git for Singular/LIB/schreyer.lib


Ignore:
Timestamp:
May 31, 2013, 6:43:08 PM (11 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
2407cbbcbfa07c81823bde4407a9c0ae473b292c
Parents:
b2fb0c0e98297019d6f0ef81e8a72354659ad7dd
git-author:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2013-05-31 18:43:08+02:00
git-committer:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2014-05-07 04:41:44+02:00
Message:
Minor chages + defaults
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/schreyer.lib

    rb2fb0c r8b368ff  
    495495  }
    496496
    497   if( typeof( attrib(basering, "SYZCHECK") ) == "int" )
    498   {
    499     int @SYZCHECK = attrib(basering, "SYZCHECK");
    500   } else
    501   {
    502     int @SYZCHECK = @DEBUG;
     497  if( typeof( attrib(basering, "KERCHECK") ) == "int" )
     498  {
     499    int @KERCHECK = attrib(basering, "KERCHECK");
     500  } else
     501  {
     502    int @KERCHECK = @DEBUG; // TODO: @SYZCHECK:(
    503503  }
    504504
     
    511511  def @N = M; Sort_c_ds(@N);
    512512 
    513   if( @SYZCHECK )
     513  if( @KERCHECK )
    514514  {
    515515    def iv = sort(lead(M), "c,ds", 1)[2]; // ,1 => reversed! // TODO: not needed?
     
    518518   
    519519    // 0^th syz. property
    520     if( size(module( matrix(@N) - matrix(@M) )) > 0 )
     520    if(size(@N) * size(@M) > 0 )
     521    {
     522    if( size(module( matrix(module(matrix(@N))) - matrix(module(matrix(@M))) )) > 0 )
    521523    {
    522524      "@M:"; @M;
     
    526528      module( matrix(@N) - matrix(@M) );
    527529
    528       "ERROR: wrong sorting in 'MySort': @N != @M!!!";
     530      "ERROR: MySort: wrong sorting in 'MySort': @N != @M!!!";
    529531      $
    530532    }
     533    }
    531534  }
    532535
     
    563566    @SYZCHECK = attrib(SSinit, "SYZCHECK");
    564567  }
    565  
     568
     569  int @KERCHECK = @SYZCHECK;
     570
     571  if( typeof( attrib(SSinit, "KERCHECK") ) == "int" )
     572  {
     573    @KERCHECK = attrib(SSinit, "KERCHECK");
     574  }
     575
    566576  if( @DEBUG )
    567577  {
     
    743753  attrib(S, "DEBUG", @DEBUG);
    744754  attrib(S, "SYZCHECK", @SYZCHECK);
     755  attrib(S, "KERCHECK", @KERCHECK);
    745756 
    746757  if( @DEBUG )
     
    805816    int @SYZCHECK = @DEBUG;
    806817  }
    807  
     818
     819  if( typeof( attrib(basering, "KERCHECK") ) == "int" )
     820  {
     821    int @KERCHECK = attrib(basering, "KERCHECK");
     822  } else
     823  {
     824    int @KERCHECK = @SYZCHECK;
     825  }
     826
    808827  if( @DEBUG )
    809828  {
     
    814833  module SS = ComputeLeadingSyzygyTerms(L);
    815834
    816   if( @SYZCHECK )
     835  if( @KERCHECK )
    817836  { 
    818837    int i, j, r;
     
    860879    S = MySort(simplify(S, 2));
    861880
     881    if( size(S) * size(SS) > 0 )
     882    {
    862883    if( size(module(matrix(S) - matrix(SS))) > 0 )
    863884    {
    864         "ERROR: S != SS ";
     885        "ERROR: SSComputeLeadingSyzygyTerms: S != SS ";
    865886
    866887        "basering: ";
     
    877898        $
    878899    }
     900    }
    879901  }
    880902
     
    887909  }
    888910 
    889   attrib(SS, "isSB", 1);
    890 
     911  if( size(SS) > 0 )
     912  {
     913    attrib(SS, "isSB", 1);
     914  }
     915 
    891916  return (SS);
    892917}
     
    909934  {
    910935    int @SYZCHECK = @DEBUG;
     936  }
     937
     938  if( typeof( attrib(basering, "KERCHECK") ) == "int" )
     939  {
     940    int @KERCHECK = attrib(basering, "KERCHECK");
     941  } else
     942  {
     943    int @KERCHECK = @SYZCHECK;
    911944  }
    912945
     
    942975      }
    943976    }
     977  }
     978   
     979  if( @KERCHECK )
     980  {
    944981
    945982    int i, j, r;
     
    10081045    if( size(module(matrix(S) - matrix(SS))) > 0 )
    10091046    {
    1010       "ERROR: S != SS ";
     1047      "ERROR: SSCompute2LeadingSyzygyTerms: S != SS ";
    10111048
    10121049      "basering: ";
     
    12911328    int @SYZCHECK = @DEBUG;
    12921329  }
    1293   
     1330 
    12941331 
    12951332  if( @DEBUG )
     
    16521689  def S = SSres(M, 0); setring S; S;
    16531690  MRES;
     1691  print(_);
    16541692  RES;
     1693
     1694  kill S; setring r; kill M;
     1695
     1696  kill r;
     1697 
     1698  ring R = 0, (w, x, y, z), dp;
     1699  ideal M = w^2 - x*z,  w*x - y*z,  x^2 - w*y, x*y - z^2, y^2 - w*z;
     1700 
     1701  def S = SSres(M, 0); setring S; S;
    16551702  "";
    16561703  LRES;
    16571704  "";
    1658   TRES;
    1659 
    1660   kill S; setring r; kill M;
    1661 
    1662   kill r;
    1663  
    1664   ring R = 0, (w, x, y, z), dp;
    1665   ideal M = w^2 - x*z,  w*x - y*z,  x^2 - w*y, x*y - z^2, y^2 - w*z;
    1666  
    1667   def S = SSres(M, 0); setring S; S;
     1705  TRES;
     1706  "";
    16681707  MRES;
     1708  print(_);
    16691709  RES;
    1670   "";
    1671   LRES;
    1672   "";
    1673   TRES;
    16741710}
    16751711
     
    19251961{
    19261962  attrib(SSinit, "SYZCHECK", 1); // TODO: only for now!!
     1963  attrib(SSinit, "KERCHECK", 0); // TODO: only for now!!
    19271964
    19281965  ring r; r; ideal M = maxideal(1); M;
     
    19662003
    19672004// TODO: betti!!!
    1968 
Note: See TracChangeset for help on using the changeset viewer.