Changeset 3e032aa in git for Singular/LIB/sing.lib


Ignore:
Timestamp:
Jan 28, 2014, 11:19:02 AM (10 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
d1280f11e9d71dd9d45c276dfc5619bd557fba32
Parents:
4e4e24bd5220c690dc16529b1fb431b5ef67482c738208e574e435aed89673e40171a0e9c7b58651
Message:
Merge pull request #474 from surface-smoothers/fix-slocus.proposal

fix slocus bug for zero ideal (see Singular-track 526)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/sing.lib

    r4e4e24b r3e032aa  
    362362///////////////////////////////////////////////////////////////////////////////
    363363
    364 proc slocus (ideal i)
     364proc slocus(ideal i)
    365365"USAGE:   slocus(i);  i ideal
    366 RETURN:  ideal of singular locus of i
     366RETURN:  ideal of singular locus of i. Quotient rings and rings with integer coefficients are currently not supported.
    367367EXAMPLE: example slocus; shows an example
    368368"
    369369{
     370  // quotient rings currently not supported
     371  ASSUME( 0, 0==isQuotientRing(basering) );
     372  // integer coefficient rings currently not supported
     373  ASSUME( 0, 0==hasIntegerCoefficientRing(basering) );
     374
     375
    370376  def R=basering;
    371377  int j,k;
     
    415421{
    416422  ideal ist=std(i);
    417   if(deg(ist[1])==0){return(ist);}
    418   int cod  = nvars(basering)-dim(ist);
    419   i        = i+minor(jacob(i),cod);
     423  if ( size(ist)==0 ) // we have a zero ideal
     424  {
     425     // the zero locus of the zero ideal is nonsingular
     426     return( ideal(1) ) ;
     427  }
     428  if( deg( ist[1] ) == 0 ) // the ideal has a constant generator
     429  {
     430    return(ist);
     431  }
     432  int cod  = nvars(basering) - dim(ist);
     433  i        = i + minor( jacob(i), cod );
    420434  return(i);
    421435}
Note: See TracChangeset for help on using the changeset viewer.