# Computing characteristic classes of subschemes of smooth toric varieties

Let X_Σ be a smooth complete toric variety defined by a fan Σ and let V=V(I) be a subscheme of X_Σ defined by an ideal I homogeneous with respect to the grading on the total coordinate ring of X_Σ. We show a new expression for the Segre class s(V,X_Σ) in terms of the projective degrees of a rational map specified by the generators of I when each generator corresponds to a numerically effective (nef) divisor. Restricting to the case where X_Σ is a smooth projective toric variety and dehomogenizing the total homogeneous coordinate ring of X_Σ via a dehomogenizing ideal we also give an expression for the projective degrees of this rational map in terms of the dimension of an explicit quotient ring. Under an additional technical assumption we construct what we call a general dehomogenizing ideal and apply this construction to give effective algorithms to compute the Segre class s(V,X_Σ), the Chern-Schwartz-MacPherson class c_SM(V) and the topological Euler characteristic χ(V) of V. These algorithms can, in particular, be used for subschemes of any product of projective spaces P^n_1×...×P^n_j or for subschemes of many other projective toric varieties. Running time bounds for several of the algorithms are given and the algorithms are tested on a variety of examples. In all applicable cases our algorithms to compute these characteristic classes are found to offer significantly increased performance over other known algorithms.

## Authors

• 12 publications
12/03/2017

### Toric Codes and Lattice Ideals

Let X be a complete simplicial toric variety over a finite field F_q wit...
02/09/2022

### Saturation and vanishing ideals

