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 ::= QQ[x,y,z];
  I := Ideal(x,y);  -- an object dependent on R
  S ::= ZZ/(3)[a,b];  -- define S, but do not make S active
  RingEnv();  -- the current ring
R
-------------------------------
  RingEnvs();  -- your result here could be different
["QQ", "QQt", "R", "S", "ZZ"]
-------------------------------
  Ring(S);
ZZ/(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();
QQ[x,y,z]
-------------------------------
  Use QQ[a,b];
  RingEnv();
CurrentRingEnv
-------------------------------


See Also