Package sage :: Package rings :: Package number_field :: Module number_field_ideal_rel :: Class NumberFieldFractionalIdeal_rel
[hide private]
[frames] | no frames]

Class NumberFieldFractionalIdeal_rel

source code

                      object --+                        
                               |                        
structure.sage_object.SageObject --+                    
                                   |                    
           structure.element.Element --+                
                                       |                
         structure.element.MonoidElement --+            
                                           |            
                         ideal.Ideal_generic --+        
                                               |        
             number_field_ideal.NumberFieldIdeal --+    
                                                   |    
       number_field_ideal.NumberFieldFractionalIdeal --+
                                                       |
                                                      NumberFieldFractionalIdeal_rel


An ideal of a relative number field.

EXAMPLES:
    sage: K.<a> = NumberField([x^2 + 1, x^2 + 2]); K
    Number Field in a0 with defining polynomial x^2 + 1 over its base field
    sage: i = K.ideal(38); i
    Fractional ideal (38)
    
WARNING: Ideals in relative number fields are broken:
    sage: K.<a> = NumberField([x^2 + 1, x^2 + 2]); K
    Number Field in a0 with defining polynomial x^2 + 1 over its base field
    sage: i = K.ideal([a+1]); i
    Traceback (most recent call last):
    ...
    TypeError: Unable to coerce -a1 to an integer



Instance Methods [hide private]
 
pari_rhnf(self)
Return PARI's representation of this relative ideal in Hermite normal form.
source code
 
absolute_ideal(self)
If this is an ideal in the extension L/K, return the ideal with the same generators in the absolute field L/Q.
source code
 
gens_reduced(self)
Express this ideal in terms of at most two generators, and one if possible.
source code
 
__invert__(self)
Return the multiplicative inverse of self.
source code
 
is_principal(self)
Return True if this ideal is principal.
source code
 
is_zero(self)
Return True iff self is the zero ideal...
source code
 
norm(self)
Compute the relative norm of this extension L/K as an ideal of K.
source code
 
factor(self)
Factorization of this ideal in terms of prime ideals.
source code
 
integral_basis(self)
Return a list of generators for this ideal as a $\mathbb{Z}$-module.
source code
 
integral_split(self)
Return a tuple (I, d), where I is an integral ideal, and d is the smallest positive integer such that this ideal is equal to I/d.
source code
 
is_maximal(self)
Return True if this ideal is maximal.
source code
 
is_prime(self)
Return True if this ideal is prime.
source code
 
ramification(self) source code
 
residue_class_degree(self)
Return the residue class degree of this fractional ideal, assuming it is prime.
source code
 
smallest_integer(self)
Return the smallest nonnegative integer in $I \cap \mathbb{Z}$, where $I$ is this ideal.
source code
 
valuation(self)
Return the valuation of this fractional ideal at the prime $\mathfrak{p}$.
source code

Inherited from number_field_ideal.NumberFieldFractionalIdeal: __div__, __init__, __pow__, __repr__, divides, is_trivial, prime_factors, ramification_index, residue_field

Inherited from number_field_ideal.NumberFieldIdeal: __cmp__, _contains_, _latex_, _pari_, _pari_init_, basis, free_module, is_integral, number_field, pari_hnf, reduce_equiv

Inherited from ideal.Ideal_generic: __add__, __contains__, __mul__, __nonzero__, __radd__, __rmul__, base_ring, category, gens, reduce, ring

Inherited from structure.element.MonoidElement: __new__, __rpow__, _mul_, multiplicative_order, order

Inherited from structure.element.Element: __eq__, __ge__, __gt__, __hash__, __le__, __lt__, __ne__, __reduce__, __rxor__, __xor__, _cmp_, _im_gens_, _repr_, _richcmp_, base_base_extend, base_base_extend_canonical_sym, base_extend, base_extend_canonical, base_extend_canonical_sym, base_extend_recursive, n, parent, subs, substitute

Inherited from structure.sage_object.SageObject: _axiom_, _axiom_init_, _gap_, _gap_init_, _gp_, _gp_init_, _interface_, _interface_init_, _interface_is_cached_, _kash_, _kash_init_, _macaulay2_, _macaulay2_init_, _magma_, _magma_init_, _maple_, _maple_init_, _mathematica_, _mathematica_init_, _maxima_, _maxima_init_, _octave_, _octave_init_, _r_init_, _sage_, _singular_, _singular_init_, db, dump, dumps, plot, rename, reset_name, save, version