We consider an homogeneous ideal I in the polynomial ring S=K[x_1,…, x_m...
06/30/2020

### ON THE ANDERSON-BADAWI ωR[X](I[X]) = ωR(I) CONJECTURE

Let R be a commutative ring with an identity different from zero and n ...
04/21/2020

### On the ideal shortest vector problem over random rational primes

Any ideal in a number field can be factored into a product of prime idea...
08/08/2019

### Subgroups of an abelian group, related ideals of the group ring, and quotients by those ideals

Let RG be the group ring of an abelian group G over a commutative ring R...
12/19/2017

### Computing effectively stabilizing controllers for a class of nD systems

In this paper, we study the internal stabilizability and internal stabil...
06/19/2018

### Effective Intersection Theory

Let X ⊂ Y be closed (possibly singular) subschemes of a smooth projectiv...
##### This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

## 1 Introduction

Beginning with observations of Descartes (circa 1639) and first formalized in Euler’s polyhedral formula (circa 1751) the Euler characteristic has become an important tool for the consideration of a diverse selection of mathematical problems. Modern realizations of the Euler characteristic have proved especially important in algebraic geometry and algebraic topology, enabling, among other things, the classification of orientable surfaces. In what follows, by Euler characteristic we mean the topological Euler characteristic.

The topological Euler characteristic is also of interest in applications. For example, Huh [23] and Rodriguez and Wang [32]

apply the Euler characteristic of projective varieties to study problems of maximum likelihood estimation in algebraic statistics. Applications to string theory in physics include Aluffi and Esole

[5] and Collinucci, Denef, and Esole [7].

Let be a smooth variety and let be some subscheme of . The Euler characteristic of may be obtained directly from the Chern-Schwartz-MacPherson class of , . More specifically, if we consider as an element of the Chow ring of , , we have that is equal to the degree of the zero dimensional component of . It is this method that we shall use to obtain the Euler characteristic. In the case of subschemes of a projective space this approach has been used by several authors (e.g. Aluffi [3], Jost [24], the author [21, 22]) to construct different algorithms which are capable of calculating Euler characteristics of complex projective varieties.

In this note, we consider the computation of the Segre class, and the class (and hence the Euler characteristic) of subschemes in a more general setting. More specifically we significantly generalize all of the results and algorithms presented by the author in [21, 22] from the setting of subschemes of projective varieties to the setting of subschemes of certain smooth projective toric varieties . While we only present the algorithm overviews (see §4) for subschemes of smooth projective toric varieties satisfying an additional technical condition these restrictions will not be imposed on the majority of the results. The main portion of this work will be several new theorems which will form the basis for algorithmic computation.

We now give a brief overview of the main results of this note. In what follows will always denote a toric variety defined by a fan and will denote the Cox ring or total coordinate ring of . We will often also require that is either smooth and complete or smooth and projective.

Let be a smooth complete toric variety and let be a subscheme of defined by a homogeneous ideal in , note that may be a multi-graded ring and by homogeneous we mean homogeneous with respect to the grading on , see §2.3 for a discussion of this. We further suppose (without loss of generality) that a set of generators has been chosen for such that all the have the same multi-degree. Since all have the same multi-degree then we have for all (where is the codimension one Chow group of ).

We begin with a theorem which gives an explicit expression for the Segre class in , the Chow ring of . Define a rational map given by

 ϕ:p↦(f0(p):⋯:fr(p)). (1)

Let where denotes a general linear subspace of dimension in . Note that the cycle has pure codimension . Letting be a basis of we may write . Following the classical terminology of Harris [19, Example 19.4] for a similar construction for rational maps between projective spaces we refer to the as the projective degrees of the rational map . With these notations we have the following result, which will be proved in Theorem 3.4 below.

###### Theorem.

Let be a subscheme of defined by an ideal which is homogeneous with respect to the grading of the total coordinate ring with for all , further suppose that is a numerically effective (nef) divisor. Then we have that

 s(V,XΣ)=1−1(1+α)(∑ι≥0[Yι](1+α)ι).

The assumption that is nef is equivalent to requiring that the subscheme be the intersection of divisors whose corresponding line bundles are generated by global sections, see Theorem 2.5 and the proceeding remarks for a discussion of this. A smooth complete toric variety is projective if and only if the cone generated by the nef divisors (often called the nef cone, , of ) is full dimensional in (see Proposition 6.3.24 of [9]). Hence if we restrict to a smooth projective toric variety we can always be sure of finding a nef divisor corresponding to the generators of the ideal defining .

The main ingredient needed to apply the result above to give an algorithm to compute the Segre class is an explicit expression for the projective degrees of the rational map in (1). One of the main contributions of this note is the development of such a result in the case where is a smooth projective toric variety. Roughly speaking the idea here is to construct appropriate zero dimensional ideals to compute the projective degrees by finding intersection numbers and using the quotient construction of toric varieties to move the computation to an affine space. See Theorem 2.3 for a review of the quotient construction.

Let be a smooth projective toric variety. To simplify the statement of the result we first define several terms. Let be the graded total coordinate ring of (where are the rays of ) and let be the ring without the grading so that . Let be a reduced zero dimensional subscheme of consisting of points. We refer to an ideal in as a dehomogenizing ideal for if the intersection in contains points.

Let ). Again write where is a basis of . Since is a smooth projective toric variety, will have a basis consisting of nef divisors, see Proposition 6.3.24 of of Cox, Little and Schenck [9]. Let denote a fixed nef basis for . Since the divisors are nef we may express the rational equivalence class of a point as a monomial in . In particular let denote the rational equivalence class of a point in the dimension zero Chow group, . Similarly we may write the basis elements as monomials in . Since the are nef and since is the class of a point then each exponent of appearing in must be less or equal to , the exponent of in . Hence is divisible by . We refer to the class as the complementary cycle to . For let be a general form in with . Writing for let be the ideal generated by linear forms , linear forms ,, and linear forms . We refer to as the complementary ideal associated to the cycle .

The following result gives an expression for the projective degrees of a rational map as the dimension of an explicit quotient ring, this result is proved in Theorem 3.5.

###### Theorem.

With the notations above we have that the projective degrees are given by

 γ(ι)i=dimk(R[T]/((P1,…,Pι,S)+La(ι)i+LA)),

where the are general linear combinations of , is the complementary ideal to , is a dehomogenizing ideal of and for general .

Note that the above result does not specify how to construct the required dehomogenizing ideal. Hence the other desirable ingredient for algorithmic usage is an explicit result which can be used to construct a dehomogenizing ideal in a simple and algorithmic manner for any zero dimensional subscheme which is the intersection of nef divisors. Such a result is proved in Theorem 3.1 below where we give a explicit expression for a general dehomogenizing ideal for any (reduced) zero dimensional subscheme of provided that satisfies what we call the affine codimension condition. Explicitly we say that a toric variety satisfies the affine codimension condition if the number of primitive collections of the fan is equal to where and is the number of generating rays of (equivalently is the number of variables in the Cox ring of ).

