Clifford algebra elements¶
AUTHORS:
Travis Scrimshaw (2013-09-06): Initial version
Trevor Karn (2022-07-10): Rewrite multiplication using bitsets
- class sage.algebras.clifford_algebra_element.CliffordAlgebraElement[source]¶
Bases:
IndexedFreeModuleElement
An element in a Clifford algebra.
- clifford_conjugate()[source]¶
Return the Clifford conjugate of
self
.The Clifford conjugate of an element
of a Clifford algebra is defined aswhere
denotes thereflection
automorphism and thetransposition
.EXAMPLES:
sage: Q = QuadraticForm(ZZ, 3, [1,2,3,4,5,6]) sage: Cl.<x,y,z> = CliffordAlgebra(Q) sage: elt = 5*x + y + x*z sage: c = elt.conjugate(); c -x*z - 5*x - y + 3 sage: c.conjugate() == elt True
>>> from sage.all import * >>> Q = QuadraticForm(ZZ, Integer(3), [Integer(1),Integer(2),Integer(3),Integer(4),Integer(5),Integer(6)]) >>> Cl = CliffordAlgebra(Q, names=('x', 'y', 'z',)); (x, y, z,) = Cl._first_ngens(3) >>> elt = Integer(5)*x + y + x*z >>> c = elt.conjugate(); c -x*z - 5*x - y + 3 >>> c.conjugate() == elt True
Q = QuadraticForm(ZZ, 3, [1,2,3,4,5,6]) Cl.<x,y,z> = CliffordAlgebra(Q) elt = 5*x + y + x*z c = elt.conjugate(); c c.conjugate() == elt
- conjugate()[source]¶
Return the Clifford conjugate of
self
.The Clifford conjugate of an element
of a Clifford algebra is defined aswhere
denotes thereflection
automorphism and thetransposition
.EXAMPLES:
sage: Q = QuadraticForm(ZZ, 3, [1,2,3,4,5,6]) sage: Cl.<x,y,z> = CliffordAlgebra(Q) sage: elt = 5*x + y + x*z sage: c = elt.conjugate(); c -x*z - 5*x - y + 3 sage: c.conjugate() == elt True
>>> from sage.all import * >>> Q = QuadraticForm(ZZ, Integer(3), [Integer(1),Integer(2),Integer(3),Integer(4),Integer(5),Integer(6)]) >>> Cl = CliffordAlgebra(Q, names=('x', 'y', 'z',)); (x, y, z,) = Cl._first_ngens(3) >>> elt = Integer(5)*x + y + x*z >>> c = elt.conjugate(); c -x*z - 5*x - y + 3 >>> c.conjugate() == elt True
Q = QuadraticForm(ZZ, 3, [1,2,3,4,5,6]) Cl.<x,y,z> = CliffordAlgebra(Q) elt = 5*x + y + x*z c = elt.conjugate(); c c.conjugate() == elt
- degree_negation()[source]¶
Return the image of the reflection automorphism on
self
.The reflection automorphism of a Clifford algebra is defined as the linear endomorphism of this algebra which maps
It is an algebra automorphism of the Clifford algebra.
degree_negation()
is an alias forreflection()
.EXAMPLES:
sage: Q = QuadraticForm(ZZ, 3, [1,2,3,4,5,6]) sage: Cl.<x,y,z> = CliffordAlgebra(Q) sage: elt = 5*x + y + x*z sage: r = elt.reflection(); r x*z - 5*x - y sage: r.reflection() == elt True
>>> from sage.all import * >>> Q = QuadraticForm(ZZ, Integer(3), [Integer(1),Integer(2),Integer(3),Integer(4),Integer(5),Integer(6)]) >>> Cl = CliffordAlgebra(Q, names=('x', 'y', 'z',)); (x, y, z,) = Cl._first_ngens(3) >>> elt = Integer(5)*x + y + x*z >>> r = elt.reflection(); r x*z - 5*x - y >>> r.reflection() == elt True
Q = QuadraticForm(ZZ, 3, [1,2,3,4,5,6]) Cl.<x,y,z> = CliffordAlgebra(Q) elt = 5*x + y + x*z r = elt.reflection(); r r.reflection() == elt
- list()[source]¶
Return the list of monomials and their coefficients in
self
(as a list of -tuples, each of which has the form(monomial, coefficient)
).EXAMPLES:
sage: Q = QuadraticForm(ZZ, 3, [1,2,3,4,5,6]) sage: Cl.<x,y,z> = CliffordAlgebra(Q) sage: elt = 5*x + y sage: elt.list() [(1, 5), (01, 1)]
>>> from sage.all import * >>> Q = QuadraticForm(ZZ, Integer(3), [Integer(1),Integer(2),Integer(3),Integer(4),Integer(5),Integer(6)]) >>> Cl = CliffordAlgebra(Q, names=('x', 'y', 'z',)); (x, y, z,) = Cl._first_ngens(3) >>> elt = Integer(5)*x + y >>> elt.list() [(1, 5), (01, 1)]
Q = QuadraticForm(ZZ, 3, [1,2,3,4,5,6]) Cl.<x,y,z> = CliffordAlgebra(Q) elt = 5*x + y elt.list()
- reflection()[source]¶
Return the image of the reflection automorphism on
self
.The reflection automorphism of a Clifford algebra is defined as the linear endomorphism of this algebra which maps
It is an algebra automorphism of the Clifford algebra.
degree_negation()
is an alias forreflection()
.EXAMPLES:
sage: Q = QuadraticForm(ZZ, 3, [1,2,3,4,5,6]) sage: Cl.<x,y,z> = CliffordAlgebra(Q) sage: elt = 5*x + y + x*z sage: r = elt.reflection(); r x*z - 5*x - y sage: r.reflection() == elt True
>>> from sage.all import * >>> Q = QuadraticForm(ZZ, Integer(3), [Integer(1),Integer(2),Integer(3),Integer(4),Integer(5),Integer(6)]) >>> Cl = CliffordAlgebra(Q, names=('x', 'y', 'z',)); (x, y, z,) = Cl._first_ngens(3) >>> elt = Integer(5)*x + y + x*z >>> r = elt.reflection(); r x*z - 5*x - y >>> r.reflection() == elt True
Q = QuadraticForm(ZZ, 3, [1,2,3,4,5,6]) Cl.<x,y,z> = CliffordAlgebra(Q) elt = 5*x + y + x*z r = elt.reflection(); r r.reflection() == elt
- support()[source]¶
Return the support of
self
.This is the list of all monomials which appear with nonzero coefficient in
self
.EXAMPLES:
sage: Q = QuadraticForm(ZZ, 3, [1,2,3,4,5,6]) sage: Cl.<x,y,z> = CliffordAlgebra(Q) sage: elt = 5*x + y sage: elt.support() [1, 01]
>>> from sage.all import * >>> Q = QuadraticForm(ZZ, Integer(3), [Integer(1),Integer(2),Integer(3),Integer(4),Integer(5),Integer(6)]) >>> Cl = CliffordAlgebra(Q, names=('x', 'y', 'z',)); (x, y, z,) = Cl._first_ngens(3) >>> elt = Integer(5)*x + y >>> elt.support() [1, 01]
Q = QuadraticForm(ZZ, 3, [1,2,3,4,5,6]) Cl.<x,y,z> = CliffordAlgebra(Q) elt = 5*x + y elt.support()
- transpose()[source]¶
Return the transpose of
self
.The transpose is an anti-algebra involution of a Clifford algebra and is defined (using linearity) by
EXAMPLES:
sage: Q = QuadraticForm(ZZ, 3, [1,2,3,4,5,6]) sage: Cl.<x,y,z> = CliffordAlgebra(Q) sage: elt = 5*x + y + x*z sage: t = elt.transpose(); t -x*z + 5*x + y + 3 sage: t.transpose() == elt True sage: Cl.one().transpose() 1
>>> from sage.all import * >>> Q = QuadraticForm(ZZ, Integer(3), [Integer(1),Integer(2),Integer(3),Integer(4),Integer(5),Integer(6)]) >>> Cl = CliffordAlgebra(Q, names=('x', 'y', 'z',)); (x, y, z,) = Cl._first_ngens(3) >>> elt = Integer(5)*x + y + x*z >>> t = elt.transpose(); t -x*z + 5*x + y + 3 >>> t.transpose() == elt True >>> Cl.one().transpose() 1
Q = QuadraticForm(ZZ, 3, [1,2,3,4,5,6]) Cl.<x,y,z> = CliffordAlgebra(Q) elt = 5*x + y + x*z t = elt.transpose(); t t.transpose() == elt Cl.one().transpose()
- class sage.algebras.clifford_algebra_element.CohomologyRAAGElement[source]¶
Bases:
CliffordAlgebraElement
An element in the cohomology of a right-angled Artin group.
See also
- class sage.algebras.clifford_algebra_element.ExteriorAlgebraElement[source]¶
Bases:
CliffordAlgebraElement
An element of an exterior algebra.
- antiderivation(x)[source]¶
Return the interior product (also known as antiderivation) of
self
with respect tox
(that is, the element of the exterior algebra).If
is an -module, and if is a fixed element of , then the interior product with respect to is an -linear map , determined by the following requirements: for all ,it is a graded derivation of degree
: all and in satisfy
It can be shown that this map
is graded of degree (that is, sends into for every ).When
is a finite free -module, the interior product can also be defined bywhere
is thought of as an alternating multilinear mapping from to .Since Sage is only dealing with exterior powers of modules of the form
for some nonnegative integer , the element can be thought of as an element of (by identifying the standard basis of with its dual basis). This is how should be passed to this method.We then extend the interior product to all
byINPUT:
x
– element of (or coercing into) (for example, an element of ); this plays the role of in the above definition
EXAMPLES:
sage: E.<x,y,z> = ExteriorAlgebra(QQ) sage: x.interior_product(x) 1 sage: (x + x*y).interior_product(2*y) -2*x sage: (x*z + x*y*z).interior_product(2*y - x) -2*x*z - y*z - z sage: x.interior_product(E.one()) x sage: E.one().interior_product(x) 0 sage: x.interior_product(E.zero()) 0 sage: E.zero().interior_product(x) 0
>>> from sage.all import * >>> E = ExteriorAlgebra(QQ, names=('x', 'y', 'z',)); (x, y, z,) = E._first_ngens(3) >>> x.interior_product(x) 1 >>> (x + x*y).interior_product(Integer(2)*y) -2*x >>> (x*z + x*y*z).interior_product(Integer(2)*y - x) -2*x*z - y*z - z >>> x.interior_product(E.one()) x >>> E.one().interior_product(x) 0 >>> x.interior_product(E.zero()) 0 >>> E.zero().interior_product(x) 0
E.<x,y,z> = ExteriorAlgebra(QQ) x.interior_product(x) (x + x*y).interior_product(2*y) (x*z + x*y*z).interior_product(2*y - x) x.interior_product(E.one()) E.one().interior_product(x) x.interior_product(E.zero()) E.zero().interior_product(x)
REFERENCES:
- constant_coefficient()[source]¶
Return the constant coefficient of
self
.Todo
Define a similar method for general Clifford algebras once the morphism to exterior algebras is implemented.
EXAMPLES:
sage: E.<x,y,z> = ExteriorAlgebra(QQ) sage: elt = 5*x + y + x*z + 10 sage: elt.constant_coefficient() 10 sage: x.constant_coefficient() 0
>>> from sage.all import * >>> E = ExteriorAlgebra(QQ, names=('x', 'y', 'z',)); (x, y, z,) = E._first_ngens(3) >>> elt = Integer(5)*x + y + x*z + Integer(10) >>> elt.constant_coefficient() 10 >>> x.constant_coefficient() 0
E.<x,y,z> = ExteriorAlgebra(QQ) elt = 5*x + y + x*z + 10 elt.constant_coefficient() x.constant_coefficient()
- hodge_dual()[source]¶
Return the Hodge dual of
self
.The Hodge dual of an element
of the exterior algebra is defined as , where is the volume form (volume_form()
) and denotes the antiderivation function with respect to (seeinterior_product()
for the definition of this).Note
The Hodge dual of the Hodge dual of a homogeneous element
of equals , where and .EXAMPLES:
sage: E.<x,y,z> = ExteriorAlgebra(QQ) sage: x.hodge_dual() y*z sage: (x*z).hodge_dual() -y sage: (x*y*z).hodge_dual() 1 sage: [a.hodge_dual().hodge_dual() for a in E.basis()] [1, x, y, z, x*y, x*z, y*z, x*y*z] sage: (x + x*y).hodge_dual() y*z + z sage: (x*z + x*y*z).hodge_dual() -y + 1 sage: E = ExteriorAlgebra(QQ, 'wxyz') sage: [a.hodge_dual().hodge_dual() for a in E.basis()] [1, -w, -x, -y, -z, w*x, w*y, w*z, x*y, x*z, y*z, -w*x*y, -w*x*z, -w*y*z, -x*y*z, w*x*y*z]
>>> from sage.all import * >>> E = ExteriorAlgebra(QQ, names=('x', 'y', 'z',)); (x, y, z,) = E._first_ngens(3) >>> x.hodge_dual() y*z >>> (x*z).hodge_dual() -y >>> (x*y*z).hodge_dual() 1 >>> [a.hodge_dual().hodge_dual() for a in E.basis()] [1, x, y, z, x*y, x*z, y*z, x*y*z] >>> (x + x*y).hodge_dual() y*z + z >>> (x*z + x*y*z).hodge_dual() -y + 1 >>> E = ExteriorAlgebra(QQ, 'wxyz') >>> [a.hodge_dual().hodge_dual() for a in E.basis()] [1, -w, -x, -y, -z, w*x, w*y, w*z, x*y, x*z, y*z, -w*x*y, -w*x*z, -w*y*z, -x*y*z, w*x*y*z]
E.<x,y,z> = ExteriorAlgebra(QQ) x.hodge_dual() (x*z).hodge_dual() (x*y*z).hodge_dual() [a.hodge_dual().hodge_dual() for a in E.basis()] (x + x*y).hodge_dual() (x*z + x*y*z).hodge_dual() E = ExteriorAlgebra(QQ, 'wxyz') [a.hodge_dual().hodge_dual() for a in E.basis()]
- interior_product(x)[source]¶
Return the interior product (also known as antiderivation) of
self
with respect tox
(that is, the element of the exterior algebra).If
is an -module, and if is a fixed element of , then the interior product with respect to is an -linear map , determined by the following requirements: for all ,it is a graded derivation of degree
: all and in satisfy
It can be shown that this map
is graded of degree (that is, sends into for every ).When
is a finite free -module, the interior product can also be defined bywhere
is thought of as an alternating multilinear mapping from to .Since Sage is only dealing with exterior powers of modules of the form
for some nonnegative integer , the element can be thought of as an element of (by identifying the standard basis of with its dual basis). This is how should be passed to this method.We then extend the interior product to all
byINPUT:
x
– element of (or coercing into) (for example, an element of ); this plays the role of in the above definition
EXAMPLES:
sage: E.<x,y,z> = ExteriorAlgebra(QQ) sage: x.interior_product(x) 1 sage: (x + x*y).interior_product(2*y) -2*x sage: (x*z + x*y*z).interior_product(2*y - x) -2*x*z - y*z - z sage: x.interior_product(E.one()) x sage: E.one().interior_product(x) 0 sage: x.interior_product(E.zero()) 0 sage: E.zero().interior_product(x) 0
>>> from sage.all import * >>> E = ExteriorAlgebra(QQ, names=('x', 'y', 'z',)); (x, y, z,) = E._first_ngens(3) >>> x.interior_product(x) 1 >>> (x + x*y).interior_product(Integer(2)*y) -2*x >>> (x*z + x*y*z).interior_product(Integer(2)*y - x) -2*x*z - y*z - z >>> x.interior_product(E.one()) x >>> E.one().interior_product(x) 0 >>> x.interior_product(E.zero()) 0 >>> E.zero().interior_product(x) 0
E.<x,y,z> = ExteriorAlgebra(QQ) x.interior_product(x) (x + x*y).interior_product(2*y) (x*z + x*y*z).interior_product(2*y - x) x.interior_product(E.one()) E.one().interior_product(x) x.interior_product(E.zero()) E.zero().interior_product(x)
REFERENCES:
- reduce(I, left=True)[source]¶
Reduce
self
with respect to the elements inI
.INPUT:
I
– list of exterior algebra elements or an idealleft
– boolean; if reduce as a left ideal (True
) or right ideal (False
), ignored ifI
is an ideal
EXAMPLES:
sage: E.<a,b,c,d> = ExteriorAlgebra(QQ) sage: f = (a + b*c) * d sage: f.reduce([a + b*c], True) 2*a*d sage: f.reduce([a + b*c], False) 0 sage: I = E.ideal([a + b*c]) sage: f.reduce(I) 0
>>> from sage.all import * >>> E = ExteriorAlgebra(QQ, names=('a', 'b', 'c', 'd',)); (a, b, c, d,) = E._first_ngens(4) >>> f = (a + b*c) * d >>> f.reduce([a + b*c], True) 2*a*d >>> f.reduce([a + b*c], False) 0 >>> I = E.ideal([a + b*c]) >>> f.reduce(I) 0
E.<a,b,c,d> = ExteriorAlgebra(QQ) f = (a + b*c) * d f.reduce([a + b*c], True) f.reduce([a + b*c], False) I = E.ideal([a + b*c]) f.reduce(I)
- scalar(other)[source]¶
Return the standard scalar product of
self
withother
.The standard scalar product of
is defined by , where denotes the degree-0 term of , and where denotes the transpose (transpose()
) of .Todo
Define a similar method for general Clifford algebras once the morphism to exterior algebras is implemented.
EXAMPLES:
sage: E.<x,y,z> = ExteriorAlgebra(QQ) sage: elt = 5*x + y + x*z sage: elt.scalar(z + 2*x) 0 sage: elt.transpose() * (z + 2*x) -2*x*y + 5*x*z + y*z
>>> from sage.all import * >>> E = ExteriorAlgebra(QQ, names=('x', 'y', 'z',)); (x, y, z,) = E._first_ngens(3) >>> elt = Integer(5)*x + y + x*z >>> elt.scalar(z + Integer(2)*x) 0 >>> elt.transpose() * (z + Integer(2)*x) -2*x*y + 5*x*z + y*z
E.<x,y,z> = ExteriorAlgebra(QQ) elt = 5*x + y + x*z elt.scalar(z + 2*x) elt.transpose() * (z + 2*x)