The declaration is accomplished by setting
R.isField to be
true, and, in case the ring is a ring handled by the engine, informing the engine. Polynomial rings over rings declared to be fields support Groebner basis operations.
If the engine eventually discovers that some nonzero element of
R is not a unit, an error will be signalled. The user may then use
getNonUnit to obtain a non-invertible element of
R. If a ring is probably a field, it can be used as a field until a contradiction is found, and this may be a good way of discovering whether a ring is a field.