| Home | Trees | Indices | Help |
|---|
|
|
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
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from Inherited from Inherited from Inherited from Inherited from Inherited from Inherited from Inherited from Inherited from Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
Return PARI's representation of this relative ideal in Hermite normal form. EXAMPLES: |
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
|
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)
|
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
|
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)
|
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
|
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)
|
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]
|
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
|
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
|
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
|
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]
|
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
|
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
|
| Home | Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0beta1 on Thu Jul 17 04:23:53 2008 | http://epydoc.sourceforge.net |