[GAP Forum] Groebner Basis

Marco Costantini costanti at science.unitn.it
Mon Jun 20 15:42:06 BST 2005


Dear Bulutoglu Dursun and GAP Forum,
the Groebner Basis that you are asking for (see below) can be calculated
using GAP, in the following way.

# First of all, choose a coefficient field F:

F := Rationals;
# F := GaloisField( 3 ); # another possibility

# Then construct a field C over F, that contains your parameters n, N, M, R:

C := FunctionField( F, ["n", "N", "M", "R"] );
n := IndeterminatesOfFunctionField(C)[1];
N := IndeterminatesOfFunctionField(C)[2];
M := IndeterminatesOfFunctionField(C)[3];
R := IndeterminatesOfFunctionField(C)[4];

# The polynomial ring PR over C has has x, y, z as "indeterminates",
# and n, N, M, R as "parameters".

PR := PolynomialRing( C, [ "x", "y", "z" ]);

# GAP will issue a warning at this point, about creating polynomial rings
# over polynomials, (once for each variable) that should be ignored. This is
# one of the few contexts in which one really wants to do this.

# However, one should not expect wonders in performance when working over
# function fields with Gap (although in this example works well).

x := IndeterminatesOfPolynomialRing(PR)[1];
y := IndeterminatesOfPolynomialRing(PR)[2];
z := IndeterminatesOfPolynomialRing(PR)[3];

I := Ideal( PR, [x+y+(n-2)*z-N, x^2+y^2+(n-2)*z^2-M, x^3+y^3+(n-2)*z^3-R] );
ord := MonomialLexOrdering(x,y,z);

GroebnerBasis( I, ord );

In the example above, it is of course possible to define first n, N, M, R
 with the command "Indeterminate" and thereafter the field C. The same for x,
 y, z and PR.

However, calculating Groebner bases is not the strongest point of Gap: if you 
need to perform heavier calculations another specialized system may be 
useful.

A computer algebra system well suited to compute Groebner bases is Singular
(see http://www.singular.uni-kl.de/ , also for more help about Singular, ask
the people of Singular and not the Gap forum).
The Groebner basis that you are asking for can be calculated using Singular,

in the following way:
> ring r = (0, N, n, M, R), (x, y, z), lp;
> ideal I=[x+y+(n-2)*z-N, x^2+y^2+(n-2)*z^2-M, x^3+y^3+(n-2)*z^3-R];
> groebner(I);

_[1]=(n3-3n2+2n)*z3+(-3Nn2+9Nn-6N)*z2+(3N2n-6N2-3nM+6M)*z+(-N3+3NM-2R)
_[2]=2*y2+(2n-4)*yz+(-2N)*y+(n2-3n+2)*z2+(-2Nn+4N)*z+(N2-M)
_[3]=x+y+(n-2)*z+(-N)


Here _[1], _[3], _[3] are the generators and, in the notation used by
Singular, the '^' and some '*' are omitted (so, for instance, '3Nn2' means
'3*N*n^2'). See the manual of Singular for more details.

The functionality provided by Singular can be used from within GAP using an
interface provided by the GAP package "singular", see
http://www.gap-system.org/Packages/singular.html . Note however, that the
polynomial rings whose coefficients ring is a function field (like the PR of
the example above) are not yet supported by the interface; probably they will
be supported in the fortcoming release of the package "singular".

Best regards,
Marco Costantini (using also some suggestions by Steve Linton and Alexander
Hulpke)

On Sunday 05 June 2005 16:42, Bulutoglu Dursun A Civ AFIT/ENC wrote:
> Dear Gap Forum,
> 	I am trying to compute the Groebner basis for the ideal
> I=[x+y+(n-2)*z-N, x^2+y^2+(n-2)*z^2-M, x^3+y^3+(n-2)*z^3-R] where n, N,
> M, R are parameters for the coefficients of the generating polynomials
> but not indeterminates. x,y,z are the indeterminates.
> I would like to compute the Groebner basis of the Ideal I with respect
> to the monomial ordering [x,y,z]
>
> If I type GroebnerBasis(I,MonomialLexOrdering(x,y,z)) I get an error:
> Undefined variables [N,n] where I defined my parameters N, n, M, R as
> indeterminates.
>
> I was wondering if there is a way to define the parameters for the
> coefficients of the generating polynomials but not as indeterminates.
>
> I would like to get a set of polynomials whose coefficients are
> polynomials of N,n M,R with indeterminates x,y,z and  form a Groebner
> basis for I.




More information about the Forum mailing list