Changeset 71673b in git


Ignore:
Timestamp:
Sep 22, 2010, 6:51:00 PM (13 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '828514cf6e480e4bafc26df99217bf2a1ed1ef45')
Children:
f48d7b69ebab215998125e1e8020cc229bf8f040
Parents:
8c87110fe9bfff712ab72ad60f3ed035b70989e2
Message:
format

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

Legend:

Unmodified
Added
Removed
  • Singular/LIB/resjung.lib

    r8c8711 r71673b  
    33info="
    44LIBRARY:  resjung.lib      Resolution of surface singularities (Desingularization)
    5                            by Jung's Algorithm 
    6 AUTHORS:  Philipp Renner,   philipp_renner@web.de 
     5                           by Jung's Algorithm
     6AUTHORS:  Philipp Renner,   philipp_renner@web.de
    77          Anne Fruehbis-Krueger, anne@math.uni-hannover.de
    88
    99MAIN PROCEDURES:
    10  jungresolve(J,i)  computes a resolution of the surface given by the 
     10 jungresolve(J,i)  computes a resolution of the surface given by the
    1111                   ideal J using Jungs Method
    1212
    1313AUXILLARY PROCEDURES:
    1414 clocus(J)         computes the critical locus of the projection of V(J)
    15                    onto the coordinate plane of the last two coordinates 
    16  embR(C)           computes a strong embedded resolution of 
     15                   onto the coordinate plane of the last two coordinates
     16 embR(C)           computes a strong embedded resolution of
    1717                   the plane curve V(C)
    1818 jungnormal(J,i)   computes intermediate step in Jung's algorithm
    19                    such that all singularities are of Hirzebruch-Jung type 
     19                   such that all singularities are of Hirzebruch-Jung type
    2020";
    2121
     
    3030//Critical locus for the Weierstrass map induced by the noether normalization
    3131//----------------------------------------------------------------------------
    32 proc clocus(ideal id)     
     32proc clocus(ideal id)
    3333"USAGE:  clocus(ideal J);
    3434@*       J = ideal
    35 ASSUME:  J  = two dimensional ideal in noether position with respect   
    36          to the last two variables 
     35ASSUME:  J  = two dimensional ideal in noether position with respect
     36         to the last two variables
    3737RETURN:  A ring containing the ideal Clocus respresenting the critical
    3838         locus of the projection V(J)-->C^2 onto the coordinate plane
     
    5252      lowdim = intersect(lowdim,l[j]);
    5353    }
    54   } 
     54  }
    5555  //lowdim = radical(lowdim);  // affects performance
    56   ideal I = l[size(l)]; 
     56  ideal I = l[size(l)];
    5757  poly product=1;
    58   kill l; 
    59   for(i=1; i < n-1; i++){ 
     58  kill l;
     59  for(i=1; i < n-1; i++){
    6060  //elimination of all variables exept var(i),var(n-1),var(n)
    6161    intvec v;
     
    7878    ringl[3]=ll;
    7979    kill l,ll;
    80     def R = ring(ringl); //now x_j > x_i > x_n-1 > x_n forall j != i,n-1,n 
     80    def R = ring(ringl); //now x_j > x_i > x_n-1 > x_n forall j != i,n-1,n
    8181    setring R;
    8282    ideal J = groebner(fetch(A,I));  //this eliminates the variables
    8383    setring A;
    84     ideal J = fetch(R,J);   
     84    ideal J = fetch(R,J);
    8585    attrib(J,"isPrincipal",0);
    8686    if(size(J)==1){
     
    131131///////////////////////////////////////////////////////////////////////////////
    132132//-----------------------------------------------------------------------------
    133 // Build the fibre product of the embedded resolution and 
     133// Build the fibre product of the embedded resolution and
    134134// the coordinate ring of the variety
    135135//-----------------------------------------------------------------------------
    136 static 
     136static
    137137proc buildFP(list embR,ideal NoetherN, map phi){
    138138  def A = basering;
     
    145145    setring R;
    146146    list temp = ringlist(A);
    147 // create data for the new ring 
     147// create data for the new ring
    148148// e.g. if A=K[x_1,..,x_n] and R=K[y_1,..,y_m], K[x_1,..,x_n-2,y_1,..,y_m]
    149149    for(j = 1; j<= nvars(R);j++){
     
    157157    int m = size(J);
    158158    def R2 = ring(temp);
    159     kill temp; 
     159    kill temp;
    160160    setring R2;
    161161    ideal Temp=0;           //defines map from R to R2 which is the inclusion
     
    171171    FibPMI= FibPMI+ideal(f(J));
    172172    map FibMap = A,FibPMI;
    173     kill f,FibPMI; 
     173    kill f,FibPMI;
    174174    ideal TotalT = groebner(FibMap(NoetherN));
    175175    ideal QIdeal = TotalT;
     
    189189// embedded resolution for curves -- optimized for our situation
    190190//-----------------------------------------------------------------------------
    191 proc embR(ideal C) 
     191proc embR(ideal C)
    192192"USAGE:  embR(ideal C);
    193193@*       C = ideal
    194 ASSUME:  C  = ideal of plane curve 
     194ASSUME:  C  = ideal of plane curve
    195195RETURN:  a list l of rings
    196196         l[i] is a ring containing a basic object BO, the result of the
    197          resolution. 
     197         resolution.
    198198NOTE:    Algorithm does not touch normal crossings of V(C)
    199199EXAMPLE: example embR; shows an example
     
    203203  attrib(J,"iswholeRing",1);
    204204  list primdec = equidim(C);
    205   if(size(primdec)==2){   
    206 // zero dimensional components of the discrimiant curve 
    207 // are smooth an cross normally so they can be ignored 
     205  if(size(primdec)==2){
     206// zero dimensional components of the discrimiant curve
     207// are smooth an cross normally so they can be ignored
    208208// in the resolution process
    209209    ideal Lowdim = radical(primdec[1]);
     
    218218  list result = resolve2(BO);
    219219  if(defined(Lowdim)){
    220     for(int i = 1;i<=size(result);i++){       
     220    for(int i = 1;i<=size(result);i++){
    221221// had zero dimensional components which are now added to the end result
    222222      if(defined(R)) {kill R;}
    223223      def R = result[i];
    224       setring R; 
     224      setring R;
    225225      map f = R2,BO[5];
    226226      BO[2]=BO[2]*f(Lowdim);
     
    241241}
    242242///////////////////////////////////////////////////////////////////////////////
    243 static 
     243static
    244244proc resolve2(list BO){
    245 // computes an embedded resolution for the basic object BO 
    246 // and returns a list of rings with BO -- specifically optimized 
    247 // to our situation 
     245// computes an embedded resolution for the basic object BO
     246// and returns a list of rings with BO -- specifically optimized
     247// to our situation
    248248  def H = basering;
    249249  int i,j,k;
     
    253253  result[1]=H;
    254254  attrib(result[1],"isResolved",0);    // has only simple normal crossings
    255   attrib(result[1],"smoothC",0);       // has smooth components 
     255  attrib(result[1],"smoothC",0);       // has smooth components
    256256  int safety=0;                        // number of runs restricted to 30
    257257  while(1){
     
    263263        def R = result[j];
    264264        setring R;
    265         if(attrib(result[j],"smoothC")==0){     
     265        if(attrib(result[j],"smoothC")==0){
    266266// has possibly singular components so choose a singular point and blow up
    267267          list primdecPC = primdecGTZ(BO[2]);
     
    278278              if(defined(blowup)){kill blowup;}
    279279              list blowup = blowUpBO(BO,primdecSL[index][2],3);
    280 // if it has only a rational singularity, blow it up, 
     280// if it has only a rational singularity, blow it up,
    281281// else choose some arbitary singular point
    282               if(attrib(primdecSL[1],"isRational")==0){ 
    283 // if we blew up a non rational singularity, the exeptional divisors 
     282              if(attrib(primdecSL[1],"isRational")==0){
     283// if we blew up a non rational singularity, the exeptional divisors
    284284// are reduzible, so we need to separate them
    285285                for(k=1;k<=size(blowup);k++){
     
    326326          kill primdecPC;
    327327          j=p;
    328           break; 
    329         }
    330         else{                           
    331 // if it has smooth components, determine all the intersection points 
     328          break;
     329        }
     330        else{
     331// if it has smooth components, determine all the intersection points
    332332// and check whether they are snc or not
    333333          int count = 0;
     
    415415};
    416416///////////////////////////////////////////////////////////////////////////////
    417 static 
    418 proc jungfib(ideal id, int noeth) 
     417static
     418proc jungfib(ideal id, int noeth)
    419419"USAGE:  jungfib(ideal J, int i);
    420420@*       J = ideal
     
    422422ASSUME:  J  = two dimensional ideal
    423423RETURN:  a list l of rings
    424          l[i] is a ring containing two Ideals: QIdeal and BMap. 
    425          BMap defines a birational morphism from V(QIdeal)-->V(J), such that 
     424         l[i] is a ring containing two Ideals: QIdeal and BMap.
     425         BMap defines a birational morphism from V(QIdeal)-->V(J), such that
    426426         V(QIdeal) has only quasi-ordinary singularities.
    427          If i!=0 then it's assumed that J is in noether position with respect 
     427         If i!=0 then it's assumed that J is in noether position with respect
    428428         to the last two variables.
    429          If i=0 the algorithm computes a coordinate change such that J is in 
     429         If i=0 the algorithm computes a coordinate change such that J is in
    430430         noether position.
    431431EXAMPLE: none, as it is a static procedure
     
    439439  ideal I = std(radical(id));
    440440  def A = basering;
    441   int n = nvars(A);                           
     441  int n = nvars(A);
    442442  if(deg(NF(1,groebner(slocus(id)))) == -1){
    443443    list result;
     
    452452  if(dim(I)<> 2){ERROR("dimension is unequal 2");}  //dummy check
    453453
    454 // Noether Normalization 
     454// Noether Normalization
    455455  if(noeth == 0){
    456456    if(n==3){
     
    474474        }
    475475        map phi = A,NoetherPos;
    476         kill i,pos,NoetherPos; 
    477       }
    478     }
    479     else{ 
     476        kill i,pos,NoetherPos;
     477      }
     478    }
     479    else{
    480480      map phi = A,NoetherPosition(I);
    481481    }
    482     ideal NoetherN = ideal(phi(I));             
     482    ideal NoetherN = ideal(phi(I));
    483483//image of id under the NoetherN coordinate change
    484484  }
     
    487487    map phi = A,maxideal(1);
    488488  }
    489   kill I; 
    490 //Critical Locus 
     489  kill I;
     490//Critical Locus
    491491  def C2 = clocus(NoetherN);
    492492  setring C2;
    493      
     493
    494494//dim of critical locus is 0 then the normalization is an resolution
    495495  if(dim(Clocus) == 0){
     
    510510    return(result);
    511511  }
    512    
    513 // dim of critical locus is 1, so compute embedded resolution of the discriminant curve 
     512
     513// dim of critical locus is 1, so compute embedded resolution of the discriminant curve
    514514  list embRe = embR(Clocus);
    515  
     515
    516516// build the fibreproduct
    517517  setring A;
    518   list fibreP = buildFP(embRe,NoetherN,phi); 
    519 // a list of lists, where fibreP[i] contains the information 
     518  list fibreP = buildFP(embRe,NoetherN,phi);
     519// a list of lists, where fibreP[i] contains the information
    520520// concerning  the i-th chart of the fibrepoduct
    521521// fibreP[i] is the ring; QIdeal the quotientideal; BMap is the map from A
     
    530530ASSUME:  J  = two dimensional ideal
    531531RETURN:  a list l of rings
    532          l[k] is a ring containing two Ideals: QIdeal and BMap. 
    533          BMap defines a birational morphism from V(QIdeal)-->V(J), such that 
     532         l[k] is a ring containing two Ideals: QIdeal and BMap.
     533         BMap defines a birational morphism from V(QIdeal)-->V(J), such that
    534534         V(QIdeal) has only singularities of Hizebuch-Jung type.
    535          If i!=0 then it's assumed that J is in noether position with respect 
     535         If i!=0 then it's assumed that J is in noether position with respect
    536536         to the last two variables.
    537          If i=0 the algorithm computes a coordinate change such that J is in 
     537         If i=0 the algorithm computes a coordinate change such that J is in
    538538         noether position.
    539539EXAMPLE: example jungnormal; shows an example
     
    585585ASSUME:  J  = two dimensional ideal
    586586RETURN:  a list l of rings
    587          l[k] is a ring containing two Ideals: QIdeal and BMap. 
    588          BMap defines a birational morphism from V(QIdeal)-->V(J), such that 
    589          V(QIdeal) is smooth. For this the algorithm computes first 
     587         l[k] is a ring containing two Ideals: QIdeal and BMap.
     588         BMap defines a birational morphism from V(QIdeal)-->V(J), such that
     589         V(QIdeal) is smooth. For this the algorithm computes first
    590590         a representation of V(J) with Hirzebruch-Jung singularities
    591          and then it currently uses Villamayor's algorithm to resolve 
     591         and then it currently uses Villamayor's algorithm to resolve
    592592         these singularities.
    593          If i!=0 then it's assumed that J is in noether position with respect 
     593         If i!=0 then it's assumed that J is in noether position with respect
    594594         to the last two variables.
    595          If i=0 the algorithm computes a coordinate change such that J is in 
     595         If i=0 the algorithm computes a coordinate change such that J is in
    596596         noether position.
    597597EXAMPLE: none
     
    635635  }
    636636  return(result);
    637 }   
     637}
    638638example
    639639{"EXAMPLE:";
     
    649649}
    650650///////////////////////////////////////////////////////////////////////////////
    651 static 
     651static
    652652proc NoetherP_test(ideal id){
    653653  def A = basering;
     
    658658    list L;
    659659    intvec v = 1,1,1;
    660     L[1] = "lp";     
     660    L[1] = "lp";
    661661    L[2] = v;
    662662    kill v;
     
    679679      intvec v = leadexp(I[1]);
    680680      attrib(v,"isMonic",1);
    681       for(k = 2;k<=3;k++){ 
     681      for(k = 2;k<=3;k++){
    682682// checks whether f is monic in var(i)
    683         if(v[k] <> 0 || v[1] == 0){ 
     683        if(v[k] <> 0 || v[1] == 0){
    684684          attrib(v,"isMonic",0);
    685685          j++;
     
    697697    }
    698698  }
    699   else{     
     699  else{
    700700// not yet a test for more variables
    701701    return(index);
     
    706706//// not necessary in this setting                                    ///
    707707/////////////////////////////////////////////////////////////////////////
    708 static 
    709 proc normalCrossing(ideal J,list E,ideal V)       
     708static
     709proc normalCrossing(ideal J,list E,ideal V)
    710710"Internal procedure - no help and no example available
    711711"
     
    713713   int i,d,j;
    714714   int n=nvars(basering);
    715    list E1,E2;                   
     715   list E1,E2;
    716716   ideal K,M,Estd;
    717717   intvec v,w;
    718718
    719    for(i=1;i<=size(E);i++) 
     719   for(i=1;i<=size(E);i++)
    720720   {
    721721      Estd=std(E[i]+J);
     
    726726   }
    727727   E=E1;
    728    for(i=1;i<=size(E);i++)   
     728   for(i=1;i<=size(E);i++)
    729729   {
    730730      v=i;
     
    732732   }
    733733   list ll;
    734    int re=1;         
    735 
    736    while((size(E1)>0)&&(re==1))   
     734   int re=1;
     735
     736   while((size(E1)>0)&&(re==1))
    737737   {
    738       K=E1[1][1];                 
    739       v=E1[1][2];                 
     738      K=E1[1][1];
     739      v=E1[1][2];
    740740      attrib(K,"isSB",1);
    741741      E1=delete(E1,1);
    742       d=n-dim(K);               
    743       M=minor(jacob(K),d)+K;     
    744       if(deg(std(M+V)[1])>0)     
     742      d=n-dim(K);
     743      M=minor(jacob(K),d)+K;
     744      if(deg(std(M+V)[1])>0)
    745745      {
    746746         re=0;
     
    749749      for(i=1;i<=size(E);i++)
    750750      {
    751          for(j=1;j<=size(v);j++){if(v[j]==i){break;}} 
    752          if(j<=size(v)){if(v[j]==i){i++;continue;}}   
    753          Estd=std(K+E[i]);                             
     751         for(j=1;j<=size(v);j++){if(v[j]==i){break;}}
     752         if(j<=size(v)){if(v[j]==i){i++;continue;}}
     753         Estd=std(K+E[i]);
    754754         w=v;
    755755         if(deg(Estd[1])==0){i++;continue;}
    756          if(d==n-dim(Estd))                           
     756         if(d==n-dim(Estd))
    757757         {
    758758            if(deg(std(Estd+V)[1])>0)
     
    844844        ideal norid = imap(R3,norid);
    845845        ideal normap = imap(R3,normap);
    846         kill R3; 
     846        kill R3;
    847847        map f = R,normap;
    848848        if(defined(BMap)){kill BMap;}
     
    898898//////////////////////////////////////////////////////////////////////////////
    899899
    900 
    901 
    902 
    903 
    904    
    905      
Note: See TracChangeset for help on using the changeset viewer.