Changeset 47a6aec in git


Ignore:
Timestamp:
Jun 7, 1999, 7:01:26 PM (24 years ago)
Author:
Gert-Martin Greuel <greuel@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
Children:
f937e20ea755161f0ffc5168e6b102697901293d
Parents:
00b574855c4c3b834269f6a81fed2006d7408463
Message:
* greuel: changed help text, internal names changed (norid, normap),
   error message for local orderings


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

Legend:

Unmodified
Added
Removed
  • Singular/LIB/normal.lib

    r00b574 r47a6aec  
    66///////////////////////////////////////////////////////////////////////////////
    77
    8 version="$Id: normal.lib,v 1.12 1999-05-26 12:25:23 obachman Exp $";
     8version="$Id: normal.lib,v 1.13 1999-06-07 17:01:26 greuel Exp $";
    99info="
    1010LIBRARY: normal.lib     PROCEDURES FOR NORMALIZATION
     
    217217
    218218//---------- computation of p*Hom(J,J) as R-ideal -----------------------------
     219   if ( y>=1 )
     220   {
     221     "// compute p*Hom(rad(J),rad(J)) = p*J:J, p a non-zerodivisor";
     222     "//   p is equal to:"; "";
     223     p;
     224     "";
     225   }
     226
    219227   f  = quotient(p*J,J);
    220228   if ( y>=1 )
     
    270278      if(y>=1)
    271279      {
    272          "R=Hom(rad(J),rad(J))";
     280         "//   R=Hom(rad(J),rad(J))";
    273281         "   ";
    274282         lastRing;
    275283         "   ";
    276          "the new ideal";
     284         "//   the new ideal";
    277285         endid;
    278286         "   ";
    279          "the old ring";
     287         "//   the old ring";
    280288         "   ";
    281289         P;
    282290         "   ";
    283          "the old ideal";
     291         "//   the old ideal";
    284292         "   ";
    285293         setring P;
     
    287295         "   ";
    288296         setring lastRing;
    289          "the map";
     297         "//   the map";
    290298         "   ";
    291299         endphi;
    292300         "   ";
    293301         pause;
     302         newline;
    294303      }
    295304      setring P;
     
    298307   if(y>=1)
    299308   {
    300       "R is not equal to Hom(rad(J),rad(J)), we have to try again";
     309      "// R is not equal to Hom(rad(J),rad(J)), we have to try again";
    301310      pause;
     311      newline;
    302312   }
    303313//---------- Hom(J,j) != R: create new ring and map form old ring -------------
     
    348358   if(y>=1)
    349359   {
    350       "the ring structure of Hom(rad(J),rad(J)) as R-algebra";
     360      "// the ring structure of Hom(rad(J),rad(J)) as R-algebra";
    351361      " ";
    352       "the linear relations";
     362      "//   the linear relations";
    353363      " ";
    354364      Lin;
     
    365375   if(y>=1)
    366376   {
    367       "the quadratic relations";
     377      "//   the quadratic relations";
    368378      "   ";
    369379      interred(Quad);
    370380      pause;
     381      newline;
    371382   }
    372383   Q = Lin+Quad;
     
    400411   if(y>=1)
    401412   {
    402       "the new ring after reduction of the number of variables";
     413      "//   the new ring after reduction of the number of variables";
    403414      "   ";
    404415      lastRing;
    405416      "   ";
    406       "the new ideal";
     417      "//   the new ideal";
     418      "   ";
    407419      endid;
    408420      "   ";
    409       "the old ring";
     421      "//   the old ring";
    410422      "   ";
    411423      P;
    412424      "   ";
    413       "the old ideal";
     425      "//   the old ideal";
    414426      "   ";
    415427      setring P;
     
    417429      "   ";
    418430      setring lastRing;
    419       "the map";
     431      "//   the map";
    420432      "   ";
    421433      endphi;
    422434      "   ";
    423435      pause;
     436      newline;
    424437   }
    425438   L = lastRing;
     
    445458///////////////////////////////////////////////////////////////////////////////
    446459proc normal(ideal id, list #)
    447 "USAGE:   normal(i [,choose]);  i ideal, choose empty or 1
     460"USAGE:   normal(i [,choose]);  i a radical ideal, choose empty or 1
    448461         if choose=1 the factorizing Buchberger algorithm is not used
    449462         (which is sometimes more efficient)
    450 RETURN:  a list L of rings, in each ring L[i] are two ideals
    451          norid, normap such that the product of the L[i]/norid is the
     463RETURN:  a list of rings (say nor), in each ring nor[i] are two ideals
     464         norid, normap such that the product of the nor[i]/norid is the
    452465         normalization of basering/id and normap is the map from basering/id
    453          to L[i]/norid
    454 NOTE:    to use the rings type: def r=L[i]; setring r; norid; normap;
     466         to nor[i]/norid
     467NOTE:    to use the i-th ring type: def R=nor[i]; setring R;
    455468         increasing printlevel displays more comments (default: printlevel=0)
    456 COMMENT: The algoritm works in principle for any basering and reduced ideal.
    457          The implementation should work correctly for any global (p-) ordering,
    458          however, this is not fully tested.
     469COMMENT: Not implemented for local or mixed orderings.
    459470         If the input ideal i is weighted homogeneous a weighted ordering may
    460471         be used (qhweight(i); computes weights).
     472CAUTION: The proc does not check whether the input is radical, for non radical
     473         ideals the output may be wrong (i=radical(i); makes i radical)
    461474EXAMPLE: example normal; shows an example
    462475"
    463476{
    464477   int i,j,y;
     478   string sr;
    465479   list result,prim,keepresult;
    466    y=printlevel-voice+2;
     480   y = printlevel-voice+2;
    467481
    468482   if ( find(ordstr(basering),"s")+find(ordstr(basering),"M") != 0)
    469483   {
    470      "
    471 // Not implemented for this ordering,
    472 // please change to global ordering!";
     484     "";
     485     "// Not implemented for this ordering,";
     486     "// please change to global ordering!";
    473487     return(result);
    474488   }
    475 
    476489
    477490   if(size(#)==0)
     
    536549          attrib(prim[1],"isRegInCodim2",0);
    537550      }
     551
     552      result = normalizationPrimes(prim[1],maxideal(1));
     553      sr = string(size(result));
     554     
    538555      dbprint(y+1,"
    539 // If the name of your list is L type:
    540 //          def r=L[i]; setring r; norid; normap;
    541 // then r/norid is the i-th ring of the normaliztion
    542 // and normap the map of the basring to r/norid");
    543 
    544       return(normalizationPrimes(prim[1],maxideal(1)));
     556// 'normal' created a list of "+sr+" ring(s).
     557// To see the rings, type (if the name of your list is nor):
     558     show( nor);
     559// To access the 1-st ring and map (and similair for the others), type:
     560     def R = nor[1]; setring R;  norid; normap;
     561// R/norid is the 1-st ring of the normalization and
     562// normap the map from the original basering to R/norid");
     563
     564      // kill endphi,endid;
     565       return(result);
    545566   }
    546567   else
     
    557578      if(y>=1)
    558579      {
    559          "we have ";size(prim);"components";
     580         "// we have ",size(prim),"components";
    560581      }
    561582      for(i=1;i<=size(prim);i++)
     
    563584         if(y>=1)
    564585         {
    565             "we are in loop";i;
     586            "// we are in loop ",i;
    566587         }
    567588         attrib(prim[i],"isCohenMacaulay",0);
     
    599620         }
    600621      }
     622      sr = string(size(result));
    601623
    602624      dbprint(y+1,"
    603 // If the name of your list is L type:
    604 //          def r=L[i]; setring r; norid; normap;
    605 // then r/norid is the i-th ring of the normaliztion
    606 // and normap the map of the basring to r/norid");
    607  
     625// 'normal' created a list of "+sr+" ring(s).
     626// To see the rings, type (if the name of your list is nor):
     627     show( nor);                 
     628// To access the 1-st ring and map (and similair for the others), type:
     629     def R = nor[1]; setring R;  norid; normap;
     630// R/norid is the 1-st ring of the normalization and
     631// normap the map from the original basering to R/norid");
     632
     633      //kill endphi,endid;
    608634      return(result);
    609635   }
     
    613639   ring r=32003,(x,y,z),wp(2,1,2);
    614640   ideal i=z3-xy4;
    615    list pr=normal(i);
    616    pr;
    617    def r1=pr[1];
     641   list nor=normal(i);
     642   show(nor);
     643   def r1=nor[1];
    618644   setring r1;
    619645   norid;
     
    637663   if(y>=1)
    638664   {
    639       "START one normalization loop with the ideal";
    640       "        ";
    641       i;
    642       "        ";
    643       basering;
    644       "        ";
    645       pause;
     665     "";
     666     "// START a normalization loop with the ideal";  "";
     667     i;  "";
     668     basering;  "";
     669     pause;
     670     newline;
    646671   }
    647672
     
    656681      if(y>=1)
    657682      {
    658           "the ideal was the zero-ideal";
     683          "// the ideal was the zero-ideal";
    659684      }
    660685         execute "ring newR7="+charstr(basering)+",("+varstr(basering)+"),("
     
    672697   if(y>=1)
    673698   {
    674       "                                  ";
    675       "                                  ";
    676       " SB-computation of the input ideal";
    677       "                                  ";
     699     "// SB-computation of the input ideal";
    678700   }
    679701   list SM=mstd(i);
     
    681703   if(y>=1)
    682704   {
    683       " the dimension is                 ";
    684       dim(SM[1]);
    685       "                                  ";
     705      "//   the dimension is:"; "";
     706      dim(SM[1]);"";
    686707   }
    687708
     
    752773         if(y>=1)
    753774         {
    754             "the ideal was smooth";
     775            "// the ideal was smooth";
    755776         }
    756777         MB=SM[2];
     
    761782         ideal norid=endid;
    762783         ideal normap=endphi;
     784         kill endid,endphi;
    763785         export norid;
    764786         export normap;
     
    774796      if(y>=1)
    775797      {
    776          "the ideal was zero-dimensional and homogeneous";
     798         "// the ideal was zero-dimensional and homogeneous";
    777799      }
    778800      MB=maxideal(1);
     
    783805      ideal norid=endid;
    784806      ideal normap=endphi;
     807      kill endid,endphi;
    785808      export norid;
    786809      export normap;
     
    798821      if(y>=1)
    799822      {
    800          "the ideal defines a line";
     823         "// the ideal defines a line";
    801824      }
    802825      MB=SM[2];
     
    807830      ideal norid=endid;
    808831      ideal normap=endphi;
     832      kill endid,endphi;
    809833      export norid;
    810834      export normap;
     
    825849      if(y>=1)
    826850      {
    827          "it is a complete Intersection";
     851         "// the ideal is a complete Intersection";
    828852      }
    829853   }
     
    838862      if(y>=1)
    839863      {
    840          "SB of singular locus will be computed";
     864         "// SB of singular locus will be computed";
    841865      }
    842866      ideal sin=J+SM[2];
     
    847871      if(y>=1)
    848872      {
    849          "                                  ";
    850          "the dimension of the singular locus is";
    851          dim(JM[1]);
    852          "                                  ";
     873         "//   the dimension of the singular locus is:";"";
     874         dim(JM[1]); "";
    853875      }
    854876
     
    860882         if(y>=1)
    861883         {
    862             "it is smooth";
     884            "// the ideal is smooth";
    863885         }
    864886         MB=SM[2];
     
    869891         ideal norid=endid;
    870892         ideal normap=endphi;
     893         kill endid,endphi;
    871894         export norid;
    872895         export normap;
     
    905928         if(y>=1)
    906929         {
    907             "                                  ";
    908             "the ideal rad(J):                 ";
    909             "                                  ";
     930            "";
     931            "//   the ideal rad(J):";
     932            "";
    910933            maxideal(1);
    911             "                                  ";
    912             "                                  ";
     934            newline;
    913935         }
    914936         //again test for normality
     
    938960         export normap;
    939961         result=newR7;
     962     def R = nor[1]; setring R;     //make the 1-st ring the basering
     963     norid; normap;                 //data of the normalization)
    940964         setring BAS;
    941965         return(result);
     
    9911015      if(y>=1)
    9921016      {
    993          "radical computation";
     1017         "// radical computation of singular locus";
    9941018      }
    9951019
     
    10171041      }
    10181042
     1043      if(y>=1)
     1044      {
     1045        "//   radical is equal to:";"";
     1046        J;
     1047        "";
     1048      }
     1049
    10191050      JM=J,J;
    10201051
     
    10221053      RR=SM[1],SM[2],JM[2],SL[1];
    10231054
    1024 //   evtl eine geeignete Potenz von JM?
     1055      //   evtl eine geeignete Potenz von JM?
    10251056     if(y>=1)
    10261057     {
    1027         "compute Hom(rad(J),rad(J)):";
     1058        "// compute Hom(rad(J),rad(J))";
    10281059     }
    10291060
     
    10371068         ideal norid=endid;
    10381069         ideal normap=psi1(ihp);
     1070         kill endid,endphi;
    10391071         export norid;
    10401072         export normap;
     
    10621094      if(y>=1)
    10631095      {
    1064          "zero-divisor found";
     1096         "// zero-divisor found";
    10651097      }
    10661098      ideal vid=fetch(BAS,new1);
     
    11451177
    11461178   list Le = elimpart(endid);
    1147            //this proc and the next loop try to
     1179                                     //this proc and the next loop try to
    11481180   int q = size(Le[2]);              //substitute as many variables as possible
    11491181   intvec rw1 = 0;                   //indices of substituted variables
     
    12231255{
    12241256   matrix m;
     1257   intvec iv = option(get);
    12251258   option(redSB);
    12261259   ideal j=liftstd(jet(i,1),m);
    1227    option(noredSB);
     1260   option(set,iv);
    12281261   return(ideal(matrix(i)*m));
    12291262}
Note: See TracChangeset for help on using the changeset viewer.