next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
Divisor :: divisor

divisor -- Constructor for (Weil/Q/R)-divisors

Synopsis

Description

The general function for constructing Weil divisors. If f is an element of a fraction field, it is handled appropriately.

i1 : R = QQ[x,y,z]

o1 = R

o1 : PolynomialRing
i2 : D = divisor({1,2,3}, {ideal(x), ideal(y), ideal(z)})

o2 = 3*Div(z) + 2*Div(y) + 1*Div(x) of R

o2 : WDiv
i3 : E = divisor(x*y^2*z^3)

o3 = 3*Div(z) + 2*Div(y) + 1*Div(x) of R

o3 : WDiv
i4 : F = divisor(ideal(x*y^2*z^3))

o4 = 3*Div(z) + 2*Div(y) + 1*Div(x) of R

o4 : WDiv
i5 : G = divisor({{1, ideal(x)}, {2, ideal(y)}, {3, ideal(z)}})

o5 = 3*Div(z) + 2*Div(y) + 1*Div(x) of R

o5 : WDiv

Creates the same Weil divisor with coefficients 1, 2 and 3 in four different ways

i6 : R = QQ[x,y,z]/ideal(x^2-y*z)

o6 = R

o6 : QuotientRing
i7 : D = divisor({2}, {ideal(x,y)})

o7 = 2*Div(x, y) of R

o7 : WDiv
i8 : E = divisor(y)

o8 = 2*Div(y, x) of R

o8 : WDiv

Creates the same Weil divisor in two different ways

i9 : R = ZZ/7[x,y]

o9 = R

o9 : PolynomialRing
i10 : D = divisor({-1/2, 2/1}, {ideal(y^2-x^3), ideal(x)}, CoeffType=>QQ)

o10 = -1/2*Div(-x^3+y^2) + 2*Div(x) of R

o10 : QDiv

Constructs a Q-divisor

i11 : R = ZZ/11[x,y,u,v]/ideal(x*y-u*v)

o11 = R

o11 : QuotientRing
i12 : D = divisor({1.1, -3.14159}, {ideal(x,u), ideal(x, v)}, CoeffType=>RR)

o12 = 1.1*Div(x, u) + -3.14159*Div(x, v) of R

o12 : RDiv

See also

Ways to use divisor :