CSM.m2 is a collection of Macaulay2 functions computing (the
push-forward to projective space of) certain classes
determined by a projective scheme *S*. The input to all
functions is the defining ideal of *S* in projective
space: it is expected that this is a homogeneous ideal in a
polynomial ring. The output consists of polynomials in a
variable *H*; these are to be interpreted as elements in
the Chow ring of projective space. This ring is globally
defined as `intringPn` by the routine. The functions
print out their result to the screen, and store it in global
variables.

`segre`displays the Segre class of*S*in its ambient projective space. The global variables`segreclass`and`fultonclass`are set to the Segre class and Fulton class of*S*, respectively.`CF`performs exactly the same calculation as`segre`, but displays the Fulton class of*S*.`CSM`displays the Chern-Schwartz-MacPherson class of*S*, and stores it in the global variable`csmclass`.**Note:**if the ambient space has dimension*n*, then the the coefficient of*H*in^{n}`csmclass`is the Euler characteristic of the support of*S*.`milnor`computes and displays both the Fulton and the Chern-Schwartz-MacPherson class of*S*, setting`segreclass`,`fultonclass`, and`csmclass`as above. It also displays the difference between`CF`and`CSM`, storing it as`milnorclass`.

`euleraffine`computes the Euler characteristic of the support of an*affine*scheme*S*, given its ideal in the (polynomial) ring of its ambient affine space.

The examples that follow are meant to be transparent both in the mathematics and in the use of the code. Suggestions for further examples are very welcome.

I take this opportunity to thank Dan Grayson and Mike Stillman for creating the excellent Macaulay2.

themis{aluffi}1: Macaulay2 Macaulay 2, version 0.9 --Copyright 1993-2001, D. R. Grayson and M. E. Stillman --Singular-Factory 1.3b, copyright 1993-2001, G.-M. Greuel, et al. --Singular-Libfac 0.3.2, copyright 1996-2001, M. Messollen |

We start by loading CSM, and defining a few rings for the examples that follow.

i1 : load "CSM.m2" --loaded CSM.m2 i2 : ringP2=QQ[x,y,z]; ringP3=QQ[x,y,z,w]; ringP4=QQ[x,y,z,w,t]; |

Define the ideal of S_{1}=three distinct, concurrent,
non-coplanar lines in **P**^{3}, and compute its Segre class in
**P**^{3}:

i5 : use ringP3; threelines=ideal(x*y,x*z,y*z); o6 : Ideal of ringP3 i7 : segre threelines 3 2 .Segre class : - 10H + 3H |

The ``.`' signals that one random choice for a
`general' hyperplane had to be rejected. Next we define the ideal of
S_{2}=three (distinct, concurrent) *coplanar* lines in
**P**^{3}, and compute its Segre class.

i8 : threecoplanarlines=ideal(z,x*y*(x+y)); o8 : Ideal of ringP3 i9 : segre threecoplanarlines 3 2 Segre class : - 12H + 3H |

Both the Segre class and the Fulton class of the scheme are now
available as global variables. For example, by the result of Example
4.2.6(a) in Fulton's *Intersection theory*, the following must
equal the Segre class of S_{2} in **P**^{2}:

i10 : (1+H)*segreclass 3 2 o10 = - 9H + 3H o10 : intringPn |

This is written as an element of the Chow ring of
**P**^{3}, with `H` as the hyperplane class; so it
should be read as 3 times the class of a line, minus 9 times the class
of a point. To perform directly the (trivial) computation of the Segre
class in **P**^{2}:

i11 : use ringP2; threecoplanarlines2=ideal(x*y*(x+y)); o12 : Ideal of ringP2 i13 : segre threecoplanarlines2 2 Segre class : - 9H + 3H |

Note that the active intersection ring has changed, so now
`H` denotes the hyperplane class *in
P^{2}*.

Not surprisingly, computations in **P**^{2} take less
than in **P**^{3}, even when they compute `the same' object
(these times were obtained on a SunFire V880, running Solaris 8,
in 2002):

i14 : time CF threecoplanarlines2 Fulton class : 3H -- used 0.4 seconds i15 : time CF threecoplanarlines 2 Fulton class : 3H -- used 4.71 seconds |

As the schemes are isomorphic, and the Fulton class is intrinsic,
these computation agree. Again, the difference in the output is due to
the fact that the first one is given in the Chow ring of
**P**^{2}, while the second one is given in the Chow ring
of **P**^{3}.

The Fulton class of the two (nonisomorphic) schemes S_{1}
and S_{2} differ:

i16 : CF threelines 3 2 Fulton class : 2H + 3H i17 : CF threecoplanarlines 2 Fulton class : 3H |

By contrast, the Chern-Schwartz-MacPherson classes agree:

i18 : CSM threelines 3 2 Chern-Schwartz-MacPherson class : 4H + 3H i19 : CSM threecoplanarlines 3 2 Chern-Schwartz-MacPherson class : 4H + 3H |

The Euler characteristic is the coefficient of H^{3}, that
is (of course) 4.

For an example of two nonisomorphic schemes with the same Fulton
class, but different Chern-Schwartz-MacPherson classes, consider the
union of three planes in **P**^{3}, vs. a nonsingular cubic
surface:

i20 : use ringP3;threeplanes=ideal(x*y*z);cubic=ideal(x^3+y^3+z^3+w^3); o21 : Ideal of ringP3 o22 : Ideal of ringP3 i23 : CF threeplanes; CF cubic; 3 2 Fulton class : 9H + 3H + 3H 3 2 Fulton class : 9H + 3H + 3H i25 : CSM threeplanes; CSM cubic; 3 2 Chern-Schwartz-MacPherson class : 4H + 6H + 3H 3 2 Chern-Schwartz-MacPherson class : 9H + 3H + 3H |

The Fulton and Chern-Schwartz-MacPherson classes agree for the
second scheme since it is nonsingular. The Euler characteristic is
computed to 9, as it should. To compute the Euler characteristic of
the (complex) *affine* nonsingular cubic surface
*x ^{3}+y^{3}+z^{3}=1*:

i27 : use QQ[x,y,z]; euleraffine ideal(x^3+y^3+z^3-1) o28 = 9 |

This is also 9, as the cubic curve `at infinity' is
nonsingular. Not so for the affine nonsingular cubic surface
*x ^{3}+y^{3}+z^{2}=1*, and the Euler
characteristic drops accordingly:

