Changeset 72c1b9 in git


Ignore:
Timestamp:
May 9, 2000, 4:28:41 PM (23 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', 'f6c3dc58b0df4bd712574325fe76d0626174ad97')
Children:
4c852afb0419364a8ee3f4adf3ec70ab9f3e69ea
Parents:
b1926022497677c8d2f91e7c017f1c7a2317bc9a
Message:
*hannes: 1.22 does not pass the tests


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

Legend:

Unmodified
Added
Removed
  • Singular/LIB/normal.lib

    rb19260 r72c1b9  
    55///////////////////////////////////////////////////////////////////////////////
    66
    7 version="$Id: normal.lib,v 1.22 2000-05-08 15:52:50 pfister Exp $";
     7version="$Id: normal.lib,v 1.23 2000-05-09 14:28:41 Singular 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 normalization of the associated primes is computed
     379         if choose=1 the factorizing Buchberger algorithm is not used
    380380         (which is sometimes more efficient)
    381381RETURN:  a list of rings (say nor), in each ring nor[i] are two ideals
     
    405405     return(result);
    406406   }
    407    if( typeof(attrib(id,"isCompleteIntersection"))=="int" )
    408    {
    409       if(attrib(id,"isCompleteIntersection")==1)
    410       {
    411          attrib(id,"isCohenMacaulay",1);
    412          attrib(id,"isEquidimensional",1);
    413       }
    414    }       
    415    if( typeof(attrib(id,"isCohenMacaulay"))=="int" )
    416    {
    417       if(attrib(id,"isCohenMacaulay")==1)
    418       {
    419          attrib(id,"isEquidimensional",1);
    420       }
    421    }       
    422    if( typeof(attrib(id,"isPrim"))=="int" )
    423    {
    424       if(attrib(id,"isPrim")==1)
    425       {
    426          attrib(id,"isEquidimensional",1);
    427       }
    428    }       
     407
    429408   if(size(#)==0)
    430    {
     409//--------------- the factorizing Buchberger algorithm is used ---------------
     410   {
     411      prim[1]=id;
    431412      if( typeof(attrib(id,"isEquidimensional"))=="int" )
    432413      {
    433          if(attrib(id,"isEquidimensional")==1)
     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)
    434504         {
    435             prim[1]=id;
     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           }
    436520         }
    437521         else
    438522         {
    439             prim=equidim(id);
     523            attrib(prim[i],"isEquidimensional",0);
    440524         }
    441       }
    442       else
    443       {
    444          prim=equidim(id);
    445       }
    446       if(y>=1)
    447       {
    448          "// we have ",size(prim),"equidimensional components";
    449       }
    450    }
    451    else
    452    { 
    453       if( typeof(attrib(id,"isPrim"))=="int" )
    454       {
    455          if(attrib(id,"isPrim")==1)
     525         if( typeof(attrib(id,"isIsolatedSingularity"))=="int" )
    456526         {
    457             prim[1]=id;
     527            if(attrib(id,"isIsolatedSingularity")==1)
     528             {attrib(prim[i],"isIsolatedSingularity",1); }
    458529         }
    459530         else
    460          {   
    461             prim=minAssPrimes(id);
     531         {
     532            attrib(prim[i],"isIsolatedSingularity",0);
    462533         }
    463       }
    464       else
    465       {
    466          prim=minAssPrimes(id);
    467       }         
    468       if(y>=1)
    469       {
    470          "// we have ",size(prim),"irreducible components";
    471       }
    472    }
    473    for(i=1; i<=size(prim); i++)
    474    {
    475       if(y>=1)
    476       {
    477          "// we are in loop ",i;
    478       }
    479       attrib(prim[i],"isCohenMacaulay",0);
    480       if(size(#)!=0)
    481       {
    482          attrib(prim[i],"isPrim",1);
    483       }
    484       else
    485       {
    486          attrib(prim[i],"isPrim",0);
    487       }
    488       attrib(prim[i],"isRegInCodim2",0);
    489       attrib(prim[i],"isIsolatedSingularity",0);
    490       attrib(prim[i],"isEquidimensional",1);
    491       attrib(prim[i],"isCompleteIntersection",0);
    492 
    493       if( typeof(attrib(id,"isIsolatedSingularity"))=="int" )
    494       {
    495             if(attrib(id,"isIsolatedSingularity")==1)
    496              {attrib(prim[i],"isIsolatedSingularity",1); }
    497       }
    498 
    499       if( typeof(attrib(id,"isCompleteIntersection"))=="int" )
    500       {
    501             if((attrib(id,"isIsolatedSingularity")==1)&&(size(#)==0))
    502              {attrib(prim[i],"isIsolatedSingularity",1); }
    503       }
    504       keepresult=normalizationPrimes(prim[i],maxideal(1));
    505       for(j=1;j<=size(keepresult);j++)
    506       {
    507          result=insert(result,keepresult[j]);
     534
     535         keepresult=normalizationPrimes(prim[i],maxideal(1));
     536         for(j=1;j<=size(keepresult);j++)
     537         {
     538            result=insert(result,keepresult[j]);
     539         }
    508540      }
    509541      sr = string(size(result));
    510    }
     542
    511543      dbprint(y+1,"
    512544// 'normal' created a list of "+sr+" ring(s).
     
    520552      //kill endphi,endid;
    521553      return(result);
     554   }
    522555}
    523556example
     
    585618     "// SB-computation of the input ideal";
    586619   }
    587    
    588620   list SM=mstd(i);                //here the work starts
    589621   int dimSM =  dim(SM[1]);
     
    656688      attrib(SM[2],"isRegInCodim2",0);
    657689   }
    658    if(attrib(i,"isEquidimensional")==1)
     690    if(attrib(i,"isEquidimensional")==1)
    659691   {
    660692      attrib(SM[2],"isEquidimensional",1);
     
    789821         dim(JM[1]); "";
    790822      }
     823
    791824      attrib(JM[2],"isRad",0);
    792825      //   timer-ti;
     
    816849         attrib(SM[2],"isIsolatedSingularity",1);
    817850      }
    818       if(dim(JM[1])<=dim(SM[1])-2)
     851      if(dim(JM[1])<=nvars(basering)-2)
    819852      {
    820853         attrib(SM[2],"isRegInCodim2",1);
     
    829862        attrib(SM[2],"isRegInCodim2",1);
    830863     }
    831    }
    832    if((attrib(SM[2],"isRegInCodim2")==1)&&(attrib(SM[2],"isCohenMacaulay")==1))
    833    {     
    834       if(y>=1)
    835       {
    836             "// the ideal was CohenMacaulay and regular in codimension 2";
    837       }
    838       MB=SM[2];
    839       intvec rw;
    840       list LL=substpart(MB,ihp,0,rw);
    841       def newR6=LL[1];
    842       setring newR6;
    843       ideal norid=endid;
    844       ideal normap=endphi;
    845       kill endid,endphi;
    846       export norid;
    847       export normap;
    848       result=newR6;
    849       setring BAS;
    850       return(result);         
    851864   }
    852865   //if it is an isolated singularity things are easier
     
    12371250b6c+bc6+a2b4e-3ab2c2de+c4d2e-a3cde2-abd3e2+bce5;
    12381251
    1239 int aa=timer;list nor=normal(i);timer-aa;
    12401252
    12411253//Vasconcelos
     
    12501262ring r=32003,(x,y,z),wp(2,3,6);
    12511263ideal i=zy2-zx3-x6;
    1252 
    1253 //Theo1a (CohenMacaulay and regular in codimension 2)
    1254 ring r=32003,(x,y,z,u),wp(2,3,6,6);
    1255 ideal i=zy2-zx3-x6+u2;
    1256 
    12571264
    12581265//Theo2
     
    14051412puv2-puw;
    14061413
    1407 ring r=0,(u,v,w,x,y,z),wp(1,1,1,3,2,1);
    1408 ideal i=wx,wy,wz,vx,vy,vz,ux,uy,uz,y3-x2;
    1409 
    1410 
    14111414
    14121415*/
Note: See TracChangeset for help on using the changeset viewer.