[GAP Forum] Alnuth: FactorsPolynomialKant

andreas at mcs.st-and.ac.uk andreas at mcs.st-and.ac.uk
Thu Mar 31 11:04:27 BST 2011


Dear Anja,

My apologies for the confusion. This is a mistake in the documentation.
The function to use here is 'FactorsPolynomialAlgExt'. In the example from
the documentation one gets:

gap> FactorsPolynomialAlgExt( L, pol );
[ !2*y, y, y+a, y^2+!1, y^2+(-a)*y+a^2 ]

The function 'FactorsPolynomialKant' takes as input a polynomial with
coefficients in a proper extension of the Rationals. You can get the same
result as above doing:

gap> AlgExtEmbeddedPol(L,pol);
!2*y^7+!2*y^5+!8*y^4+!8*y^2
gap> FactorsPolynomialKant(last);
[ !2*y, y, y+a, y^2+!1, y^2+(-a)*y+a^2 ]

The same works also without using the interface to KANT:

gap> AlgExtEmbeddedPol(L,pol);
!2*y^7+!2*y^5+!8*y^4+!8*y^2
gap> Factors(last);
[ !2*y, y, y+a, y^2+(-a)*y+a^2, y^2+!1 ]

For more difficult factorizations you will note that the algorithm
implemented in KANT is more efficient than the method available in GAP.

I'll correct the documentation in the next version of Alnuth. Thanks for
pointing it out.

Best wishes,

   Andreas


> Dear GAP Forum,
>
> I want to factor polynomials over an algebraic field extension created
> by FieldByMatrices or FieldByPolynomial. There is a method
> FactorsPolynomialKant(L, poly) listed in the Alnuth package
> documentation, see
> http://www.gap-system.org/Manuals/pkg/alnuth/htm/CHAP002.htm.
> As far as I can see this doesn't seem to work properly, the example
> given there results in the following:
>
> gap> x := Indeterminate( Rationals, "x" );;
> gap> pol := 2*x^7+2*x^5+8*x^4+8*x^2;
> 2*x^7+2*x^5+8*x^4+8*x^2
> gap> L := FieldByPolynomial( x^3-4 );
> <algebraic extension over the Rationals of degree 3>
> gap> y := Indeterminate( L, "y" );;
> gap> FactorsPolynomialKant( L, pol );
> Function: number of arguments must be 1 (not 2)
> not in any function
> Entering break read-eval-print loop ...
>
> Looking in pkg/alnuth/gap/factors.gi, I found that there seems to be no
> function matching the suggested signature in the example (especially
> FactorsPolynomialKant only takes one argument <pol>).
>
> If anyone had any ideas at all on how to solve this issue I'd be happy
> if you'd let me know.
>
> Thanks a lot,
> Anja
>
> _______________________________________________
> Forum mailing list
> Forum at mail.gap-system.org
> http://mail.gap-system.org/mailman/listinfo/forum
>




More information about the Forum mailing list