Associative algebras¶
-
class
sage.categories.associative_algebras.
AssociativeAlgebras
(base_category)¶ Bases:
sage.categories.category_with_axiom.CategoryWithAxiom_over_base_ring
The category of associative algebras over a given base ring.
An associative algebra over a ring
is a module over
which is also a not necessarily unital ring.
Warning
Until trac ticket #15043 is implemented,
Algebras
is the category of associative unital algebras; thus, unlike the name suggests,AssociativeAlgebras
is not a subcategory ofAlgebras
but ofMagmaticAlgebras
.EXAMPLES:
sage: from sage.categories.associative_algebras import AssociativeAlgebras sage: C = AssociativeAlgebras(ZZ); C Category of associative algebras over Integer Ring
TESTS:
sage: from sage.categories.magmatic_algebras import MagmaticAlgebras sage: C is MagmaticAlgebras(ZZ).Associative() True sage: TestSuite(C).run()
-
class
ElementMethods
¶ An abstract class for elements of an associative algebra.
Note
Magmas.Element.__mul__
is preferable toModules.Element.__mul__
since the later does not handle products of two elements ofself
.TESTS:
sage: A = AlgebrasWithBasis(QQ).example(); A An example of an algebra with basis: the free algebra on the generators ('a', 'b', 'c') over Rational Field sage: x = A.an_element() sage: x B[word: ] + 2*B[word: a] + 3*B[word: b] + B[word: bab] sage: x.__mul__(x) B[word: ] + 4*B[word: a] + 4*B[word: aa] + 6*B[word: ab] + 2*B[word: abab] + 6*B[word: b] + 6*B[word: ba] + 2*B[word: bab] + 2*B[word: baba] + 3*B[word: babb] + B[word: babbab] + 9*B[word: bb] + 3*B[word: bbab]
-
class