up previous next
zero

zero of a ring

Syntax
zero(R: RING): RINGELEM

Description
This function return the additive identity of a ring. For when you want to force the integer 0 to be a RINGELEM .

Example
/**/ P ::= ZZ/(101)[x,y,z];

/**/ N := 0;  Print N, " of type ",  type(N);
0 of type INT
/**/ N := zero(P);  Print N, " of type ",  type(N);
0 of type RINGELEM
/**/ N := 300*0;  Print N, " of type ",  type(N);
0 of type INT
/**/ N := 300*zero(P);  Print N, " of type ",  type(N);
0 of type RINGELEM

/**/  F := NewFreeModule(P, 3);
/**/  zero(F);
[0, 0, 0]

See Also