Changeset 6dce0a in git for Singular/LIB/fpadim.lib


Ignore:
Timestamp:
Apr 8, 2011, 6:16:54 PM (13 years ago)
Author:
Burcin Erocal <burcin@…>
Branches:
(u'spielwiese', '4a9821a93ffdc22a6696668bd4f6b8c9de3e6c5f')
Children:
85e6ebcef21ccced4e0f80d03648434201ef3793
Parents:
640e4c41fe3f49b835ff0373ec2b7cb6b7cf9553
Message:
Add new version of fpadim.lib received from the authors on 08.04.2011.

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

Legend:

Unmodified
Added
Removed
  • Singular/LIB/fpadim.lib

    r640e4c r6dce0a  
    3131@*      monomial in V the whole graph can be described only from the knowledge
    3232@*      of the mistletoes. Note that V corresponds to a basis of A/<GB>, so
    33 @*      knowing the mistletoes we know a K-basis. For more details see
    34 @*      [studzins]. This package uses the Letterplace format introduced by
    35 @*      [lls]. The algebra can either be represented as a Letterplace ring or
    36 @*      via integer vectors: Every variable will only be represented by its
    37 @*      number, so variable one is represented as 1, variable two as 2 and so
    38 @*      on. The monomial x_1*x_3*x_2 for example will be stored as (1,3,2).
    39 @*      Multiplication is concatenation. Note that there is no algorithm for
    40 @*      computing the normal form needed for our case.
    41 @*
     33@*      knowing the mistletoes we know a K-basis. The name mistletoes was given
     34@*      to those points because of these miraculous value and the algorithm is
     35@*      named sickle, because a sickle is the tool to harvest mistletoes.
     36@*      For more details see [studzins]. This package uses the Letterplace
     37@*      format introduced by [lls]. The algebra can either be represented as a
     38@*      Letterplace ring or via integer vectors: Every variable will only be
     39@*      represented by its number, so variable one is represented as 1,
     40@*      variable two as 2 and so on. The monomial x_1*x_3*x_2 for example will
     41@*      be stored as (1,3,2). Multiplication is concatenation. Note that there
     42@*      is no algorithm for computing the normal form needed for our case.
     43@*      Note that the name fpadim.lib is short for dimensions of finite
     44@*      presented algebras.
    4245
    4346References:
     
    5356@* - all intvecs correspond to Letterplace monomials
    5457@* - if you specify a different degree bound d,
    55      d <= attrib(basering,uptodeg) holds
     58     d <= attrib(basering,uptodeg) should hold.
    5659@* In the procedures below, 'iv' stands for intvec representation
    5760  and 'lp' for the letterplace representation of monomials
     
    142145    {for (i3 = 1; i3 <= n; i3++)
    143146      {for (i4 = 1; i4 <= (n^(i1-1)); i4++)
    144         {M[i2,i1] = i3;
    145           i2 = i2 + 1;
    146         }
     147        {M[i2,i1] = i3;
     148          i2 = i2 + 1;
     149        }
    147150      }
    148151    }
     
    191194      for (j = 1; j<= size(P); j++)
    192195      {if (P[j] <= size(Vt))
    193         {Vt2 = Vt[(size(Vt)-P[j]+1)..size(Vt)];
    194           if (isInMat(Vt2,L[j]) > 0) {w = 1; break;}
    195         }
     196        {Vt2 = Vt[(size(Vt)-P[j]+1)..size(Vt)];
     197          if (isInMat(Vt2,L[j]) > 0) {w = 1; break;}
     198        }
    196199      }
    197200      if (w == 0)
    198201      {vector Vtt;
    199         for (it = 1; it <= size(Vt); it++){Vtt = Vtt + Vt[it]*gen(it);}
    200         M = M,Vtt;
    201         kill Vtt;
     202        for (it = 1; it <= size(Vt); it++){Vtt = Vtt + Vt[it]*gen(it);}
     203        M = M,Vtt;
     204        kill Vtt;
    202205      }
    203206    }
     
    207210      for (i = 1; i <= size(M); i++)
    208211      {kill Vt; intvec Vt;
    209         for (j =1; j <= size(M[i]); j++){Vt[j] =  int(leadcoef(M[i][j]));}
    210         dimen = dimen + 1 + findDimen(Vt,n,L,P);
     212        for (j =1; j <= size(M[i]); j++){Vt[j] =  int(leadcoef(M[i][j]));}
     213        dimen = dimen + 1 + findDimen(Vt,n,L,P);
    211214      }
    212215      return(dimen);
     
    220223      for (j = 1; j<= size(P); j++)
    221224      {if (P[j] <= size(Vt))
    222         {Vt2 = Vt[(size(Vt)-P[j]+1)..size(Vt)];
    223           if (isInMat(Vt2,L[j]) > 0) {w = 1; break;}
    224         }
     225        {Vt2 = Vt[(size(Vt)-P[j]+1)..size(Vt)];
     226          if (isInMat(Vt2,L[j]) > 0) {w = 1; break;}
     227        }
    225228      }
    226229      if (w == 0) {vector Vtt;
    227         for (it = 1; it <= size(Vt); it++){Vtt = Vtt + Vt[it]*gen(it);}
    228         M = M,Vtt;
    229         kill Vtt;
     230        for (it = 1; it <= size(Vt); it++){Vtt = Vtt + Vt[it]*gen(it);}
     231        M = M,Vtt;
     232        kill Vtt;
    230233      }
    231234    }
     
    235238      for (i = 1; i <= size(M); i++)
    236239      {kill Vt; intvec Vt;
    237         for (j =1; j <= size(M[i]); j++){Vt[j] =  int(leadcoef(M[i][j]));}
    238         dimen = dimen + 1 + findDimen(Vt,n,L,P,degbound);
     240        for (j =1; j <= size(M[i]); j++){Vt[j] =  int(leadcoef(M[i][j]));}
     241        dimen = dimen + 1 + findDimen(Vt,n,L,P,degbound);
    239242      }
    240243      return(dimen);
     
    255258      for (j = 1; j <= size(P); j++)
    256259      {if (P[j] <= size(Vt))
    257         {Vt2 = Vt[(size(Vt)-P[j]+1)..size(Vt)];
    258           if (isInMat(Vt2,L[j]) > 0)
    259           {w = 1; break;}
    260         }
     260        {Vt2 = Vt[(size(Vt)-P[j]+1)..size(Vt)];
     261          if (isInMat(Vt2,L[j]) > 0)
     262          {w = 1; break;}
     263        }
    261264      }
    262265      if (w == 0) {r = findCycle(Vt,L,P,n,ld,M);}
     
    272275      for (it = 1; it <= j; it++)
    273276      { for(it2 = 1; it2 <= nrows(M);it2++)
    274         {Mt[it,it2] = int(leadcoef(M[it2,it]));}
     277        {Mt[it,it2] = int(leadcoef(M[it2,it]));}
    275278      }
    276279      Vt = V[(size(V)-ld+1)..size(V)];
     
    279282      else
    280283      {vector Vtt;
    281         for (it =1; it <= size(Vt); it++)
    282         {Vtt = Vtt + Vt[it]*gen(it);}
    283         M = M,Vtt;
    284         kill Vtt;
    285         for (i = 1; i <= n; i++)
    286         {Vt = V,i; w = 0;
    287           for (j = 1; j <= size(P); j++)
    288           {if (P[j] <= size(Vt))
    289             {Vt2 = Vt[(size(Vt)-P[j]+1)..size(Vt)];
    290               //L[j]; type(L[j]);Vt2;type(Vt2);
    291               if (isInMat(Vt2,L[j]) > 0)
    292               {w = 1; break;}
    293             }
    294           }
    295           if (w == 0) {r = findCycle(Vt,L,P,n,ld,M);}
    296           if (r == 1) {break;}
    297         }
    298         return(r);
     284        for (it =1; it <= size(Vt); it++)
     285        {Vtt = Vtt + Vt[it]*gen(it);}
     286        M = M,Vtt;
     287        kill Vtt;
     288        for (i = 1; i <= n; i++)
     289        {Vt = V,i; w = 0;
     290          for (j = 1; j <= size(P); j++)
     291          {if (P[j] <= size(Vt))
     292            {Vt2 = Vt[(size(Vt)-P[j]+1)..size(Vt)];
     293              //L[j]; type(L[j]);Vt2;type(Vt2);
     294              if (isInMat(Vt2,L[j]) > 0)
     295              {w = 1; break;}
     296            }
     297          }
     298          if (w == 0) {r = findCycle(Vt,L,P,n,ld,M);}
     299          if (r == 1) {break;}
     300        }
     301        return(r);
    299302      }
    300303    }
     
    308311      for (i = 1; i <= n; i++)
    309312      {Vt = V,i; w = 0;
    310         for (j = 1; j <= size(P); j++)
    311         {if (P[j] <= size(Vt))
    312           {Vt2 = Vt[(size(Vt)-P[j]+1)..size(Vt)];
    313             //L[j]; type(L[j]);Vt2;type(Vt2);
    314             if (isInMat(Vt2,L[j]) > 0)
    315             {w = 1; break;}
    316           }
    317         }
    318         if (w == 0) {r = findCycle(Vt,L,P,n,ld,M);}
    319         if (r == 1) {break;}
     313        for (j = 1; j <= size(P); j++)
     314        {if (P[j] <= size(Vt))
     315          {Vt2 = Vt[(size(Vt)-P[j]+1)..size(Vt)];
     316            //L[j]; type(L[j]);Vt2;type(Vt2);
     317            if (isInMat(Vt2,L[j]) > 0)
     318            {w = 1; break;}
     319          }
     320        }
     321        if (w == 0) {r = findCycle(Vt,L,P,n,ld,M);}
     322        if (r == 1) {break;}
    320323      }
    321324      return(r);
     
    342345      for (j = 1; j<= size(P); j++)
    343346      {if (P[j] <= size(Vt))
    344         {Vt2 = Vt[(size(Vt)-P[j]+1)..size(Vt)];
    345           if (isInMat(Vt2,L[j]) > 0) {w = 1; break;}
    346         }
     347        {Vt2 = Vt[(size(Vt)-P[j]+1)..size(Vt)];
     348          if (isInMat(Vt2,L[j]) > 0) {w = 1; break;}
     349        }
    347350      }
    348351      if (w == 0)
    349352      {vector Vtt;
    350         for (it = 1; it <= size(Vt); it++){Vtt = Vtt + Vt[it]*gen(it);}
    351         M = M,Vtt;
    352         kill Vtt;
     353        for (it = 1; it <= size(Vt); it++){Vtt = Vtt + Vt[it]*gen(it);}
     354        M = M,Vtt;
     355        kill Vtt;
    353356      }
    354357    }
     
    358361      for (i = 1; i <= size(M); i++)
    359362      {kill Vt; intvec Vt;
    360         for (j =1; j <= size(M[i]); j++) {Vt[j] =  int(leadcoef(M[i][j]));}
    361         h1 = h1 + 1; H1 = findHCoeff(Vt,n,L,P,H1);
     363        for (j =1; j <= size(M[i]); j++) {Vt[j] =  int(leadcoef(M[i][j]));}
     364        h1 = h1 + 1; H1 = findHCoeff(Vt,n,L,P,H1);
    362365      }
    363366      if (size(H1) < (size(V)+2)) {H1[(size(V)+2)] = h1;}
     
    374377      for (j = 1; j<= size(P); j++)
    375378      {if (P[j] <= size(Vt))
    376         {Vt2 = Vt[(size(Vt)-P[j]+1)..size(Vt)];
    377           if (isInMat(Vt2,L[j]) > 0) {w = 1; break;}
    378         }
     379        {Vt2 = Vt[(size(Vt)-P[j]+1)..size(Vt)];
     380          if (isInMat(Vt2,L[j]) > 0) {w = 1; break;}
     381        }
    379382      }
    380383      if (w == 0)
    381384      {vector Vtt;
    382         for (it = 1; it <= size(Vt); it++){Vtt = Vtt + Vt[it]*gen(it);}
    383         M = M,Vtt;
    384         kill Vtt;
     385        for (it = 1; it <= size(Vt); it++){Vtt = Vtt + Vt[it]*gen(it);}
     386        M = M,Vtt;
     387        kill Vtt;
    385388      }
    386389    }
     
    390393      for (i = 1; i <= size(M); i++)
    391394      {kill Vt; intvec Vt;
    392         for (j =1; j <= size(M[i]); j++)
    393         {Vt[j] =  int(leadcoef(M[i][j]));}
    394         h1 = h1 + 1; H1 = findHCoeff(Vt,n,L,P,H1,degbound);
     395        for (j =1; j <= size(M[i]); j++)
     396        {Vt[j] =  int(leadcoef(M[i][j]));}
     397        h1 = h1 + 1; H1 = findHCoeff(Vt,n,L,P,H1,degbound);
    395398      }
    396399      if (size(H1) < (size(V)+2)) { H1[(size(V)+2)] = h1;}
     
    419422      for (j = 1; j<= size(P); j++)
    420423      {if (P[j] <= size(Vt))
    421         {Vt2 = Vt[(size(Vt)-P[j]+1)..size(Vt)];
    422           if (isInMat(Vt2,L[j]) > 0) {w = 1; break;}
    423         }
     424        {Vt2 = Vt[(size(Vt)-P[j]+1)..size(Vt)];
     425          if (isInMat(Vt2,L[j]) > 0) {w = 1; break;}
     426        }
    424427      }
    425428      if (w == 0)
    426429      {vector Vtt;
    427         for (it = 1; it <= size(Vt); it++){Vtt = Vtt + Vt[it]*gen(it);}
    428         M = M,Vtt;
    429         kill Vtt;
     430        for (it = 1; it <= size(Vt); it++){Vtt = Vtt + Vt[it]*gen(it);}
     431        M = M,Vtt;
     432        kill Vtt;
    430433      }
    431434    }
     
    435438      for (i = 1; i <= size(M); i++)
    436439      {kill Vt; intvec Vt;
    437         for (j =1; j <= size(M[i]); j++)
    438         {Vt[j] =  int(leadcoef(M[i][j]));}
    439         if (size(R[1]) < (size(V)+2)) { R[1][(size(V)+2)] = 1;}
    440         else
    441         {R[1][(size(V)+2)] = R[1][(size(V)+2)] + 1;}
    442         R = findHCoeffMis(Vt,n,L,P,R);
     440        for (j =1; j <= size(M[i]); j++)
     441        {Vt[j] =  int(leadcoef(M[i][j]));}
     442        if (size(R[1]) < (size(V)+2)) { R[1][(size(V)+2)] = 1;}
     443        else
     444        {R[1][(size(V)+2)] = R[1][(size(V)+2)] + 1;}
     445        R = findHCoeffMis(Vt,n,L,P,R);
    443446      }
    444447      return(R);
     
    456459      for (j = 1; j<= size(P); j++)
    457460      {if (P[j] <= size(Vt))
    458         {Vt2 = Vt[(size(Vt)-P[j]+1)..size(Vt)];
    459           if (isInMat(Vt2,L[j]) > 0) {w = 1; break;}
    460         }
     461        {Vt2 = Vt[(size(Vt)-P[j]+1)..size(Vt)];
     462          if (isInMat(Vt2,L[j]) > 0) {w = 1; break;}
     463        }
    461464      }
    462465      if (w == 0)
    463466      {vector Vtt;
    464         for (it = 1; it <= size(Vt); it++){Vtt = Vtt + Vt[it]*gen(it);}
    465         M = M,Vtt;
    466         kill Vtt;
     467        for (it = 1; it <= size(Vt); it++){Vtt = Vtt + Vt[it]*gen(it);}
     468        M = M,Vtt;
     469        kill Vtt;
    467470      }
    468471    }
     
    472475      for (i = 1; i <= ncols(M); i++)
    473476      {kill Vt; intvec Vt;
    474         for (j =1; j <= size(M[i]); j++)
    475         {Vt[j] =  int(leadcoef(M[i][j]));}
    476         if (size(R[1]) < (size(V)+2)) { R[1][(size(V)+2)] = 1;}
    477         else
    478         {R[1][(size(V)+2)] = R[1][(size(V)+2)] + 1;}
    479         R = findHCoeffMis(Vt,n,L,P,R,degbound);
     477        for (j =1; j <= size(M[i]); j++)
     478        {Vt[j] =  int(leadcoef(M[i][j]));}
     479        if (size(R[1]) < (size(V)+2)) { R[1][(size(V)+2)] = 1;}
     480        else
     481        {R[1][(size(V)+2)] = R[1][(size(V)+2)] + 1;}
     482        R = findHCoeffMis(Vt,n,L,P,R,degbound);
    480483      }
    481484      return(R);
     
    500503      for (j = 1; j<= size(P); j++)
    501504      {if (P[j] <= size(Vt))
    502         {Vt2 = Vt[(size(Vt)-P[j]+1)..size(Vt)];
    503           if (isInMat(Vt2,L[j]) > 0) {w = 1; break;}
    504         }
     505        {Vt2 = Vt[(size(Vt)-P[j]+1)..size(Vt)];
     506          if (isInMat(Vt2,L[j]) > 0) {w = 1; break;}
     507        }
    505508      }
    506509      if (w == 0)
    507510      {vector Vtt;
    508         for (it = 1; it <= size(Vt); it++){Vtt = Vtt + Vt[it]*gen(it);}
    509         M = M,Vtt;
    510         kill Vtt;
     511        for (it = 1; it <= size(Vt); it++){Vtt = Vtt + Vt[it]*gen(it);}
     512        M = M,Vtt;
     513        kill Vtt;
    511514      }
    512515    }
     
    520523      for (i = 1; i <= size(M); i++)
    521524      {kill Vt; intvec Vt;
    522         for (j =1; j <= size(M[i]); j++){Vt[j] =  int(leadcoef(M[i][j]));}
    523         R[1] = R[1] + 1; R = findMisDim(Vt,n,L,P,R);
     525        for (j =1; j <= size(M[i]); j++){Vt[j] =  int(leadcoef(M[i][j]));}
     526        R[1] = R[1] + 1; R = findMisDim(Vt,n,L,P,R);
    524527      }
    525528      return(R);
     
    537540      for (j = 1; j<= size(P); j++)
    538541      {if (P[j] <= size(Vt))
    539         {Vt2 = Vt[(size(Vt)-P[j]+1)..size(Vt)];
    540           if (isInMat(Vt2,L[j]) > 0) {w = 1; break;}
    541         }
     542        {Vt2 = Vt[(size(Vt)-P[j]+1)..size(Vt)];
     543          if (isInMat(Vt2,L[j]) > 0) {w = 1; break;}
     544        }
    542545      }
    543546      if (w == 0)
    544547      {vector Vtt;
    545         for (it = 1; it <= size(Vt); it++){Vtt = Vtt + Vt[it]*gen(it);}
    546         M = M,Vtt;
    547         kill Vtt;
     548        for (it = 1; it <= size(Vt); it++){Vtt = Vtt + Vt[it]*gen(it);}
     549        M = M,Vtt;
     550        kill Vtt;
    548551      }
    549552    }
     
    557560      for (i = 1; i <= size(M); i++)
    558561      {kill Vt; intvec Vt;
    559         for (j =1; j <= size(M[i]); j++){Vt[j] =  int(leadcoef(M[i][j]));}
    560         R[1] = R[1] + 1; R = findMisDim(Vt,n,L,P,R,degbound);
     562        for (j =1; j <= size(M[i]); j++){Vt[j] =  int(leadcoef(M[i][j]));}
     563        R[1] = R[1] + 1; R = findMisDim(Vt,n,L,P,R,degbound);
    561564      }
    562565      return(R);
     
    586589      for (j = 1; j <= size(P); j++)
    587590      {if (P[j] <= size(Vt))
    588         {Vt2 = Vt[(size(Vt)-P[j]+1)..size(Vt)];
    589           if (isInMat(Vt2,L[j]) > 0)
    590           {w = 1; break;}
    591         }
     591        {Vt2 = Vt[(size(Vt)-P[j]+1)..size(Vt)];
     592          if (isInMat(Vt2,L[j]) > 0)
     593          {w = 1; break;}
     594        }
    592595      }
    593596      if (w == 0)
    594597      {vector Vtt;
    595         for (it = 1; it <= size(Vt); it++){Vtt = Vtt + Vt[it]*gen(it);}
    596         M = M,Vtt;
    597         kill Vtt;
     598        for (it = 1; it <= size(Vt); it++){Vtt = Vtt + Vt[it]*gen(it);}
     599        M = M,Vtt;
     600        kill Vtt;
    598601      }
    599602    }
     
    603606      for (i = 1; i <= size(M); i++)
    604607      {kill Vt; intvec Vt;
    605         for (j =1; j <= size(M[i]); j++){Vt[j] =  int(leadcoef(M[i][j]));}
    606         R = R + findmistletoes(Vt,n,L,P);
     608        for (j =1; j <= size(M[i]); j++){Vt[j] =  int(leadcoef(M[i][j]));}
     609        R = R + findmistletoes(Vt,n,L,P);
    607610      }
    608611      return(R);
     
    617620      for (j = 1; j <= size(P); j++)
    618621      {if (P[j] <= size(Vt))
    619         {Vt2 = Vt[(size(Vt)-P[j]+1)..size(Vt)];
    620           if (isInMat(Vt2,L[j]) > 0){w = 1; break;}
    621         }
     622        {Vt2 = Vt[(size(Vt)-P[j]+1)..size(Vt)];
     623          if (isInMat(Vt2,L[j]) > 0){w = 1; break;}
     624        }
    622625      }
    623626      if (w == 0)
    624627      {vector Vtt;
    625         for (it = 1; it <= size(Vt); it++){Vtt = Vtt + Vt[it]*gen(it);}
    626         M = M,Vtt;
    627         kill Vtt;
     628        for (it = 1; it <= size(Vt); it++){Vtt = Vtt + Vt[it]*gen(it);}
     629        M = M,Vtt;
     630        kill Vtt;
    628631      }
    629632    }
     
    633636      for (i = 1; i <= ncols(M); i++)
    634637      {kill Vt; intvec Vt;
    635         for (j =1; j <= size(M[i]); j++)
    636         {Vt[j] =  int(leadcoef(M[i][j]));}
    637         //Vt; typeof(Vt); size(Vt);
    638         R = R + findmistletoes(Vt,n,L,P,degbound);
     638        for (j =1; j <= size(M[i]); j++)
     639        {Vt[j] =  int(leadcoef(M[i][j]));}
     640        //Vt; typeof(Vt); size(Vt);
     641        R = R + findmistletoes(Vt,n,L,P,degbound);
    639642      }
    640643      return(R);
     
    683686"USAGE: ivL2lpI(L); L a list of intvecs
    684687RETURN: ideal
    685 PURPOSE:Transforming a list of intvecs into an ideal of Letterplace monomials
     688PURPOSE:Transforming a list of intvecs into an ideal of Letterplace monomials.
     689@*      For the encoding of the variables see the overview.
    686690ASSUME: - Intvec corresponds to a Letterplace monomial
    687691@*      - basering has to be a Letterplace ring
     
    713717RETURN: poly
    714718PURPOSE:Transforming an intvec into the corresponding Letterplace polynomial
     719@*      For the encoding of the variables see the overview.
    715720ASSUME: - Intvec corresponds to a Letterplace monomial
    716721@*      - basering has to be a Letterplace ring
     
    742747RETURN: ideal
    743748PURPOSE:Converting a list of intmats into an ideal of corresponding monomials
     749@*      The rows of the intmat corresponds to an intvec, which stores the
     750@*      monomial.
     751@*      For the encoding of the variables see the overview.
    744752ASSUME: - The rows of each intmat in L must correspond to a Letterplace monomial
    745753@*      - basering has to be a Letterplace ring
     
    770778"USAGE: iv2lpMat(M); M an intmat
    771779RETURN: ideal
    772 PURPOSE:Converting an intmat into an ideal of the corresponding monomials
     780PURPOSE:Converting an intmat into an ideal of the corresponding monomials.
     781@*      The rows of the intmat corresponds to an intvec, which stores the
     782@*      monomial.
     783@*      For the encoding of the variables see the overview.
    773784ASSUME: - The rows of M must correspond to Letterplace monomials
    774785@*      - basering has to be a Letterplace ring
     
    804815"USAGE: lpId2ivLi(G); G an ideal
    805816RETURN: list
    806 PURPOSE:Transforming an ideal into the corresponding list of intvecs
     817PURPOSE:Transforming an ideal into the corresponding list of intvecs.
     818@*      For the encoding of the variables see the overview.
    807819ASSUME: - basering has to be a Letterplace ring
    808820EXAMPLE: example lpId2ivLi; shows examples
     
    827839"USAGE: lp2iv(p); p a poly
    828840RETURN: intvec
    829 PURPOSE:Transforming a monomial into the corresponding intvec
     841PURPOSE:Transforming a monomial into the corresponding intvec.
     842@*      For the encoding of the variables see the overview.
    830843ASSUME: - basering has to be a Letterplace ring
    831844NOTE:   - Assumptions will not be checked!
     
    869882RETURN: list
    870883PURPOSE:Converting an ideal into an list of intmats,
    871 @*      the corresponding intvecs forming the rows
     884@*      the corresponding intvecs forming the rows.
     885@*      For the encoding of the variables see the overview.
    872886ASSUME: - basering has to be a Letterplace ring
    873887EXAMPLE: example lp2ivId; shows examples
     
    917931ASSUME: - basering is a Letterplace ring
    918932@*      - all rows of each intmat correspond to a Letterplace monomial
     933@*        for the encoding of the variables see the overview
    919934@*      - if you specify a different degree bound degbound,
    920 @*        degbound <= attrib(basering,uptodeg) holds
     935@*        degbound <= attrib(basering,uptodeg) should hold.
    921936NOTE: - If L is the list returned, then L[1] is an integer corresponding to the
    922937@*      dimension, L[2] is an intvec which contains the coefficients of the
     
    968983ASSUME: - basering is a Letterplace ring.
    969984@*      - All rows of each intmat correspond to a Letterplace monomial.
     985@*        for the encoding of the variables see the overview
    970986@*      - If you specify a different degree bound degbound,
    971 @*        degbound <= attrib(basering,uptodeg) holds.
     987@*        degbound <= attrib(basering,uptodeg) should hold.
    972988NOTE: - If L is the list returned, then L[1] is an integer, L[2] is an intvec
    973989@*      which contains the coefficients of the Hilbert series and L[3]
     
    10141030RETURN: int, 0 if the dimension is finite, or 1 otherwise
    10151031PURPOSE:Decides, whether the K-dimension is finite or not
    1016 ASSUME: - basering is a Letterplace ring.
    1017 @*      - All rows of each intmat correspond to a Letterplace monomial.
    1018 NOTE:   - n is the number of variables.
     1032ASSUME: - basering is a Letterplace ring
     1033@*      - All rows of each intmat correspond to a Letterplace monomial
     1034@*        For the encoding of the variables see the overview.
     1035NOTE:   - n is the number of variables
    10191036EXAMPLE: example ivDimCheck; shows examples
    10201037"
     
    10721089ASSUME: - basering is a Letterplace ring.
    10731090@*      - all rows of each intmat correspond to a Letterplace monomial
     1091@*        for the encoding of the variables see the overview
    10741092@*      - if you specify a different degree bound degbound,
    1075 @*       degbound <= attrib(basering,uptodeg) holds.
     1093@*       degbound <= attrib(basering,uptodeg) should hold.
    10761094NOTE: - If degbound is set, a degree bound  will be added. By default there
    10771095@*      is no degree bound.
     
    11571175ASSUME: - basering is a Letterplace ring.
    11581176@*      - all rows of each intmat correspond to a Letterplace monomial
     1177@*        for the encoding of the variables see the overview
    11591178@*      - if you specify a different degree bound degbound,
    1160 @*        degbound <= attrib(basering,uptodeg) holds.
     1179@*        degbound <= attrib(basering,uptodeg) should hold.
    11611180NOTE: - If degbound is set, a degree bound will be added. By default there
    11621181@*      is no degree bound.
     
    12391258@*        Otherwise there might some elements missing.
    12401259@*      - basering is a Letterplace ring.
     1260@*      - mistletoes are stored as intvecs, as described in the overview
    12411261EXAMPLE: example ivMis2Base; shows examples
    12421262"
     
    12921312@*        Otherwise the returned value may differ from the K-dimension.
    12931313@*      - basering is a Letterplace ring.
     1314@*      - mistletoes are stored as intvecs, as described in the overview
    12941315EXAMPLE: example ivMis2Dim; shows examples
    12951316"
     
    12991320  if (isInList(L,M) > 0) {print("1 is a mistletoe, therefore dim = 1"); return(1);}
    13001321  int i,j,d,s;
    1301   j = 1;
    13021322  d = 1 + size(M[1]);
    13031323  for (i = 1; i < size(M); i++)
    1304   {s = size(M[i]); if (s > size(M[i+1])){s = size(M[i+1]);}
    1305     while ((M[i][j] == M[i+1][j]) && (j <= s)){j = j + 1;}
    1306     d = d + size(M[i+1])- j + 1;
     1324  {j = 1;
     1325   s = size(M[i]); if (s > size(M[i+1])){s = size(M[i+1]);}
     1326   while ((M[i][j] == M[i+1][j]) && (j <= s)){j = j + 1;}
     1327   d = d + size(M[i+1])- j + 1;
    13071328  }
    13081329  return(d);
     
    13261347PURPOSE:Orders a given set of mistletoes lexicographically
    13271348ASSUME: - basering is a Letterplace ring.
    1328        - intvecs correspond to monomials
     1349@*      - intvecs correspond to monomials, as explained in the overview
    13291350NOTE:   - This is preprocessing, it's not needed if the mistletoes are returned
    13301351@*        from the sickle algorithm.
     
    13521373@*      optional integer
    13531374RETURN: list, containing intvecs, the mistletoes of A/<L>
    1354 PURPOSE:Computing the mistletoes for a given Groebner basis L
     1375PURPOSE:Computing the mistletoes for a given Groebner basis L, given by intmats
    13551376ASSUME: - basering is a Letterplace ring.
    13561377@*      - all rows of each intmat correspond to a Letterplace monomial
     1378@*        as explained in the overview
    13571379@*      - if you specify a different degree bound degbound,
    1358 @*        degbound <= attrib(basering,uptodeg) holds.
     1380@*        degbound <= attrib(basering,uptodeg) should hold.
    13591381NOTE: - If degbound is set, a degree bound will be added. By default there
    13601382@*      is no degree bound.
     
    14341456ASSUME: - basering is a Letterplace ring.
    14351457@*      - all rows of each intmat correspond to a Letterplace monomial
     1458@*        as explained in the overview
    14361459@*      - if you specify a different degree bound degbound,
    1437 @*        degbound <= attrib(basering,uptodeg) holds.
     1460@*        degbound <= attrib(basering,uptodeg) should hold.
    14381461NOTE: - If L is the list returned, then L[1] is an integer, L[2] is a list,
    14391462@*      containing the mistletoes as intvecs.
     
    15211544ASSUME: - basering is a Letterplace ring.
    15221545@*      - all rows of each intmat correspond to a Letterplace monomial
     1546@*        as explained in the overview
    15231547@*      - if you specify a different degree bound degbound,
    1524 @*        degbound <= attrib(basering,uptodeg) holds.
     1548@*        degbound <= attrib(basering,uptodeg) should hold.
    15251549NOTE: - If L is the list returned, then L[1] is an intvec, L[2] is a list,
    15261550@*      containing the mistletoes as intvecs.
     
    16051629RETURN: list
    16061630PURPOSE:Computing K-dimension and Hilbert series, starting with a lp-ideal
    1607 ASSUME: - basering is a Letterplace ring.
     1631ASSUME: - basering is a Letterplace ring. G is a Letterplace ideal.
    16081632@*      - if you specify a different degree bound degbound,
    1609 @*        degbound <= attrib(basering,uptodeg) holds.
     1633@*        degbound <= attrib(basering,uptodeg) should hold.
    16101634NOTE: - If L is the list returned, then L[1] is an integer corresponding to the
    16111635@*      dimension, L[2] is an intvec which contains the coefficients of the
     
    16471671RETURN: list
    16481672PURPOSE:Computing K-dimension, Hilbert series and mistletoes at once
    1649 ASSUME: - basering is a Letterplace ring.
     1673ASSUME: - basering is a Letterplace ring.  G is a Letterplace ideal.
    16501674@*      - if you specify a different degree bound degbound,
    1651 @*        degbound <= attrib(basering,uptodeg) holds.
     1675@*        degbound <= attrib(basering,uptodeg) should hold.
    16521676NOTE: - If L is the list returned, then L[1] is an integer, the K-dimension,
    1653 @*      L[2] is an intvec, the Hilbert series and L[3] is an ideal,
     1677@*      L[2] is an intvec, the Hilbert series and L[3] is an ideal, 
    16541678@*      the mistletoes
    16551679@*    - If degbound is set, there will be a degree bound added. 0 means no
     
    16901714RETURN: intvec, containing the coefficients of the Hilbert series
    16911715PURPOSE:Computing the Hilbert series
    1692 ASSUME: - basering is a Letterplace ring.
     1716ASSUME: - basering is a Letterplace ring.  G is a Letterplace ideal.
    16931717@*      - if you specify a different degree bound degbound,
    1694 @*        degbound <= attrib(basering,uptodeg) holds.
     1718@*        degbound <= attrib(basering,uptodeg) should hold.
    16951719NOTE: - If degbound is set, there will be a degree bound added. 0 means no
    16961720@*      degree bound. Default: attrib(basering,uptodeg).
     
    17281752RETURN: int, 1 if K-dimension of the factor algebra is infinite, 0 otherwise
    17291753PURPOSE:Checking a factor algebra for finiteness of the K-dimension
    1730 ASSUME: - basering is a Letterplace ring.
     1754ASSUME: - basering is a Letterplace ring.  G is a Letterplace ideal.
    17311755EXAMPLE: example lpDimCheck; shows examples
    17321756"
     
    17561780RETURN: int, the K-dimension of the factor algebra
    17571781PURPOSE:Computing the K-dimension of a factor algebra, given via an ideal
    1758 ASSUME: - basering is a Letterplace ring
     1782ASSUME: - basering is a Letterplace ring. G is a Letterplace ideal.
    17591783@*      - if you specify a different degree bound degbound,
    1760 @*        degbound <= attrib(basering,uptodeg) holds.
     1784@*        degbound <= attrib(basering,uptodeg) should hold.
    17611785NOTE: - If degbound is set, there will be a degree bound added. 0 means no
    17621786@*      degree bound. Default: attrib(basering, uptodeg).
     
    17911815RETURN: ideal, a K-basis of the factor algebra
    17921816PURPOSE:Computing a K-basis out of given mistletoes
    1793 ASSUME: - basering is a Letterplace ring.
     1817ASSUME: - basering is a Letterplace ring. G is a Letterplace ideal.
    17941818@*      - M contains only monomials
    17951819NOTE:   - The mistletoes have to be ordered lexicographically -> OrdMisLex.
     
    18151839RETURN: int, the K-dimension of the factor algebra
    18161840PURPOSE:Computing the K-dimension out of given mistletoes
    1817 ASSUME: - basering is a Letterplace ring.
     1841ASSUME: - basering is a Letterplace ring. G is a Letterplace ideal.
    18181842@*      - M contains only monomials
    18191843NOTE:   - The mistletoes have to be ordered lexicographically -> OrdMisLex.
     
    18391863RETURN: ideal, containing the mistletoes, ordered lexicographically
    18401864PURPOSE:A given set of mistletoes is ordered lexicographically
    1841 ASSUME: - basering is a Letterplace ring.
     1865ASSUME: - basering is a Letterplace ring. G is a Letterplace ideal.
    18421866NOTE:   This is preprocessing, it is not needed if the mistletoes are returned
    18431867@*      from the sickle algorithm.
     
    18601884RETURN: ideal
    18611885PURPOSE:Computing the mistletoes of K[X]/<G>
    1862 ASSUME: - basering is a Letterplace ring.
     1886ASSUME: - basering is a Letterplace ring. G is a Letterplace ideal.
    18631887@*      - if you specify a different degree bound degbound,
    1864 @*        degbound <= attrib(basering,uptodeg) holds.
     1888@*        degbound <= attrib(basering,uptodeg) should hold.
    18651889NOTE: - If degbound is set, there will be a degree bound added. 0 means no
    18661890@*      degree bound. Default: attrib(basering,uptodeg).
     
    18981922RETURN: list
    18991923PURPOSE:Computing the K-dimension and the mistletoes
    1900 ASSUME: - basering is a Letterplace ring.
     1924ASSUME: - basering is a Letterplace ring. G is a Letterplace ideal.
    19011925@*      - if you specify a different degree bound degbound,
    1902 @*        degbound <= attrib(basering,uptodeg) holds.
     1926@*        degbound <= attrib(basering,uptodeg) should hold.
    19031927NOTE: - If L is the list returned, then L[1] is an integer, the K-dimension,
    19041928@*      L[2] is an ideal, the mistletoes.
     
    19371961RETURN: list
    19381962PURPOSE:Computing the Hilbert series and the mistletoes
    1939 ASSUME: - basering is a Letterplace ring.
     1963ASSUME: - basering is a Letterplace ring. G is a Letterplace ideal.
    19401964@*      - if you specify a different degree bound degbound,
    1941 @*        degbound <= attrib(basering,uptodeg) holds.
     1965@*        degbound <= attrib(basering,uptodeg) should hold.
    19421966NOTE: - If L is the list returned, then L[1] is an intvec, corresponding to the
    19431967@*      Hilbert series, L[2] is an ideal, the mistletoes.
     
    19792003RETURN: list
    19802004PURPOSE:Allowing the user to access all procs with one command
    1981 ASSUME: - basering is a Letterplace ring.
     2005ASSUME: - basering is a Letterplace ring. G is a Letterplace ideal.
    19822006@*      - if you specify a different degree bound degbound,
    1983 @*        degbound <= attrib(basering,uptodeg) holds.
     2007@*        degbound <= attrib(basering,uptodeg) should hold.
    19842008NOTE:   The returned object will always be a list, but the entries of the
    19852009@*      returned list may be very different
     
    20412065
    20422066
     2067proc tst_fpadim()
     2068{
     2069  example ivDHilbert;
     2070  example ivDHilbertSickle;
     2071  example ivDimCheck;
     2072  example ivHilbert;
     2073  example ivKDim;
     2074  example ivMis2Base;
     2075  example ivMis2Dim;
     2076  example ivOrdMisLex;
     2077  example ivSickle;
     2078  example ivSickleHil;
     2079  example ivSickleDim;
     2080  example lpDHilbert;
     2081  example lpDHilbertSickle;
     2082  example lpHilbert;
     2083  example lpDimCheck;
     2084  example lpKDim;
     2085  example lpMis2Base;
     2086  example lpMis2Dim;
     2087  example lpOrdMisLex;
     2088  example lpSickle;
     2089  example lpSickleHil;
     2090  example lpSickleDim;
     2091  example sickle;
     2092  example ivL2lpI;
     2093  example iv2lp;
     2094  example iv2lpList;
     2095  example iv2lpMat;
     2096  example lp2iv;
     2097  example lp2ivId;
     2098  example lpId2ivLi;
     2099}
     2100
     2101
     2102
     2103
     2104
    20432105/*
    20442106  Here are some examples one may try. Just copy them into your console.
Note: See TracChangeset for help on using the changeset viewer.