up previous next
NewPolyRing

create a new PolyRing

Syntax
NewPolyRing(CoeffRing: RING, IndetNames: LIST: RING
NewPolyRing(CoeffRing: RING, IndetNames: LIST, OrdMat: MAT, GradingDim: INT: RING

Description
This function returns a polynomial ring which can be used as any programming variable (assigned with := ).

The ::= syntax starts the input method for a new polynomial ring, with the special interpretation of brackets and symbols (i.e. R ::= QQ[x] is not read as X := LL[i]). The pre-defined orderings for the ::= syntax are Lex (no grading), DegLex , DegRevLex (standard grading). For more orderings use the NewPolyRing function call (see also ElimMat ).

NB: calling NewPolyRing twice with the same arguments gives two different rings, therefore incompatible. See ID .

Example
/**/  R ::= QQ[x,y,alpha]; -- is equivalent to
/**/  R := NewPolyRing(RingQQ(), ["x","y","alpha"]);

/**/  R ::= QQ[x,y], DegRevLex; -- is equivalent to
/**/  R := NewPolyRing(RingQQ(), ["x","y"], StdDegRevLexMat(2), 1);

/**/  OrdM := matrix([[2,3],[1,0]]);
/**/  P := NewPolyRing(QQ, ["x","y"], OrdM, 1);
/**/  GradingDim(P);
1
/**/  P2 := NewPolyRing(RingZZ(), IndetSymbols(P));
/**/  Indets(P2);
[x, y]
/**/  P3 := NewPolyRing(P2, SymbolRange("alpha", 0,2));
/**/  indets(P3);
[alpha[0], alpha[1], alpha[2]]

See Also