Changeset b15ad0 in git


Ignore:
Timestamp:
May 10, 2000, 3:05:16 PM (23 years ago)
Author:
Gerhard Pfister <pfister@…>
Branches:
(u'spielwiese', 'f6c3dc58b0df4bd712574325fe76d0626174ad97')
Children:
0658d94b02b071f2a019543baea28fe2c95d9226
Parents:
a9cf54361b742e9fc5c8efe5927396e566518869
Message:
Hans, now it is correct!


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

Legend:

Unmodified
Added
Removed
  • Singular/LIB/normal.lib

    ra9cf54 rb15ad0  
    55///////////////////////////////////////////////////////////////////////////////
    66
    7 version="$Id: normal.lib,v 1.23 2000-05-09 14:28:41 Singular Exp $";
     7version="$Id: normal.lib,v 1.24 2000-05-10 13:05:16 pfister Exp $";
    88info="
    99LIBRARY:  normal.lib     PROCEDURES FOR NORMALIZATION
     
    377377proc normal(ideal id, list #)
    378378"USAGE:   normal(i [,choose]);  i a radical ideal, choose empty or 1
    379          if choose=1 the factorizing Buchberger algorithm is not used
     379         if choose=1 the normalization of the associated primes is computed
    380380         (which is sometimes more efficient)
    381381RETURN:  a list of rings (say nor), in each ring nor[i] are two ideals
     
    397397   list result,prim,keepresult;
    398398   y = printlevel-voice+2;
    399 
     399   
     400   attrib(id,"isRadical",1);
    400401   if ( find(ordstr(basering),"s")+find(ordstr(basering),"M") != 0)
    401402   {
     
    405406     return(result);
    406407   }
    407 
     408   if( typeof(attrib(id,"isCompleteIntersection"))=="int" )
     409   {
     410      if(attrib(id,"isCompleteIntersection")==1)
     411      {
     412         attrib(id,"isCohenMacaulay",1);
     413         attrib(id,"isEquidimensional",1);
     414      }
     415   }       
     416   if( typeof(attrib(id,"isCohenMacaulay"))=="int" )
     417   {
     418      if(attrib(id,"isCohenMacaulay")==1)
     419      {
     420         attrib(id,"isEquidimensional",1);
     421      }
     422   }       
     423   if( typeof(attrib(id,"isPrim"))=="int" )
     424   {
     425      if(attrib(id,"isPrim")==1)
     426      {
     427         attrib(id,"isEquidimensional",1);
     428      }
     429   }       
    408430   if(size(#)==0)
    409 //--------------- the factorizing Buchberger algorithm is used ---------------
    410    {
    411       prim[1]=id;
     431   {
    412432      if( typeof(attrib(id,"isEquidimensional"))=="int" )
    413433      {
    414         if(attrib(id,"isEquidimensional")==1)
    415         {
    416            attrib(prim[1],"isEquidimensional",1);
    417         }
    418       }
    419       else
    420       {
    421          attrib(prim[1],"isEquidimensional",0);
    422       }
    423       if( typeof(attrib(id,"isCompleteIntersection"))=="int" )
    424       {
    425         if(attrib(id,"isCompleteIntersection")==1)
    426         {
    427            attrib(prim[1],"isCompleteIntersection",1);
    428         }
    429       }
    430       else
    431       {
    432          attrib(prim[1],"isCompleteIntersection",0);
    433       }
    434 
    435       if( typeof(attrib(id,"isPrim"))=="int" )
    436       {
    437         if(attrib(id,"isPrim")==1)  {attrib(prim[1],"isPrim",1); }
    438       }
    439       else
    440       {
    441          attrib(prim[1],"isPrim",0);
    442       }
    443       if( typeof(attrib(id,"isIsolatedSingularity"))=="int" )
    444       {
    445          if(attrib(id,"isIsolatedSingularity")==1)
    446              {attrib(prim[1],"isIsolatedSingularity",1); }
    447       }
    448       else
    449       {
    450          attrib(prim[1],"isIsolatedSingularity",0);
    451       }
    452       if( typeof(attrib(id,"isCohenMacaulay"))=="int" )
    453       {
    454          if(attrib(id,"isCohenMacaulay")==1)
    455            { attrib(prim[1],"isCohenMacaulay",1); }
    456       }
    457       else
    458       {
    459          attrib(prim[1],"isCohenMacaulay",0);
    460       }
    461       if( typeof(attrib(id,"isRegInCodim2"))=="int" )
    462       {
    463          if(attrib(id,"isRegInCodim2")==1)
    464          { attrib(prim[1],"isRegInCodim2",1);}
    465       }
    466       else
    467       {
    468           attrib(prim[1],"isRegInCodim2",0);
    469       }
    470 
    471       result = normalizationPrimes(prim[1],maxideal(1));
    472       sr = string(size(result));
    473      
    474       dbprint(y+1,"
    475 // 'normal' created a list of "+sr+" ring(s).
    476 // To see the rings, type (if the name of your list is nor):
    477      show( nor);
    478 // To access the 1-st ring and map (and similair for the others), type:
    479      def R = nor[1]; setring R;  norid; normap;
    480 // R/norid is the 1-st ring of the normalization and
    481 // normap the map from the original basering to R/norid");
    482 
    483        return(result);
    484    }
    485    else
    486 //------------- the factorizing Buchberger algorithm is not used -------------
    487    {
    488       if(#[1]==0)
    489       {
    490          prim=minAssPrimes(id);
    491       }
    492       else
    493       {
    494          prim=minAssPrimes(id,1);
    495       }
    496 
    497       if(y>=1)
    498       {
    499          "// we have ",size(prim),"components";
    500       }
    501       for(i=1; i<=size(prim); i++)
    502       {
    503          if(y>=1)
     434         if(attrib(id,"isEquidimensional")==1)
    504435         {
    505             "// we are in loop ",i;
    506          }
    507          attrib(prim[i],"isCohenMacaulay",0);
    508          attrib(prim[i],"isPrim",1);
    509          attrib(prim[i],"isRegInCodim2",0);
    510          attrib(prim[i],"isIsolatedSingularity",0);
    511          attrib(prim[i],"isEquidimensional",0);
    512          attrib(prim[i],"isCompleteIntersection",0);
    513 
    514          if( typeof(attrib(id,"isEquidimensional"))=="int" )
    515          {
    516            if(attrib(id,"isEquidimensional")==1)
    517            {
    518               attrib(prim[i],"isEquidimensional",1);
    519            }
     436            prim[1]=id;
    520437         }
    521438         else
    522439         {
    523             attrib(prim[i],"isEquidimensional",0);
     440            prim=equidim(id);
    524441         }
    525          if( typeof(attrib(id,"isIsolatedSingularity"))=="int" )
     442      }
     443      else
     444      {
     445         prim=equidim(id);
     446      }
     447      if(y>=1)
     448      {
     449         "// we have ",size(prim),"equidimensional components";
     450      }
     451   }
     452   else
     453   { 
     454      if( typeof(attrib(id,"isPrim"))=="int" )
     455      {
     456         if(attrib(id,"isPrim")==1)
    526457         {
     458            prim[1]=id;
     459         }
     460         else
     461         {   
     462            prim=minAssPrimes(id);
     463         }
     464      }
     465      else
     466      {
     467         prim=minAssPrimes(id);
     468      }         
     469      if(y>=1)
     470      {
     471         "// we have ",size(prim),"irreducible components";
     472      }
     473   }
     474   for(i=1; i<=size(prim); i++)
     475   {
     476      if(y>=1)
     477      {
     478         "// we are in loop ",i;
     479      }
     480      attrib(prim[i],"isCohenMacaulay",0);
     481      if(size(#)!=0)
     482      {
     483         attrib(prim[i],"isPrim",1);
     484      }
     485      else
     486      {
     487         attrib(prim[i],"isPrim",0);
     488      }
     489      attrib(prim[i],"isRegInCodim2",0);
     490      attrib(prim[i],"isIsolatedSingularity",0);
     491      attrib(prim[i],"isEquidimensional",1);
     492      attrib(prim[i],"isCompleteIntersection",0);
     493
     494      if( typeof(attrib(id,"isIsolatedSingularity"))=="int" )
     495      {
    527496            if(attrib(id,"isIsolatedSingularity")==1)
    528497             {attrib(prim[i],"isIsolatedSingularity",1); }
    529          }
    530          else
    531          {
    532             attrib(prim[i],"isIsolatedSingularity",0);
    533          }
    534 
    535          keepresult=normalizationPrimes(prim[i],maxideal(1));
    536          for(j=1;j<=size(keepresult);j++)
    537          {
    538             result=insert(result,keepresult[j]);
    539          }
     498      }
     499
     500      if( typeof(attrib(id,"isCompleteIntersection"))=="int" )
     501      {
     502            if((attrib(id,"isIsolatedSingularity")==1)&&(size(#)==0))
     503             {attrib(prim[i],"isIsolatedSingularity",1); }
     504      }
     505      keepresult=normalizationPrimes(prim[i],maxideal(1));
     506      for(j=1;j<=size(keepresult);j++)
     507      {
     508         result=insert(result,keepresult[j]);
    540509      }
    541510      sr = string(size(result));
    542 
     511   }
    543512      dbprint(y+1,"
    544513// 'normal' created a list of "+sr+" ring(s).
     
    552521      //kill endphi,endid;
    553522      return(result);
    554    }
    555523}
    556524example
     
    618586     "// SB-computation of the input ideal";
    619587   }
     588   
    620589   list SM=mstd(i);                //here the work starts
    621590   int dimSM =  dim(SM[1]);
     
    688657      attrib(SM[2],"isRegInCodim2",0);
    689658   }
    690     if(attrib(i,"isEquidimensional")==1)
     659   if(attrib(i,"isEquidimensional")==1)
    691660   {
    692661      attrib(SM[2],"isEquidimensional",1);
     
    821790         dim(JM[1]); "";
    822791      }
    823 
    824792      attrib(JM[2],"isRad",0);
    825793      //   timer-ti;
     
    849817         attrib(SM[2],"isIsolatedSingularity",1);
    850818      }
    851       if(dim(JM[1])<=nvars(basering)-2)
     819      if(dim(JM[1])<=dim(SM[1])-2)
    852820      {
    853821         attrib(SM[2],"isRegInCodim2",1);
     
    862830        attrib(SM[2],"isRegInCodim2",1);
    863831     }
     832   }
     833   if((attrib(SM[2],"isRegInCodim2")==1)&&(attrib(SM[2],"isCohenMacaulay")==1))
     834   {     
     835      if(y>=1)
     836      {
     837            "// the ideal was CohenMacaulay and regular in codimension 2";
     838      }
     839      MB=SM[2];
     840      intvec rw;
     841      list LL=substpart(MB,ihp,0,rw);
     842      def newR6=LL[1];
     843      setring newR6;
     844      ideal norid=endid;
     845      ideal normap=endphi;
     846      kill endid,endphi;
     847      export norid;
     848      export normap;
     849      result=newR6;
     850      setring BAS;
     851      return(result);         
    864852   }
    865853   //if it is an isolated singularity things are easier
     
    12621250ring r=32003,(x,y,z),wp(2,3,6);
    12631251ideal i=zy2-zx3-x6;
     1252
     1253//Theo1a (CohenMacaulay and regular in codimension 2)
     1254ring r=32003,(x,y,z,u),wp(2,3,6,6);
     1255ideal i=zy2-zx3-x6+u2;
     1256
    12641257
    12651258//Theo2
     
    14121405puv2-puw;
    14131406
     1407ring r=0,(u,v,w,x,y,z),wp(1,1,1,3,2,1);
     1408ideal i=wx,wy,wz,vx,vy,vz,ux,uy,uz,y3-x2;
     1409
     1410
    14141411
    14151412*/
Note: See TracChangeset for help on using the changeset viewer.