next | previous | forward | backward | up | top | index | toc | Macaulay2 website
Divisor :: canonicalDivisor

canonicalDivisor -- compute a canonical divisor of a ring

Synopsis

Description

Compute the canonical divisor of a ring (warning, the canonical divisor is not unique, but only unique up to linear equivalence). If the IsGraded option is set to true (default false), then it will return a canonical divisor for the $Proj$ of $R$, otherwise it will return one for only the $Spec$. The graded version only works reliably for graded rings over a field (for instance, if you have a Rees algebra you will need to flatten the variables).

i1 : R = QQ[x,y,z];
i2 : canonicalDivisor(R)

o2 = 0, the zero divisor

o2 : WeilDivisor on R
i3 : canonicalDivisor(R, IsGraded=>true)

o3 = -3*Div(x)

o3 : WeilDivisor on R

Note the IsGraded option makes a difference. Consider now a non-Gorenstein singularity.

i4 : R = QQ[a,b,c,d]/ideal(c^2-b*d, b*c-a*d, b^2-a*c);
i5 : canonicalDivisor(R)

o5 = -2*Div(d, c, b)

o5 : WeilDivisor on R

Caveat

Text This function assumes that the coefficientRing of the ambient ring is a field (or at least Gorenstein). If the coefficientRing is a more general ring, this function will produce a relative canonical divisor of the ring over its coefficientRing.

Ways to use canonicalDivisor :

For the programmer

The object canonicalDivisor is a method function with options.