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

RWeilDivisor == RWeilDivisor -- whether two divisors are equal

Synopsis

Description

This function returns true if the two divisors are equal

i1 : R = QQ[x,y];
i2 : D = divisor(x*y);

o2 : WeilDivisor on R
i3 : E = divisor(x);

o3 : WeilDivisor on R
i4 : F = divisor(y);

o4 : WeilDivisor on R
i5 : D == E

o5 = false
i6 : D == E+F

o6 = true

Here is an example with rational coefficients compared with integer coefficients.

i7 : R = QQ[x,y];
i8 : D = (1/2)*divisor(x)

o8 = 1/2*Div(x)

o8 : QWeilDivisor on R
i9 : D == 2*D

o9 = false
i10 : D + D == 2*D

o10 = true
i11 : E = divisor(x)

o11 = Div(x)

o11 : WeilDivisor on R
i12 : D == E

o12 = false
i13 : 2*D == E

o13 = true