up previous next
RingOf

the ring of the object

Syntax
RingOf(E: RINGELEM|IDEAL|MAT|MODULE): RING

Description
This function returns the ring on which the object E is defined.

NOTE: A ring contains many information and two separate rings, even when defined with the same commands, are not "equal". When a ring is printed only a few informations are shown, so different rings might look the same.

Example
/**/  Use R ::= QQ[x,y,z];
/**/  I := ideal(x,y);
/**/  RingOf(I);
RingWithID(6, "QQ[x,y,z]")

/**/  RingOf(mat([[1,2],[3,4]]));
QQ

/**/  Use Qabc ::= QQ[a,b,c];
/**/  F := a^2+b;
/**/  G := a*b+b^2;
/**/  Use S ::=ZZ/(3)[x,y];
/**/  RingOf(F+G);  -- F+G is computed in the ring of definition
RingWithID(7, "QQ[a,b,c]")
/**/  indets(RingOf(F));
[a, b, c]

See Also