An abstract variety in Schubert2 is defined by its dimension and by a ℚ-algebra A, interpreted as the intersection ring. For example, the following code defines the abstract variety corresponding to ℙ2.
i1 : A=QQ[t]/ideal(t^3)
o1 = A
o1 : QuotientRing
|
i2 : X=abstractVariety(2,A)
o2 = X
o2 : an abstract variety of dimension 2
|
Once the variety X is created, we can access its structure sheaf OX via the operator OO, and view its Chern class:
i3 : OO_X
o3 = a sheaf
o3 : an abstract sheaf of rank 1 on X
|
i4 : chern OO_X
o4 = 1
o4 : A
|
A variable of type
AbstractVariety is implemented as
a mutable hash table, and can contain other information, such as the variety’s tangent bundle, stored under the key
TangentBundle. Installation of a variety’s tangent bundle enables the computation of its Todd class.
i5 : X.TangentBundle = abstractSheaf(X,Rank=>2, ChernClass=>(1+t)^3)
o5 = a sheaf
o5 : an abstract sheaf of rank 2 on X
|
i6 : todd X
3 2
o6 = 1 + -t + t
2
o6 : A
|
To enable the computation of such things as the Euler characteristic of a sheaf, we must also specify a method to take the
integral of an element of the intersection ring
A; in the case where
A is Gorenstein, as is the case for the intersection ring modulo numerical equivalence of a complete nonsingular variety, the integral can often be implemented as the functional that takes the coefficient of the highest degree component with respect to a suitable basis of monomials. The default integration method installed by such functions as
base and
abstractVariety for varieties of dimension greater than 0 returns a symbolic expression indicating the further integration that ought to be done. In this example, we choose to implement the integral by taking the coefficient of the monomoial in our ring of top degree.
i7 : integral A := f -> coefficient(t^2,f);
|
Now we can compute the Euler characteristic of the line bundle whose first Chern class is 2t (the algorithm uses the Todd class and the Riemann-Roch formula):
i8 : chi OO_X(2*t)
o8 = 6
o8 : QQ
|