GAP (Alnuth) - Chapter 2: Working with number fields

Goto Chapter: Top 1 2 3 4 Bib Ind
[Top of Book] [Contents] [Previous Chapter] [Next Chapter]

[MathJax off]

2 Working with number fields
2.1 Creation of number fields
2.1-1 FieldByMatricesNC
2.1-2 FieldByMatrixBasisNC
2.1-3 FieldByPolynomialNC
2.2 Methods for number fields
2.2-1 PrimitiveElement
2.2-2 IsPrimitiveElementOfNumberField
2.2-3 DegreeOverPrimeField
2.2-4 EquationOrderBasis
2.2-5 UnitGroup
2.2-6 IsUnitOfNumberField
2.2-7 ExponentsOfUnits
2.2-8 IsCyclotomicField
2.2-9 NormCosetsOfNumberField
2.3 Presentations of multiplicative subgroups
2.3-1 PcpPresentationOfMultiplicativeSubgroup
2.3-2 RelationLattice
2.4 Methods to compute with subgroups of the unit group
2.4-1 RelationLatticeOfUnits
2.4-2 IntersectionOfUnitSubgroups
2.5 Factorisation of polynomials over a number field
2.5-1 FactorsPolynomialAlgExt
2.5-2 FactorsPolynomialAlnuth
2.6 Examples
2.6-1 ExampleMatField

### 2 Working with number fields

An algebraic number field is a finite-dimensional extension of the rational numbers \(ℚ\). Such a number field has a primitive element and it can be defined by the minimal polynomial of this primitive element. Another important way to define an algebraic number field is by a set of rational matrices which generate a number field.

#### 2.1 Creation of number fields

We provide functions to create number fields defined by rational matrices or by rational polynomials.

##### 2.1-1 FieldByMatricesNC

`‣ FieldByMatricesNC`( matrices ) | ( function )

`‣ FieldByMatrices`( matrices ) | ( function )

Creates a field generated by the rational matrices matrices. In the faster NC version, the function assumes that the input generates a field and there are no checks on this performed.

##### 2.1-2 FieldByMatrixBasisNC

`‣ FieldByMatrixBasisNC`( matrices ) | ( function )

`‣ FieldByMatrixBasis`( matrices ) | ( function )

Creates a field with basis matrices. The list matrices must consist of rational matrices which form a basis for a number field. In the faster NC version, the function assumes that the input is a matrix basis for a field and no checks are performed.

##### 2.1-3 FieldByPolynomialNC

`‣ FieldByPolynomialNC`( polynomial ) | ( function )

`‣ FieldByPolynomial`( polynomial ) | ( function )

Creates a field defined by polynomial. The polynomial polynomial must be an irreducible rational polynomial. In the faster NC version, no checks on the input are performed.

#### 2.2 Methods for number fields

We outline a number of functions for number fields.

##### 2.2-1 PrimitiveElement

`‣ PrimitiveElement`( F ) | ( function )

`‣ DefiningPolynomial`( F ) | ( function )

Computes a primitive element and a defining polynomial for the given number field. The defining polynomial is the minimal polynomial of the primitive element. Since F contains various primitive elements, `PrimitiveElement` tries to find a primitive element which has a minimal polynomial with small coefficients. Via the user preference `PrimitiveElementTrials` the user can decide how many primitive elements will be compared. The default value is 20. (See `SetUserPreference` (Reference: SetUserPreference) for more information about user preferences.)

##### 2.2-2 IsPrimitiveElementOfNumberField

`‣ IsPrimitiveElementOfNumberField`( F, a ) | ( function )

Checks if the given element generates the field.

##### 2.2-3 DegreeOverPrimeField

`‣ DegreeOverPrimeField`( F ) | ( function )

Returns the degree of F over the rationals.

##### 2.2-4 EquationOrderBasis

`‣ EquationOrderBasis`( F ) | ( function )

`‣ MaximalOrderBasis`( F ) | ( function )

`‣ IsIntegerOfNumberField`( F, k ) | ( function )

These functions return bases for the equation order or the maximal order of the number field F. Also, they allow to check if a given element is an integer in the given number field.

##### 2.2-5 UnitGroup

`‣ UnitGroup`( F ) | ( function )

determines the unit group of F.

Recall that the unit group of F is a finitely generated abelian group. The function `IsomorphismPcpGroup` from the Polycyclic [EHN11] package gives an isomorphism to a pcp group which can be used for various computations with the unit group.

##### 2.2-6 IsUnitOfNumberField

`‣ IsUnitOfNumberField`( F, k ) | ( function )

checks whether the element k is a unit in F.

##### 2.2-7 ExponentsOfUnits

`‣ ExponentsOfUnits`( F, elms ) | ( function )

This function determines the exponent vectors of the elements in elms with respect to the generators of the unit group of F. If the unit group of F is not known, then the function computes this unit group also.

