11.1 Ideals

Module: sage.rings.ideal

SAGE provides functionality for computing with ideals. One can create an ideal in any commutative ring $ R$ by giving a list of generators, using the notation R.ideal([a,b,...]).

Module-level Functions

Ideal( R, [gens=True], [coerce=[]])

Create the ideal in ring with given generators.

There are some shorthand notations for creating an ideal, in addition to use the Ideal function:

        --  R.ideal(gens, coerce=True)
        --  gens*R
        --  R*gens

INPUT:
    R -- a ring
    gens -- list of elements
    coerce -- bool (default: True); whether gens need to be coerced into
ring.

Alternatively, one can also call this function with the syntax
     Ideal(gens)
where gens is a nonempty list of generators or a single generator.
    
OUTPUT:
    The ideal of ring generated by gens.

sage: R, x = PolynomialRing(Z).objgen()
sage: I = R.ideal([4 + 3*x + x^2, 1 + x^2])
sage: I
Ideal (x^2 + 1, x^2 + 3*x + 4) of Univariate Polynomial Ring in x over
Integer Ring
sage: Ideal(R, [4 + 3*x + x^2, 1 + x^2])
Ideal (x^2 + 1, x^2 + 3*x + 4) of Univariate Polynomial Ring in x over
Integer Ring
sage: Ideal((4 + 3*x + x^2, 1 + x^2))
Ideal (x^2 + 1, x^2 + 3*x + 4) of Univariate Polynomial Ring in x over
Integer Ring

sage: ideal(x^2-2*x+1, x^2-1)
Ideal (x^2 - 2*x + 1, x^2 - 1) of Univariate Polynomial Ring in x over
Integer Ring
sage: ideal([x^2-2*x+1, x^2-1])
Ideal (x^2 - 2*x + 1, x^2 - 1) of Univariate Polynomial Ring in x over
Integer Ring
sage: ideal(x^2-2*x+1, x^2-1)
Ideal (x^2 - 2*x + 1, x^2 - 1) of Univariate Polynomial Ring in x over
Integer Ring
sage: ideal([x^2-2*x+1, x^2-1])
Ideal (x^2 - 2*x + 1, x^2 - 1) of Univariate Polynomial Ring in x over
Integer Ring

is_Ideal( x)

Class: Ideal_fractional

class Ideal_fractional
Ideal_fractional( self, ring, gen)

Special Functions: __repr__

Class: Ideal_generic

class Ideal_generic
An ideal.
Ideal_generic( self, ring, gens, [coerce=True])

Functions: category,$  $ gens,$  $ is_maximal,$  $ is_prime,$  $ is_principal,$  $ is_zero,$  $ reduce,$  $ ring

category( self)

Return the category of this ideal.

reduce( self, f)

Return the reduction the element of $ f$ modulo the ideal $ I$ (=self). This is an element of $ R$ that is equivalent modulo $ I$ to $ f$ .

ring( self)

Return the ring in which this ideal is contained.

Special Functions: __add__,$  $ __cmp__,$  $ __contains__,$  $ __mul__,$  $ __radd__,$  $ __rmul__,$  $ _cmp_,$  $ _contains_,$  $ _latex_,$  $ _repr_,$  $ _repr_short

Class: Ideal_pid

class Ideal_pid
An ideal of a principal ideal domain.
Ideal_pid( self, ring, gen)

Functions: reduce

reduce( self, f)

Return the reduction of f modulo self.

sage: I = 8*Z
sage: I.reduce(10)
2
sage: n = 10; n.mod(I)
2

Special Functions: __add__

Class: Ideal_principal

class Ideal_principal
A principal ideal.
Ideal_principal( self, ring, gen)

Functions: divides,$  $ gen,$  $ is_principal

divides( self, other)

Returns True if self divides other.

Special Functions: __cmp__,$  $ __contains__,$  $ _repr_

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