Macaulay2 » Documentation
Packages » Divisor :: positivePart
next | previous | forward | backward | up | index | toc

positivePart -- get the effective part or anti-effective part of a divisor

Synopsis

Description

This function returns the positive part of a divisor

i1 : R = QQ[x, y, u, v] / ideal(x * y - u * v);
i2 : D = divisor({1, -2, 3, -4}, {ideal(x, u), ideal(y, u), ideal(x, v), ideal(y, v)})

o2 = -4*Div(y, v) + Div(x, u) + -2*Div(y, u) + 3*Div(x, v)

o2 : WeilDivisor on R
i3 : positivePart( D )

o3 = Div(x, u) + 3*Div(x, v)

o3 : WeilDivisor on R
i4 : negativePart( D )

o4 = 2*Div(y, u) + 4*Div(y, v)

o4 : WeilDivisor on R
i5 : D == positivePart(D) - negativePart(D)

o5 = true
i6 : E = divisor({0, 1}, {ideal(x,u), ideal(y,u)})

o6 = 0*Div(x, u) + Div(y, u)

o6 : WeilDivisor on R
i7 : positivePart(E)

o7 = Div(y, u)

o7 : WeilDivisor on R
i8 : negativePart(E)

o8 = 0, the zero divisor

o8 : WeilDivisor on R
i9 : E == positivePart(E) - negativePart(E)

o9 = true

Ways to use positivePart :

For the programmer

The object positivePart is a method function.