up previous next
RingElem

convert an expression into a RINGELEM

Syntax
RingElem(R:RING, N:INT): RINGELEM
RingElem(R:RING, Q:RAT): RINGELEM
RingElem(R:RING, Sym:STRING): RINGELEM
RingElem(R:RING, Sym:[STRING, INT, .., INT]): RINGELEM

Description
This function converts the expression E into a RINGELEM, if possible.

Example
/**/  Use P ::= ZZ/(5)[x,y,z];
/**/  RingElem(P, 7);
2

/**/  RingElem(P, 3/2);
-1

/**/  S ::= QQ[x,y,z[1..4,3..7]];
/**/  7*RingElem(P, "x");  --> x as an element of P
2*x
/**/  7*RingElem(S, "x");  --> x as an element of S
7*x
/**/  7*RingElem(S, ["z",2,5]);
7*z[2,5]

See Also