Macaulay2 » Documentation
Packages » Divisor :: coefficients(BasicDivisor)
next | previous | forward | backward | up | index | toc

coefficients(BasicDivisor) -- get the list of coefficients of a divisor

Synopsis

Description

Get the list of coefficients of a BasicDivisor (or a WeilDivisor, QWeilDivisor or RWeilDivisor).

i1 : R = QQ[x,y,u,v]/ideal(x*y-u*v);
i2 : D = divisor(x);

o2 : WeilDivisor on R
i3 : coefficients(D)

o3 = {1, 1}

o3 : List
i4 : E = divisor(x*u);

o4 : WeilDivisor on R
i5 : coefficients(E)

o5 = {1, 1, 2}

o5 : List
i6 : F = divisor({0, 1/2, -2/3}, {ideal(y, u), ideal(x,u), ideal(x,v)}, CoefficientType => QQ)

o6 = 0*Div(y, u) + 1/2*Div(x, u) + -2/3*Div(x, v)

o6 : QWeilDivisor on R
i7 : coefficients(F)

         1    2
o7 = {0, -, - -}
         2    3

o7 : List
i8 : G = divisor({0.5, -0.667}, {ideal(x,u), ideal(x,v)}, CoefficientType => RR)

o8 = .5*Div(x, u) + -.667*Div(x, v)

o8 : RWeilDivisor on R
i9 : coefficients(G)

o9 = {.5, -.667}

o9 : List

See also

Ways to use this method: