| LIB "chern.lib";
ring r=0, (x,y,z, c(1..3)), dp;
list l=c(1..3);
// The symmetric part of f = 3x2 + 3y2 + 3z2 + 7xyz + y
// in terms of the elemenatary symmetric functions c(1), c(2), c(3)
// and the remainder
poly f = 3x2 + 3y2 + 3z2 + 7xyz + y;
print( symNsym(f, l) );
==> [1]:
==> 3*c(1)^2-6*c(2)+7*c(3)
==> [2]:
==> y
// Take a symmetrix polynomial in variables x and z
f=x2+xz+z2;
// Express it in terms of the elementary the symmetric functions
print( symNsym(f, l)[1]);
==> c(1)^2-c(2)
|