Package sage :: Package rings :: Module number_field :: Class NumberField
[show private | hide private]
[frames | no frames]

Type NumberField

            Gens --+
                   |
            Ring --+
                   |
      object --+   |
               |   |
_uniqNumberField --+
                   |
                  NumberField

Known Subclasses:
CyclotomicField, QuadraticField

Method Summary
  __init__(self, poly, variable, check)
  __call__(self, x)
Coerce x into this number field.
  __cmp__(self, other)
  __contains__(self, x)
  __repr__(self)
  characteristic(self)
  class_group(self)
  class_number(self)
  composite_fields(self, other)
List of all possible composite fields formed from self and other.
  degree(self)
  discriminant(self, v)
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.
  factor_integer(self, n)
Ideal factorization of the principal ideal of the ring of integers generated by n.
  gen(self, n)
  integral_basis(self)
Return a list of elements of this number field that are a basis for the full ring of integers.
  is_field(self)
  name(self)
  ngens(self)
  order_table(self)
  pari_bnf(self)
PARI big number field corresponding to this field.
  pari_nf(self)
PARI number field corresponding to this field.
  pari_polynomial(self)
PARI polynomial corresponding to polynomial that defines this field.
  polynomial(self)
  polynomial_ring(self)
  trace_pairing(self, v)
Returns the trace pairing on the elements of the list v.
  units(self)
  variable(self, new_var)
Returns or sets the name of the generator of the number field.
  zeta(self)
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)
    Inherited from Ring
  is_atomic_repr(self)
True if the elements have atomic string representations, in the sense that they print if they print at s, then -s means the negative of s.
  type(self)
    Inherited from Gens
  __getattr__(self, attrname)
  __getitem__(self, n)
  __getslice__(self, n, m)
  gens(self)
  list(self)

Instance Method Details

__call__(self, x)
(Call operator)

Coerce x into this number field.
Overrides:
sage.rings.ring.Ring.__call__

composite_fields(self, other)

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

discriminant(self, 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(self, n)

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

integral_basis(self)

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

EXAMPLES:
>>> from sage.all import *
>>> K = NumberField(x**5+10*x+1)
>>> 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.
>>> K = NumberField(x**3 + x**2 - 2*x + 8)
>>> K.integral_basis()
[1, a, 1/2*a^2 + 1/2*a]

pari_bnf(self)

PARI big number field corresponding to this field.

pari_nf(self)

PARI number field corresponding to this field.

pari_polynomial(self)

PARI polynomial corresponding to polynomial that defines this field.

trace_pairing(self, v)

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

variable(self, 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

Generated by Epydoc 2.1 on Mon May 9 17:57:03 2005 http://epydoc.sf.net