Module: sage.rings.ideal
SAGE provides functionality for computing with ideals. One can create
an ideal in any commutative ring
by giving a list of generators,
using the notation
R.ideal([a,b,...])
.
Module-level Functions
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
x) |
Class: Ideal_fractional
self, ring, gen) |
Special Functions: __repr__
Class: Ideal_generic
self, ring, gens, [coerce=True]) |
Functions: category,
gens,
is_maximal,
is_prime,
is_principal,
is_zero,
reduce,
ring
self) |
Return the category of this ideal.
self, f) |
Return the reduction the element of
modulo the ideal
(=self). This is an element of
that is equivalent modulo
to
.
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
self, ring, gen) |
Functions: 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
self, ring, gen) |
Functions: divides,
gen,
is_principal
self, other) |
Returns True if self divides other.
Special Functions: __cmp__,
__contains__,
_repr_
See About this document... for information on suggesting changes.