Changeset 90cf60e in git for Singular


Ignore:
Timestamp:
Oct 14, 2016, 2:30:14 PM (8 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
a85c1546f3be117e077ebe1215bb680cf6023e70
Parents:
81fb5aeadbd51ed0150e244d060d98a3a6637449
Message:
format
Location:
Singular/LIB
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/alexpoly.lib

    r81fb5ae r90cf60e  
    361361  int n_i,n_j;
    362362  int bad_contact;
    363   list newpos;  // when reordering the branches, here we save the new order of the old branches 
     363  list newpos;  // when reordering the branches, here we save the new order of the old branches
    364364  for (ii=1;ii<=r;ii++)
    365365  {
     
    421421      newpos=insert(newpos,newpos[j],i-1);
    422422      newpos=delete(newpos,j+1);
    423       // BE AWARE: after this reordering the graphs do not have the correct weight for the 
    424       //           strict transform any more; this will be adjusted further down 
     423      // BE AWARE: after this reordering the graphs do not have the correct weight for the
     424      //           strict transform any more; this will be adjusted further down
    425425      graphs=insert(graphs,graphs[j],i-1);
    426426      graphs=delete(graphs,j+1);
     
    440440      i=i+1;
    441441    }
    442   } 
    443   // Here we adjust the weights of the strict transforms in the graphs!!! 
     442  }
     443  // Here we adjust the weights of the strict transforms in the graphs!!!
    444444  for (i=1;i<=size(graphs);i++)
    445445  {
     
    578578  {
    579579    list result=rgraph,rtm,rmt;
    580     return(result); 
     580    return(result);
    581581  }
    582582  else // reorder the branches according to the ordering of the input
    583583  {
    584     // reordered total multiplicities, multiplicities and resolution graph 
     584    // reordered total multiplicities, multiplicities and resolution graph
    585585    intmat rtmro[nrows(rtm)][ncols(rtm)];
    586586    intmat rmtro[nrows(rmt)][ncols(rmt)];
  • Singular/LIB/ncHilb.lib

    r81fb5ae r90cf60e  
    2222proc nchilb(list L_wp, int d, list #)
    2323"USAGE:  nchilb(list of relations, an integer, optional);
    24          L is a list of modules (each module represents a free-polynomial), 
    25          d is an integer for the degree bound, 
     24         L is a list of modules (each module represents a free-polynomial),
     25         d is an integer for the degree bound,
    2626         # != NULL for non-finitely generated ideals;
    2727NOTE  : The input ideal needs to be given in special form. It is a list
     
    3131        every next entry is a variable.
    3232        Ex. module p1=[1,y,z],[-1,z,y] represents the poly y*z-z*y;
    33             module p2=[1,x,z,x],[-1,z,x,z] represents the poly x*z*x-z*x*z 
     33            module p2=[1,x,z,x],[-1,z,x,z] represents the poly x*z*x-z*x*z
    3434        for more details about the input, see examples.
    3535EXAMPLE: example nchilb; shows an example "
    3636{
    3737
    38     if (d<1) 
     38    if (d<1)
    3939    {
    4040      ERROR("bad degree bound");
    4141    }
    42    
     42
    4343    def save = basering;
    4444    int sz=size(#);
    4545    int lV=nvars(save);
    46    
     46
    4747    def R =makeLetterplaceRing(d);
    4848    setring R;
     
    5050    poly p;
    5151    poly q=0;
    52     // convert list L_wp of free-poly to letterPlace-poly format 
     52    // convert list L_wp of free-poly to letterPlace-poly format
    5353    setring save;
    5454    module M;
     
    5656    vector w;
    5757    poly pc=0;
    58     intvec v; 
     58    intvec v;
    5959    slm = size(L_wp);                  // number of polys in the given ideal
    60    
     60
    6161    for (i=1; i<=slm; i++)
    62     {   
     62    {
    6363        M  = L_wp[i];
    6464        sm = ncols(M);                 // number of words in the free-poly M
     
    6666        {
    6767            w  = M[j];
    68             sw = size(w); 
     68            sw = size(w);
    6969            for (k=2; k<=sw; k++)
    7070            {
     
    8383        setring R;
    8484        I = I,q; //lp-polynomial added to I
    85         q=0;   //ready for the next polynomial 
     85        q=0;   //ready for the next polynomial
    8686        setring save;
    8787    }
     
    8989
    9090    ideal J = system("freegb",I,d,lV);
    91    
     91
    9292    //Groebner Basis is computed for the given ideal.
    9393    //now compute the leading monomials of the Groebner Basis
    94    
     94
    9595    ideal J_lm;
    9696    for(i=1;i<=size(J);i++)
     
    9898        J_lm[i]=leadmonom(J[i]);
    9999    }
    100    
     100
    101101    setring save;
    102102    def A =makeLetterplaceRing(2*d);
    103103    setring A;
    104104    ideal I=imap(R, J_lm);
    105    
     105
    106106    //compute the Hilbert series
    107    
     107
    108108    if(sz==1)                     // non-finitely generated case
    109109    {
     
    116116}
    117117example
    118 { 
     118{
    119119"EXAMPLE:"; echo = 2;
    120120    ring r=0,(x,y,z),dp;
     
    123123    list l1=list(p1,p2);
    124124    nchilb(l1,6,1); //third argument is for non-finitely generated case
    125    
     125
    126126    ring r=0,(x,y,z,w),dp;
    127127    module p1=[1,y,x],[-1,x,y];            //represents the poly y*x-x*y
     
    133133    list l2=list(p1,p2,p3,p4,p5,p6);
    134134    nchilb(l2,5);
    135        
     135
    136136    ring r=0,(X,Y,Z),dp;
    137137    module p1 =[1,Y,Z];                //represents the poly Y*Z
     
    145145    list l3=list(p1,p2,p3,p4,p5,p6,p7,p8);
    146146    nchilb(l3,10);
    147    
     147
    148148    ring r=0,U(1..3),dp;
    149149    module p1=[1,U(2),U(3),U(3)];
     
    171171    p14,p15,p16,p17,p18,p19,p20,p21);
    172172    nchilb(ll,7,1);
    173    
     173
    174174    ring r=0,(x,y,z),dp;
    175175    module p1=[1,x,z,y,z,x,z];
     
    178178    module p4=[1,y,z];
    179179    module p5=[1,x,z,z,x,z];
    180    
     180
    181181    list l1=list(p1,p2,p3,p4,p5);
    182182    nchilb(l1,7);
Note: See TracChangeset for help on using the changeset viewer.