| Home | Trees | Indices | Help |
|---|
|
|
object --+
|
structure.sage_object.SageObject --+
|
structure.element.Element --+
|
structure.element.MonoidElement --+
|
Ideal_generic --+
|
Ideal_principal
A principal ideal.
|
|||
|
Inherited from |
|||
|
|||
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
|
File: sage/structure/sage_object.pyx (starting at line 86)
|
Returns True if the ideal is principal in the ring containing the
ideal. When the ideal construction is explicitly principal (i.e.
when we define an ideal with one element) this is always the case.
EXAMPLES:
Note that SAGE automatically coerces ideals into principals ideals
during initialization:
sage: R = ZZ[x]
sage: I = R.ideal(x)
sage: J = R.ideal(2,x)
sage: K = R.base_extend(QQ).ideal(2,x)
sage: I
Principal ideal (x) of Univariate Polynomial Ring in x
over Integer Ring
sage: J
Ideal (2, x) of Univariate Polynomial Ring in x over Integer Ring
sage: K
Principal ideal (1) of Univariate Polynomial Ring in x
over Rational Field
sage: I.is_principal()
True
sage: K.is_principal()
True
|
Returns the generator of the principal ideal. The generators are
elements of the ring containing the ideal.
EXAMPLES:
A simple example in the integers:
sage: R = ZZ
sage: I = R.ideal(7)
sage: J = R.ideal(7, 14)
sage: I.gen(); J.gen()
7
7
Note that the generator belongs to the ring from which the
ideal was initialized:
sage: R = ZZ[x]
sage: I = R.ideal(x)
sage: J = R.base_extend(QQ).ideal(2,x)
sage: a = I.gen(); a
x
sage: b = J.gen(); b
1
sage: a.base_ring()
Integer Ring
sage: b.base_ring()
Rational Field
|
Returns True if x is in the ideal self.
EXAMPLES:
sage: P.<x> = PolynomialRing(ZZ)
sage: I = P.ideal(x^2-2)
sage: x^2 in I
False
sage: x^2-2 in I
True
sage: x^2-3 in I
False
|
cmp(x,y)
|
Returns True if self divides other.
EXAMPLES:
sage: P.<x> = PolynomialRing(QQ)
sage: I = P.ideal(x)
sage: J = P.ideal(x^2)
sage: I.divides(J)
True
sage: J.divides(I)
False
|
| Home | Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0beta1 on Thu Jul 17 04:23:51 2008 | http://epydoc.sourceforge.net |