Changeset 6e40beb in git


Ignore:
Timestamp:
Sep 30, 2010, 3:37:51 PM (14 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
a56ed44773b523e0bf45bcb99e4c02c8a9671db3
Parents:
8eda39598bf5a0767209a0c1a874ffbdbfead64b
Message:
format fix

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

Legend:

Unmodified
Added
Removed
  • Singular/LIB/fpadim.lib

    r8eda39 r6e40beb  
    1010@* of the German DFG
    1111
    12 THEORY: Given the free algebra A = K<x_1,...,x_n> and a (finite) Groebner basis
     12OVERVIEW: Given the free algebra A = K<x_1,...,x_n> and a (finite) Groebner basis
    1313@*      GB = {g_1,..,g_w}, one is interested in the K-dimension and in the
    1414@*      explicit K-basis of A/<GB>.
     
    2020@*
    2121@*      The Ufnarovskij graph is used to determine whether A/<GB> has finite
    22 @*      K-dimension. One has to check if the graph contains cycles. 
    23 @*      For the whole theory we refer to [ufna]. Given a 
     22@*      K-dimension. One has to check if the graph contains cycles.
     23@*      For the whole theory we refer to [ufna]. Given a
    2424@*      reduced set of monomials GB one can define the basis tree, which vertex
    25 @*      set V consists of all normal monomials w.r.t. GB. For every two 
     25@*      set V consists of all normal monomials w.r.t. GB. For every two
    2626@*      monomials m_1, m_2 in V there is a direct edge from m_1 to m_2, if and
    2727@*      only if there exists x_k in {x_1,..,x_n}, such that m_1*x_k = m_2. The
    2828@*      set M = {m in V | there is no edge from m to another monomial in V} is
    29 @*      called the set of mistletoes. As one can easily see it consists of 
     29@*      called the set of mistletoes. As one can easily see it consists of
    3030@*      the endpoints of the graph. Since there is a unique path to every
    3131@*      monomial in V the whole graph can be described only from the knowledge
     
    3737@*      number, so variable one is represented as 1, variable two as 2 and so
    3838@*      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 
     39@*      Multiplication is concatenation. Note that there is no algorithm for
    4040@*      computing the normalform yet, but for our case it is not needed.
    4141@*
     
    4343REFERENCES:
    4444
    45 @*   [ufna]     Ufnarovskij: Combinatorical and asymptotic methods in algebra,
     45@*   [ufna] Ufnarovskij: Combinatorical and asymptotic methods in algebra,
    4646@*                           1990
    47 @*   [lls]      Levandovskyy, La Scala: Letterplace ideals and non-commutative
     47@*   [lls] Levandovskyy, La Scala: Letterplace ideals and non-commutative
    4848@*                                      Groebner bases, 2009
    49 @*   [studzins] Studzinski: Dimension computations in non-commutative, 
     49@*   [studzins] Studzinski: Dimension computations in non-commutative,
    5050@*                          associative algebras, Diploma thesis, RWTH Aachen, 2010
    5151
     
    5353@* - basering is always a Letterplace ring
    5454@* - all intvecs correspond to Letterplace monomials
    55 @* - if you specify a different degree bound d, 
     55@* - if you specify a different degree bound d,
    5656@*  d <= attrib(basering,uptodeg) holds
    5757@*
     
    5959@* and 'lp' for the letterplace representation of monomials
    6060
    61 MAIN PROCEDURES:
     61PROCEDURES:
    6262
    6363ivDHilbert(L,n[,d]);       computes the K-dimension and the Hilbert series
     
    8484
    8585
    86 AUXILIARY PROCEDURES:
    87 
    8886ivL2lpI(L);           transforms a list of intvecs into an ideal of lp monomials
    89 iv2lp(I);             transforms an intvec into the corresponding monomial 
     87iv2lp(I);             transforms an intvec into the corresponding monomial
    9088iv2lpList(L);         transforms a list of intmats into an ideal of lp monomials
    9189iv2lpMat(M);          transforms an intmat into an ideal of lp monomials
     
    185183 if (size(#) > 0) {if (#[1] > 0) {degbound = #[1];}}
    186184 int dimen,i,j,w,it;
    187  intvec Vt,Vt2; 
     185 intvec Vt,Vt2;
    188186 module M;
    189187 if (degbound == 0)
     
    196194    }
    197195   }
    198     if (w == 0) 
     196    if (w == 0)
    199197    {vector Vtt;
    200198     for (it = 1; it <= size(Vt); it++){Vtt = Vtt + Vt[it]*gen(it);}
     
    205203  if (size(M) == 0) {return(0);}
    206204  else
    207   {M = simplify(M,2); 
     205  {M = simplify(M,2);
    208206   for (i = 1; i <= size(M); i++)
    209207   {kill Vt; intvec Vt;
     
    233231  if (size(M) == 0) {return(0);}
    234232  else
    235   {M = simplify(M,2); 
     233  {M = simplify(M,2);
    236234   for (i = 1; i <= size(M); i++)
    237235   {kill Vt; intvec Vt;
     
    302300  else
    303301  { Vt = V[(size(V)-ld+1)..size(V)];
    304     vector Vtt; 
     302    vector Vtt;
    305303    for (it = 1; it <= size(Vt); it++)
    306304     {Vtt = Vtt + Vt[it]*gen(it);}
     
    317315      }
    318316     }
    319      if (w == 0) {r = findCycle(Vt,L,P,n,ld,M);} 
     317     if (w == 0) {r = findCycle(Vt,L,P,n,ld,M);}
    320318     if (r == 1) {break;}
    321319    }
     
    330328PURPOSE:Computing the coefficient of the Hilbert series (upto degree degbound)
    331329NOTE:   Starting with a part of the Hilbert series we change the coefficient
    332 @*      depending on how many baseelements we found on the actual branch 
    333 "       
     330@*      depending on how many baseelements we found on the actual branch
     331"
    334332{int degbound = 0;
    335333 if (size(#) > 0){if (#[1] > 0){degbound = #[1];}}
     
    337335 int h1 = 0;
    338336 intvec Vt,Vt2,H1;
    339  module M; 
     337 module M;
    340338 if (degbound == 0)
    341339 {for (i = 1; i <= n; i++)
     
    347345    }
    348346   }
    349     if (w == 0) 
     347    if (w == 0)
    350348    {vector Vtt;
    351349     for (it = 1; it <= size(Vt); it++){Vtt = Vtt + Vt[it]*gen(it);}
     
    439437     {Vt[j] =  int(leadcoef(M[i][j]));}
    440438    if (size(R[1]) < (size(V)+2)) { R[1][(size(V)+2)] = 1;}
    441     else 
     439    else
    442440    {R[1][(size(V)+2)] = R[1][(size(V)+2)] + 1;}
    443441    R = findHCoeffMis(Vt,n,L,P,R);
     
    450448  if (size(V) == degbound)
    451449  {if (size(R) < 2){R[2] = list (V);}
    452    else{R[2] = R[2] + list (V);} 
     450   else{R[2] = R[2] + list (V);}
    453451   return(R);
    454452  }
     
    476474     {Vt[j] =  int(leadcoef(M[i][j]));}
    477475     if (size(R[1]) < (size(V)+2)) { R[1][(size(V)+2)] = 1;}
    478      else 
     476     else
    479477     {R[1][(size(V)+2)] = R[1][(size(V)+2)] + 1;}
    480478     R = findHCoeffMis(Vt,n,L,P,R,degbound);
     
    505503    }
    506504   }
    507     if (w == 0) 
     505    if (w == 0)
    508506    {vector Vtt;
    509507     for (it = 1; it <= size(Vt); it++){Vtt = Vtt + Vt[it]*gen(it);}
     
    512510    }
    513511  }
    514   if (size(M) == 0) 
     512  if (size(M) == 0)
    515513  {if (size(R) < 2){R[2] = list (V);}
    516    else{R[2] = R[2] + list(V);} 
     514   else{R[2] = R[2] + list(V);}
    517515   return(R);
    518516  }
     
    531529  if (size(V) == degbound)
    532530  {if (size(R) < 2){R[2] = list (V);}
    533    else{R[2] = R[2] + list (V);} 
     531   else{R[2] = R[2] + list (V);}
    534532   return(R);
    535533  }
     
    542540    }
    543541   }
    544     if (w == 0) 
     542    if (w == 0)
    545543    {vector Vtt;
    546544     for (it = 1; it <= size(Vt); it++){Vtt = Vtt + Vt[it]*gen(it);}
     
    549547    }
    550548  }
    551   if (size(M) == 0) 
     549  if (size(M) == 0)
    552550  {if (size(R) < 2){R[2] = list (V);}
    553    else{R[2] = R[2] + list(V);} 
     551   else{R[2] = R[2] + list(V);}
    554552   return(R);
    555553  }
     
    601599  if (size(M)==0) {R = V; return(R);}
    602600  else
    603   {M = simplify(M,2); 
     601  {M = simplify(M,2);
    604602   for (i = 1; i <= size(M); i++)
    605603   {kill Vt; intvec Vt;
     
    622620    }
    623621   }
    624    if (w == 0) 
     622   if (w == 0)
    625623   {vector Vtt;
    626624    for (it = 1; it <= size(Vt); it++){Vtt = Vtt + Vt[it]*gen(it);}
     
    628626    kill Vtt;
    629627   }
    630   } 
     628  }
    631629  if (size(M) == 0) {R = V; return(R);}
    632630  else
     
    704702  def R = makeLetterplaceRing(5);// constructs a Letterplace ring
    705703  setring R; //sets basering to Letterplace ring
    706   intvec u = 1,1,2; intvec v = 2,1,3; intvec w = 3,1,1; 
     704  intvec u = 1,1,2; intvec v = 2,1,3; intvec w = 3,1,1;
    707705  // u = x^2y, v = yxz, w = zx^2 in intvec representation
    708706  list L = u,v,w;
     
    721719{if (I[1] == 0) {return(1);}
    722720 int i = size(I);
    723  if (i > attrib(basering,"uptodeg")) {ERROR("polynomial exceeds degreebound");} 
     721 if (i > attrib(basering,"uptodeg")) {ERROR("polynomial exceeds degreebound");}
    724722 int j; poly p = 1;
    725723 for (j = 1; j <= i; j++) {if (I[j] > 0) { p = lpMult(p,var(I[j]));}} //ignore zeroes, because they correspond to 1
     
    732730  def R = makeLetterplaceRing(5); // constructs a Letterplace ring
    733731  setring R; //sets basering to Letterplace ring
    734   intvec u = 1,1,2; intvec v = 2,1,3; intvec w = 3,1,1; 
     732  intvec u = 1,1,2; intvec v = 2,1,3; intvec w = 3,1,1;
    735733  // u = x^2y, v = yxz, w = zx^2 in intvec representation
    736734  iv2lp(u); // invokes the procedure and returns the corresponding poly
     
    762760  // defines intmats of different size containing intvec representations of
    763761  // monomials as rows
    764   list L = u,v,w; 
     762  list L = u,v,w;
    765763  print(u); print(v); print(w); // shows the intmats contained in L
    766764  iv2lpList(L); // returns the corresponding monomials as an ideal
     
    787785  }
    788786 return(G);
    789 } 
     787}
    790788example
    791789{
     
    823821   ideal L = x(1)*x(2),y(1)*y(2),x(1)*y(2)*x(3);
    824822   lpId2ivLi(L); // returns the corresponding intvecs as a list
    825 } 
     823}
    826824
    827825proc lp2iv(poly p)
     
    842840 for ( i = 1; i <= attrib(basering,"lV"); i++) {if (lep[i] == 1) {I = i; break;}}
    843841 for (i = (attrib(basering,"lV")+1); i <= size(lep); i++)
    844    {if (lep[i] == 1) 
    845     { j = (i mod attrib(basering,"lV")); 
     842   {if (lep[i] == 1)
     843    { j = (i mod attrib(basering,"lV"));
    846844      if (j == 0) {I = I,attrib(basering,"lV");}
    847845      else {I = I,j;}
     
    861859  poly p = x(1)*x(2)*z(3); poly q = y(1)*y(2)*x(3)*x(4);
    862860  poly w= z(1)*y(2)*x(3)*z(4)*z(5);
    863   // p,q,w are some polynomials we want to transform into their 
     861  // p,q,w are some polynomials we want to transform into their
    864862  // intvec representation
    865863  lp2iv(p); lp2iv(q); lp2iv(w);
     
    878876 checkAssumptions(0,L);
    879877 int i,md;
    880  for (i = 1; i <= size(G); i++) { if (md <= deg(G[i])) {md = deg(G[i]);}} 
     878 for (i = 1; i <= size(G); i++) { if (md <= deg(G[i])) {md = deg(G[i]);}}
    881879 while (size(G) > 0)
    882880 {ideal Gt;
    883881  for (i = 1; i <= ncols(G); i++) {if (md == deg(G[i])) {Gt = Gt + G[i]; G[i] = 0;}}
    884882  if (size(Gt) > 0)
    885   {G = simplify(G,2); 
     883  {G = simplify(G,2);
    886884   intmat M [size(Gt)][md];
    887885   for (i = 1; i <= size(Gt); i++) {M[i,1..md] = lp2iv(Gt[i]);}
    888886   L = insert(L,M);
    889887   kill M; kill Gt;
    890    md = md - 1; 
    891   }
    892   else {kill Gt; md = md - 1;} 
     888   md = md - 1;
     889  }
     890  else {kill Gt; md = md - 1;}
    893891 }
    894892 return(L);
     
    902900  poly p = x(1)*x(2)*z(3); poly q = y(1)*y(2)*x(3)*x(4);
    903901  poly w = z(1)*y(2)*x(3)*z(4);
    904   // p,q,w are some polynomials we want to transform into their 
     902  // p,q,w are some polynomials we want to transform into their
    905903  // intvec representation
    906904  ideal G = p,q,w;
     
    918916ASSUME: - basering is a Letterplace ring
    919917@*      - all rows of each intmat correspond to a Letterplace monomial
    920 @*      - if you specify a different degree bound degbound, 
     918@*      - if you specify a different degree bound degbound,
    921919@*        degbound <= attrib(basering,uptodeg) holds
    922920NOTE: - If L is the list returned, then L[1] is an integer corresponding to the
     
    10231021 int i,r;
    10241022 intvec P,H;
    1025  for (i = 1; i <= size(L); i++) 
     1023 for (i = 1; i <= size(L); i++)
    10261024 {P[i] = ncols(L[i]);
    10271025  if (P[i] == 1) {if (isInMat(H,L[i]) > 0) {ERROR("Quotient algebra is trivial");}}
     
    10311029 intmat S; int sd,ld; intvec V;
    10321030 sd = P[1]; ld = P[1];
    1033  for (i = 2; i <= size(P); i++) 
     1031 for (i = 2; i <= size(P); i++)
    10341032 {if (P[i] < sd) {sd = P[i];}
    10351033  if (P[i] > ld) {ld = P[i];}
     
    10861084 if (size(#) > 0) {if (typeof(#[1])=="int"){if (#[1] > 0) {degbound = #[1];}}}
    10871085 intvec P,H; int i;
    1088  for (i = 1; i <= size(L); i++) 
     1086 for (i = 1; i <= size(L); i++)
    10891087 {P[i] = ncols(L[i]);
    10901088  if (P[i] == 1) {if ( isInMat(H,L[i]) > 0) {ERROR("Quotient algebra is trivial");}}
     
    10941092 checkAssumptions(degbound,L);
    10951093 if (degbound == 0)
    1096  {int sd; 
     1094 {int sd;
    10971095  intmat S;
    10981096  sd = P[1];
    10991097  for (i = 2; i <= size(P); i++) {if (P[i] < sd) {sd = P[i];}}
    1100   sd = (sd - 1); 
     1098  sd = (sd - 1);
    11011099  if (sd == 0) { for (i = 1; i <= size(L); i++){if (ncols(L[i]) == 1){S = createStartMat1(n,L[i]); break;}}}
    11021100  else {S = createStartMat(sd,n);}
     
    11041102  for (i = 1; i <= sd; i++) {H = H,(n^i);}
    11051103  for (i = 1; i <= nrows(S); i++)
    1106   {intvec St = S[i,1..ncols(S)]; 
     1104  {intvec St = S[i,1..ncols(S)];
    11071105   H = findHCoeff(St,n,L,P,H);
    11081106   kill St;
    11091107  }
    1110   return(H); 
     1108  return(H);
    11111109 }
    11121110 else
    1113  {for (i = 1; i <= size(P); i++) 
     1111 {for (i = 1; i <= size(P); i++)
    11141112  {if (P[i] > degbound) {ERROR("degreebound is too small, GB contains elements of higher degree");}}
    1115   int sd; 
     1113  int sd;
    11161114  intmat S;
    11171115  sd = P[1];
    11181116  for (i = 2; i <= size(P); i++) {if (P[i] < sd) {sd = P[i];}}
    1119   sd = (sd - 1); 
     1117  sd = (sd - 1);
    11201118  if (sd == 0) { for (i = 1; i <= size(L); i++){if (ncols(L[i]) == 1){S = createStartMat1(n,L[i]); break;}}}
    11211119  else {S = createStartMat(sd,n);}
     
    11231121  for (i = 1; i <= sd; i++) {H = H,(n^i);}
    11241122  for (i = 1; i <= nrows(S); i++)
    1125   {intvec St = S[i,1..ncols(S)]; 
     1123  {intvec St = S[i,1..ncols(S)];
    11261124   H = findHCoeff(St,n,L,P,H,degbound);
    11271125   kill St;
    11281126  }
    1129   return(H);   
     1127  return(H);
    11301128 }
    11311129}
     
    11691167 if (size(#) > 0) {if (typeof(#[1])=="int"){if (#[1] > 0) {degbound = #[1];}}}
    11701168 intvec P,H; int i;
    1171  for (i = 1; i <= size(L); i++) 
     1169 for (i = 1; i <= size(L); i++)
    11721170 {P[i] = ncols(L[i]);
    11731171  if (P[i] == 1) {if ( isInMat(H,L[i]) > 0) {ERROR("Quotient algebra is trivial");}}
     
    11771175 checkAssumptions(degbound,L);
    11781176 if (degbound == 0)
    1179  {int sd; int dimen = 1; 
     1177 {int sd; int dimen = 1;
    11801178  intmat S;
    11811179  sd = P[1];
    11821180  for (i = 2; i <= size(P); i++) {if (P[i] < sd) {sd = P[i];}}
    1183   sd = (sd - 1); 
     1181  sd = (sd - 1);
    11841182  if (sd == 0) { for (i = 1; i <= size(L); i++){if (ncols(L[i]) == 1){S = createStartMat1(n,L[i]); break;}}}
    11851183  else {S = createStartMat(sd,n);}
     
    11871185  for (i = 1; i <= sd; i++) {dimen = dimen +(n^i);}
    11881186  for (i = 1; i <= nrows(S); i++)
    1189   {intvec St = S[i,1..ncols(S)]; 
     1187  {intvec St = S[i,1..ncols(S)];
    11901188   dimen = dimen + findDimen(St,n,L,P);
    11911189   kill St;
    11921190  }
    1193   return(dimen); 
     1191  return(dimen);
    11941192 }
    11951193 else
    1196  {for (i = 1; i <= size(P); i++) 
     1194 {for (i = 1; i <= size(P); i++)
    11971195  {if (P[i] > degbound) {ERROR("degreebound is too small, GB contains elements of higher degree");}}
    1198   int sd; int dimen = 1; 
     1196  int sd; int dimen = 1;
    11991197  intmat S;
    12001198  sd = P[1];
    12011199  for (i = 2; i <= size(P); i++) {if (P[i] < sd) {sd = P[i];}}
    1202   sd = (sd - 1); 
     1200  sd = (sd - 1);
    12031201  if (sd == 0) { for (i = 1; i <= size(L); i++){if (ncols(L[i]) == 1){S = createStartMat1(n,L[i]); break;}}}
    12041202  else {S = createStartMat(sd,n);}
     
    12061204  for (i = 1; i <= sd; i++) {dimen = dimen +(n^i);}
    12071205  for (i = 1; i <= nrows(S); i++)
    1208   {intvec St = S[i,1..ncols(S)]; 
     1206  {intvec St = S[i,1..ncols(S)];
    12091207   dimen = dimen + findDimen(St,n,L,P, degbound);
    12101208   kill St;
     
    13161314 int i;
    13171315 intvec P,H;
    1318  for (i = 1; i <= size(L); i++) 
     1316 for (i = 1; i <= size(L); i++)
    13191317 {P[i] = ncols(L[i]);
    13201318  if (P[i] == 1) {if (isInMat(H,L[i]) > 0) {ERROR("Quotient algebra is trivial");}}
     
    13321330  if (intvec(S) == 0) {return(list (intvec(0)));}
    13331331  for (i = 1; i <= nrows(S); i++)
    1334   {intvec St = S[i,1..ncols(S)]; 
     1332  {intvec St = S[i,1..ncols(S)];
    13351333   M = M + findmistletoes(St,n,L,P);
    13361334   kill St;
     
    13391337 }
    13401338 else
    1341  {for (i = 1; i <= size(P); i++) 
     1339 {for (i = 1; i <= size(P); i++)
    13421340  {if (P[i] > degbound) {ERROR("degreebound is too small, GB contains elements of higher degree");}}
    13431341  intmat S; int sd;
     
    13491347  if (intvec(S) == 0) {return(list (intvec(0)));}
    13501348  for (i = 1; i <= nrows(S); i++)
    1351   {intvec St = S[i,1..ncols(S)]; 
     1349  {intvec St = S[i,1..ncols(S)];
    13521350   M = M + findmistletoes(St,n,L,P,degbound);
    13531351   kill St;
     
    13971395 int i,dimen; list R;
    13981396 intvec P,H;
    1399  for (i = 1; i <= size(L); i++) 
     1397 for (i = 1; i <= size(L); i++)
    14001398 {P[i] = ncols(L[i]);
    14011399  if (P[i] == 1) {if (isInMat(H,L[i]) > 0) {ERROR("Quotient algebra is trivial, dimension equals zero");}}
     
    14051403 checkAssumptions(degbound,L);
    14061404 if (degbound == 0)
    1407  {int sd; dimen = 1; 
     1405 {int sd; dimen = 1;
    14081406  intmat S;
    14091407  sd = P[1];
    14101408  for (i = 2; i <= size(P); i++) {if (P[i] < sd) {sd = P[i];}}
    1411   sd = (sd - 1); 
     1409  sd = (sd - 1);
    14121410  if (sd == 0) { for (i = 1; i <= size(L); i++){if (ncols(L[i]) == 1){S = createStartMat1(n,L[i]); break;}}}
    14131411  else {S = createStartMat(sd,n);}
     
    14161414  R[1] = dimen;
    14171415  for (i = 1; i <= nrows(S); i++)
    1418   {intvec St = S[i,1..ncols(S)]; 
     1416  {intvec St = S[i,1..ncols(S)];
    14191417   R = findMisDim(St,n,L,P,R);
    14201418   kill St;
    14211419  }
    1422   return(R); 
     1420  return(R);
    14231421 }
    14241422 else
    1425  {for (i = 1; i <= size(P); i++) 
     1423 {for (i = 1; i <= size(P); i++)
    14261424  {if (P[i] > degbound) {ERROR("degreebound is too small, GB contains elements of higher degree");}}
    1427   int sd; dimen = 1; 
     1425  int sd; dimen = 1;
    14281426  intmat S;
    14291427  sd = P[1];
    14301428  for (i = 2; i <= size(P); i++) {if (P[i] < sd) {sd = P[i];}}
    1431   sd = (sd - 1); 
     1429  sd = (sd - 1);
    14321430  if (sd == 0) { for (i = 1; i <= size(L); i++){if (ncols(L[i]) == 1){S = createStartMat1(n,L[i]); break;}}}
    14331431  else {S = createStartMat(sd,n);}
     
    14361434  R[1] = dimen;
    14371435  for (i = 1; i <= nrows(S); i++)
    1438   {intvec St = S[i,1..ncols(S)]; 
     1436  {intvec St = S[i,1..ncols(S)];
    14391437   R = findMisDim(St,n,L,P,R,degbound);
    14401438   kill St;
    14411439  }
    1442   return(R); 
     1440  return(R);
    14431441 }
    14441442}
     
    14841482 if (size(#) > 0) {if (typeof(#[1])=="int"){if (#[1] > 0) {degbound = #[1];}}}
    14851483 intvec P,H; int i; list R;
    1486  for (i = 1; i <= size(L); i++) 
     1484 for (i = 1; i <= size(L); i++)
    14871485 {P[i] = ncols(L[i]);
    14881486  if (P[i] == 1) {if ( isInMat(H,L[i]) > 0) {ERROR("Quotient algebra is trivial");}}
     
    14921490 checkAssumptions(degbound,L);
    14931491 if (degbound == 0)
    1494  {int sd; 
     1492 {int sd;
    14951493  intmat S;
    14961494  sd = P[1];
    14971495  for (i = 2; i <= size(P); i++) {if (P[i] < sd) {sd = P[i];}}
    1498   sd = (sd - 1); 
     1496  sd = (sd - 1);
    14991497  if (sd == 0) { for (i = 1; i <= size(L); i++){if (ncols(L[i]) == 1){S = createStartMat1(n,L[i]); break;}}}
    15001498  else {S = createStartMat(sd,n);}
     
    15031501  R[1] = H; kill H;
    15041502  for (i = 1; i <= nrows(S); i++)
    1505   {intvec St = S[i,1..ncols(S)]; 
     1503  {intvec St = S[i,1..ncols(S)];
    15061504   R = findHCoeffMis(St,n,L,P,R);
    15071505   kill St;
    15081506  }
    1509   return(R); 
     1507  return(R);
    15101508 }
    15111509 else
    1512  {for (i = 1; i <= size(P); i++) 
     1510 {for (i = 1; i <= size(P); i++)
    15131511  {if (P[i] > degbound) {ERROR("degreebound is too small, GB contains elements of higher degree");}}
    1514   int sd; 
     1512  int sd;
    15151513  intmat S;
    15161514  sd = P[1];
    15171515  for (i = 2; i <= size(P); i++) {if (P[i] < sd) {sd = P[i];}}
    1518   sd = (sd - 1); 
     1516  sd = (sd - 1);
    15191517  if (sd == 0) { for (i = 1; i <= size(L); i++){if (ncols(L[i]) == 1){S = createStartMat1(n,L[i]); break;}}}
    15201518  else {S = createStartMat(sd,n);}
     
    15231521  R[1] = H; kill H;
    15241522  for (i = 1; i <= nrows(S); i++)
    1525   {intvec St = S[i,1..ncols(S)]; 
     1523  {intvec St = S[i,1..ncols(S)];
    15261524   R = findHCoeffMis(St,n,L,P,R,degbound);
    15271525   kill St;
    15281526  }
    1529   return(R); 
     1527  return(R);
    15301528 }
    15311529}
     
    15791577  def R = makeLetterplaceRing(5); // constructs a Letterplace ring
    15801578  setring R; // sets basering to Letterplace ring
    1581   ideal G = x(1)*x(2), y(1)*y(2),x(1)*y(2)*x(3); // ideal G contains a 
     1579  ideal G = x(1)*x(2), y(1)*y(2),x(1)*y(2)*x(3); // ideal G contains a
    15821580  //Groebner basis
    15831581  lpDHilbert(G,5,2); // invokes procedure with degree bound 5 and 2 variables
     
    16221620  def R = makeLetterplaceRing(5); // constructs a Letterplace ring
    16231621  setring R; // sets basering to Letterplace ring
    1624   ideal G = x(1)*x(2), y(1)*y(2),x(1)*y(2)*x(3); // ideal G contains a 
     1622  ideal G = x(1)*x(2), y(1)*y(2),x(1)*y(2)*x(3); // ideal G contains a
    16251623  //Groebner basis
    16261624  lpDHilbertSickle(G,5,2); //invokes procedure with degree bound 5 and 2 variables
     
    17021700PURPOSE:Computing the K-dimension of a factor algebra, given via an ideal
    17031701ASSUME: - basering is a Letterplace ring
    1704 @*      - if you specify a different degree bound degbound, 
     1702@*      - if you specify a different degree bound degbound,
    17051703@*        degbound <= attrib(basering,uptodeg) holds.
    17061704NOTE: - If degbound is set, there will be a degree bound added. 0 means no
     
    17821780PURPOSE:Computing the mistletoes of K[X]/<G>
    17831781ASSUME: - basering is a Letterplace ring.
    1784 @*      - if you specify a different degree bound degbound, 
     1782@*      - if you specify a different degree bound degbound,
    17851783@*        degbound <= attrib(basering,uptodeg) holds.
    17861784NOTE: - If degbound is set, there will be a degree bound added. 0 means no
     
    18201818PURPOSE:Computing the K-dimension and the mistletoes
    18211819ASSUME: - basering is a Letterplace ring.
    1822 @*      - if you specify a different degree bound degbound, 
     1820@*      - if you specify a different degree bound degbound,
    18231821@*        degbound <= attrib(basering,uptodeg) holds.
    18241822NOTE: - If L is the list returned, then L[1] is an integer, the K-dimension,
     
    18591857PURPOSE:Computing the Hilbert series and the mistletoes
    18601858ASSUME: - basering is a Letterplace ring.
    1861 @*      - if you specify a different degree bound degbound, 
     1859@*      - if you specify a different degree bound degbound,
    18621860@*        degbound <= attrib(basering,uptodeg) holds.
    18631861NOTE: - If L is the list returned, then L[1] is an intvec, corresponding to the
     
    18981896"USAGE: sickle(G[,m, d, h, degbound]); G an ideal; m,d,h,degbound optional
    18991897@*      integers
    1900 RETURN: A list 
     1898RETURN: A list
    19011899PURPOSE:Allowing the user to access all procs with one command
    19021900ASSUME: - basering is a Letterplace ring.
    1903 @*      - if you specify a different degree bound degbound, 
     1901@*      - if you specify a different degree bound degbound,
    19041902@*        degbound <= attrib(basering,uptodeg) holds.
    19051903NOTE:   The returned object will always be a list, but the entries of the
     
    20092007setring R;
    20102008ideal I = y(1)*x(2)*y(3) - z(1)*y(2)*z(3), x(1)*y(2)*x(3) - z(1)*x(2)*y(3),
    2011 z(1)*x(2)*z(3) - y(1)*z(2)*x(3), x(1)*x(2)*x(3) + y(1)*y(2)*y(3) + 
     2009z(1)*x(2)*z(3) - y(1)*z(2)*x(3), x(1)*x(2)*x(3) + y(1)*y(2)*y(3) +
    20122010z(1)*z(2)*z(3) + x(1)*y(2)*z(3);
    20132011option(prot);
     
    20252023setring R;
    20262024ideal I = y(1)*x(2)*y(3) - z(1)*y(2)*z(3), x(1)*y(2)*z(3) - z(1)*x(2)*y(3),
    2027 z(1)*x(2)*z(3) - y(1)*z(2)*x(3), x(1)*x(2)*x(3) + y(1)*y(2)*y(3) + 
     2025z(1)*x(2)*z(3) - y(1)*z(2)*x(3), x(1)*x(2)*x(3) + y(1)*y(2)*y(3) +
    20282026z(1)*z(2)*z(3) + x(1)*y(2)*z(3);
    20292027option(prot);
     
    20582056def R = makeLetterplaceRing(d);
    20592057setring R;
    2060 ideal I = 
     2058ideal I =
    20612059z(1)*z(2)*z(3)*z(4) + y(1)*x(2)*y(3)*x(4) - x(1)*y(2)*y(3)*x(4) - 3*z(1)*y(2)*x(3)*z(4), x(1)*x(2)*x(3) + y(1)*x(2)*y(3) - x(1)*y(2)*x(3), z(1)*y(2)*x(3)-x(1)*y(2)*z(3) + z(1)*x(2)*z(3);
    20622060option(prot);
Note: See TracChangeset for help on using the changeset viewer.