[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

9.3 Representation of algebraic numbers by distributed polynomials

Simplification of algebraic numbers containing root is not done automatically and should be done by users. There is another representation of algebraic numbers, for which the results of fundamental operations are automatically simplified. This representations are designed so that operations are efficiently performed especially when the field is a successive extension and it can be used as a ground field for Groebner basis related functions. Internally an algebraic number of this type is defined as an object called DAlg. A DAlg is represented as a fraction. The denominator is an integer and the numerator is a distributed polynomial with integral coefficients.

DAlg is generated as an element of an algebraic number field set by set_field(). There are two methods to generate a DAlg. algtodalg() converts an algebraic number containing root to DAlg. dptodalg() directly converts a distributed polynomial to DAlg.

[0] A=newalg(x^2+1);
[1] B=newalg(x^3+A*x+A);
[2] set_field([B,A]);
[3] C=algtodalg(A+B);
[4] C^5;
[5] 1/C;

In this example Q(a,b) (a^2+1=0, b^3+ab+b=0) is set as the current ground field, and (a+b)^5 and 1/(a+b) are simplified in the field. The numerators of the results are printed as distributed polynomials.

[ << ] [ < ] [ Up ] [ > ] [ >> ]

This document was generated on October 22, 2017 using texi2html 5.0.