Changeset 67e0dc in git for Singular/LIB/classify_aeq.lib


Ignore:
Timestamp:
Oct 21, 2015, 2:57:17 PM (9 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
5bd9ec36b87fa8f176a21995de2b56724d67be2d
Parents:
a1b6c917a1c8886b1bba1b05680ff06cfd39c82def1a968e317a12b42f88e04cd7f9483e47fba2f7
Message:
Merge pull request #718 from adipopescu/STDChanes2

Std over rings
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/classify_aeq.lib

    ref1a96 r67e0dc  
    77AUTHORS: Faira Kanwal Janjua     fairakanwaljanjua@gmail.com
    88         Gerhard Pfister         pfister@mathematik.uni-kl.de
     9         Khawar Mehmood          khawar1073@gmail.com                         NEU
    910
    1011OVERVIEW: A library for classifying the simple singularities
     
    2223  [4] Bruce, J.W.,Gaffney, T.J.: Simple singularities of mappings (C, 0) ->(C2,0).
    2324  J. London Math. Soc. (2) 26 (1982), 465-474.
    24 
     25  [5] Ishikawa,G; Janeczko,S.: The Complex Symplectic Moduli Spaces of Unimodal Parametric Plane Curve  NEU Singularities. Insitute of Mathematics of the Polish Academy of Sciences,Preprint 664(2006)
    2526PROCEDURES:
    2627          sagbiAlg(G);    Compute the Sagbi-basis of the Algebra.
     
    662663
    663664////////////////////////////////////////////////////////////////////////////////
    664 proc sagbiAlg(ideal I)
     665proc sagbiAlg(ideal I,list #)
    665666"USAGE":  sagbiAlg(I);  I ideal
    666667RETURN: An ideal.The sagbi bases of I.
     
    676677
    677678    if(size(I)==0){return(I);}
    678     int b=ConductorBound(I);
    679 
    680   // int b=200;
     679    if(size(#)==0)
     680    {
     681       int b=ConductorBound(I);
     682    // int b=200;
    681683  //   b=correctBound(I,b);
     684    }
     685    else
     686    {
     687       int b=#[1];
     688    }
    682689   ideal S=interReduceSagbi(I,b) ;
    683690  // b=correctBound(S,b);
     
    699706   return(S);
    700707}
    701 
    702708example
    703709{
     
    709715sagbiAlg(I);
    710716}
    711 
     717//////////////////////////////////////////////////////////////////////////////// NEU
     718proc reducedSagbiAlg(ideal I,list #)
     719{
     720
     721   I=sagbiAlg(I,#);
     722   intvec L=semiGroup(I)[3];
     723   if(size(#)==0)
     724   {
     725      int b=findConductor(L);
     726   }
     727   else
     728   {
     729      int b=#[1];
     730   }
     731   int i;
     732   poly q;
     733   for(i=1;i<=size(I);i++)
     734   {
     735      q=I[i]-lead(I[i]);
     736      q=sagbiNF(q,I,b);
     737      I[i]=lead(I[i])+q;
     738   }
     739   return(I);
     740}
     741example
     742{
     743  "EXAMPLE:"; echo=2;
     744ring R=0,t,ds;
     745ideal I=t4+2t9,t9+t10+19/18t11-3t12+t13-t14;
     746reducedSagbiAlg(I);
     747}
     748////////////////////////////////////////////////////////////////////////////////   NEU
     749proc classifyAEQunimodal(ideal I)
     750"USAGE":  classifyAEQunimodal(I);  I ideal generated by 2 polynomials
     751RETURN: An ideal.Ideal is one of the singularity in the list of Ishikawa and Jenczko [5]
     752EXAMPLE: example classifyAEQunimodal;  shows an example
     753"
     754{
     755    def R=basering;
     756    ring @S=0,t,ds;
     757    ideal I=fetch(R,I);
     758    ideal J;
     759    poly g;
     760    if(size(I)>=3){ERROR("not a plane curve");}
     761    I=simplify(I,2);   //deletes zero’s i I
     762    I=simplify(I,1);   //creates monic generators in I
     763    if(ord(I[1])>ord(I[2])){poly q=I[2];I[2]=I[1];I[1]=q;}
     764    if((ord(I[1])>=6)||(ord(I[1])<=3)){return("not in the unimodal list");}
     765    //compute estimate of the term with the modulus
     766    int c=ord(sagbiNF(I[2],ideal(I[1]),10));
     767    if(c==10)
     768    {
     769       if(ord(I[1])!=4){return("not in the unimodal list");}
     770       c=ord(I[2][2])+2;
     771    }
     772    else
     773    {
     774       c=0;
     775       intvec v=ord(I[1]),ord(I[2]);
     776       if(v==intvec(5,6)){c=14;}
     777       if(v==intvec(5,7)){c=18;}
     778       if(v==intvec(5,8)){c=22;}
     779       if(v==intvec(4,9)){c=19;}
     780       if(v==intvec(4,11)){c=25;}
     781       if(c==0){return("not in the unimodal list");}
     782    }
     783    while(size(I[1])>1)
     784    {
     785      I=jet(subst(I,t,t-number(1)/number(ord(I[1]))*leadcoef(I[1][2])*t^(ord(I[1][2])-ord(I[1])+1)),c);
     786    }
     787    ideal G=I;
     788    G[2]=sagbiNF(G[2],ideal(G[1]),c);
     789    ideal M=sagbiMod(diff(G,t),G);
     790    list K=semiMod(M,G);
     791
     792    if(K[1]==intvec(4,9))
     793    {
     794       if(K[4]==intvec(3,8)){J=t4,t9;}
     795       if(K[4]==intvec(3,8,22)){J=t4,t9+t19;}
     796       if(K[4]==intvec(3,8,18)){J=t4,t9+t15;}
     797       if(K[4]==intvec(3,8,14)){J=t4,t9+t11;}
     798       if(K[4]==intvec(3,8,13))
     799       {
     800          G=reducedSagbiAlg(G,15);
     801          if(ord(G[2][4])==14)
     802          {
     803             //kill the term t14 by some transformation
     804             G=subst(G,t,t-leadcoef(G[2][4])/9*t^6);
     805             G=jet(G,15);
     806             G[1]=sagbiNF(G[1],ideal(G[2]),15);
     807             //arrange the first element to be t4
     808             while(size(G[1])>1)
     809             {
     810                G=subst(G,t,t-1/4*(G[1]-lead(G[1]))/t^3);
     811                G=jet(G,15);
     812             }
     813          }
     814          G[2]=sagbiNF(G[2],ideal(G[1]),15);
     815          //arrange the coefficient of t10 to become 1
     816          number m=leadcoef(G[2]-lead(G[2]));
     817          G[2]=m^9*subst(G[2],t,1/m*t);
     818          J=G;
     819       }
     820       if(K[4]==intvec(3,8,13,18))
     821       {
     822          G=reducedSagbiAlg(G,11);
     823          number m=leadcoef(G[2]-lead(G[2]));
     824          G[2]=m^9*subst(G[2],t,1/m*t);
     825          J=G;
     826       }
     827    }
     828    if(K[1]==intvec(4,11))
     829    {
     830       if(K[4]==intvec(3,10)){J=t4,t11;}
     831       if(K[4]==intvec(3,10,28)){J=t4,t11+t25;}
     832       if(K[4]==intvec(3,10,24)){J=t4,t11+t21;}
     833       if(K[4]==intvec(3,10,20)){J=t4,t11+t17;}
     834       if(K[4]==intvec(3,10,16))
     835       {
     836          G=reducedSagbiAlg(G,14);
     837          number m=leadcoef(G[2]-lead(G[2]));
     838          number l=leadcoef(G[2][3]);
     839          //lambda^2=l^2/m^3
     840          J=G;
     841       }
     842       if(K[4]==intvec(3,10,17))
     843       {
     844          G=reducedSagbiAlg(G,21);
     845          if(ord(G[2][4])==18)
     846          {
     847             //kill the term t18 by some transformation
     848             G=subst(G,t,t-leadcoef(G[2][4])/11*t^8);
     849             G=jet(G,21);
     850             G[1]=sagbiNF(G[1],ideal(G[2]),21);
     851             //arrange the first element to be t4
     852             while(size(G[1])>1)
     853             {
     854                G=subst(G,t,t-1/4*(G[1]-lead(G[1]))/t^3);
     855                G=jet(G,21);
     856             }
     857          }
     858          G[2]=sagbiNF(G[2],ideal(G[1]),21);
     859          //arrange the coefficient of t14 to become 1
     860          number m=leadcoef(G[2]-lead(G[2]));
     861          number l=leadcoef(G[2][4]);
     862          //lambda^2=l^3/m^10
     863          J=G;
     864
     865
     866       }
     867       if(K[4]==intvec(3,10,17,24))
     868       {
     869          G=reducedSagbiAlg(G,18);
     870          //arrange the coefficient of t14 to become 1
     871          number m=leadcoef(G[2]-lead(G[2]));
     872          G[2]=t11+t14+leadcoef(G[2][3])/m^2*t17;
     873          J=G;
     874       }
     875    }
     876    if((size(K[1])==3)&&(K[1][1]==4)&&(K[1][2]==10))
     877    {
     878       int l=(K[1][3]-19) div 2;
     879       G=reducedSagbiAlg(G,2*l+12);
     880       number m=leadcoef(G[2]-lead(G[2]));
     881       number s=leadcoef(G[2][3]);
     882       //lambda^(2l-1)=s^(2l-1)/m^(2l+1)
     883       J=G;
     884    }
     885    if(K[1]==intvec(5,6))
     886    {
     887       if(K[4]==intvec(4,5)){J=t5,t6;}
     888       if(K[4]==intvec(4,5,18)){J=t5,t6+t14;}
     889       if(K[4]==intvec(4,5,13)){J=t5,t6+t9;}
     890       if(K[4]==intvec(4,5,12))
     891       {
     892          G=reducedSagbiAlg(G,9);
     893          if(ord(G[2][2])==7)
     894          {
     895             //kill the term t7 by some transformation
     896             G=subst(G,t,t-leadcoef(G[2][2])/6*t^2);
     897             G=jet(G,10);
     898             G[1]=sagbiNF(G[1],ideal(G[2]),9);
     899             //arrange the first element to be t4
     900             while(size(G[1])>1)
     901             {
     902                G=subst(G,t,t-1/5*(G[1]-lead(G[1]))/t^4);
     903                G=jet(G,9);
     904             }
     905          }
     906          G[2]=sagbiNF(G[2],ideal(G[1]),9);
     907          //arrange the coefficient of t8 to become 1
     908          number m=leadcoef(G[2]-lead(G[2]));
     909          number l=leadcoef(G[2][3]);
     910          //lambda^2=l^2/m^3
     911          J=G;
     912
     913       }
     914    }
     915    if(K[1]==intvec(5,7))
     916    {
     917       if(K[4]==intvec(4,6)){J=t5,t7;}
     918       if(K[4]==intvec(4,6,22)){J=t5,t7+t18;}
     919       if(K[4]==intvec(4,6,17)){J=t5,t7+t13;}
     920       if(K[4]==intvec(4,6,12))
     921       {
     922          G=reducedSagbiAlg(G,11);
     923          if(ord(G[2][3])==9)
     924          {
     925             //kill the term t9 by some transformation
     926             G=subst(G,t,t-leadcoef(G[2][3])/7*t^3);
     927             G=jet(G,11);
     928             G[1]=sagbiNF(G[1],ideal(G[2]),11);
     929             //arrange the first element to be t4
     930             while(size(G[1])>1)
     931             {
     932                G=subst(G,t,t-1/5*(G[1]-lead(G[1]))/t^4);
     933                G=jet(G,11);
     934             }
     935          }
     936          G[2]=sagbiNF(G[2],ideal(G[1]),11);
     937          //arrange the coefficient of t8 to become 1
     938          number m=leadcoef(G[2]-lead(G[2]));
     939          G[2]=m^7*subst(G[2],t,1/m*t);
     940          J=G;
     941       }
     942       if(K[4]==intvec(4,6,15))
     943       {
     944          G=reducedSagbiAlg(G,14);
     945          if(ord(G[2][2])==9)
     946          {
     947             //kill the term t9 by some transformation
     948             G=subst(G,t,t-leadcoef(G[2][2])/7*t^3);
     949             G=jet(G,14);
     950             G[1]=sagbiNF(G[1],ideal(G[2]),14);
     951             //arrange the first element to be t4
     952             while(size(G[1])>1)
     953             {
     954                G=subst(G,t,t-1/5*(G[1]-lead(G[1]))/t^4);
     955                G=jet(G,14);
     956             }
     957          }
     958          G[2]=sagbiNF(G[2],ideal(G[1]),14);
     959          //arrange the coefficient of t11 to become 1
     960          number m=leadcoef(G[2]-lead(G[2]));
     961          number l=leadcoef(G[2][3]);
     962          //lambda^2=l^2/m^3
     963          J=G;
     964       }
     965
     966    }
     967    if(K[1]==intvec(5,8))
     968    {
     969       if(K[4]==intvec(4,7)){J=t5,t8;}
     970       if(K[4]==intvec(4,7,26)){J=t5,t8+t22;}
     971       if(K[4]==intvec(4,7,21)){J=t5,t8+t17;}
     972       if(K[4]==intvec(4,7,13))
     973       {
     974          G=reducedSagbiAlg(G,12);
     975          if(ord(G[2][3])==11)
     976          {
     977             //kill the term t11 by some transformation
     978             G=subst(G,t,t-leadcoef(G[2][3])/8*t^4);
     979             G=jet(G,12);
     980             G[1]=sagbiNF(G[1],ideal(G[2]),12);
     981             //arrange the first element to be t4
     982             while(size(G[1])>1)
     983             {
     984                G=subst(G,t,t-1/5*(G[1]-lead(G[1]))/t^4);
     985                G=jet(G,12);
     986             }
     987          }
     988          G[2]=sagbiNF(G[2],ideal(G[1]),12);
     989          //arrange the coefficient of t9 to become 1
     990          number m=leadcoef(G[2]-lead(G[2]));
     991          G[2]=m^8*subst(G[2],t,1/m*t);
     992          J=G;
     993       }
     994
     995       if(K[4]==intvec(4,7,16))
     996       {
     997          G=reducedSagbiAlg(G,14);
     998          if(ord(G[2][2])==11)
     999          {
     1000             //kill the term t11 by some transformation
     1001             G=subst(G,t,t-leadcoef(G[2][2])/8*t^4);
     1002             G=jet(G,14);
     1003             G[1]=sagbiNF(G[1],ideal(G[2]),14);
     1004             //arrange the first element to be t4
     1005             while(size(G[1])>1)
     1006             {
     1007                G=subst(G,t,t-1/5*(G[1]-lead(G[1]))/t^4);
     1008                G=jet(G,14);
     1009             }
     1010          }
     1011          G[2]=sagbiNF(G[2],ideal(G[1]),14);
     1012          //arrange the coefficient of t12 to become 1
     1013          number m=leadcoef(G[2]-lead(G[2]));
     1014          number l=leadcoef(G[2][3]);
     1015          //lambda^2=l^2/m^3
     1016          J=G;
     1017
     1018       }
     1019       if(K[4]==intvec(4,7,18))
     1020       {
     1021          G=reducedSagbiAlg(G,17);
     1022          if(ord(G[2][2])==11)
     1023          {
     1024             //kill the term t11 by some transformation
     1025             G=subst(G,t,t-leadcoef(G[2][2])/8*t^4);
     1026             G=jet(G,17);
     1027             G[1]=sagbiNF(G[1],ideal(G[2]),17);
     1028             //arrange the first element to be t4
     1029             while(size(G[1])>1)
     1030             {
     1031                G=subst(G,t,t-1/5*(G[1]-lead(G[1]))/t^4);
     1032                G=jet(G,17);
     1033             }
     1034          }
     1035          G[2]=sagbiNF(G[2],ideal(G[1]),17);
     1036          //arrange the coefficient of t12 to become 1
     1037          number m=leadcoef(G[2]-lead(G[2]));
     1038          number l=leadcoef(G[2][3]);
     1039          //lambda^2=l^2/m^3
     1040          J=G;
     1041       }
     1042    }
     1043    setring R;
     1044    ideal J=fetch(@S,J);
     1045    if(size(J)==0)
     1046    {
     1047       return("not in the unimodal list");
     1048    }
     1049    return(J);
     1050}
     1051example
     1052{
     1053  "EXAMPLE:"; echo=2;
     1054ring R=0,t,ds;
     1055ideal I=t4,9t9+18t10+38t11-216t12+144t13-288t14;
     1056classifyAEQunimodal(I);
     1057I=t4,9t9+18t10+40t11-216t12+144t13-288t14;
     1058classifyAEQunimodal(I);
     1059I=t4,t11+t12+3t14+2t15+7t16+7t17;
     1060classifyAEQunimodal(I);
     1061I=t4,t11+t14+25/22t17+3t18+4t21;
     1062classifyAEQunimodal(I);
     1063I=t5,t6+2t7+t8+3t9;
     1064classifyAEQunimodal(I);
     1065I=t5,t7+3t8+3t9+5t10;
     1066classifyAEQunimodal(I);
     1067I=t5,t7+3t11+3t12+5t13;
     1068classifyAEQunimodal(I);
     1069I=t5,t8+3t9+5t10+2t11+3t12+5t13;
     1070classifyAEQunimodal(I);
     1071I=t5,t8+5t11+3t12+7t13+5t14;
     1072classifyAEQunimodal(I);
     1073I=t5,t8+5t11+7t13+5t14+7t15+2t16+8t17;
     1074classifyAEQunimodal(I);
     1075I=subst(I,t,t+t2);
     1076classifyAEQunimodal(I);
     1077I=t4+2t5+3t6+5t7+t8,9t9+18t10+40t11-216t12+144t13-288t14;
     1078classifyAEQunimodal(I);
     1079}
     1080////////////////////////////////////////////////////////////////////////////////   NEU
     1081proc computeModulus(poly p)
     1082"USAGE":  computeModulus(p);  p monic poly with 3 or 4 monomials
     1083RETURN: A polynomial with first and second coefficient 1
     1084EXAMPLE: computeModulus;  shows an example
     1085ASSUME: the basering has one vearable and one parameter
     1086"
     1087{
     1088   def R=basering;
     1089   int a1=ord(p);
     1090   int a2=ord(p-lead(p));
     1091   number m=leadcoef(p-lead(p));
     1092
     1093   poly q=par(1)^(a2-a1)-1/m;
     1094   ring S=(0,a),t,ds;
     1095   number m=fetch(R,m);
     1096   minpoly=par(1)^(a2-a1)-1/m;
     1097   poly p=fetch(R,p);
     1098   p=1/par(1)^a1*subst(p,var(1),par(1)*var(1));
     1099   setring R;
     1100   p=imap(S,p);
     1101   return(list(p,q));
     1102}
     1103example
     1104{
     1105  "EXAMPLE:"; echo=2;
     1106ring R=(0,a),t,ds;
     1107poly p=t8-395/16t14+4931/32t17;
     1108computeModulus(p);
     1109p=t8+3t12-395/16t14;
     1110computeModulus(p);
     1111p=t8-395/16t14+4931/32t17;
     1112computeModulus(p);
     1113
     1114}
     1115
     1116////////////////////////////////////////////////////////////////////////////////   NEU
     1117static proc n_thRoot(poly p,int n, int b)
     1118{
     1119   //computes the n-th root of 1+p up to order b
     1120   //assumes that p(0)=0
     1121   poly s=1;
     1122   poly q=jet(p,b);
     1123   if(q==0){return(s);}
     1124   int i;
     1125   for(i=1;i<=b;i++)
     1126   {
     1127      s=s+bino(n,i)*q;
     1128      q=jet(q*p,b);
     1129   }
     1130   return(jet(s,b));
     1131}
     1132////////////////////////////////////////////////////////////////////////////////   NEU
     1133static proc bino(number n, int i)
     1134{
     1135//computes the i-th binomial coefficient of 1/n
     1136   if(i==0){return(1);}
     1137   return(bino(n,i-1)*(1/n-i+1)/i);
     1138}
    7121139////////////////////////////////////////////////////////////////////////////////
    7131140proc sagbiMod(ideal I,ideal G)
     
    12831710    execute
    12841711    ("ring T=("+charstr(br)+",x(1),z(1..n)),(x(2),y(1..m)),dp;");
    1285     execute
    1286     ("ring R=("+charstr(br)+"),(x(1..2),y(1..m),z(1..n)),(lp(m+2),dp(n));");
     1712     execute
     1713    ("ring R=("+charstr(br)+"),(x(1..2),y(1..m),z(1..n)),(lp(2),dp(m),dp(n));");
     1714
    12871715     map phi = br,x(1);
    12881716     ideal P = phi(G1);
     
    13051733     M[size(M)+1]=check-x(2);
    13061734     check=check*keep;
     1735
    13071736     option(redSB);
    13081737     M=std(M);
    13091738     int j,s;
     1739
    13101740     for(i=1;i<=size(M);i++)
    13111741     {
     
    13421772         f=sagbiNFMODO(f,G,I,b);
    13431773    }
    1344     return(f+sagbiNFMOD(p-lead(p),G,I,b));
     1774    return(lead(f)+sagbiNFMOD(p-lead(p),G,I,b));
    13451775}
    13461776////////////////////////////////////////////////////////////////////////////////
Note: See TracChangeset for help on using the changeset viewer.