Synopsis:
If n==1, then determines whether I is the unit ideal. If n==0, then determines whether I is the zero ideal. Any other value for n is an error.
i1 : R = QQ[x]; |
i2 : ideal(x^2,x+1) == 1 |
i3 : ideal(0_R) == 0 |
Code:
-- ../../../Macaulay2/m2/modules2.m2:358-364 Ideal == ZZ := (I,n) -> ( if n === 0 then I.generators == 0 else if n === 1 then 1_(ring I) % I == 0 else error "attempted to compare ideal to integer not 0 or 1" )