Free algebra elements#
AUTHORS:
David Kohel (2005-09)
- class sage.algebras.free_algebra_element.FreeAlgebraElement(A, x)#
Bases:
IndexedFreeModuleElement
,AlgebraElement
A free algebra element.
- is_unit()#
Return
True
ifself
is invertible.EXAMPLES:
sage: A.<x, y, z> = FreeAlgebra(ZZ) sage: A(-1).is_unit() True sage: A(2).is_unit() False sage: A(1 + x).is_unit() False sage: A.<x, y> = FreeAlgebra(QQ, degrees=(1,-1)) sage: A(x * y).is_unit() False sage: A(2).is_unit() True
- to_pbw_basis()#
Return
self
in the Poincaré-Birkhoff-Witt (PBW) basis.EXAMPLES:
sage: F.<x,y,z> = FreeAlgebra(ZZ, 3) sage: p = x^2*y + 3*y*x + 2 sage: p.to_pbw_basis() 2*PBW[1] + 3*PBW[y]*PBW[x] + PBW[x^2*y] + 2*PBW[x*y]*PBW[x] + PBW[y]*PBW[x]^2
- variables()#
Return the variables used in
self
.EXAMPLES:
sage: A.<x,y,z> = FreeAlgebra(ZZ,3) sage: elt = x + x*y + x^3*y sage: elt.variables() [x, y] sage: elt = x + x^2 - x^4 sage: elt.variables() [x] sage: elt = x + z*y + z*x sage: elt.variables() [x, y, z]