In this setting we give algorithms to compute the Segre class , the Chern-Schwartz-MacPherson class and the Euler characteristic . A third algorithm to compute the class in the special case where can be seen as a hypersurface in some smooth complete intersection subscheme of is also given. This third algorithm offers performance improvements in some cases by eliminating the need to perform inclusion/exclusion (Proposition 2.2), see §3.4 for more details.

We note that arbitrary products of projective spaces are projective (and hence have a basis for consisting of nef divisors) and satisfy the affine codimension condition above. The affine codimension condition is also satisfied by many other projective toric varieties. For example, of the 124 unique smooth toric Fano fourfolds satisfy the affine codimension condition, this condition also holds for 205 of the 866 smooth Fano toric varieties with and for 1152 of the 7622 smooth Fano toric varieties with (these can be found using the smoothFanoToricVariety function in Macaulay2 [17], see also Øbro [31]). For these varieties, since they satisfy the affine codimension condition, we may use Theorem 3.1 to obtain a general dehomogenizing ideal and use this to compute characteristic classes for any subscheme of (which is the intersection of hypersurfaces corresponding to nef divisors). For toric varieties not satisfying the affine codimension condition we may still use the results of Theorems 3.4 and 3.5 to compute the Segre class of a subscheme, however we would need to construct a dehomogenizing ideal via a different method.

The last result proved is Theorem 3.7, this result provides a theoretical basis for an algorithm to compute classes without using the expensive inclusion/exclusion procedure (Proposition 2.2) in some cases. This result, in particular, gives an explicit expression for the class when the subscheme of can be seen as a hypersurface in a smooth complete intersection subscheme of .

The algorithm presented here to compute Segre classes of subschemes of toric varieties offers substantial performance improvements over the previous algorithm of Moe and Qviller [30] which is applicable in a setting similar to that presented here. The algorithm of [30] is a generalization of the previous algorithm of Eklund, Jost and Peterson [12] and works by using appropriate saturations to compute the ideals of certain residual schemes and then computing their multi-degrees. The key advantage of our algorithm (Algorithm 1) likely comes from the result of Theorem 3.5 (combined with Theorem 3.4) since this theorem reduces the problem of computing the Segre class of a subscheme to that of finding the number of solutions to certain zero dimensional polynomial systems; a problem for which there are many effective algorithms. See §2.5 and §5 for further discussions.

In the context of computing Segre classes the recent algorithm of Harris [18] will allow for the computation of certain Segre classes in the Chow ring of projective space not encompassed by the current work, however the algorithm presented here has the advantage of working directly in the toric variety , rather than via an embedding. From a practical standpoint, using the algorithm of [18] on even simple examples such as subschemes of a product of projective spaces would have a significant added cost due to the fact that one would need to work in an ambient projective space via the Segre embedding. For example considering subschemes of using the Segre embedding to compute would require working in a polynomial ring with variables; working in the Cox ring of , as we do here, gives a polynomial ring in variables. Since algebraic methods of all types are heavily dependent on the number of variables in the polynomial rings being considered this is a very substantial difference.

It should be noted that all algorithms presented in this note are probabilistic; this is because they involve a general choice of some scalars. More precisely, in the sense of algebraic geometry and using terminology from books such as Sommese and Wampler [33], Algorithms 1, 2, and 3

are probability one algorithms as they will return the correct result for any choice of objects within an open dense Zariski set in the associated parameter space. In practice, however, we need to make random choices from finite (albeit large) sets of either integers or rational numbers for computer implementations. A detailed probabilistic analysis of the projective case of these algorithms is carried out by the author in

[22, §3.2, §3.4]. Let denote a finite subset of our coefficient field from which we choose random elements in our algorithm. In [22, Proposition 3.6] a probability bound is given on the number elements needed in the set to ensure a probability of failure less then a given value. In particular the probability of failure may be made arbitrarily small given a sufficiently large set . In practice, for computations of Segre classes of subschemes of , choosing scalars from a set of elements yielded no errors in over trials. Based on experimental results and our experience we believe the more general case presented here will have similar probabilistic behaviour.

This note will be organized as follows. In §2, we begin by precisely stating the problem to be considered and the setting in which we shall work. Following this, we review several previous results and constructions which are important for this work. Previous algorithms to compute characteristics classes are also reviewed in §2.5.

