9.1.1.1 FreeAlgebra Objects

class FreeAlgebra
FreeAlgebra( R, n, [names=None])

Returns the free algebra on $ n$ generators.

sage: F = FreeAlgebra(QQ,ZZ(3),names=("x","y","z"))
sage: mul([ F.gen(i) for i in range(3) ])
x*y*z
sage: mul([ F.gen(i%3) for i in range(12) ])
x*y*z*x*y*z*x*y*z*x*y*z
sage: (x,y,z) = F.gens()
sage: (2 + x*z + x**2)**2 + (x - y)**2
4 + 3*x^2 - x*y + 2*x*z - y*x + y^2 + x^4 + x^3*z + x*z*x^2 + x*z*x*z

Instances of class FreeAlgebra have the following methods (in addition to inherited methods and special methods):

assign_names,$  $ base_ring,$  $ gen,$  $ monoid,$  $ ngens

Further documentation:

assign_names( names)

Assign the printing names for the generators; this will have the unfortunate effect of overwriting the names for the covering algebra; this also does not overwrite the return value of names() for the Algebra.

gen( i)

The i-th generator of the algebra.

monoid( )

The free monoid of generators of the algebra.

ngens( )

The number of generators of the algebra.

Instances of class FreeAlgebra also have the following special methods:

__call__,$  $ __contains__,$  $ __repr__

See About this document... for information on suggesting changes.