Macaulay2 » Documentation
Packages » Macaulay2Doc :: getNonUnit
next | previous | forward | backward | up | index | toc

getNonUnit -- retrieve a previously discovered non-unit



If a ring has been declared to be a field, using toField or frac, but a nonzero element is found to not be a unit, this routine will return that element, otherwise null is returned.
i1 : A = ZZ/101[a]/(a^2-1);
i2 : toField A

o2 = A[]

o2 : PolynomialRing
i3 : 1//(a-1)

o3 = 0

o3 : A
i4 : getNonUnit A
Warning: this function does not work yet for divisions attempted in the course of computing a Gröbner basis or resolution.

See also

For the programmer

The object getNonUnit is a function closure.