up previous next
one    --    one of a ring


Syntax
one(R: RING): RINGELEM

Description
This function returns the multiplicative identity of a ring. For when you want to force the integer 1 to be a RINGELEM.

Example
/**/ P ::= ZZ/(101)[x,y,z];
/**/ N := 1;  Print N, " of type ",  type(N);
1 of type INT
/**/ N := one(P);  Print N, " of type ",  type(N);
1 of type RINGELEM
/**/ N := 300*1;  Print N, " of type ",  type(N);
300 of type INT
/**/ N := 300*one(P);  Print N, " of type ",  type(N);
-3 of type RINGELEM

See Also