The main results of this note are proved in §3. In §4 we apply the results of §3 to construct explicit algorithms to compute the Segre and Chern-Schwartz-MacPherson classes and the Euler characteristic of subschemes of . The presentation in §4 is restricted to the case where is a projective toric variety satisfying the affine codimension condition. Our algorithm to compute Segre classes of arbitrary subschemes of is given in Algorithm 1. In Algorithm 2 we present an algorithm to compute and in the toric setting using the inclusion/exclusion property of classes (see Proposition 2.2). In Algorithm 3 we present an algorithm to compute the class of certain complete intersection subschemes of without using inclusion/exclusion, eliminating the inclusion/exclusion procedure often speeds up computation. Algorithm 3 is based on Theorem 3.7.

In §5 we discuss the performance of these algorithms. The running times of our test implementation on a variety of examples are given in §5.1 and are compared with those of other known algorithms where possible. In all cases the algorithms presented here offer improved performance in comparison to existing algorithms. Running time bounds for Algorithm 1 and Algorithm 2 are given in §5.2.

The Macaulay2 [17] implementation of the Algorithms 1, 2, and 3 can be found at
https://github.com/Martin-Helmer/char-class-calc-toric.

###### Example 1.1.

Let be an algebraically closed field of characteristic zero and let be the subvariety of defined by the ideal

 I=(17x0y0y2−3x1y0y2+9x3y0y2,5x1y22+x3y22−3x4y22,−4x1y20+7x2y20+12x3y20)

in . Also let be the Chow ring of . is singular with and is not a complete intersection. Using Algorithm 1 with input we compute the Segre class in to be

 s(V,P4×P2)= −300h41h22+40h41h2+80h31h22−3h41−12h31h2+h31−12h1h22+2h1h2+4h22.

Using Algorithm 2 with input we obtain the Chern-Schwartz-MacPherson class

 cSM(V)= 13h41h22+10h41h2+22h31h22+2h41+13h31h2+18h21h22+h31+8h21h2+7h1h22+2h1h2+h22

in and also obtain the Euler characteristic

## 2 Setting, Review and Problem

For the algorithmic portions of this note we primarily consider ambient spaces which are smooth projective toric varieties. For some, but not all, of the results projective can be replaced by complete. We also (primarily) consider subschemes of toric varieties over the complex numbers and take . This is done because several of the results of Cox, Little, and Schenck [9] which we use are stated in this setting. If the toric variety is the ambient space we could work instead over any algebraically closed field of characteristic zero. We note that MacPherson’s original construction [28] of the class was over , however subsequent constructions such as Kennedy [25] or Aluffi [4] require only an algebraically closed field of characteristic zero.

Let be a smooth projective toric variety of dimension with homogeneous coordinate ring . Let be any subscheme of defined by an ideal in which is homogeneous with respect to the grading on . The problem we consider in this note is the following: determine the Segre class of in , , the Chern-Schwartz-MacPherson class of , , and the Euler characteristic of , , in a time efficient manner on a computer algebra system.

We will represent all characteristic classes as elements of the Chow ring of , . Proposition 2.4 gives the concrete realization of which will be used for all algorithms in this note. We abuse notation and write , and for the pushforwards to of the Segre class of , and the class of , respectively.

### 2.1 The Segre Class

The Segre class is an important invariant in intersection theory, both because it contains important intersection theoretic information and because it can be used to construct other commonly studied structures and invariants. In particular the Chern-Fulton class (see (4)) and the Chern-Schwartz-MacPherson class (see Proposition 2.6) may be defined in terms of Segre classes.

For a proper closed subscheme of a variety , we may define the Segre class of in as

 s(V,W)=∑j≥1(−1)j−1η∗(~Vj)=η∗([~V]1+[~V])∈A∗(V) (2)

where is the exceptional divisor of the blow-up of along , , is the projection (and is its pushforward), the class is the -th self intersection of , and is the class of in the Chow ring of the blow-up, . See Fulton [16, §4.2.2] for further details.

The total Chern class of a -dimensional nonsingular variety is defined as the Chern class of the tangent bundle ; we express this as in the Chow ring of ,

. A definition of the Chern class of a vector bundle can be found in Fulton

[16, §3.2]. If is a smooth projective varitey the degree of the zero dimensional component of the total Chern class of is equal to the topological Euler characteristic (this follows from the Gauss-Bonnet-Chern theorem, see, for example, [11, Theorem 5.21]), that is

 ∫c(TV)∩[V]=χ(V). (3)

