4.13.1.3 NumberField Objects

class NumberField
NumberField( poly, [variable=True], [check=a])

Instances of class NumberField have the following functions (in addition to inherited functions and special functions):

characteristic,$  $ class_group,$  $ class_number,$  $ composite_fields,$  $ degree,$  $ disc,$  $ discriminant,$  $ factor_integer,$  $ gen,$  $ integral_basis,$  $ is_field,$  $ name,$  $ ngens,$  $ order_table,$  $ pari_bnf,$  $ pari_nf,$  $ pari_polynomial,$  $ polynomial,$  $ polynomial_quotient_ring,$  $ polynomial_ring,$  $ trace_pairing,$  $ units,$  $ variable,$  $ zeta

Further documentation:

class_group( )

WARNING: Assume GRH, etc. !! TODO: Change to use bnf_certify, unless user requests not to.

composite_fields( other)

List of all possible composite fields formed from self and other.

disc( [v=None])

Returns the discriminant of the ring of integers of the number field, or if v is specified, the determinant of the trace pairing on the elements of the list v.

INPUT:
    v (optional) -- list of element of this number field
OUTPUT:
    Integer if v is omitted, and Rational otherwise.

discriminant( [v=None])

Returns the discriminant of the ring of integers of the number field, or if v is specified, the determinant of the trace pairing on the elements of the list v.

INPUT:
    v (optional) -- list of element of this number field
OUTPUT:
    Integer if v is omitted, and Rational otherwise.

factor_integer( n)

Ideal factorization of the principal ideal of the ring of integers generated by n.

integral_basis( )

Return a list of elements of this number field that are a basis for the full ring of integers.

sage: x = PolynomialRing(QQ).gen()
sage: K = NumberField(x**5+10*x+1)
sage: K.integral_basis()
[1, a, a^2, a^3, a^4]

Next we compute the ring of integers of a cubic field in which 2 is an "essential discriminant divisor", so the ring of integers is not generated by a single element.

sage: K = NumberField(x**3 + x**2 - 2*x + 8)
sage: K.integral_basis()
[1, a, 1/2*a^2 + 1/2*a]

pari_bnf( )

PARI big number field corresponding to this field.

pari_nf( )

PARI number field corresponding to this field.

pari_polynomial( )

PARI polynomial corresponding to polynomial that defines this field.

polynomial_quotient_ring( )

Return the polynomial quotient ring isomorphic to this number field.

sage: R = PolynomialRing(RationalField(), 'x'); x = R.gen()
sage: K = NumberField(x**3 + 2*x - 5, 'alpha')
sage: K.polynomial_quotient_ring()
Univariate Quotient Polynomial Ring in alpha over Rational
Field with modulus x^3 + 2*x - 5

trace_pairing( v)

Returns the trace pairing on the elements of the list v.

variable( [new_var=None])

Returns or sets the name of the generator of the number field.

If the optional string argument new_var is given, then the name of the number field generator is set to new_var. If it is not given, this function returns the current name of the generator.

INPUT:
    new_value -- optional str
OUTPUT:
    str -- the name of the generator

Instances of class NumberField also have the following special functions:

__call__,$  $ __cmp__,$  $ __contains__

Further documentation:

__call__( x)

Coerce x into this number field.

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