Bases: sage.combinat.free_module.CombinatorialFreeModule
An example of an algebra with basis: the free algebra
This class illustrates a minimal implementation of an algebra with basis.
Returns the generators of this algebra, as per Algebras.ParentMethods.algebra_generators().
EXAMPLES:
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: A.algebra_generators()
Family (B[word: a], B[word: b], B[word: c])
Returns the empty word, which index the one of this algebra, as per AlgebrasWithBasis.ParentMethods.one_basis().
EXAMPLES:
sage: A = AlgebrasWithBasis(QQ).example()
sage: A.one_basis()
word:
sage: A.one()
B[word: ]
Product of basis elements, as per AlgebrasWithBasis.ParentMethods.product_on_basis().
EXAMPLES:
sage: A = AlgebrasWithBasis(QQ).example()
sage: Words = A.basis().keys()
sage: A.product_on_basis(Words("acb"), Words("cba"))
B[word: acbcba]
sage: (a,b,c) = A.algebra_generators()
sage: a * (1-b)^2 * c
B[word: abbc] - 2*B[word: abc] + B[word: ac]