Here we let denote the degree of the zero dimensional component of the class , that is the degree (i.e. the coefficient if has only one term) of the part of in the dimension zero Chow group , see Fulton [16, Definition 1.4] for more details.

Any algorithm to compute the Segre class will immediately give us an algorithm to compute the Chern-Fulton class (refered to as the Canonical class by Fulton [16]) of a subscheme of a smooth variety over an algebraically closed field. Specifically we have that

 cF(V)=c(TM)∩s(V,M)∈A∗(M). (4)

The Chern-Fulton class is a generalization of the Chern class to singular schemes, see Fulton [16, Examples 4.2.6, 19.1.7]. In particular if is a smooth subscheme of , any method to compute the Segre class also gives the total Chern class (of the tangent bundle), i.e.

 c(V)=c(TV)∩[V]=c(TM)∩s(V,M).

### 2.2 The Chern-Schwartz-MacPherson Class

While there are several generalizations of the total Chern class to singular varieties, all of which agree with for nonsingular , the Chern-Schwartz-MacPherson class is the only generalization which satisfies a property analogous to (3) for any , i.e.

 ∫cSM(V)=χ(V). (5)

Here we briefly recall the functorial definition of classes arising from MacPherson’s results in [28] (see also Kennedy [25] and Aluffi [4]). For a scheme , we take to be the abelian group of finite linear combinations , where are (closed) subvarieties of , , and denotes the function that is in , and outside of . Elements are referred to as constructible functions and the group is termed the group of constructible functions on . We may make into a functor by letting map a scheme to the group of constructible functions on and letting map a proper morphism to

 C(f)(1W)(p)=χ(f−1(p)∩W),W⊂V1,p∈V2aclosedpoint.

The Chow group functor is also a functor from algebraic varieties to abelian groups. The class arises from a natural transformation between these two functors; we abuse notation slightly and denote both the natural transformation and the associated class as .

###### Definition 2.1.

The Chern-Schwartz-MacPherson class is characterized by the unique natural transformation between the constructible function functor and the Chow group functor, that is is the unique natural transformation satisfying:

• (Normalization) for non-singular and complete.

• (Naturality) , for a proper transformation of projective varieties, a constructible function on .

In all that follows we always consider the class as an element of the Chow group of some ambient smooth variety . More precisely for a subscheme of a smooth variety we think of as an element of . Let denote the support of the scheme , the notation is taken to mean and hence, since , we write .

The class satisfies the same inclusion/exclusion relation as the Euler characteristic. That is for subschemes of a smooth variety we have that

 cSM(V1∩V2)=cSM(V1)+cSM(V2)−cSM(V1∪V2)inA∗(M). (6)

Note that this relation for classes will allow us to reduce all computation of classes to the case of hypersurfaces. From this we obtain the following proposition (see also Aluffi [3]).

###### Proposition 2.2.

Let be a subscheme of a smooth variety with coordinate ring . Write the polynomials defining as and let for . Then,

 cSM(V)=∑S⊂{1,…,r}(−1)|S|+1cSM(V(F{S}))inA∗(M)

where denotes the cardinality of the integer set .

### 2.3 The Graded Total Coordinate Ring

In this subsection we briefly review some notation and results regarding the quotient construction of a toric variety. We will make extensive use of this construction throughout this note, for a more detailed review see, for example, Cox, Little, and Schenck [9, §5.1,§5.2].

We restrict to the case where is a smooth complete toric variety defined by a fan . Let denote the set of one dimensional cones, also referred to as rays, in the fan . The homogeneous coordinate ring of is given by . is also referred to as the Cox ring or total coordinate ring. We grade the ring by defining the degree of a monomial to be With this grading, if we set then we have that Additionally .

For a cone take to be the set of one-dimensional faces of . We may define the irrelevant ideal of the coordinate ring as the ideal

 B=⎛⎝∏ρ∉σ(1)xρ|σ∈Σ⎞⎠⊂R. (7)

Let be an affine space. Define the group

###### Theorem 2.3 (Theorem 5.1.11 of Cox, Little, and Schenck [9]).

Let be a smooth complete toric variety. Then is the geometric quotient of by .

Hence we may regard elements of as “homogeneous coordinates” for . We now consider the structure of and in greater detail. We say the collection of ray generators (i.e. ) is a primitive collection (see [9, Definition 5.1.5, Proposition 5.1.6]) if the collection does not lie in any cone but every proper subset does. We may write an irreducible decomposition of as

 V(B)=⋃vρ1,…,vρsprimitiveV(xρ1,…,xρs). (8)

