| LIB "chern.lib";
ring r = 0, (c(1..2)), dp;
list l=c(1..2);
// Let c(1) be a variable of degree 1, let c(2) be a variable of degree 2.
// The monomials in c(1) and c(2) of weighted degree 5 are:
print( chNum( 5, l ) );
==> [1]:
==> c(1)^5
==> [2]:
==> c(1)^3*c(2)
==> [3]:
==> c(1)*c(2)^2
// Compare the result to the output of chNumbers(...):
print( chNumbers(5, l) );
==> [1]:
==> c(1)^5
==> [2]:
==> c(1)^3*c(2)
==> [3]:
==> c(1)*c(2)^2
==> [4]:
==> 0
==> [5]:
==> 0
==> [6]:
==> 0
==> [7]:
==> 0
|