up previous next
RingEnv

name of the current ring

Syntax
RingEnv():STRING
RingEnv(E:POLY, IDEAL, MODULE, RATFUN, VECTOR):STRING

Description
The first form of this function returns the identifier for the current ring. The second form returns the identifier of the ring on which the object E is dependent.

Example
Use R ::= Q[x,y,z];
I := Ideal(x,y);  -- an object dependent on R
S ::= Z/(3)[a,b];  -- define S, but do not make S active
RingEnv();  -- the current ring
R
-------------------------------
RingEnvs();  -- your result here could be different
["Q", "Qt", "R", "S", "Z"]
-------------------------------
Ring(S);
Z/(3)[a,b]
-------------------------------
I;
Ideal(x, y)
-------------------------------
Use S;  -- S is now the active ring
I;  -- I is labeled by its ring.  The label appears explicitly when R
    -- is not the current ring.
R :: Ideal(x, y)
-------------------------------
RingEnv(I);  -- the ring labeling I
R
-------------------------------
CurrentRing();
Q[x,y,z]
-------------------------------
Use Q[a,b];
RingEnv();
CurrentRingEnv
------------------------------- 


See Also