To simplify terminology we will also refer to the collection of rays as a primitive collection if the associated ray generators form a primitive collection.

### 2.4 The Chow Ring of a Smooth Complete Toric Variety

Let . The following proposition gives us a simple method to compute the Chow ring of a smooth, complete toric variety . We use this result to compute the Chow ring in the algorithms of §4.

###### Proposition 2.4 (Theorem 12.5.3 of Cox, Little, and Schenck [9]).

Let be an integer lattice with dual lattice and let be a complete and smooth toric variety with generating rays where for . Then the Chow ring of has the following presentation

 A∗(XΣ)≅Z[x1,…,xr]/(I+J), (9)

with the isomorphism map specified by . Here denotes the Stanley-Reisner ideal of the fan , that is the ideal in specified by

 I=(xi1⋯xis|iijdistinctandρi1+⋯+ρisisnotaconeofΣ) (10)

and denotes the ideal of generated by linear relations of the rays, that is is generated by linear forms for ranging over some basis of .

In §3 we will need an additional property for the elements of . Let be a normal toric variety; a Cartier divisor on is termed numerically effective or nef if for every irreducible complete curve .

###### Theorem 2.5 (Theorem 6.3.12 of [9]).

Let be a Cartier divisor on a complete toric variety . is nef, that is for all torus-invariant irreducible complete curves , if and only if is basepoint free, i.e.  is generated by global sections.

Proposition 6.3.24 of Cox, Little, and Schenck [9] states that a smooth complete toric variety is projective if and only if the cone generated by the nef divisors is full dimensional in . In particular, then, when is a smooth projective toric variety there exists a basis for consisting of nef divisors.

### 2.5 Previous Algorithms

In [30] Moe and Qviller give an algorithm to compute the Segre class of subschemes of smooth projective toric varieties. The algorithm of Moe and Qviller [30] is based on a result which gives an expression for the Segre class of a subscheme of a smooth projective toric variety in terms of the classes in the Chow ring of certain residual sets which are computed via saturation. This result of Moe and Qviller [30] generalizes a previous result of Eklund, Jost and Peterson [12] which gave an expression for the Segre class of a subscheme of in terms of residual sets having a similar structure. For both cases, the residual sets are in the sense of Fulton’s residual intersection theorem/formula (Theorem 9.2 and Corollary 9.2.3 of Fulton [16]).

The main computational step of the algorithm of Moe and Qviller [30] (and similarly for the algorithm of Eklund, Jost and Peterson [12] for subschemes of ) is the computation of the saturations to find the residual sets. This can in practice be a quite computationally expensive procedure. Moe and Qviller [30] describe their algorithm which uses this result to obtain the Segre classes in Section 5 of [30]. Runtime comparisons between the algorithm constructed here and that of [30] are given in §5.

When computing for a subscheme of algorithms of Aluffi [3] and Eklund, Jost, and Peterson [12] may also be applied. The algorithm of Aluffi [3] works by computing the ideal of the blowup of along , hence the main computational cost of this algorithm is the cost of computing the Rees algebra. This is often a very computationally expensive operation. When computing the algorithm presented here reduces to the algorithm of the author in [21], and does indeed offer increased performance in comparison to the algorithms of [3] and [12], see [21] for a detailed comparison in the projective setting.

A separate algorithm to compute and using algebraic methods for a subscheme of was given by Marco-Buzunáriz in [29]. This method, in practice, computes sectional Euler characteristics and its main computational cost arises from the computation of (numerous) primary decompositions, Hilbert polynomials and elimination ideals. As noted by Marco-Buzunáriz in [29, §8.1] the computations required are extremely expensive and seem to quickly become impractical even in low dimension and degree.

The main performance benefit of Algorithm 1 seems to be that it explicitly constructs a zero dimensional system, so that we only need to compute the vector space dimension of the quotient rings specified by Theorem 3.5. While our approach can still be computationally difficult, the explicit nature of the set up allows for a variety of effective algorithms for computing the vector space dimension of a quotient by a zero dimensional ideal to be applied.

