Changeset 0291940 in git


Ignore:
Timestamp:
Oct 8, 2010, 12:14:28 PM (14 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '38077648e7239f98078663eb941c3c979511150a')
Children:
87ee9b164257c151ff65e88084e1964ad3138011
Parents:
6e45c119f7dae5d56d3bdbc0441f758aef1380a0
Message:
some syntax fixes

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

Legend:

Unmodified
Added
Removed
  • Singular/LIB/resbin.lib

    r6e45c1 r0291940  
    22////////////////////////////////////////////////////////////////////////////
    33version="$Id: resbin.lib$";
    4 category="Commutative algebra";
     4category="Resolution of singularities";
    55info="
    66LIBRARY: resbin.lib    Combinatorial algorithm of resolution of singularities
     
    1111@*        G. Pfister,           pfister@mathematik.uni-kl.de
    1212
    13 SEE ALSO: resolve_lib
    14 
    1513PROCEDURES:
    1614 BINresol(J);      computes a E-resolution of singularities of (J) (THE SECOND PART IS NOT IMPLEMENTED YET)
     15
    1716 Eresol(J);                         computes a E-resolution of singularities of (J) in char 0
    1817 determinecenter(L1,L2,c,n,Y,a,mb,flag,control3);    computes the next blowing-up center
    1918 Blowupcenter(L1,id,m,L2,c,n,h);    makes the blowing-up
    2019 Nonhyp(Coef,expJ,sJ,n,flag,sums);  computes the ideal generated by the non hyperbolic generators of expJ
     20
    2121 inidata(K,k);                      verifies input data, a binomial ideal K of k generators
    2222 identifyvar();                     identifies status of variables
     
    3535 Maxord(L,n);                       computes the maximum exponent of an exceptional monomial ideal
    3636 Gamma(L,c,n);                      computes the Gamma function for an exceptional monomial ideal given by L
     37
    3738 convertdata(C,L,n,flag);           computes the ideal corresponding to C,L
    38  tradblwup(blwhist,n,Y,a,num);      composes the blowing up at this chart
    3939 lcmofall(nchart,mobile);           computes the lcm of the denominators of the E-orders for all the charts
    4040 computemcm(Eolist);                computes the lcm of the denominators of the E-orders for one chart
     41
    4142 constructH(Hhist,n,flag);                construct the list of exceptional divisors accumulated at this chart
    4243 constructblwup(blwhist,n,chy,flag);      construct the ideal defining the map K[W] --> K[Wi],
    4344                                          which gives the composition map of all the blowing up leading to this chart
    4445 constructlastblwup(blwhist,n,chy,flag);  construct the ideal defining the last blowup leading to this chart
     46
    4547 genoutput(chart,mobile,nchart,nsons,n,q,p);             generates the output for visualization
    4648 salida(idchart,chart,mobile,numson,previousa,n,q);      generates the output for one chart
     49
    4750 iniD(n);                           creates a list of lists of zeros of size n
    4851 sumlist(L1,L2);                    sums two lists component to component
     
    5255 createlist(L1,L2);                 creates a list of lists of two elements
    5356 list0(n);                          creates a list of zeros of size n
    54 
    5557";
    5658
     
    23912393"
    23922394{
    2393 int idchart,parent;
    2394 list auxlist,solvedrings,totalringlist,previousa;
    2395 list auxlistenp,solvedringsenp,totalringenp;
     2395  int idchart,parent;
     2396  list auxlist,solvedrings,totalringlist,previousa;
     2397  list auxlistenp,solvedringsenp,totalringenp;
    23962398
    23972399// chart gives: parent,Y,a,expJ,Coef,flag,Hhist,blwhist,path,hipercoef,hiperexp
    23982400// mobile gives: tip,oldOlist,oldC,oldt,oldD,oldH,allH,infobo7;  NOTE: Eolist=mobile[2];
    23992401
    2400 idchart=1;
     2402  idchart=1;
    24012403
    24022404// first loop, construct list previousa
    24032405
    2404 while (idchart<=nchart)
    2405 {
    2406 if (idchart==1){previousa[1]=chart[2][3];}
    2407 
    2408 else{
    2409 
     2406  while (idchart<=nchart)
     2407  {
     2408    if (idchart==1){previousa[1]=chart[2][3];}
     2409    else
     2410    {
    24102411// if there are no sons, the next center is nothing
    2411 
    2412      if (nsons[idchart]==0){previousa[idchart]=0;}
    2413 
     2412      if (nsons[idchart]==0){previousa[idchart]=0;}
    24142413// always fill the parent
    2415 
    2416      parent=chart[idchart][1];
    2417      previousa[parent]=chart[idchart][3];
    2418      }
    2419 idchart=idchart+1;
    2420 }
    2421 
     2414      parent=chart[idchart][1];
     2415      previousa[parent]=chart[idchart][3];
     2416    }
     2417    idchart=idchart+1;
     2418  }
    24222419// HERE BEGIN THE LOOP
    2423 
    2424 idchart=1;
    2425 
    2426 while (idchart<=nchart)
    2427 {
    2428 
    2429 def auxexit=salida(idchart,chart[idchart],mobile[idchart+1],nsons[idchart],previousa[idchart],n,q,p);
    2430 
    2431 if (p>0){ // we need the computations in char 0 too
    2432          def auxexitenp=salida(idchart,chart[idchart],mobile[idchart+1],nsons[idchart],previousa[idchart],n,q,0);
    2433         }
    2434 else{def auxexitenp=auxexit;}
    2435 
     2420  idchart=1;
     2421  while (idchart<=nchart)
     2422  {
     2423    def auxexit=salida(idchart,chart[idchart],mobile[idchart+1],nsons[idchart],previousa[idchart],n,q,p);
     2424    if (p>0)
     2425    { // we need the computations in char 0 too
     2426      def auxexitenp=salida(idchart,chart[idchart],mobile[idchart+1],nsons[idchart],previousa[idchart],n,q,0);
     2427    }
     2428    else{def auxexitenp=auxexit;}
    24362429// we add the ring to the list of all rings
    2437 
    2438 auxlist[1]=auxexit;
    2439 totalringlist=totalringlist+auxlist;
    2440 
    2441 auxlistenp[1]=auxexitenp;
    2442 totalringenp=totalringenp+auxlistenp;
    2443 
     2430    auxlist[1]=auxexit;
     2431    totalringlist=totalringlist+auxlist;
     2432    auxlistenp[1]=auxexitenp;
     2433    totalringenp=totalringenp+auxlistenp;
    24442434// if the chart has no sons, add it to the list of final charts
    2445 
    2446 if (nsons[idchart]==0){solvedrings=solvedrings+auxlist;
    2447                        solvedringsenp=solvedringsenp+auxlistenp;
    2448                       }
    2449 
    2450 auxlist=list();
    2451 auxlistenp=list();
    2452 kill auxexit;
    2453 kill auxexitenp;
    2454 
    2455 idchart=idchart+1;
    2456 
    2457 } // EXIT WHILE
    2458 
    2459 return(solvedrings,totalringlist,solvedringsenp,totalringenp);
     2435    if (nsons[idchart]==0)
     2436    {
     2437      solvedrings=solvedrings+auxlist;
     2438      solvedringsenp=solvedringsenp+auxlistenp;
     2439    }
     2440    auxlist=list();
     2441    auxlistenp=list();
     2442    kill auxexit;
     2443    kill auxexitenp;
     2444    idchart=idchart+1;
     2445  } // EXIT WHILE
     2446  return(solvedrings,totalringlist,solvedringsenp,totalringenp);
    24602447}
    24612448example
     
    24842471"
    24852472{
    2486 int m,i,aux,mcmchart;
    2487 intvec num;
    2488 
    2489 m=size(Eolist);
    2490 
    2491 if (m==1){mcmchart=int(denominator(Eolist[1])); return(mcmchart);}
    2492 
    2493 if (m>1){num=int(denominator(Eolist[1]));
    2494          for (i=2;i<=m;i++){aux=int(denominator(Eolist[i]));
    2495                             num=num,aux; }}
    2496 
    2497 mcmchart=lcm(num);
    2498 
    2499 return(mcmchart);
     2473  int m,i,aux,mcmchart;
     2474  intvec num;
     2475  m=size(Eolist);
     2476  if (m==1){mcmchart=int(denominator(Eolist[1])); return(mcmchart);}
     2477  if (m>1)
     2478  {
     2479    num=int(denominator(Eolist[1]));
     2480    for (i=2;i<=m;i++)
     2481    {aux=int(denominator(Eolist[i])); num=num,aux; }
     2482  }
     2483  mcmchart=lcm(num);
     2484  return(mcmchart);
    25002485}
    25012486example
     
    25172502"
    25182503{
    2519 int i,j,m,l;
    2520 list exceplist;
    2521 ideal aux;
    2522 
    2523 m=size(Hhist);
    2524 if (Hhist[1]==0 and m>1){Hhist=Hhist[2..m]; m=m-1;
    2525 
    2526                          for (i=1;i<=m;i++){
    2527                                             l=Hhist[i];
    2528                                             if (flag[l]==0){aux=ideal(poly(x(l))); }
    2529                                             else {aux=ideal(poly(y(l))); }
    2530 
    2531                                             exceplist[i]=aux;
    2532                                             }
     2504  int i,j,m,l;
     2505  list exceplist;
     2506  ideal aux;
     2507  m=size(Hhist);
     2508  if (Hhist[1]==0 and m>1)
     2509  {
     2510    Hhist=Hhist[2..m]; m=m-1;
     2511    for (i=1;i<=m;i++)
     2512    {
     2513      l=Hhist[i];
     2514      if (flag[l]==0){aux=ideal(poly(x(l))); }
     2515      else {aux=ideal(poly(y(l))); }
     2516      exceplist[i]=aux;
     2517    }
    25332518// eliminate repeated variables
    2534 for (i=1;i<=m;i++){for (j=1;j<=m;j++){
    2535                                       if (Hhist[i]==Hhist[j] and i!=j){
    2536                                                                        if (i<j){exceplist[i]=ideal(1);}
    2537                                                                        if (i>j){exceplist[j]=ideal(1);}
    2538                                                                       }
    2539                                      }
    2540                   }
    2541 
    2542                          }
    2543 else  {exceplist=list();}
    2544 
     2519    for (i=1;i<=m;i++)
     2520    {
     2521      for (j=1;j<=m;j++)
     2522      {
     2523        if (Hhist[i]==Hhist[j] and i!=j)
     2524        {
     2525          if (i<j){exceplist[i]=ideal(1);}
     2526          if (i>j){exceplist[j]=ideal(1);}
     2527        }
     2528      }
     2529    }
     2530  }
     2531  else  {exceplist=list();}
    25452532// else  {exceplist=list(ideal(0));} // IF IT FAILS USE THIS
    2546 
    2547 return(exceplist);
     2533  return(exceplist);
    25482534}
    25492535example
     
    25562542  L[1][7][7]; // blow ups at x(3)-th, x(1)-th and x(1)-th charts
    25572543  constructH(L[1][7][7],3,flag);
    2558 
    25592544}
    25602545/////////////////////////////////////////////////////////////////////
     
    25692554"
    25702555{
    2571 int i,j,m,m2;
    2572 poly aux2;
    2573 
    2574 m=size(blwhist[1]);
    2575 
    2576 for (j=1;j<=m;j++){
    2577                    for (i=1;i<=n;i++){ m2=blwhist[i][j];
    2578 
     2556  int i,j,m,m2;
     2557  poly aux2;
     2558
     2559  m=size(blwhist[1]);
     2560
     2561  for (j=1;j<=m;j++)
     2562  {
     2563    for (i=1;i<=n;i++)
     2564    {
     2565      m2=blwhist[i][j];
    25792566// If m2!=0 this variable changes. First decide if the variable to multiply is invertible or not
    2580 
    2581                                        if  (m2!=0){
    2582                                                   if (flag[m2]==0){aux2=poly(x(m2));}
    2583                                                   else {aux2=poly(y(m2));}
    2584 
     2567      if  (m2!=0)
     2568      {
     2569        if (flag[m2]==0){aux2=poly(x(m2));}
     2570        else {aux2=poly(y(m2));}
    25852571// And then substitute this variable for the corresponding product in the whole ideal
    2586 
    2587                                                   if (flag[i]==0){chy=subst(chy,x(i),x(i)*aux2);}
    2588                                                   else {chy=subst(chy,y(i),y(i)*aux2);}
    2589 
    2590                                                   }
    2591                                       }
    2592 
    2593                    }
    2594 
    2595 return(chy);
     2572        if (flag[i]==0){chy=subst(chy,x(i),x(i)*aux2);}
     2573        else {chy=subst(chy,y(i),y(i)*aux2);}
     2574      }
     2575    }
     2576  }
     2577  return(chy);
    25962578}
    25972579example
     
    26162598"
    26172599{
    2618 int i,j,m,m2;
    2619 poly aux2;
    2620 
    2621 m=size(blwhist[1]);
    2622 
    2623 if (m>0){
    2624 for (i=1;i<=n;i++){ m2=blwhist[i][m];
    2625 
    2626 // If m2!=0 this variable changes. First decide if the variable to multiply is invertible or not
    2627 
    2628                                        if  (m2!=0){
    2629                                                   if (flag[m2]==0){aux2=poly(x(m2));}
    2630                                                   else {aux2=poly(y(m2));}
     2600  int i,j,m,m2;
     2601  poly aux2;
     2602  m=size(blwhist[1]);
     2603
     2604  if (m>0)
     2605  {
     2606    for (i=1;i<=n;i++){ m2=blwhist[i][m];
     2607
     2608    // If m2!=0 this variable changes. First decide if the variable to multiply is invertible or not
     2609
     2610    if  (m2!=0)
     2611    {
     2612      if (flag[m2]==0){aux2=poly(x(m2));}
     2613      else {aux2=poly(y(m2));}
    26312614
    26322615// And then substitute this variable for the corresponding product in the whole ideal
    26332616
    2634                                                   if (flag[i]==0){chy=subst(chy,x(i),x(i)*aux2);}
    2635                                                   else {chy=subst(chy,y(i),y(i)*aux2);}
    2636 
    2637                                                   }
    2638                   }
     2617      if (flag[i]==0){chy=subst(chy,x(i),x(i)*aux2);}
     2618      else {chy=subst(chy,y(i),y(i)*aux2);}
     2619    }
     2620  }
    26392621}
    26402622
     
    26622644"
    26632645{
    2664 int i,m;
    2665 ideal acenter,aux2;
    2666 
    2667 if (a==0){acenter=J2;}
    2668 else{
    2669      m=size(a);
    2670      for (i=1;i<=m;i++){
    2671                         if (flag[a[i]]==0){aux2=poly(x(a[i]));}
    2672                         else {aux2=poly(y(a[i]));}
    2673 
    2674                         acenter=acenter+aux2;
    2675                         }
     2646  int i,m;
     2647  ideal acenter,aux2;
     2648
     2649  if (a==0)
     2650  {acenter=J2;}
     2651  else
     2652  {
     2653    m=size(a);
     2654    for (i=1;i<=m;i++)
     2655    {
     2656      if (flag[a[i]]==0){aux2=poly(x(a[i]));}
     2657      else {aux2=poly(y(a[i]));}
     2658
     2659      acenter=acenter+aux2;
    26762660    }
     2661  }
    26772662return(acenter);
    26782663}
     
    26892674//////////////////////////////////////////////////////////////////////////////////////
    26902675
    2691  proc iniD(int n)
     2676proc iniD(int n)
    26922677"USAGE: iniD(n);   n integer
    26932678RETURN: list of lists of zeros of size n
Note: See TracChangeset for help on using the changeset viewer.