##### 2.2-8 IsCyclotomicField

`‣ IsCyclotomicField`( F ) | ( function )

Check whether F is cyclotomic.

##### 2.2-9 NormCosetsOfNumberField

`‣ NormCosetsOfNumberField`( F, norm ) | ( function )

Returns a description for the set of all elements of norm norm in F. These elements can be written as a finite union of cosets of the unit group of F. The function returns coset representatives for these cosets.

#### 2.3 Presentations of multiplicative subgroups

Suppose that a finite number of invertible elements of a number field are given. Then these elements generate a finitely generated abelian group. However, it is a non-trivial task to provide a presentation for this abelian group. The most useful representation for such groups is as pcp group.

##### 2.3-1 PcpPresentationOfMultiplicativeSubgroup

`‣ PcpPresentationOfMultiplicativeSubgroup`( F, elms ) | ( function )

`‣ IsomorphismPcpGroup`( F, elms ) | ( function )

Determine a pcp presentation for the multiplicative group of \(\textit{F}\backslash\{0\}\) generated by elms and an isomorphism on this presentation. Note, that the method `IsomorphismPcpGroup` is defined in the Polycyclic package [EHN11]. We refer to the manual of this package for further background.

In the determination of the Pcp-presentation of a multiplicative subgroup generated by elms the relations between the elements in elms play an important role. Let \(elms=\{e_1,\dots,e_l\}\) be a finite subset of a field F. The relation lattice for elms is

\[ rl(elms):=\left\{(h_1,\dots,h_l) \in ℤ^l | e_1^{h_1} \cdots e_l^{h_l} = 1\right\} . \]

##### 2.3-2 RelationLattice

`‣ RelationLattice`( F, elms ) | ( function )

Determines a generating set for the relation lattice of the field elements elms.

#### 2.4 Methods to compute with subgroups of the unit group

##### 2.4-1 RelationLatticeOfUnits

`‣ RelationLatticeOfUnits`( F, elms ) | ( function )

Determines a basis for the relation lattice of the units elms in triangularized form. Note that this method is more efficient than the method `RelationLattice`.

##### 2.4-2 IntersectionOfUnitSubgroups

`‣ IntersectionOfUnitSubgroups`( F, gen1, gen2 ) | ( function )

The lists gen1 and gen2 are supposed to generate two subgroups \(U_1\) and \(U_2\) of the unit group of F. This function determines the intersection of \(U_1\) with \(U_2\). The result is returned as a list of vectors generating the lattice \(\{ e \in ℤ^n \mid g_1^{e_1} \cdots g_n^{e_n} \in U_2 \}\) for gen1 = \([g_1, \ldots, g_n]\).

For efficiency reasons this function does not check the input and it may return wrong results if the input generators do not fulfil the requirements.

#### 2.5 Factorisation of polynomials over a number field

##### 2.5-1 FactorsPolynomialAlgExt

`‣ FactorsPolynomialAlgExt`( F, pol ) | ( function )

embeds the rational polynomial pol into the polynomial ring over the number field F, which has to be constructed by `FieldByPolynomial` or `AlgebraicExtension`, and returns the factorization of the embedded polynomial. By default a denotes the primitive element of the field one can obtain from `PrimitiveElement(F)`, that is, a root of the defining polynomial of F.

##### 2.5-2 FactorsPolynomialAlnuth

`‣ FactorsPolynomialAlnuth`( pol ) | ( function )

takes a polynomial pol defined over an algebraic extension of the Rationals and factors it using the external CAS (PARI/GP or OSCAR).

The alias `FactorsPolynomialPari` is provided for backwards compatibility.

    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> FactorsPolynomialAlgExt( L, pol );
    [ !2*y, y, y+a, y^2+!1, y^2+(-a)*y+a^2 ]
    gap> FactorsPolynomialAlnuth( last[5] );
    [ y^2+(-a)*y+a^2 ]

#### 2.6 Examples

##### 2.6-1 ExampleMatField

`‣ ExampleMatField`( l ) | ( function )

This function returns some examples of fields generated by matrices. There are 9 such example fields provided and they can be obtained by assigning the input l to an integer between 1 and 9. Some of the properties of the examples are summarized in the following table.

                        degree over Q  number of generators  dim. of generators
    ExampleMatField(1)              4                     4                   4
    ExampleMatField(2)              4                     4                   4
    ExampleMatField(3)              4                     4                   4
    ExampleMatField(4)              4                    13                   4
    ExampleMatField(5)              4                    13                   4
    ExampleMatField(6)              4                     7                   4
    ExampleMatField(7)              4                    18                   4
    ExampleMatField(8)              4                    13                   4
    ExampleMatField(9)              4                     7                   4

[Top of Book] [Contents] [Previous Chapter] [Next Chapter]
Goto Chapter: Top 1 2 3 4 Bib Ind

generated by GAPDoc2HTML