Inherited from object: __delattr__, __getattribute__, __reduce_ex__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

pari_rhnf(self)

source code 

Return PARI's representation of this relative ideal in Hermite
normal form.

EXAMPLES:

gens_reduced(self)

source code 

Express this ideal in terms of at most two generators, and one
if possible.

Note that if the ideal is not principal, then this uses PARI's
\code{idealtwoelt} function, which takes exponential time, the
first time it is called for each ideal.  Also, this indirectly
uses \code{bnfisprincipal}, so set \code{proof=True} if you
want to prove correctness (which \emph{is} the default).

EXAMPLE:
    sage: R.<x> = PolynomialRing(QQ)
    sage: K.<i> = NumberField(x^2+1, 'i')
    sage: J = K.ideal([i+1, 2])
    sage: J.gens()
    (i + 1, 2)
    sage: J.gens_reduced()
    (i + 1,)

TESTS:
    sage: all(j.parent() is K for j in J.gens())
    True
    sage: all(j.parent() is K for j in J.gens_reduced())
    True

    sage: K.<a> = NumberField(x^4 + 10*x^2 + 20)
    sage: J = K.prime_above(5)
    sage: J.is_principal()
    False
    sage: J.gens_reduced()
    (5, a)
    sage: all(j.parent() is K for j in J.gens())
    True
    sage: all(j.parent() is K for j in J.gens_reduced())
    True

Overrides: number_field_ideal.NumberFieldIdeal.gens_reduced
(inherited documentation)

__invert__(self)

source code 

Return the multiplicative inverse of self.  Call with ~self.

EXAMPLES:
    sage: K.<a,b> = NumberField([x^2 + 1, x^2 + 2])
    sage: I = K.fractional_ideal(4)
    sage: I^(-1)
    Fractional ideal (1/4)
    sage: I * I^(-1)
    Fractional ideal (1)

Overrides: number_field_ideal.NumberFieldFractionalIdeal.__invert__

is_principal(self)

source code 

Return True if this ideal is principal.

Since it uses the PARI method \code{bnfisprincipal}, specify
\code{proof=True} (this is the default setting) to prove the
correctness of the output.

EXAMPLES:
We create equal ideals in two different ways, and note that
they are both actually principal ideals. 
    sage: K = QuadraticField(-119,'a')
    sage: P = K.ideal([2]).factor()[1][0]
    sage: I = P^5
    sage: I.is_principal()
    True

Overrides: number_field_ideal.NumberFieldIdeal.is_principal
(inherited documentation)

is_zero(self)

source code 

Return True iff self is the zero ideal

EXAMPLES:
    sage: K.<a> = NumberField(x^2 + 2); K
    Number Field in a with defining polynomial x^2 + 2
    sage: K.ideal(3).is_zero()
    False
    sage: I=K.ideal(0); I.is_zero()
    True
    sage: I
    Ideal (0) of Number Field in a with defining polynomial x^2 + 2

    (0 is a NumberFieldIdeal, not a NumberFieldFractionIdeal)

Overrides: number_field_ideal.NumberFieldIdeal.is_zero
(inherited documentation)

norm(self)

source code 

Compute the relative norm of this extension L/K as an ideal of K.

EXAMPLE:
    sage: R.<x> = QQ[]
    sage: K.<a> = NumberField(x^2+6)
    sage: L.<b> = K.extension(K['x'].gen()^4 + a)
    sage: N = L.ideal(b).norm(); N
    Fractional ideal (-a)
    sage: N.parent()
    Monoid of ideals of Number Field in a with defining polynomial x^2 + 6
    sage: N.ring()
    Number Field in a with defining polynomial x^2 + 6

Overrides: number_field_ideal.NumberFieldIdeal.norm

factor(self)

source code 

Factorization of this ideal in terms of prime ideals. 

EXAMPLES:
    sage: K.<a> = NumberField(x^4 + 23); K
    Number Field in a with defining polynomial x^4 + 23
    sage: I = K.ideal(19); I
    Fractional ideal (19)
    sage: F = I.factor(); F
    (Fractional ideal (a^2 + 2*a + 2)) * (Fractional ideal (a^2 - 2*a + 2))
    sage: type(F)
    <class 'sage.structure.factorization.Factorization'>
    sage: list(F)
    [(Fractional ideal (a^2 + 2*a + 2), 1), (Fractional ideal (a^2 - 2*a + 2), 1)]
    sage: F.prod()
    Fractional ideal (19)

