4.13.1 rings.number_field - Number fields

The module rings.number_field defines the following classes:

class CyclotomicField
Create a cyclotomic extension of the rational field.

The command CyclotomicField(n) creates the n-th cyclotomic field, got by adjoing an n-th root of unity to the rational field.

sage: CyclotomicField(3)
Cyclotomic Field of order 3 and degree 2
sage: CyclotomicField(18)
Cyclotomic Field of order 18 and degree 6
sage: z = CyclotomicField(6).gen(); z
zeta_6
sage: z**3
-1
sage: (1+z)**3
6*zeta_6 - 3

class FractionalIdeal

class NumberField

class QuadraticField
Create a quadratic extension of the rational field.

The command QuadraticExtension(a) creates the field Q(sqrt(a)).

sage: QuadraticField(3)
Number Field with defining polynomial x^2 - 3
sage: QuadraticField(-4)
Number Field with defining polynomial x^2 + 4

The module rings.number_field defines the following functions:



Subsections
See About this document... for information on suggesting changes.