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". Also, when a ring is printed only limited information is shown, so different rings might print out 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