next | previous | forward | backward | up | top | index | toc | Macaulay2 website
RationalPoints2 > integers

integers -- Compute a basis for the integers of a number field

Synopsis

Description

This is an implementation of the Zassenhaus' Round 2 algorithm, following the textbook A course in computational algebraic number theory by Henri Cohen (Algorithm 6.1.8). Given a number field $F=\mathbf Q(\theta)$ defined as a simple extension over the rational numbers by an integral primitive element $\theta$, it computes an integral basis of the algebraic integers, expressed as polynomials in $\theta$.

i1 : integers QQ

o1 = {1}

o1 : List
i2 : integers toField(QQ[i]/(i^2+1))

o2 = {1, i}

o2 : List
i3 : integers toField(QQ[a]/(a^2+3))

         1    1
o3 = {1, -a + -}
         2    2

o3 : List

The discriminant is computed using the same algorithm.

i4 : discriminant toField(QQ[a]/(a^2+3))

o4 = -3
i5 : discriminant toField(QQ[a]/(a^4-a+2))

o5 = 2021

Ways to use integers :

For the programmer

The object integers is a method function.