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

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); (#0) [1] B=newalg(x^3+A*x+A); (#1) [2] set_field([B,A]); 0 [3] C=algtodalg(A+B); ((1)*<<1,0>>+(1)*<<0,1>>) [4] C^5; ((-11)*<<2,1>>+(5)*<<2,0>>+(10)*<<1,1>>+(9)*<<1,0>>+(11)*<<0,1>> +(-1)*<<0,0>>) [5] 1/C; ((2)*<<2,1>>+(-1)*<<2,0>>+(1)*<<1,1>>+(2)*<<1,0>>+(-3)*<<0,1>> +(-1)*<<0,0>>)/5

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 *June 19, 2018* using *texi2html 5.0*.