As noted in the introduction the recent algorithm of Harris [18] will also allow for the computation of Segre classes of subschemes of a projectively embedded toric variety in the Chow ring of projective space. However in many cases the high codimension of the projective embedding leads to computations in a polynomial ring with significantly more variables (i.e. for using the Segre embedding gives a polynomial ring with variables, the Cox ring would have variables).

### 2.6 cSM Class of a Hypersurface

We now give Theorem I.4 of Aluffi [2] which will allow us to compute classes by computing Segre classes.

###### Proposition 2.6 (Theorem I.4 of Aluffi [2]).

Let be a hypersurface in a nonsingular variety and let be the singularity subscheme of . Then we have

 cSM(V)=c(TM)∩(s(V,M)+n∑i=0n−i∑j=0(n−ij)[V]j∩(−1)n−isi+j(Y,M)) (11)

where is the class of in . Here denotes the dimension component of and denotes the tangent bundle to .

Consider the case where is a smooth complete toric variety and for a polynomial in the coordinate ring of ; that is restricting ourselves to the case considered in this note. By Proposition A.2 and Proposition A.1 the singularity subscheme in the theorem above is the scheme defined by the partial derivatives of with respect to . In particular Proposition A.1 tells us that we need not include among the defining equations of since it is in the ideal generated by its partial derivatives.

## 3 Main Results

In this section we present the main results of this note. Throughout this section and in the following sections we take to be a smooth projective toric variety, unless otherwise stated. This assumption will be somewhat relaxed to a smooth complete toric variety in Theorems 3.4, 3.1, and 3.7. The restriction to a smooth projective toric variety is required for the construction of complementary cycles used in Theorem 3.5.

In §3.2 we prove Theorem 3.4 which extends the result of Proposition 3.1 of Aluffi [3] to subschemes of smooth complete toric varieties . For a subscheme of this result gives us an expression for the Segre class in terms of the projective degrees of a rational map . We then prove Theorem 3.5 which gives an expression for the projective degrees of such a rational map in terms of the dimension of an explicit quotient ring. This theorem is the main ingredient in our algorithms to compute characteristic classes of subschemes of toric varieties. The expression in Theorem 3.5 requires that we have a valid choice of a dehomogenizing ideal so we can consider the relevant intersection in affine space via the quotient construction.

In Theorem 3.1 we give a simple characterization of a general dehomogenizing ideal which may be used for any zero dimensional subscheme of a toric variety which satisfies what we refer to as the affine codimension condition. While Theorem 3.1 is not needed to apply Theorem 3.5 it does greatly simplify the implementation of a general purpose algorithm and our test implementation used in §5 is restricted to the setting of Theorem 3.1.

In Theorem 3.7 we give an expression for the class of certain types of complete intersection subschemes of toric varieties of the form ; this result generalizes Theorem 3.3 of the author [22] and leads to a more efficient algorithm that avoids performing inclusion/exclusion when computing the class in some cases.

### 3.1 Counting Points in Zero Dimensional Subschemes

In this subsection will denote a smooth complete toric variety. The result in this subsection is essentially a consequence of the geometric quotient construction of a toric variety, see Cox, Little and Schenck [9, §5.1,§5.2]. In this subsection we again take but note that if we could allow to be any algebraically closed field of characteristic zero. We also let , be the total coordinate ring of with irrelevant ideal , and let .

We briefly review some terminology from §1. We say that satisfies the affine codimension condition if the number of primitive collections of the fan is equal to (or equivalently if there are primary components in a primary decomposition of the irrelevant ideal ).

Let be a polynomial ring in the variables of but without the grading. Let be a reduced zero dimensional subscheme of consisting of points. We refer to an ideal in as a dehomogenizing ideal for if the intersection in contains points. We refer to an ideal as a general dehomogenizing ideal for if for a general choice of scalars (i.e. scalars in some Zariski open dense set) the intersection in contains points provided that the set is sufficiently general.

Theorem 3.1 below gives an explicit construction of such a general dehomogenizing ideal provided that satisfies the affine codimension condition. In practice this gives rise to a (theoretical) probability one method which can be used to count points in a zero dimensional subscheme of by instead counting points in affine space. In practical implementations general will be replaced by random, however the probability of failure may be made arbitrarily small; see [22, Appendix A] for a discussion of this in the projective case.

