Rings

class sage.categories.rings.Rings(s=None)

Bases: sage.categories.category_singleton.Category_singleton

The category of rings

Associative rings with unit, not necessarily commutative

EXAMPLES:

sage: Rings()
Category of rings
sage: Rings().super_categories()
[Category of rngs, Category of semirings]

TESTS:

sage: TestSuite(Rings()).run()

TODO (see: http://trac.sagemath.org/sage_trac/wiki/CategoriesRoadMap)

  • Make Rings() into a subcategory or alias of Algebras(ZZ);
  • A parent P in the category Rings() should automatically be in the category Algebras(P).
class ElementMethods
class Rings.HomCategory(category, name=None)

Bases: sage.categories.category.HomCategory

Initializes this HomCategory

INPUT:
  • category – the category whose Homsets are the objects of this category.
  • name – An optional name for this category.

EXAMPLES:

sage: C = sage.categories.category.HomCategory(Rings()); C
Category of hom sets in Category of rings
sage: TestSuite(C).run()
ParentMethods

alias of HomCategory.ParentMethods

extra_super_categories()

EXAMPLES:

sage: Rings().hom_category().extra_super_categories()
[Category of sets]
class Rings.ParentMethods
bracket(x, y)

Returns the Lie bracket [x, y] = x y - y x of x and y.

INPUT:

  • x, y – elements of self

EXAMPLES:

sage: F = AlgebrasWithBasis(QQ).example()
sage: F
An example of an algebra with basis: the free algebra on the generators ('a', 'b', 'c') over Rational Field
sage: a,b,c = F.algebra_generators()
sage: F.bracket(a,b)
B[word: ab] - B[word: ba]

This measures the default of commutation between x and y. F endowed with the bracket operation is a Lie algebra; in particular, it satisfies Jacobi’s identity:

sage: F.bracket( F.bracket(a,b), c) + F.bracket(F.bracket(b,c),a) + F.bracket(F.bracket(c,a),b)
0
ideal(*args, **kwds)

Create an ideal of this ring.

NOTE:

The code is copied from the base class Ring. This is because there are rings that do not inherit from that class, such as matrix algebras. See trac ticket #11068.

INPUT:

  • An element or a list/tuple/sequence of elements.
  • coerce (optional bool, default True): First coerce the elements into this ring.
  • side, optional string, one of "twosided" (default), "left", "right": determines whether the resulting ideal is twosided, a left ideal or a right ideal.

EXAMPLE:

sage: MS = MatrixSpace(QQ,2,2)
sage: isinstance(MS,Ring)
False
sage: MS in Rings()
True
sage: MS.ideal(2)
Twosided Ideal
(
  [2 0]
  [0 2]
)
 of Full MatrixSpace of 2 by 2 dense matrices over Rational Field
sage: MS.ideal([MS.0,MS.1],side='right')
Right Ideal
(
  [1 0]
  [0 0],

  [0 1]
  [0 0]
)
 of Full MatrixSpace of 2 by 2 dense matrices over Rational Field
ideal_monoid()

The monoid of the ideals of this ring.

NOTE:

The code is copied from the base class of rings. This is since there are rings that do not inherit from that class, such as matrix algebras. See trac ticket #11068.

EXAMPLE:

sage: MS = MatrixSpace(QQ,2,2)
sage: isinstance(MS,Ring)
False
sage: MS in Rings()
True
sage: MS.ideal_monoid()
Monoid of ideals of Full MatrixSpace of 2 by 2 dense matrices
over Rational Field

Note that the monoid is cached:

sage: MS.ideal_monoid() is MS.ideal_monoid()
True
is_ring()

Return True, since this in an object of the category of rings.

EXAMPLES:

sage: Parent(QQ,category=Rings()).is_ring()
True
quo(I, names=None)

Quotient of a ring by a two-sided ideal.

NOTE:

This is a synonyme for quotient().

EXAMPLE:

sage: MS = MatrixSpace(QQ,2)
sage: MS.full_category_initialisation()
sage: I = MS*MS.gens()*MS

MS is not an instance of Ring. But since its category was fully initalised (which is not by default, by trac ticket #11900), it is an instance of the parent class of the category of rings. The quotient method is inherited from there:

sage: isinstance(MS,sage.rings.ring.Ring)
False
sage: isinstance(MS,Rings().parent_class)
True
sage: MS.quo(I,names = ['a','b','c','d'])
Quotient of Full MatrixSpace of 2 by 2 dense matrices over Rational Field by the ideal 
(
  [1 0]
  [0 0],

  [0 1]
  [0 0],

  [0 0]
  [1 0],

  [0 0]
  [0 1]
)
quotient(I, names=None)

Quotient of a ring by a two-sided ideal.

INPUT:

  • I: A twosided ideal of this ring.
  • names: a list of strings to be used as names for the variables in the quotient ring.

EXAMPLES:

sage: F.<x,y,z> = FreeAlgebra(QQ, 3)
sage: I = F*[x*y+y*z,x^2+x*y-y*x-y^2]*F
sage: Q = Rings().parent_class.quotient(F,I); Q
Quotient of Free Algebra on 3 generators (x, y, z) over Rational Field by the ideal (x*y + y*z, x^2 + x*y - y*x - y^2)
sage: Q.0
xbar
sage: Q.1
ybar
sage: Q.2
zbar
quotient_ring(I, names=None)

Quotient of a ring by a two-sided ideal.

NOTE:

This is a synonyme for quotient().

EXAMPLE:

sage: MS = MatrixSpace(QQ,2)
sage: I = MS*MS.gens()*MS

MS is not an instance of Ring, but it is an instance of the parent class of the category of rings. The quotient method is inherited from there:

sage: isinstance(MS,sage.rings.ring.Ring)
False
sage: isinstance(MS,Rings().parent_class)
True
sage: MS.quotient_ring(I,names = ['a','b','c','d'])
Quotient of Full MatrixSpace of 2 by 2 dense matrices over Rational Field by the ideal 
(
  [1 0]
  [0 0],

  [0 1]
  [0 0],

  [0 0]
  [1 0],

  [0 0]
  [0 1]
)
Rings.super_categories()

EXAMPLES:

sage: Rings().super_categories()
[Category of rngs, Category of semirings]

Previous topic

Ring ideals

Next topic

Rngs

This Page