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¶
Bases:
IndexedFreeModuleElementAn element in a Clifford algebra.
- clifford_conjugate()¶
Return the Clifford conjugate of
self.The Clifford conjugate of an element \(x\) of a Clifford algebra is defined as
\[\bar{x} := \alpha(x^t) = \alpha(x)^t\]where \(\alpha\) denotes the
reflectionautomorphism and \(t\) 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
- conjugate()¶
Return the Clifford conjugate of
self.The Clifford conjugate of an element \(x\) of a Clifford algebra is defined as
\[\bar{x} := \alpha(x^t) = \alpha(x)^t\]where \(\alpha\) denotes the
reflectionautomorphism and \(t\) 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
- degree_negation()¶
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
\[x_1 \wedge x_2 \wedge \cdots \wedge x_m \mapsto (-1)^m x_1 \wedge x_2 \wedge \cdots \wedge x_m.\]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
- list()¶
Return the list of monomials and their coefficients in
self(as a list of \(2\)-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)]
- reflection()¶
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
\[x_1 \wedge x_2 \wedge \cdots \wedge x_m \mapsto (-1)^m x_1 \wedge x_2 \wedge \cdots \wedge x_m.\]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
- support()¶
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]
- transpose()¶
Return the transpose of
self.The transpose is an anti-algebra involution of a Clifford algebra and is defined (using linearity) by
\[x_1 \wedge x_2 \wedge \cdots \wedge x_m \mapsto x_m \wedge \cdots \wedge x_2 \wedge x_1.\]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
- class sage.algebras.clifford_algebra_element.CohomologyRAAGElement¶
Bases:
CliffordAlgebraElementAn element in the cohomology of a right-angled Artin group.
See also
- class sage.algebras.clifford_algebra_element.ExteriorAlgebraElement¶
Bases:
CliffordAlgebraElementAn element of an exterior algebra.
- antiderivation(x)¶
Return the interior product (also known as antiderivation) of
selfwith respect tox(that is, the element \(\iota_{x}(\text{self})\) of the exterior algebra).If \(V\) is an \(R\)-module, and if \(\alpha\) is a fixed element of \(V^*\), then the interior product with respect to \(\alpha\) is an \(R\)-linear map \(i_{\alpha} \colon \Lambda(V) \to \Lambda(V)\), determined by the following requirements:
\(i_{\alpha}(v) = \alpha(v)\) for all \(v \in V = \Lambda^1(V)\),
it is a graded derivation of degree \(-1\): all \(x\) and \(y\) in \(\Lambda(V)\) satisfy
\[i_{\alpha}(x \wedge y) = (i_{\alpha} x) \wedge y + (-1)^{\deg x} x \wedge (i_{\alpha} y).\]It can be shown that this map \(i_{\alpha}\) is graded of degree \(-1\) (that is, sends \(\Lambda^k(V)\) into \(\Lambda^{k-1}(V)\) for every \(k\)).
When \(V\) is a finite free \(R\)-module, the interior product can also be defined by
\[(i_{\alpha} \omega)(u_1, \ldots, u_k) = \omega(\alpha, u_1, \ldots, u_k),\]where \(\omega \in \Lambda^k(V)\) is thought of as an alternating multilinear mapping from \(V^* \times \cdots \times V^*\) to \(R\).
Since Sage is only dealing with exterior powers of modules of the form \(R^d\) for some nonnegative integer \(d\), the element \(\alpha \in V^*\) can be thought of as an element of \(V\) (by identifying the standard basis of \(V = R^d\) with its dual basis). This is how \(\alpha\) should be passed to this method.
We then extend the interior product to all \(\alpha \in \Lambda (V^*)\) by
\[i_{\beta \wedge \gamma} = i_{\gamma} \circ i_{\beta}.\]INPUT:
x– element of (or coercing into) \(\Lambda^1(V)\) (for example, an element of \(V\)); this plays the role of \(\alpha\) 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
REFERENCES:
- constant_coefficient()¶
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
- hodge_dual()¶
Return the Hodge dual of
self.The Hodge dual of an element \(\alpha\) of the exterior algebra is defined as \(i_{\alpha} \sigma\), where \(\sigma\) is the volume form (
volume_form()) and \(i_{\alpha}\) denotes the antiderivation function with respect to \(\alpha\) (seeinterior_product()for the definition of this).Note
The Hodge dual of the Hodge dual of a homogeneous element \(p\) of \(\Lambda(V)\) equals \((-1)^{k(n-k)} p\), where \(n = \dim V\) and \(k = \deg(p) = |p|\).
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]
- interior_product(x)¶
Return the interior product (also known as antiderivation) of
selfwith respect tox(that is, the element \(\iota_{x}(\text{self})\) of the exterior algebra).If \(V\) is an \(R\)-module, and if \(\alpha\) is a fixed element of \(V^*\), then the interior product with respect to \(\alpha\) is an \(R\)-linear map \(i_{\alpha} \colon \Lambda(V) \to \Lambda(V)\), determined by the following requirements:
\(i_{\alpha}(v) = \alpha(v)\) for all \(v \in V = \Lambda^1(V)\),
it is a graded derivation of degree \(-1\): all \(x\) and \(y\) in \(\Lambda(V)\) satisfy
\[i_{\alpha}(x \wedge y) = (i_{\alpha} x) \wedge y + (-1)^{\deg x} x \wedge (i_{\alpha} y).\]It can be shown that this map \(i_{\alpha}\) is graded of degree \(-1\) (that is, sends \(\Lambda^k(V)\) into \(\Lambda^{k-1}(V)\) for every \(k\)).
When \(V\) is a finite free \(R\)-module, the interior product can also be defined by
\[(i_{\alpha} \omega)(u_1, \ldots, u_k) = \omega(\alpha, u_1, \ldots, u_k),\]where \(\omega \in \Lambda^k(V)\) is thought of as an alternating multilinear mapping from \(V^* \times \cdots \times V^*\) to \(R\).
Since Sage is only dealing with exterior powers of modules of the form \(R^d\) for some nonnegative integer \(d\), the element \(\alpha \in V^*\) can be thought of as an element of \(V\) (by identifying the standard basis of \(V = R^d\) with its dual basis). This is how \(\alpha\) should be passed to this method.
We then extend the interior product to all \(\alpha \in \Lambda (V^*)\) by
\[i_{\beta \wedge \gamma} = i_{\gamma} \circ i_{\beta}.\]INPUT:
x– element of (or coercing into) \(\Lambda^1(V)\) (for example, an element of \(V\)); this plays the role of \(\alpha\) 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
REFERENCES:
- reduce(I, left=True)¶
Reduce
selfwith 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 ifIis 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
- scalar(other)¶
Return the standard scalar product of
selfwithother.The standard scalar product of \(x, y \in \Lambda(V)\) is defined by \(\langle x, y \rangle = \langle x^t y \rangle\), where \(\langle a \rangle\) denotes the degree-0 term of \(a\), and where \(x^t\) denotes the transpose (
transpose()) of \(x\).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