Use R ::= QQ[x,y,z];
Memory();  the working memory is empty
[ ]

I := Ideal(xyz^3,x^2yz);
X := 3;
M := Mat([[1,2],[3,4]]);
Memory();
["I", "It", "M", "X"]

Describe Memory();
[Memory]
I = Ideal(z^3 + xy, x^2  yz)
It = ["I", "It", "M", "X"]
M = Mat([
[1, 2],
[3, 4]
])
X = 3

Use S ::= ZZ/(3)[t];  switch to a different ring
X := t^2+t+1;  the identifier X is used again
Y := 7;
Describe Memory();  note that I is labeled by its ring
[Memory]
I = R :: Ideal(z^3 + xy, x^2  yz)
It = ["I", "It", "M", "X"]
M = Mat([
[1, 2],
[3, 4]
])
X = t^2 + t + 1
Y = 7

GBasis(I);  The Groebner basis for the ideal in R can be calculated
 even though the current ring is S.
[R :: x^2  yz, R :: z^3 + xy]

M^2;
Mat([
[7, 10],
[15, 22]
])

Use R ::= QQ[s,t];  redefine the ring R
I;  Note that I is labeled by a new ring, automatically produced by
 CoCoA. This ring will automatically cease to exist when there
 are no longer variables dependent upon it, as shown below.
R#17 :: Ideal(z^3 + xy, x^2  yz)

RingEnvs();
["QQ", "QQt", "R", "R#17", "S", "ZZ"]

I := 3;  I is overwritten with an integer, and since it is the only
 variable dependent on R#17, the ring R#17 ceases to exist.
RingEnvs();  Since the only variable that was dependent upon the
 temporary ring "R#17" was overwritten, that ring is
 destroyed.
["QQ", "QQt", "R", "S", "ZZ"]

