Changeset a2c96e in git


Ignore:
Timestamp:
Sep 24, 2008, 9:54:59 AM (15 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '0604212ebb110535022efecad887940825b97c3f')
Children:
a1268301053fa4acc4bf30c8f2e760fe2df2bb7f
Parents:
040d28cacce3a8a9665322d46de21e8b0b452c8a
Message:
* GMG: hnoether.lib: comments to Newton non-degenerate added
       inout.lib::show id -> @@id
       sing.lib::milnor  printlevel and output


git-svn-id: file:///usr/local/Singular/svn/trunk@11078 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
Singular/LIB
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/hnoether.lib

    r040d28 ra2c96e  
    1 version="$Id: hnoether.lib,v 1.57 2008-07-08 12:33:46 Singular Exp $";
     1version="$Id: hnoether.lib,v 1.58 2008-09-24 07:54:59 Singular Exp $";
     2// (GMG, last modified 08.06.08: comments to Newton non-degenerate added)
     3///////////////////////////////////////////////////////////////////////////////
     4
    25category="Singularities";
    36info="
     
    270273{
    271274 //----------------- Wechsel in geeigneten Ring & Variablendefinition ---------
     275  if (nvars(basering)!=2)
     276  { ERROR("basering must have exactly 2 variables for Hnoether::squarefree"); }
    272277  def altring = basering;
    273278  int e;
    274279  int gcd_ok=1;
    275280  string mipl="0";
    276   if (nvars(basering)!=2)
    277   { ERROR("basering must have exactly 2 variables for Hnoether::squarefree"); }
    278281  if (size(parstr(altring))==1) { mipl=string(minpoly); }
    279282 //---- test: char = (p^k,a) (-> gcd not implemented) or (p,a) (gcd works) ----
     
    22942297  if(mu==nN)
    22952298  { // the Newton-polygon is non-degenerate
     2299    // REFERENCE? (tfuer mehr als 2 Variable gilt nicht, dass mu=nu impliziert,
     2300    // dass NP nicht ausgeartet ist!, Siehe KOMMENTAR in equising.lib in esIdeal)
    22962301    return(1);
    22972302  }
  • Singular/LIB/inout.lib

    r040d28 ra2c96e  
    1 // (GMG/BM, last modified 22.06.96)
    2 ///////////////////////////////////////////////////////////////////////////////
    3 version="$Id: inout.lib,v 1.30 2007-11-29 13:27:48 king Exp $";
     1//(GMG/BM, last modified 22.06.96)
     2//(GMG, last modified 21.07.2008: Argument von show von id in @@id geaendert)
     3///////////////////////////////////////////////////////////////////////////////
     4version="$Id: inout.lib,v 1.31 2008-09-24 07:54:59 Singular Exp $";
    45category="General purpose";
    56info="
     
    111112proc pmat (matrix m, list #)
    112113"USAGE:   pmat(M[,n]);  M matrix, n integer
    113 RETURN: A string representing M in array format if it fits into
    114         pagewidth; if n is given, only the first n characters of
    115         each column are shown (n>1 required), where a truncation
    116         of a column is indicated by two dots (\'..\')
     114DISPLAY: display M in array format if it fits into pagewidth; if n is given,
     115         only the first n characters of each colum are shown
     116RETURN:  no return value
    117117EXAMPLE: example pmat; shows an example
    118118"
    119119{
    120120//------------- main case: input is a matrix, no second argument---------------
    121    string OUT = "";
    122121   if ( size(#)==0)
    123122   {
     
    145144            elems = elems + nrows(m);
    146145         }
    147          OUT=OUT+aus+newline;
     146         aus;
    148147      }
    149148   //--------------- print last row (no comma after last entry) ---------------
     
    155154      }
    156155      aus = aus + string(m[nrows(m),ncols(m)]);
    157       OUT=OUT+aus;  return(OUT);
     156      aus;  return();
    158157   }
    159158//---------- second case: second argument is given and of type int ------------
    160    if ( typeof(#[1])=="int" and #[1]>1)
    161    {  string aus,tmp; int c,r;
    162    //---------------------- print all - except last - rows --------------------
    163       for ( r=1; r<nrows(m); r=r+1)
     159   if ( typeof(#[1])=="int" )
     160   {  string aus,tmp; int ll,c,r;
     161      for ( r=1; r<=nrows(m); r=r+1)
    164162      {  aus = "";
    165163         for (c=1; c<=ncols(m); c=c+1)
    166164         {
    167165            tmp=string(m[r,c]);
    168             if (size(tmp)>#[1])
    169             { tmp[#[1]-1]=".";
    170               tmp[#[1]]  =".";
    171               aus=aus+tmp[1,#[1]]+", ";
    172             }
    173             else
    174             { tmp=tmp+",";
    175               aus=aus+tmp[1,#[1]+1]+" ";
    176             }
    177          }
    178          OUT=OUT+aus+newline;
    179       }
    180    //--------------- print last row (no comma after last entry) ---------------
    181       aus = "";
    182       for (c=1; c<ncols(m); c=c+1)
    183       { tmp=string(m[r,c]);
    184         if (size(tmp)>#[1])
    185         { tmp[#[1]-1]=".";
    186           tmp[#[1]]  =".";
    187           aus=aus+tmp[1,#[1]]+", ";
    188         }
    189         else
    190         { tmp=tmp+",";
    191           aus=aus+tmp[1,#[1]+1]+" ";
    192         }
    193       }
    194       tmp=string(m[nrows(m),ncols(m)]);
    195       if (size(tmp)>#[1])
    196       { tmp[#[1]-1]=".";
    197         tmp[#[1]]  =".";
    198       }
    199       aus = aus + tmp[1,#[1]];
    200       OUT=OUT+aus;  return(OUT);
     166            aus=aus+tmp[1,#[1]]+" ";
     167         }
     168         aus;
     169      }
     170      return();
    201171   }
    202172}
     
    207177   matrix m[3][3]=i^2;
    208178   pmat(m);
    209    pmat(m,5);
     179   pmat(m,3);
    210180}
    211181///////////////////////////////////////////////////////////////////////////////
     
    333303///////////////////////////////////////////////////////////////////////////////
    334304
    335 proc show (id, list #)
     305proc show (@@id, list #)
    336306"USAGE:   show(id);   id any object of basering or of type ring/qring
    337307@*       show(R,s);  R=ring, s=string (s = name of an object belonging to R)
     
    355325      if( typeof(#[1])=="int" ) { @li@=#[1]; }
    356326   }
    357    if ( typeof(id)!="list" )
     327   if ( typeof(@@id)!="list" )
    358328   {
    359329      if( size(#)==0 )
    360330      {
    361           def @id@ = id;
     331          def @id@ = @@id;
    362332      }
    363333      if( size(#)==1 )
     
    365335         if( typeof(#[1])=="int" )
    366336         {
    367              def @id@ = id;
     337             def @id@ = @@id;
    368338         }
    369339         if( typeof(#[1])=="string" )
    370340         {
    371             if( typeof(id)=="ring" or typeof(id)=="qring")
     341            if( typeof(@@id)=="ring" or typeof(@@id)=="qring")
    372342            {
    373                def @R@ = id;
     343               def @R@ = @@id;
    374344               setring @R@;
    375345               def @id@=`#[1]`;
     
    378348      }
    379349   }
    380 //----------------------- case: id is of type list ----------------------------
    381    if ( typeof(id)=="list" )
    382    {
    383 //      @@s = tab(@li@)+"// list, "+string(size(id))+" element(s):";
    384       @@s = tab((3*(voice-2)))+"// list, "+string(size(id))+" element(s):";
     350//----------------------- case: @@id is of type list -------------------------
     351   if ( typeof(@@id)=="list" )
     352   {
     353//      @@s = tab(@li@)+"// list, "+string(size(@@id))+" element(s):";
     354      @@s = tab((3*(voice-2)))+"// list, "+string(size(@@id))+" element(s):";
    385355      @@s;
    386       for ( @ii=1; @ii<=size(id); @ii++ )
    387       {
    388          if( typeof(id[@ii])!="none" )
    389          {
    390             def @id(@ii) = id[@ii];
     356      for ( @ii=1; @ii<=size(@@id); @ii++ )
     357      {
     358         if( typeof(@@id[@ii])!="none" )
     359         {
     360            def @id(@ii) = @@id[@ii];
    391361            tab(3*(voice-2))+"["+string(@ii)+"]:";
    392362            //           show(@id(@ii),@li@+3*(voice-1));
     
    396366         {
    397367            "["+string(@ii)+"]:";
    398             tab(@li@+2),"//",id[@ii];
     368            tab(@li@+2),"//",@@id[@ii];
    399369         }
    400370      }
     
    487457      {
    488458         list na@me@s=names(@id@);
    489          kill @id@;
     459         //kill @id@;
    490460         @@s = tab(@li@)+"// ring:"; @@s,s;
    491461         @@s = tab(@li@)+"// minpoly ="; @@s,minpoly;
  • Singular/LIB/sing.lib

    r040d28 ra2c96e  
    1 // $Id: sing.lib,v 1.30 2006-08-02 15:40:52 Singular Exp $
    2 //(GMG/BM, last modified 26.06.96)
    3 ///////////////////////////////////////////////////////////////////////////////
    4 version="$Id: sing.lib,v 1.30 2006-08-02 15:40:52 Singular Exp $";
     1// $Id: sing.lib,v 1.31 2008-09-24 07:54:59 Singular Exp $
     2//(GMG/BM, last modified 26.06.96,
     3//GMG, 27.7.08: in milnor printlevel und Ausschrift geŠndert)
     4///////////////////////////////////////////////////////////////////////////////
     5version="$Id: sing.lib,v 1.31 2008-09-24 07:54:59 Singular Exp $";
    56category="Singularities";
    67info="
     
    264265         singularity) in generic form, resp. -1 if not
    265266NOTE:    use proc nf_icis to put generators in generic form
    266          printlevel >=0: display comments (default)
     267         printlevel >=1: display comments
    267268EXAMPLE: example milnor; shows an example
    268269"
     
    271272  int n = size(i);
    272273  int l,q,m_nr;  ideal t;  intvec disc;
    273   int p = printlevel-voice+3;  // p=printlevel+1 (default: p=1)
     274  int p = printlevel-voice+2;             // p=printlevel+1 (default: p=0)
    274275//---------------------------- hypersurface case ------------------------------
    275276  if( n==1 or i==0 )
     
    277278     i = std(jacob(i[1]));
    278279     m_nr = vdim(i);
    279      if( m_nr<0 and p>=1 ) { "// no isolated singularity"; }
     280     if( m_nr<0 and p>=1 ) { "// Milnor number is infinite"; }
    280281     return(m_nr);
    281282  }
     
    302303{ "EXAMPLE:"; echo = 2;
    303304   int p      = printlevel;
    304    printlevel = 1;
     305   printlevel = 2;
    305306   ring r     = 32003,(x,y,z),ds;
    306307   ideal j    = x5+y6+z6,x2+2y2+3z2,xyz+yx;
     
    799800"USAGE:   codim(id1,id2); id1,id2 ideal or module, both must be standard bases
    800801RETURN:  int, which is:
    801          1. the codimension of id2 in id1, i.e. the vectorspace dimension of
    802             id1/id2 if id2 is contained in id1 and if this number is finite@*
     802         1. the vectorspace dimension of id1/id2 if id2 is contained in id1
     803            and if this number is finite@*
    803804         2. -1 if the dimension of id1/id2 is infinite@*
    804          3. -2 if id2 is not contained in id1,
    805 COMPUTE: consider the two Hilbert series iv1(t) and iv2(t), then, in case 1.,
    806          q(t)=(iv2(t)-iv1(t))/(1-t)^n must be rational, and the result is the
    807          sum of the coefficients of q(t) (n dimension of basering)
     805         3. -2 if id2 is not contained in id1
     806COMPUTE: consider the Hilbert series iv1(t) of id1 and iv2(t) of id2.
     807         If codim(id1,id2) is finite,  q(t)=(iv2(t)-iv1(t))/(1-t)^n is
     808         rational, and the codimension is the sum of the coefficients of q(t)
     809         (n = dimension of basering).
    808810EXAMPLE: example codim; shows an example
    809811"
     
    824826   if (i1 < 0)
    825827   {
     828     if ( i2 < 0 )
     829     {
     830        return(0);
     831     }
    826832     if (i2 == 0)
    827833     {
    828        return vdim(id2);
     834       return (vdim(id2));
    829835     }
    830836     else
Note: See TracChangeset for help on using the changeset viewer.