Units( R )
Units
returns the group of units of the ring R. This may either be
returned as a list or as a group described by a group record (see
Groups).
An element r is called a unit of a ring R, if r has an inverse in R. It is easy to see that the set of units forms a multiplicative group.
gap> Units( Integers ); [ -1, 1 ]
Units
first tests whether the component R.units
is bound. If the
component is bound, it returns this value. Otherwise it calls
R.operations.Units( R )
, remembers the returned value in
R.units
, and returns it.
The default function called this way is RingOps.Units
, which runs over
all elements of R and tests for each whether it is a unit, provided
that R is finite. Special categories of rings overlay this default
function with more efficient functions.
GAP 3.4.4