Overrides: number_field_ideal.NumberFieldFractionalIdeal.factor
(inherited documentation)

integral_basis(self)

source code 

Return a list of generators for this ideal as a $\mathbb{Z}$-module.

EXAMPLE:
    sage: R.<x> = PolynomialRing(QQ)        
    sage: K.<i> = NumberField(x^2 + 1)
    sage: J = K.ideal(i+1)
    sage: J.integral_basis()
    [2, i + 1]

Overrides: number_field_ideal.NumberFieldIdeal.integral_basis
(inherited documentation)

integral_split(self)

source code 

Return a tuple (I, d), where I is an integral ideal, and d is the
smallest positive integer such that this ideal is equal to I/d.

EXAMPLE:
    sage: R.<x> = PolynomialRing(QQ)
    sage: K.<a> = NumberField(x^2-5)
    sage: I = K.ideal(2/(5+a))
    sage: I.is_integral()
    False
    sage: J,d = I.integral_split()
    sage: J
    Fractional ideal (-1/2*a + 5/2)
    sage: J.is_integral()
    True
    sage: d
    5
    sage: I == J/d
    True

Overrides: number_field_ideal.NumberFieldIdeal.integral_split
(inherited documentation)

is_maximal(self)

source code 

Return True if this ideal is maximal.  This is equivalent to
self being prime, since it is nonzero.

EXAMPLES:
    sage: K.<a> = NumberField(x^3 + 3); K
    Number Field in a with defining polynomial x^3 + 3
    sage: K.ideal(5).is_maximal()
    False
    sage: K.ideal(7).is_maximal()
    True        

Overrides: number_field_ideal.NumberFieldFractionalIdeal.is_maximal
(inherited documentation)

is_prime(self)

source code 

Return True if this ideal is prime.

EXAMPLES:
    sage: K.<a> = NumberField(x^2 - 17); K
    Number Field in a with defining polynomial x^2 - 17
    sage: K.ideal(5).is_prime()
    True
    sage: K.ideal(13).is_prime()
    False
    sage: K.ideal(17).is_prime()
    False        

Overrides: number_field_ideal.NumberFieldIdeal.is_prime
(inherited documentation)

residue_class_degree(self)

source code 

Return the residue class degree of this fractional ideal,
assuming it is prime.  Otherwise, raise a ValueError.

The residue class degree of a prime ideal $I$ is the degree of
the extension $O_K/I$ of its prime subfield.

EXAMPLES:
    sage: K.<a> = NumberField(x^5 + 2); K
    Number Field in a with defining polynomial x^5 + 2
    sage: f = K.factor(19); f
    (Fractional ideal (a^2 + a - 3)) * (Fractional ideal (-2*a^4 - a^2 + 2*a - 1)) * (Fractional ideal (a^2 + a - 1))
    sage: [i.residue_class_degree() for i, _ in f]   
    [2, 2, 1]        

Overrides: number_field_ideal.NumberFieldFractionalIdeal.residue_class_degree
(inherited documentation)

smallest_integer(self)

source code 

Return the smallest nonnegative integer in $I \cap \mathbb{Z}$,
where $I$ is this ideal.  If $I = 0$, raise a ValueError.

EXAMPLE:
    sage: R.<x> = PolynomialRing(QQ)
    sage: K.<a> = NumberField(x^2+6)
    sage: I = K.ideal([4,a])/7
    sage: I.smallest_integer()
    2

Overrides: number_field_ideal.NumberFieldIdeal.smallest_integer
(inherited documentation)

valuation(self)

source code 

Return the valuation of this fractional ideal at the prime
$\mathfrak{p}$.  If $\mathfrak{p}$ is not prime, raise a
ValueError.

INPUT:
    p -- a prime ideal of this number field.

OUTPUT:
    integer

EXAMPLES:
    sage: K.<a> = NumberField(x^5 + 2); K
    Number Field in a with defining polynomial x^5 + 2
    sage: i = K.ideal(38); i
    Fractional ideal (38)
    sage: i.valuation(K.factor(19)[0][0])
    1
    sage: i.valuation(K.factor(2)[0][0])
    5
    sage: i.valuation(K.factor(3)[0][0])
    0
    sage: i.valuation(0)
    Traceback (most recent call last):
    ...
    ValueError: p (= 0) must be nonzero

Overrides: number_field_ideal.NumberFieldIdeal.valuation
(inherited documentation)