# getNonUnit -- retrieve a previously discovered non-unit

## Synopsis

• Usage:
getNonUnit R
• Inputs:
• R, a ring, in which division by a non-unit may have been attempted
• Outputs:
• , the non-unit, if any, or null

## Description

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.