| LIB "chern.lib";
// Consider a 3-dimensional projective space
ring r = 0, (x, y, z, w), dp;
// Consider 3 non-coplanar lines trough one point and compute the Segre class
ideal I=xy, xz, yz;
I;
SegreA(I);
// Now consider 3 coplanar lines trough one point and its Segre class
ideal J=w, x*y*(x+y);
J;
SegreA(J);
|