i29 : euleraffine ideal(x^3+y^3+z^2-1) o29 = 5 |

For an example with nilpotents, here are the Fulton and
Chern-Schwartz-MacPherson classes for the scheme with ideal
*(x,z)(y,z)* in **P**^{3}, supported on two lines:

i30 : use ringP3; twolinesnilp=ideal(x,z)*ideal(y,z); o31 : Ideal of ringP3 i32 : CF twolinesnilp; CSM twolinesnilp; 3 2 Fulton class : 4H + 2H 3 2 Chern-Schwartz-MacPherson class : 3H + 2H |

The Fulton class `sees' the nilpotent, while the Chern-Schwartz-MacPherson does not; compare with the computation for the reduced scheme supported on the same two lines:

i34 : twolinesred=ideal(x*y,z); o34 : Ideal of ringP3 i35 : CF twolinesred; CSM twolinesred; 3 2 Fulton class : 2H + 2H 3 2 Chern-Schwartz-MacPherson class : 3H + 2H |

The Euler characteristic of a nonsingular quintic threefold is -200:

i37 : use ringP4; CSM ideal(x^5+y^5+z^5+w^5+t^5) 4 3 Chern-Schwartz-MacPherson class : - 200H + 50H + 5H |

And here is the computation for the (singular) quintic obtained by
closing in **P**^{4} the elliptic fibration
*y ^{2}=x^{3}+xz^{4}+w^{5}*
in

i39 : time CSM ideal(x^3*t^2+x*z^4+w^5-y^2*t^3) 4 3 Chern-Schwartz-MacPherson class : 4H + 38H + 5H -- used 15.19 seconds |

Examples in positive characteristic: they refer to the ideal
`dtupleideal`, whose definition is available
here. This
is the ideal of the base scheme of a certain rational map encountered
in studying the orbit closure of the 5-tuple of points on
**P**^{1} defined by
*(s(s+3t) ^{2}(s+5t)(s+16t))* (see the
paper,
section 4, for further details). The Segre classes in characteristic 2
and 3 resp. are obtained by:

i40 : use ZZ/2[x,y,z,w]; load "dtupleideal.m2"; time segre dtupleideal --loaded dtupleideal.m2 3 2 ..Segre class : - 70H + 13H -- used 2.48 seconds i43 : use ZZ/3[x,y,z,w]; load "dtupleideal.m2"; time segre dtupleideal --loaded dtupleideal.m2 3 2 .Segre class : - 58H + 11H -- used 3.02 seconds |

The computation in higher characteristic takes a substantially longer time (about 20 minutes for characteristic 5). These classes encode enumerative information; for example, since

i46 : (1+5*H)^3*segreclass 3 2 o46 = 107H + 11H o46 : intringPn |

it follows that the *predegree* of the orbit closure of the
5-tuple given above equals *5 ^{3}-107=18* in
characteristic 3.

The *Milnor class* measures the difference between the Fulton
and the Chern-Schwartz-MacPherson class. This class carries good
information about the singularities. For a hypersurface with isolated
singularities, this amounts to the Milnor number (hence the name).

i47 : use ringP2; milnor ideal(y^6+z*x^3*y^2+z^2*x^4) 2 Fulton class : - 18H + 6H Chern-Schwartz-MacPherson class : 6H 2 Milnor class : 18H |

This says that the sum of the Milnor numbers of the singularities
of the curve *y ^{6}+x^{3}y^{2}z+
x^{4}z^{2}=0* in

i49 : use ringP3; top ideal jacobian ideal(y^2*z-x^3-x^2*z) o50 = ideal (y, x) o50 : Ideal of ringP3 |

The Milnor class in this example is the class of the line, minus 7 points:

i51 : milnor ideal(y^2*z-x^3-x^2*z) 3 2 Fulton class : 9H + 3H + 3H 3 2 Chern-Schwartz-MacPherson class : 2H + 4H + 3H 3 2 Milnor class : - 7H + H |

and it follows that the Parusinski-Milnor number of this singularity is 7.

Paolo Aluffi Last modified: Fri Apr 5 12:51:19 EST 2002