arXiv:1109.5895v2 [math.AG] 4 Dec 2012 r a esle ycmuigteSgecasso nagbacsch algebraic an of classes Segre the computing enu n by in solved problems be Many may theory. try intersection in frequently occur they hsaSgecasmyb ersne sawihe u firreduc of sum weighted a as represented be V may class Segre a Thus of of h ere ftepoetv varieties projective the of degrees the Z fFlo n aPesn oeseicly epoeaB´ezout like a prove of we classes specifically, Segre More the involves MacPherson. that and Fulton of poie htteiptieldfie mohshm) h relat of The classes scheme). Segre smooth the a of defines degrees the ideal input the that (provided stedgeso h hr lse ftetnetbnl of bundle tangent the of classes Chern the of degrees the as er lse.Ti nbe st opt h ere fteecla these of degrees the compute to us inf enables intersection-theoretic This providing classes. computed Segre be may residual the Z ue hrceitcof characteristic Euler ftetnetbundle. tangent the of of methods. nescinter oudrtn h tp ntepoeuean procedure kno the no in requires it steps that the in understand elementary to completely theory is intersection algorithm the that is Z EHDT OPT ER LSE FSUBSCHEMES OF CLASSES SEGRE COMPUTE TO METHOD A 1 dmninlsubscheme -dimensional ec n a opt h oooia ue hrceitcusing characteristic Euler topological the compute can one Hence . V , . . . , Z Z a eetne otennsot aevates-aldChern-F so-called the via case non-smooth the to extended be may ssot,tedge ftetpCencas hc seult h t the to equal is which class, Chern top the of degree the smooth, is Z er lse r eeaiain fcaatrsi lse fvec of classes characteristic of generalizations are classes Segre nti ae epeetamto ocmuetedgeso h S the of degrees the compute to method a present we paper this In 2000 If e od n phrases. and words Key ewudlk omnintoitrsigfaue formto.One method. our of features interesting two mention to like would We The . ncase In . ie nieldefining ideal an given , Z ahmtc ujc Classification. Subject Mathematics ssot,tedgeso h er lse of classes Segre the of degrees the smooth, is eiuto n nescinter.W rvd symbolic package software a bas the system provide is software We method the The theory. using space. intersection projective and complex residuation of subscheme a of Abstract. m i th of AI KUD HITN OT N HI PETERSON CHRIS AND JOST, CHRISTINE EKLUND, DAVID Z er ls sartoa qiaec ls fcodimension of class equivalence rational a is class Segre Z h ereo er ls stecrepnigwihe u of sum weighted corresponding the is class Segre a of degree The . ssot,teCenFlo lse oniewt h hr classes Chern the with coincide classes Chern-Fulton the smooth, is epeetamto ocmuetedgeso h er classe Segre the of degrees the compute to method a present We Z er lse,cmuainlagbacgoer,numeric geometry, algebraic computational classes, Segre a ecmue rmtedgeso h er lse of classes Segre the of degrees the from computed be can , FPOETV SPACE PROJECTIVE OF Z Bertini fcmlxpoetv pc hr are there space projective complex of Z h rcdr sbsdo h nescintheory intersection the on based is procedure The . Macaulay2 1. . Z Z Introduction n h hr lse ftetnetbnl of bundle tangent the of classes Chern the and n eiulshm to scheme residual a and V 3x,1Qx 41,6H0 65E05. 65H10, 14C17, 14Qxx, 13Pxx, 1 V , . . . , 1 n ueia mlmnainusing implementation numerical a and m . Z ar h aeinformation same the carry Z implementation o ntne when instance, For . do generic on ed Z n nyvr basic very only d sses. h ereof degree The . raino the on ormation eaiegeome- merative 1Sgeclasses Segre +1 o ude and bundles tor osi between ionship besubvarieties ible m.Gvnan Given eme. u procedure our i lo classes ulton ylson cycles geclasses egre lhomotopy al opological ldeof wledge s theorem feature Z . 2 D.EKLUND,C.JOST,ANDC.PETERSON background in algebraic geometry. The method therefore provides a way of under- standing the computation of Segre classes from an elementary point of view. In addition, the algorithm is easy to implement. Another feature is the fact that our method is implementable in a numerical setting via numerical homotopy methods, see [11] for an overview of this area. This allows the method to be applied in settings that can be time consuming (and even out of reach) of current symbolic methods. One such setting is when the generating set, for an ideal determining Z, has com- plicated coefficients. An additional setting where current numerical methods can sometimes obtain useful information about the degrees of Segre classes, beyond the reach of current symbolic methods, is when Z is a reduced scheme of high codimen- sion. These gains come through numerical approximation and parallelization (but at the expense of exactness). The procedure presented in this paper has been implemented in the symbolic setting using the software system Macaulay2 [7] and in the numerical setting using the software package Bertini [3]. Both implementations are available at http://www.math.su.se/ jost/segreimplementation.htm. Initial experiments, in- volving subvarieties of relatively∼ large dimension and codimension, show a great deal of promise for the algorithm in the numerical setting. In the paper [1] Aluffi formulates an algorithm that also computes the degrees of the Segre classes of a subscheme Z of projective space. In addition he shows how to relate the computation of the so-called Chern-Schwartz-MacPherson classes of a subscheme of projective space to the computation of the degrees of certain Segre classes. In the present paper we present an alternative method to Aluffi’s. Though the two are closely related, they have a rather different computational behavior and seem to complement each other well (see Section 6 for some examples). Apart from the difference in computing speed in various cases one may ask what is the need for another method with the same output as an existing method. One answer is that our approach is different and therefore sheds new light on the problem of computing Segre classes. But more importantly we would answer by repeating the two features mentioned above, namely that our method is elementary and that it is readily amenable to numerical computation. The paper is organized as follows. In Section 2 we give the basic definitions and state a theorem from . In Section 3 we derive a recursive formula for Segre classes which is the basis of our method. The procedure to compute Segre classes is presented in Section 4. Some examples are given in Section 5 and in Section 6 we give a list of run times on examples comparing our method to other algorithms. The results of this paper are generalizations and variants of the results in [2, 4] to the setting of subschemes of projective space.

Acknowledgments We would like to thank Paolo Aluffi and Sandra Di Rocco for their useful com- ments and encouragement. We thank Jon Hauenstein for pointing out how we could utilize efficient numerical methods and also for his help with running examples in Bertini. Finally, we thank the Institut Mittag-Leffler for their wonderful research environment that facilitated the completion of this paper. AMETHODTOCOMPUTESEGRECLASSES 3

2. Background in intersection theory We start by going through some concepts and results from intersection theory. For this paper, the main reference on matters of intersection theory is Fulton’s book [5]. 2.1. Notation. Let Y be an algebraic scheme over C of dimension n. By a sub- scheme of Y we will mean a closed subscheme. We will denote by Cp(Y ) the free Abelian group on irreducible p-dimensional subvarieties of Y . The pth of Y is the quotient of Cp(Y ) by the cycles rationally equivalent to 0, and it is n denoted Ap(Y ). The Chow group of Y is the group A∗(Y )= p=0 Ap(Y ). Given th an element α A (Y ), α p Ap(Y ) will denote the p homogeneousL compo- ∈ ∗ { } ∈ nent of α (if n

g f   X / Y i where j : W V is the inclusion and g : W X the restriction of f to W . The → → normal cone CW V of W in V can be constructed as follows. Suppose first that V is affine with coordinate ring A and that W is defined by an ideal J A generated ⊆ by f1,...,fd A. Let B = A/J. Then CW V is the spectrum of the B-algebra s s+1∈ d J /J . Thus CW V may be embedded as a closed subscheme of W C s≥0 × Ldefined by the kernel of the surjective homomorphism s s+1 B[x ,...,xd] J /J 1 → Ms≥0 AMETHODTOCOMPUTESEGRECLASSES 5

2 which maps xi to the image of fi in J/J . In the general case, CW V may be constructed by covering V with open affine subsets and gluing the normal cones of the affine patches together. In case the embedding W V is regular, CW V → is a vector bundle, namely the normal bundle NW V . In this case the total Segre class of W in V is the inverse of the total Chern class of NW V in the sense that −1 −1 s(W, V )= c(NW V ) [W ], where c(NW V ) is a formal inverse of c(NW V ). The ∩ normal cone CW V has pure dimension k, see [5] Appendix B.6.6. Let C = CW V , ∗ let N = g (NX Y ) (where NX Y is the normal bundle of X in Y ), and let p : N W be the projection. It is shown in [5] Chapter 6, that C embeds in N and therefore→ it determines a class [C] Ak(N). Now, by [5] Theorem 3.3 (a), the flat-pullback ∗ ∈ ∗ −1 p : Ak−d(W ) Ak(N) is an isomorphism. This map is given by p (Z) = [p (Z)] for an irreducible→ subvariety Z W . The intersection product of V by X on Y is ⊆ a class in Ak d(W ) denoted X V and defined by − · X V = (p∗)−1([C]). · An important connection to Segre classes is given by [5] Proposition 6.1 (a):

X V = c(N) s(W, V ) k d. · { ∩ } − We will now state the Formula from [5] which is the main result underpinning our method to compute Segre classes. Let Y , X, W , V , N, k and d be as in the above definition of the intersection product X V . Let Z W · ⊆ be a closed subscheme and suppose that Z = V . Let π : V V be the blow-up 6 → of V along Z and put W = π−1(W ) and Z = π−1(Z). Let R be the residual e scheme to Z in W with respectf to V , see [5] Definitione 9.2.1. Thise is a scheme such that, if I (Z), I (W ) and I (R) are the ideal sheaves in e defining the respective e f e V schemes, then O e f e I (W )= I (Z) I (R). · Let η : W W be the restriction of π to W and let ( Z) denote the pullback of → f e e O − e ( Z) under the inclusion W V . V f f e O The− following proposition is Corollary→ 9.2.3 of [5]. e f e Proposition 2.3. With notation as above,

X V = c(N) s(Z, V ) k d + R, · { ∩ } − ∗ where R = η ( c(η N ( Z)) s(R, V ) k d). ∗ { ⊗ O − ∩ } − 3. Computing Segree classese e of projective schemes Let Z be a proper n-dimensional subscheme of complex projective space Pk. This paper is about a method for computing the push-forward of s(Z, Pk) to Pk given an ideal defining Z. In this section we explain how to derive information about the push-forward given sufficiently general elements from the ideal. k Let s0,...,sn be the homogeneous components of s(Z, P ) with si of codimension k n i, that is s(Z, P ) = i=0 si with si An−i(Z). The degree of a 0-cycle α = k k ∈ k mipi on P , mi PZ and pi P , is simply deg(α) = mi. If γ : Z P is i ∈ ∈ i → Pthe inclusion map, we define the degree of si by P n−i deg(si) = deg(γ (si) H ), ∗ · k where H Ak−1(P ) is the hyperplane class and the product is the intersection ∈ k product on P . The numbers deg(si) i is the output of our procedure, they carry { } 6 D.EKLUND,C.JOST,ANDC.PETERSON

k the same information as the push-forward γ∗(s(Z, P )). The degree of any α k p ∈ Ap(P ) is defined similarly by deg(α H ). · Let I C[x0,...,xk] be a homogeneous ideal. For a positive integer m, we use I(m) to denote⊆ the mth graded piece of I. Given a homogeneous ideal J, the ideal quotient J : I is given by

J : I = f C[x ,...,xk]: fI J , { ∈ 0 ⊆ } and the saturation of J with respect to I is J : I∞ = J : Ip. p[≥1 Note that (J : Ip): I = J : Ip+1 for p 1, that the ascending sequence of ideal quotients J : I J : I2 J : I3 ... stabilizes≥ and that J : Ip = J : I∞ for large enough p. ⊆ ⊆ ⊆

Remark 3.1. Let I and J be homogeneous ideals of C[x0,...,xk] and let V (I) k and V (J) denote the corresponding zero-loci in P . If I = C[x0,...,xk], then ∞ ∞ J : I = J. Suppose I = C[x0,...,xk]. The ideal J : I is homogeneous and the scheme R defined by J6 : I∞ is supported on the Zariski-closure of V (J) V (I). \ In fact, if J = i Qi is a primary decomposition (so each Qi is homogeneous and primary) then T ∞ (1) J : I = Qi.

{i : V (Q\i)*V (I)} ∞ ∞ To see this, note that J : I = i(Qi : I ) and that V (Qi) V (I) precisely when p ∞⊆ √Qi I. If √Qi I, then QiT I for some p and Qi : I = C[x0,...,xk]. On ⊇ ⊇ ⊇ the other hand, if √Qi + I, then Qi : I = Qi since Qi is primary. It follows that ∞ Qi : I = Qi in this case. The following theorem is a B´ezout like equality which gives rise to a recursive formula for the degrees of the Segre classes of Z in Pk. Using the statement of the theorem, we may express the degree of a Segre class sp in terms of deg(si) for i

e K C[x0,...,xk][y0,...,yr] ⊆ such that K contains the elements giyj gj yi for 0 i < j r. Observe that Z is given by the vanishing of g ,...,g . Consider− the affine≤ open≤ set 0 r e k U = Uαβ = (x ,...,xk,y ,...,yr) P : xα =0,yβ =0 { 0 0 ∈ 6 6 } y0 yr and let w = ,...,wr = with wβ = 1. Then w ,..., wβ,...,wr are coordi- 0 yβ yβ e 0 nates on r = y = 0 r. Note that for all i, f = r λj g , for a general C β P i jc=0 i j 0 {r 6 r}+1 ⊂ vector (λ ,...,λ ) C . With an abuse of notation, weP use gi, fi and wi to de- i i ∈ note the corresponding elements of the coordinate ring of U. Then, gj = wj gβ for r j all j. Hence Z U is defined by gβ. Also, fi = ( λ wj )gβ. It follows that R U ∩ j=0 i ∩ r j r jP −1 is defined bye the ideal ( j=0 λ1wj ,..., j=0 λdwj ). We conclude that R = φ e (L) for a general linear subspaceP L Pr of codimensionP d (if r < d, then R = ). Hence ⊆ e ∅ R is either empty or of pure dimension k d and R Z is either empty or of pure − ∩ e dimension k d 1. It follows that no irreducible component of R is contained e − − e e in Z. Since Pk is a variety (see [8] Proposition II.7.16 or [5] Appendix B.6.4), it e follows by Lemma 2.1 that the embedding of R in k is regular. e e P Step 2: applying Proposition 2.3. Let X1,...,Xd be defined by Xν = fν =0 . d e e k k { } Then W = Xν . Let X = X Xd and Y = P P (d factors). Let ν=1 1 ×···× ×···× j : W PkTbe the inclusion and let f : Pk Y and g : W X be the diagonal → → → k morphisms. The morphism i : X Y induced by the inclusions X1,...,Xd P → ∗ k⊂ is a regular embedding of codimension d. Put N = g (NX Y ). Letting V = P , we apply Proposition 2.3 to the diagram

d j / k ν=1 Xν P T g f   / k k X Xd P P 1 ×···× i ×···× and conclude that k k (2) X P = c(N) s(Z, P ) k d + R. · { ∩ } − Here s(Z, Pk) is regarded as a rational equivalence class on W . 8 D.EKLUND,C.JOST,ANDC.PETERSON

Step 3: we will show that p d d p−i m = m deg(si) + deg(j (R)), p i ∗ Xi=0 − ∗ d where p = d (k n). We shall first see that N = j (E) where E = ν=1 Pk (m). − k− th −1 O Let pν : Y P be the ν projection and let Xν be the divisor pLν (Xν ) on Y . Then, by [5]→ B.7.4, d NX Y = Y (Xν ) X . O | Mν=1 ∗ Since f ( Y (Xν )) = k (m) for all ν, we have that O OP ∗ ∗ ∗ ∗ j ( k (m)) = (f j) ( Y (Xν )) = (i g) ( Y (Xν )) = g ( Y (Xν ) X ) OP ◦ O ◦ O O | for all ν. Hence d ∗ ∗ ∗ N = g (NX Y )= g ( Y (Xν ) X )= j E. O | Mν=1 d k k Note that c(E) = (1+ mH) A∗(P ), where H Ak−1(P ) is the hyperplane class. ∈ ∈ We now push both sides of (2) forward to Pk by j and then take degrees. By B´ezout’s theorem, deg(j (X Pk)) = md (see [5] Example 6.2.6). By the projection ∗ · formula, j (c(N) s(Z, Pk)) = c(E) j (s(Z, Pk)). We get that ∗ ∩ ∩ ∗ k k j ( c(N) s(Z, P ) k d)= j (c(N) s(Z, P )) k d = ∗ { ∩ } − { ∗ ∩ } − n d k d (1 + mH) j (s(Z, P )) k d = (1 + mH) j (si) k d. { · ∗ } − { · ∗ } − Xi=0 The degree of the latter expression is p d p−i m deg(si), p i Xi=0 − where p = d (k n). − − Step 4: it remains to see that deg(j (R)) = deg(R) where R Pk is the scheme ∗ ⊆ defined by J : I∞. In fact, we shall see that j (R) = [R] in A (Pk). Let η : W W ∗ ∗ → be the restriction of π to W . Since R Pk is a regular embedding we have that k k → f s(R, P )= c(N eP )−1 [R]. Since R is either empty or has pure dimension k d, R ∩ f e e − ∗ k e e e c(eη N (e Z)) s(R, P ) k d = { ⊗ O − ∩ } − ∗ e k −e1 e c(η N ( Z)) (c(N eP ) [R]) k d = [R]. { ⊗ O − ∩ R ∩ } − Hence R = η∗([R]). Let R1,...,e Rt be thee irreduciblee componentse of R and let m1,...,mt denote their geometric multiplicities. Since none of the components e e e k k e R1,..., Rt is contained in Z and π : P P is an isomorphism outside Z, j∗(R)= t → mi[π(Ri)]. Observe that π induces an isomorphism (R Z) = (W Z). It e i=1 e e e \ ∼ e \ followsP from (1) that t m [π(R )] = [R].  e i=1 i i e e P e AMETHODTOCOMPUTESEGRECLASSES 9

Remark 3.3. With notation as in the proof of Theorem 3.2, note that the group GL(Ck+1) GL(Cr+1) acts transitively on Pk Pr and that Pk is regular outside × × Z. It follows by Kleiman’s transversality theorem [10] that for a general linear e subspace L Pr of codimension d, R = Pk (Pk L) is regular outside Z and the e ⊆ ∩ × multiplicities m ,...,m of the components of R are all equal to 1. Moreover, it 1 t e e e follows that the scheme R defined by J : I∞ is regular outside Z. This could be of e interest in connection with the computation of the degree of R, which is the main computational ingredient in our method to compute Segre classes.

4. The method Theorem 3.2 states that certain conditions hold for a general choice of elements of a given ideal. By choosing these elements randomly we turn this into a probabilistic algorithm. Applying Theorem 3.2 to solve for the Segre classes recursively, we obtain the following procedure to compute the degrees of the Segre classes of a subscheme of projective space. The input is an ideal defining the subscheme.

Procedure 1 A method to compute the degrees of Segre classes

Input: Non-zero homogeneous generators g ,...,gr of an ideal I C[x ,...,xk]. 0 ⊆ 0 Output: The degrees of the Segre classes of the subscheme of Pk defined by I.

1: Let m = maxi deg(gi) . { } 2: Let Z Pk be the scheme defined by I and compute n = dim(Z). ⊂ 3: Pick random elements f ,...,fk I(m). 1 ∈ 4: for d = k n to k do − 5: Let J = (f1,...,fd). 6: Compute deg(R), where R Pk is the scheme defined by J : I∞. ⊆ 7: Let p = d (k n) and compute − − p−1 d d p−i deg(sp)= m deg(R) m deg(si). − − p i Xi=0 − 8: end for 9: return deg(s0),..., deg(sn)

Remark 4.1. We will use the notation of Procedure 1 and the proof of Theorem 3.2. In particular π : Pk Pk denotes the blow-up of Pk along Z. Instead of saturating with respect to the→ whole ideal I, as is done in Procedure 1, one could saturate e with respect to one element of I. Let h I, h = 0, let R′ be the scheme defined ∈ 6 by J : (h)∞ and let H Pk be the hypersurface defined by h. The claim is that we could replace R by R⊆′ in Procedure 1. Tracing back the conditions on R used in the proof of Theorem 3.2 we see that we only need to show that no irreducible component of the residual R Pk is contained in π−1(H). This follows exactly as ⊆ in step 1 of the proof of Theorem 3.2 where it is shown that R has no irreducible e e component inside the exceptional divisor Z. e k Remark 4.2. Let Z P be a subschemee of dimension n and let si An−i(Z) be ⊆ k n ∈ the Segre classes of Z, that is s(Z, P ) = i=0 si. Define the total Chern-Fulton class of Z by P ′ k c (Z)= c(T k Z ) s(Z, P ), P | ∩ 10 D.EKLUND,C.JOST,ANDC.PETERSON

k where TPk is the tangent bundle of P . This definition is independent of the embed- ding of Z in Pk in the sense that if Z admits two embeddings into smooth varieties M and P , then c(TM Z ) s(Z,M)= c(TP Z ) s(Z, P ), see [5] Example 4.2.6. Let ′ n ′ | ′ ∩ | ∩ c (Z)= i=0 ci, with ci An−i(Z). If Z is smooth, then the Chern-Fulton classes ∈ k+1 coincideP with the Chern classes of the tangent bundle. Since c(TPk )=(1+ H) k where H Ak−1(P ) is the hyperplane class, the degrees of the Segre classes and those of the∈ Chern-Fulton classes are related by

i ′ k +1 deg(c )= deg(sp). i i p Xp=0 − Recall that in the smooth case, the degree of the top Chern class of the tangent bundle is equal to the topological Euler characteristic. Thus, in case Z is smooth, ′ deg(cn) is the topological Euler characteristic of Z and Procedure 1 provides a way of computing this topological invariant.

5. Examples In this section we illustrate Procedure 1 with some examples. In these ex- amples, for an n-dimensional subscheme Z Pk, we use the notation σ(Z) = k n ⊆ (deg(s ),..., deg(sn)), where s(Z, P )= si and si An i(Z). 0 i=0 ∈ − P Example 5.1. Let I C[x,y,z] be the ideal I = (x2,y2, xy) and let p P2 be the ⊂ ∈ degree three zero-scheme defined by I. Then s(p, P2)= s A (p), and A (p) = Z 0 ∈ 0 0 ∼ via the degree map. Now let f1,f2 I be general elements of degree 2 and put ∈ ∞ J = (f1,f2). Then J : I = (x, y) and (J : I): I = (1). Hence J : I = (1) and the residual R is empty. Therefore s =22 deg(R)=4. 0 − Note that s0 is not equal to the degree of p (which is equal to 3). Example 5.2. Consider a plane curve C P2 defined by one element g C[x,y,z] of degree m. Then it is immediate from⊆ Procedure 1 that σ(C) = (m,∈ m2). In case g = xy, we get σ(C)=(2, 4). − − Now consider the scheme D P2 defined by I = (x2y,xy2). The support of D ⊆ is the union of the lines L1 = x =0 and L2 = y =0 , but D has an embedded { } 2 { } point at p = L L . The normal cone CDP has three irreducible components, all 1 ∩ 2 of dimension 2, and the supports of these components are L1, L2 and p, respectively. The supports are the so-called distinguished varieties of the intersection defined by 2 2 x y,xy . A general element f1 I(3) may be written f1 = xy(ax + by), for { } ∞ ∈ general a,b C. Then (f1): I = (f1): I = (ax + by). Hence the residual R is the line ax∈+ by =0 and { } deg(s )=3 deg(R)=2. 0 − For a general f I(3) we have that (f ,f )= I and it follows that 2 ∈ 1 2 deg(s )=32 2 3 deg(s )= 3. 1 − · 0 − In summary, σ(D)= (2, 3). Observe that the Segre classes detect the embedded point p. − A METHOD TO COMPUTE SEGRE CLASSES 11

Example 5.3. To illustrate Procedure 1 we show in this example how it works on a surface Z Pk. Let Z be defined by an ideal I which is generated by polynomials ⊆ g ,...,gr in C[x ,...,xk]. Let m = maxi deg(gi) and let f ,...,fk I(m) be 0 0 { } 1 ∈ general. Let J2 = (f1,...,fk−2), J1 = (f1,...,fk−1) and J0 = (f1,...,fk). Let Wi ∞ be the scheme defined by Ji and let Ri be the scheme defined by Ji : I . Then W = Z R dim(R )=2(or R is empty), 2 ∪ 2 2 2 W = Z R dim(R )=1(or R is empty), 1 ∪ 1 1 1 W = Z R dim(R )=0(or R is empty). 0 ∪ 0 0 0

k The degrees of the Segre classes s0,s1,s2 of Z in P are computed as follows: deg(s )= mk−2 deg(R ), 0 − 2 deg(s )= mk−1 deg(R ) (k 1)m deg(s ), 1 − 1 − − 0 k deg(s )= mk deg(R ) m2 deg(s ) km deg(s ). 2 − 0 − 2 0 − 1 6. Implementation and benchmarks There is an implementation of Procedure 1 in the symbolic setting using the software system Macaulay2 [7]. It uses the improvement of Remark 4.1. The user may choose to be given the degrees of the Chern-Fulton classes as output. As an alternative to the Gr¨obner basis computations carried out in Macaulay2, one can use the regenerative cascade algorithm [9] implemented in the software package Bertini [3]. The regenerative cascade algorithm uses numerical homo- topy methods to collect data about solution sets of polynomial equations and this data includes the degrees of the residuals that are used in Procedure 1 to compute the degrees of the Segre classes. Both implementations are available at http://www.math.su.se/ jost/segreimplementation.htm. Table 1 shows run times∼ on some examples, comparing our implementation “segreClass” to two other algorithms. One is the April 2009 version of “CSM” which implements Aluffi’s algorithm to compute Segre classes, see [1]. The other is the routine “euler” from Macaulay2 which computes the topological Euler char- acteristic of a smooth projective variety. Observe that the input to “euler” is a projective variety, not an ideal. Following Table 1, we provide a few details about each example. Additional details on how to generate the equations for each example may be found at http://www.math.su.se/ jost/segreimplementation.htm. The defining equations of the rational∼ normal curves in Table 1 are given as (2 2)-minors of a matrix with variables as entries. The Grassmann manifold is × embedded with the Pl¨ucker embedding. The surface in P8 is defined by the (2 2)- minors of (4 3)-matrix of random linear forms. The ideal of the Abelian surface× is generated in× degrees 5 and 6. The Grassmannian and the Segre product were run over Q and the other examples were run over the finite field with 32749 elements. Remark 6.1. In connection with the comparison made in Table 1 it should be noted that the routine “euler” computes the topological Euler characteristic by first computing the Hodge numbers of the variety and then taking an alternating sum of them. Thus, “euler” computes interesting information that is not attainable from the Segre classes in any obvious way. 12 D.EKLUND,C.JOST,ANDC.PETERSON

Table 1. Comparison of run times. On an AMD Athlon 64 Pro- cessor, 2.2 GHz, and with 1 GB RAM. The computations marked with “-” were terminated after 3 hours.

Input segreClassCSMeuler Rational normal curve in P6 0.5s 180s 4s Rational normal curve in P10 - - 512s Grassmannian G(1, 5) P14 - 2s - ⊆ Smooth surface in P8 defined by minors 89s - - Abelian surface in P4 175s - - Segre embedding of P2 P3 in P11 - 8s - ×

7. Conclusions This paper presents an elementary algorithm, based on residual intersection, to compute the degrees of Segre classes of a subscheme of projective space. The symbolic version of the algorithm has been implemented in Macaulay2 [7]. The numerical version, using numerical homotopy methods and the regenerative cascade algorithm [9], has been implemented in the software package Bertini [3]. The table of example run times illustrate the complementary nature of the symbolic implementation of the algorithm to previous symbolic algorithms, in particular to the algorithm of Aluffi [1] in the general case and to the algorithm “euler” found in Macaulay2 when run on smooth projective varieties. The numeric implementation shows promise for extending the range of problems to which the algorithm can be applied.

References

[1] P. Aluffi, Computing characteristic classes of projective schemes, Journal of Symbolic Com- putation 35 (2003), 3–19. [2] D.J. Bates, D. Eklund, C. Peterson, Computing intersection numbers of Chern classes (submitted). [3] D.J. Bates, J.D. Hauenstein, A.J. Sommese, C.W. Wampler, Bertini: Software for Numer- ical Algebraic Geometry, available at http://www.nd.edu/∼sommese/bertini. [4] S. Di Rocco, D. Eklund, C. Peterson, A.J. Sommese, Chern numbers of smooth varieties via homotopy continuation and intersection theory, Journal of Symbolic Computation, Volume 46, Issue 1 (2011), 23–33. [5] W. Fulton, Intersection Theory, Second edition. Ergebnisse der Mathematik und ihrer Gren- zgebiete, 3. Folge, no. 2. Springer-Verlag, Berlin (1998). [6] H. Flenner, L. O’Carroll, W. Vogel, Joins and Intersections, Springer Monographs in Math- ematics, Springer-Verlag, Berlin (1999). [7] D. Grayson, M. Stillman, Macaulay2: a software system for research in algebraic geometry, available at http://www.math.uiuc.edu/Macaulay2. [8] R. Hartshorne, Algebraic Geometry, Graduate Texts in Mathematics 52, Springer-Verlag, New York-Heidelberg, (1977). [9] J.D. Hauenstein, A.J. Sommese, C.W. Wampler, Regenerative cascade homotopies for solv- ing polynomial systems, Applied Mathematics and Computation 218 (2011), 1240–1246. [10] S.L. Kleiman, The transversality of a general translate, Compositio Math. 28 (1974), 287– 297. [11] A.J. Sommese, C.W. Wampler, The Numerical solution of systems of polynomials arising in engineering and science, World Scientific Publishing Co. Pte. Ltd., Hackensack, NJ, (2005). A METHOD TO COMPUTE SEGRE CLASSES 13

Institut Mittag-Leffler, Auravagen¨ 17, SE-182 60 Djursholm Stockholm, Sweden E-mail address: [email protected] URL: http://www.math.kth.se/∼daek

Department of Mathematics, Stockholm University, SE-106 91 Stockholm, Sweden E-mail address: [email protected] URL: http://www.math.su.se/∼jost/

Department of Mathematics, Colorado State University, Fort Collins, CO 80523 E-mail address: [email protected] URL: http://www.math.colostate.edu/∼peterson