[GAP Forum] Composition of polynomials
Anvita
anvita21 at gmail.com
Mon May 11 13:24:38 BST 2015
Thank you, Mohamed, for suggesting a general solution. It may be useful to
other users, so I am replying to the forum rather than privately. I hope
you don't mind. Also, thank you to Alexander Hulpke for implementing the
special case for symmetric polynomials.
Best regards,
Anvita
On Sun, May 10, 2015 at 1:19 PM, Mohamed Barakat <
mohamed.barakat at rwth-aachen.de> wrote:
> Dear Anvita,
>
> this is a special case of computing the image of a subscheme under a
> morphism of schemes, which is supported in the homalg project; homalg needs
> an external computer algebra system with a Gröbner basis engine. If you
> have Singular installed and the GAP package IO compiled on a unix machine
> then the following code should work:
>
> gap> LoadPackage( "GradedModules" );
> true
> gap> Q := HomalgFieldOfRationalsInSingular( );
> Q
> gap> A := Q * "x,y";
> Q[x,y]
> gap> I := LeftSubmodule( "x^2+y^2", A );
> <A principal torsion-free (left) ideal given by a cyclic generator>
> gap> S := A / I;
> Q[x,y]/( x^2+y^2 )
> gap> AssignGeneratorVariables( S );
> #I Assigned the global variables [ x, y ]
> gap> T := Q * "e,f";
> Q[e,f]
> gap> phi := RingMap( [ x+y, x*y ], T, S );
> <A "homomorphism" of rings>
> gap> J := KernelSubobject( phi );
> <A principal torsion-free (left) ideal given by a cyclic generator>
> gap> j := MatrixOfSubobjectGenerators( J );
> <A 1 x 1 matrix over an external ring>
> gap> Assert( 0, NrRows( j ) = 1 );
> gap> result := MatElm( j, 1, 1 );
> e^2-2*f
>
> Best wishes,
>
> Mohamed
>
>
More information about the Forum
mailing list