| 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;
==> I[1]=x3+y3+z3
CSMA(I);
==> [1]:
==> 0
==> [2]:
==> 3
==> [3]:
==> 0
// the Chern-Schwartz-MacPherson class of singular cubic
// that is a union of 3 non-collinear lines:
ideal J=x*y*z;
J;
==> J[1]=xyz
CSMA(J);
==> [1]:
==> 0
==> [2]:
==> 3
==> [3]:
==> 3
// 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;
==> K[1]=x2y+xy2
CSMA(K);
==> [1]:
==> 0
==> [2]:
==> 3
==> [3]:
==> 4
|