| LIB "chern.lib";
// consider the projective plane with homogeneous coordinates x, y, z
ring r = 0, (x, y, z), dp;
// the Chern-Schwartz-MacPherson class of a smooth cubic:
ideal I=x3+y3+z3;
I;
CSMA(I);
// the Chern-Schwartz-MacPherson class of singular cubic
// that is a union of 3 non-collinear lines:
ideal J=x*y*z;
J;
CSMA(J);
// the Chern-Schwartz-MacPherson class of singular cubic
// that is a union of 3 lines passing through one point
ideal K=x*y*(x+y);
K;
CSMA(K);
|