Thinking of a projective space , roughly speaking, the idea behind Theorem 3.1 is to prevent (in general) missing counting points at infinity when dehomogenizing. Rather than thinking of dehomogenization as setting some coordinate equal to one and working in we think of it as an intersection with in for an affine linear form (i.e. instead of taking we intersect with ). To get a general point at infinity, we then take the linear form to be a general affine linear form. As a toric variety is defined by a fan with rays. The total coordinate ring is and the irrelevant ideal is , which is a prime ideal, hence we have only one primitive collection. Since is equal to the number of primitive collections then satisfies the affine codimension condition. The general dehomogenizing ideal for is for general .

Write the total coordinate ring of as and let be the set of all (unique) primitive collections of rays in (note that each is a set of rays in ). In the theorem below we use the fact that all primary components of the irrelevant ideal of are monomial ideals, i.e. from (8) (see also [9, Definition 5.15, Proposition 5.1.6]) we have

 B=⋂{ρ1,…,ρs}∈p(xρ1,…,xρs).
###### Theorem 3.1.

Let be a smooth complete toric variety which satisfies the affine codimension condition. Let , and be as above and let be any (reduced) dimension zero subscheme of . The number of points in is equal to the number of points in the affine set where

 LA(Λ)=⎛⎝∑ρj∈p1λ(1)jxρj−1,…,∑ρj∈pνλ(ν)jxρj−1⎞⎠, (12)

for general (where denotes the algebraic torus). denotes the collection of all . In other words is a general dehomogenizing ideal for . Note that in the summations above we associate a scalar to each monomial in each primitive collection.

###### Proof.

Because the are general and by our assumption on the number of primitive collections, we have that will have codimension in .

From Theorem 2.3 we have a geometric quotient . Following the terminology of Cox, Little, and Schenck [9], given a point we say a point gives homogeneous coordinates for . Since is a geometric quotient we have .

Given a homogeneous polynomial we have that if for one choice of homogeneous coordinates of then for all choices of homogeneous coordinates. Hence to count points in we may fix a choice of homogeneous coordinates for our points . We may do this as follows.

For a cone let denote the affine toric variety of (see Theorem 1.2.18 of Cox, Little, and Schenck [9]). Since is smooth and complete, the affine open sets for a maximal cone are a torus invariant affine covering of . By Proposition 5.2.10 of Cox, Little, and Schenck [9] (also see the remark following Proposition 5.2.10 of [9]) , the affine piece of for each maximal cone , may be obtained by setting for some in each of the polynomials defining ; this gives local coordinates on . In our case we may patch this together to give global coordinates by choosing a unique ray from each primitive collection and setting for each of these .

More specifically consider a primitive collection , we know that is not contained in for all and specifically if we are considering some maximal cone then is not in this . Hence there is some ray in which is not in . Now suppose that we have maximal cones and primitive collections . We may choose one ray from each primitive collection such that at least one of the maximal cones does not contain ; further we know from the structure of the irrelevant ideal that all rays not in a maximal cone will appear in some primitive collection meaning that we may choose appropriate rays from each primitive collection so that we can give compatible local coordinates on each maximal cone. Further, again from the structure of the irrelevant ideal, we see that for each maximal cone there exists exactly one in each primitive collection which is not in .

Hence by setting for some such in each primitive collection we obtain affine sets for each maximal cone which cover . Taking the intersection of these sets we must obtain all points in and we may not obtain points which are not in , hence the intersection of these affine sets must have the same number of points as .

If we instead take a general linear combination of the for and set this linear combination equal to for each and work in the larger ambient space , since the linear combination is general, then the vanishing set of this equation will not contain points which lay in (since by the construction of , given a point in our homogeneous coordinates for , if there is at least one coordinate for some in each primitive collection then this point is not in ). Hence by taking such linear combinations we would expect to obtain a new set of affine spaces covering as a subset of , provided the linear combination is sufficiently general. Taking the intersection of the new affine covering spaces gives the set , and by the arguments above this space will have dimension zero and hence will consist of points in . Further, since it is obtained from affine pieces which cover the number of points in will be the same as the number of points in . ∎

As a toric variety is defined by a fan with rays. In this case the irrelevant ideal is so there are two primitive collections. Since is equal to the number of primitive collections the affine codimension condition is satisfied. The general dehomogenizing ideal for is for general

As mentioned in the §1, 42 of the 124 unique smooth Fano fourfolds satisfy the affine codimension condition. We consider one such example below.

###### Example 3.2.

Let be the toric variety defined by the fan with rays , , , , , and maximal cones