 LIB "nchilbert.lib";
def A = makeUsl2(); setring A;
ideal I = e,h1; I = std(I);
ncHilb(I,1); // first Hilbert series of A/I
==> Warning: the input generators are not a Groebner basis
==> The result might have no meaning
==> 1,2,1,0
ncHilb(I,2); // second Hilbert series of A/I
==> Warning: the input generators are not a Groebner basis
==> The result might have no meaning
==> 1,0
ideal J = I, f^2; J = std(J);
ncHilb(J,2);
==> Warning: the input generators are not a Groebner basis
==> The result might have no meaning
==> 1,1,0
// now with weights 1,2,3
ring r = 0,(e,f,h),wp(1,2,3);
matrix D[3][3]; D[1,2]=h; D[1,3]=2*e;D[2,3]=2*f;
def R = nc_algebra(1,D); setring R;
ideal I = imap(A,I); I = std(I);
ncHilb(I,1); // first weighted Hilbert series of R/I
==> Warning: the input generators are not a Groebner basis
==> The result might have no meaning
==> 1,1,0,1,1,0
ncHilb(I,2); // second weighted Hilbert series of R/I
==> Warning: the input generators are not a Groebner basis
==> The result might have no meaning
==> 1,1,1,0
matrix M[2][5] =
e,h1,f^2, 0,0,
0,0,0, e,h+1;
module G = std(M);
print(G);
==> e,0,h1,0, f2,
==> 0,e,0, h+1,0
ncHilb(G,1); // first weighted Hilbert series of R^2/G
==> 2,2,0,2,1,1,0,1,1,0
ncHilb(G,2); // second weighted Hilbert series of R^2/G
==> 2,2,2,0,1,1,1,0
