up previous next
 indets

list of indetermiantes in a PolyRing

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

 Description
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 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];

 Example
 ```/**/ S ::= QQ[x,y,z]; /**/ Use R ::= QQ[a,b]; /**/ indets(CurrentRing); [a, b] /**/ indets(S); [x, y, z] /**/ indets(S,"x"); [x] /**/ RingElem(S,"x"); -- works also if R is not a polynomial ring x /**/ 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 [] ```