next | previous | forward | backward | up | top | index | toc | Macaulay2 website
Divisor :: trim(BasicDivisor)

trim(BasicDivisor) -- trims the ideals displayed to the user and removes primes with coefficient zero

Synopsis

Description

This function returns a divisor where all entries with coefficient zero are removed and where the ideals displayed to the user are trimmed.

i1 : R = QQ[x,y,z]/ideal(x*y-z^2);
i2 : D = divisor({1,0,-2}, {ideal(x, z), ideal(x-z,y-z), ideal(y+z, z)});

o2 : WeilDivisor on R
i3 : cleanSupport(D)

o3 = -2*Div(y+z, z) + Div(x, z)

o3 : WeilDivisor on R
i4 : trim(D)

o4 = -2*Div(z, y) + Div(z, x)

o4 : WeilDivisor on R
i5 : D == trim(D)

o5 = true