up previous next
2.9.3 Coefficient Rings
The coefficient ring for a CoCoA polynomial ring may be any ring R :
 1. ZZ: (arbitrarily large) integer numbers;
 2. QQ: (arbitrarily large) rational numbers;
 3. ZZ/(N);
 4. R[a,b,c];
 5. K(a,b,c);  ....
The first two types of coefficients are based on the GNU-gmp library. Some operations work only when coefficients are in a field (a meaningful error message will be thrown). NOTE: inside define/enddefine the top-level variables ZZ and QQ are not directly visible. Use RingZZ() or RingQQ() instead (or import them with TopLevel ).

Example
/**/  R ::= QQ[x,y];    R;
/**/  S ::= ZZ/(5)[t];  S;
/**/  -- NOTE: "::=" for special syntax C[X], ":=" for normal function call
/**/  QQi ::= QQ[i];
/**/  K := NewQuotientRing(QQi, ideal(RingElem(QQi, "i^2+1")));
/**/  U ::= K[u,v];     U;