up previous next
indets    --    list of indeterminates in a PolyRing

indets(R: RING): LIST
indets(R: RING, X: STRING): LIST

With one argument (a polynomial ring), this function returns the list of indeterminates of that polynomial ring. With two arguments (the second a STRING), it returns the list of all indeterminates whose name is the given string. The indeterminates in the list appear in order of increasing index (see the function IndetIndex ).

This function used to be called IndetsCalled up to version CoCoA-5.0.3, and AllIndetsCalled in CoCoA-4.

Additionally, up to version 4.7.3 you could get this list just by giving the name, e.g. Use QQ[x[0..4]]; x; but this syntax is no longer allowed because it is ambiguous: x[2]; is different from X := x; X[2];

/**/  S ::= QQ[x,y,z];
/**/  use R ::= QQ[a,b];
/**/  indets(CurrentRing);
[a, b]
/**/  indets(S);
[x, y, z]
/**/  indets(S,"x");
/**/  RingElem(S,"x"); -- works also if R is not a polynomial ring

/**/  use R ::= QQ[x[1..4],a[1..2,1..3]];
/**/  indets(R,"x");
[x[1], x[2], x[3], x[4]]
/**/  indets(R,"a");
[a[1,1], a[1,2], a[1,3], a[2,1], a[2,2], a[2,3]]
/**/  indets(R,"b"); -- empty list if no indet has a matching head

See Also