Clifford Algebras

AUTHORS:

  • Travis Scrimshaw (2013-09-06): Initial version
sage.algebras.clifford_algebra.CliffordAlgebra

The Clifford algebra of a quadratic form.

Let \(Q : V \to \mathbf{k}\) denote a quadratic form on a vector space \(V\) over a field \(\mathbf{k}\). The Clifford algebra \(Cl(V, Q)\) is defined as \(T(V) / I_Q\) where \(T(V)\) is the tensor algebra of \(V\) and \(I_Q\) is the two-sided ideal generated by all elements of the form \(v \otimes v - Q(v)\) for all \(v \in V\).

We abuse notation to denote the projection of a pure tensor \(x_1 \otimes x_2 \otimes \cdots \otimes x_m \in T(V)\) onto \(T(V) / I_Q = Cl(V, Q)\) by \(x_1 \wedge x_2 \wedge \cdots \wedge x_m\). This is motivated by the fact that \(Cl(V, Q)\) is the exterior algebra \(\wedge V\) when \(Q = 0\) (one can also think of a Clifford algebra as a quantization of the exterior algebra). See ExteriorAlgebra for the concept of an exterior algebra.

From the definition, a basis of \(Cl(V, Q)\) is given by monomials of the form

\[\{ e_{i_1} \wedge \cdots \wedge e_{i_k} \mid 1 \leq i_1 < \cdots < i_k \leq n \},\]

where \(n = \dim(V)\) and where \(\{ e_1, e_2, \cdots, e_n \}\) is any fixed basis of \(V\). Hence

\[\dim(Cl(V, Q)) = \sum_{k=0}^n \binom{n}{k} = 2^n.\]

Note

The algebra \(Cl(V, Q)\) is a \(\ZZ / 2\ZZ\)-graded algebra, but not (in general) \(\ZZ\)-graded (in a reasonable way).

This construction satisfies the following universal property. Let \(i : V \to Cl(V, Q)\) denote the natural inclusion (which is an embedding). Then for every associative \(\mathbf{k}\)-algebra \(A\) and any \(\mathbf{k}\)-linear map \(j : V \to A\) satisfying

\[j(v)^2 = Q(v) \cdot 1_A\]

for all \(v \in V\), there exists a unique \(\mathbf{k}\)-algebra homomorphism \(f : Cl(V, Q) \to A\) such that \(f \circ i = j\). This property determines the Clifford algebra uniquely up to canonical isomorphism. The inclusion \(i\) is commonly used to identify \(V\) with a vector subspace of \(Cl(V)\).

The Clifford algebra \(Cl(V, Q)\) is a \(\ZZ_2\)-graded algebra (where \(\ZZ_2 = \ZZ / 2 \ZZ\)); this grading is determined by placing all elements of \(V\) in degree \(1\). It is also an \(\NN\)-filtered algebra, with the filtration too being defined by placing all elements of \(V\) in degree \(1\). The degree() gives the \(\NN\)-filtration degree, and to get the super degree use instead is_even_odd().

The Clifford algebra also can be considered as a covariant functor from the category of vector spaces equipped with quadratic forms to the category of algebras. In fact, if \((V, Q)\) and \((W, R)\) are two vector spaces endowed with quadratic forms, and if \(g : W \to V\) is a linear map preserving the quadratic form, then we can define an algebra morphism \(Cl(g) : Cl(W, R) \to Cl(V, Q)\) by requiring that it send every \(w \in W\) to \(g(w) \in V\). Since the quadratic form \(R\) on \(W\) is uniquely determined by the quadratic form \(Q\) on \(V\) (due to the assumption that \(g\) preserves the quadratic form), this fact can be rewritten as follows: If \((V, Q)\) is a vector space with a quadratic form, and \(W\) is another vector space, and \(\phi : W \to V\) is any linear map, then we obtain an algebra morphism \(Cl(\phi) : Cl(W, \phi(Q)) \to Cl(V, Q)\) where \(\phi(Q) = \phi^T \cdot Q \cdot \phi\) (we consider \(\phi\) as a matrix) is the quadratic form \(Q\) pulled back to \(W\). In fact, the map \(\phi\) preserves the quadratic form because of

\[\phi(Q)(x) = x^T \cdot \phi^T \cdot Q \cdot \phi \cdot x = (\phi \cdot x)^T \cdot Q \cdot (\phi \cdot x) = Q(\phi(x)).\]

Hence we have \(\phi(w)^2 = Q(\phi(w)) = \phi(Q)(w)\) for all \(w \in W\).

REFERENCES:

INPUT:

  • Q – a quadratic form
  • names – (default: 'e') the generator names

EXAMPLES:

To create a Clifford algebra, all one needs to do is specify a quadratic form:

sage: Q = QuadraticForm(ZZ, 3, [1,2,3,4,5,6])
sage: Cl = CliffordAlgebra(Q)
sage: Cl
The Clifford algebra of the Quadratic form in 3 variables
 over Integer Ring with coefficients:
[ 1 2 3 ]
[ * 4 5 ]
[ * * 6 ]

We can also explicitly name the generators. In this example, the Clifford algebra we construct is an exterior algebra (since we choose the quadratic form to be zero):

sage: Q = QuadraticForm(ZZ, 4, [0]*10)
sage: Cl.<a,b,c,d> = CliffordAlgebra(Q)
sage: a*d
a*d
sage: d*c*b*a + a + 4*b*c
a*b*c*d + 4*b*c + a
class sage.algebras.clifford_algebra.CliffordAlgebraElement

Bases: sage.modules.with_basis.indexed_element.IndexedFreeModuleElement

An 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 reflection automorphism and \(t\) the transposition.

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
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 reflection automorphism and \(t\) the transposition.

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
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 for reflection().

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
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()
[((0,), 5), ((1,), 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 for reflection().

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
supercommutator(x)

Return the supercommutator of self and x.

Let \(A\) be a superalgebra. The supercommutator of homogeneous elements \(x, y \in A\) is defined by

\[[x, y\} = x y - (-1)^{|x| |y|} y x\]

and extended to all elements by linearity.

EXAMPLES:

sage: Q = QuadraticForm(ZZ, 3, [1,2,3,4,5,6])
sage: Cl.<x,y,z> = CliffordAlgebra(Q)
sage: a = x*y - z
sage: b = x - y + y*z
sage: a.supercommutator(b)
-5*x*y + 8*x*z - 2*y*z - 6*x + 12*y - 5*z
sage: a.supercommutator(Cl.one())
0
sage: Cl.one().supercommutator(a)
0
sage: Cl.zero().supercommutator(a)
0
sage: a.supercommutator(Cl.zero())
0

sage: Q = QuadraticForm(ZZ, 2, [-1,1,-3])
sage: Cl.<x,y> = CliffordAlgebra(Q)
sage: [a.supercommutator(b) for a in Cl.basis() for b in Cl.basis()]
[0, 0, 0, 0, 0, -2, 1, -x - 2*y, 0, 1,
 -6, 6*x + y, 0, x + 2*y, -6*x - y, 0]
sage: [a*b-b*a for a in Cl.basis() for b in Cl.basis()]
[0, 0, 0, 0, 0, 0, 2*x*y - 1, -x - 2*y, 0,
 -2*x*y + 1, 0, 6*x + y, 0, x + 2*y, -6*x - y, 0]

Exterior algebras inherit from Clifford algebras, so supercommutators work as well. We verify the exterior algebra is supercommutative:

sage: E.<x,y,z,w> = ExteriorAlgebra(QQ)
sage: all(b1.supercommutator(b2) == 0
....:     for b1 in E.basis() for b2 in E.basis())
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()
[(0,), (1,)]
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
sage.algebras.clifford_algebra.ExteriorAlgebra

An exterior algebra of a free module over a commutative ring.

Let \(V\) be a module over a commutative ring \(R\). The exterior algebra (or Grassmann algebra) \(\Lambda(V)\) of \(V\) is defined as the quotient of the tensor algebra \(T(V)\) of \(V\) modulo the two-sided ideal generated by all tensors of the form \(x \otimes x\) with \(x \in V\). The multiplication on \(\Lambda(V)\) is denoted by \(\wedge\) (so \(v_1 \wedge v_2 \wedge \cdots \wedge v_n\) is the projection of \(v_1 \otimes v_2 \otimes \cdots \otimes v_n\) onto \(\Lambda(V)\)) and called the “exterior product” or “wedge product”.

If \(V\) is a rank-\(n\) free \(R\)-module with a basis \(\{e_1, \ldots, e_n\}\), then \(\Lambda(V)\) is the \(R\)-algebra noncommutatively generated by the \(n\) generators \(e_1, \ldots, e_n\) subject to the relations \(e_i^2 = 0\) for all \(i\), and \(e_i e_j = - e_j e_i\) for all \(i < j\). As an \(R\)-module, \(\Lambda(V)\) then has a basis \((\bigwedge_{i \in I} e_i)\) with \(I\) ranging over the subsets of \(\{1, 2, \ldots, n\}\) (where \(\bigwedge_{i \in I} e_i\) is the wedge product of \(e_i\) for \(i\) running through all elements of \(I\) from smallest to largest), and hence is free of rank \(2^n\).

The exterior algebra of an \(R\)-module \(V\) can also be realized as the Clifford algebra of \(V\) for the quadratic form \(Q\) given by \(Q(v) = 0\) for all vectors \(v \in V\). See CliffordAlgebra for the notion of a Clifford algebra.

The exterior algebra of an \(R\)-module \(V\) is a connected \(\ZZ\)-graded Hopf superalgebra. It is commutative in the super sense (i.e., the odd elements anticommute and square to \(0\)).

This class implements the exterior algebra \(\Lambda(R^n)\) for \(n\) a nonnegative integer.

Warning

We initialize the exterior algebra as an object of the category of Hopf algebras, but this is not really correct, since it is a Hopf superalgebra with the odd-degree components forming the odd part. So use Hopf-algebraic methods with care!

INPUT:

  • R – the base ring, or the free module whose exterior algebra is to be computed
  • names – a list of strings to name the generators of the exterior algebra; this list can either have one entry only (in which case the generators will be called e + '0', e + '1', …, e + 'n-1', with e being said entry), or have n entries (in which case these entries will be used directly as names for the generators)
  • n – the number of generators, i.e., the rank of the free module whose exterior algebra is to be computed (this doesn’t have to be provided if it can be inferred from the rest of the input)

REFERENCES:

sage.algebras.clifford_algebra.ExteriorAlgebraBoundary

The boundary \(\partial\) of an exterior algebra \(\Lambda(L)\) defined by the structure coefficients of \(L\).

Let \(L\) be a Lie algebra. We give the exterior algebra \(E = \Lambda(L)\) a chain complex structure by considering a differential \(\partial : \Lambda^{k+1}(L) \to \Lambda^k(L)\) defined by

\[\partial(x_1 \wedge x_2 \wedge \cdots \wedge x_{k+1}) = \sum_{i < j} (-1)^{i+j+1} [x_i, x_j] \wedge x_1 \wedge \cdots \wedge \hat{x}_i \wedge \cdots \wedge \hat{x}_j \wedge \cdots \wedge x_{k+1}\]

where \(\hat{x}_i\) denotes a missing index. The corresponding homology is the Lie algebra homology.

INPUT:

  • E – an exterior algebra of a vector space \(L\)
  • s_coeff – a dictionary whose keys are in \(I \times I\), where \(I\) is the index set of the basis of the vector space \(L\), and whose values can be coerced into 1-forms (degree 1 elements) in E; this dictionary will be used to define the Lie algebra structure on \(L\) (indeed, the \(i\)-th coordinate of the Lie bracket of the \(j\)-th and \(k\)-th basis vectors of \(L\) for \(j < k\) is set to be the value at the key \((j, k)\) if this key appears in s_coeff, or otherwise the negated of the value at the key \((k, j)\))

Warning

The values of s_coeff are supposed to be coercible into 1-forms in E; but they can also be dictionaries themselves (in which case they are interpreted as giving the coordinates of vectors in L). In the interest of speed, these dictionaries are not sanitized or checked.

Warning

For any two distinct elements \(i\) and \(j\) of \(I\), the dictionary s_coeff must have only one of the pairs \((i, j)\) and \((j, i)\) as a key. This is not checked.

EXAMPLES:

We consider the differential given by Lie algebra given by the cross product \(\times\) of \(\RR^3\):

sage: E.<x,y,z> = ExteriorAlgebra(QQ)
sage: par = E.boundary({(0,1): z, (1,2): x, (2,0): y})
sage: par(x)
0
sage: par(x*y)
z
sage: par(x*y*z)
0
sage: par(x+y-y*z+x*y)
-x + z
sage: par(E.zero())
0

We check that \(\partial \circ \partial = 0\):

sage: p2 = par * par
sage: all(p2(b) == 0 for b in E.basis())
True

Another example: the Lie algebra \(\mathfrak{sl}_2\), which has a basis \(e,f,h\) satisfying \([h,e] = 2e\), \([h,f] = -2f\), and \([e,f] = h\):

sage: E.<e,f,h> = ExteriorAlgebra(QQ)
sage: par = E.boundary({(0,1): h, (2,1): -2*f, (2,0): 2*e})
sage: par(E.zero())
0
sage: par(e)
0
sage: par(e*f)
h
sage: par(f*h)
2*f
sage: par(h*f)
-2*f
sage: C = par.chain_complex(); C
Chain complex with at most 4 nonzero terms over Rational Field
sage: ascii_art(C)
                          [ 0 -2  0]       [0]
                          [ 0  0  2]       [0]
            [0 0 0]       [ 1  0  0]       [0]
 0 <-- C_0 <-------- C_1 <----------- C_2 <---- C_3 <-- 0
sage: C.homology()
{0: Vector space of dimension 1 over Rational Field,
 1: Vector space of dimension 0 over Rational Field,
 2: Vector space of dimension 0 over Rational Field,
 3: Vector space of dimension 1 over Rational Field}

Over the integers:

sage: C = par.chain_complex(R=ZZ); C
Chain complex with at most 4 nonzero terms over Integer Ring
sage: ascii_art(C)
                          [ 0 -2  0]       [0]
                          [ 0  0  2]       [0]
            [0 0 0]       [ 1  0  0]       [0]
 0 <-- C_0 <-------- C_1 <----------- C_2 <---- C_3 <-- 0
sage: C.homology()
{0: Z, 1: C2 x C2, 2: 0, 3: Z}

REFERENCES:

sage.algebras.clifford_algebra.ExteriorAlgebraCoboundary

The coboundary \(d\) of an exterior algebra \(\Lambda(L)\) defined by the structure coefficients of a Lie algebra \(L\).

Let \(L\) be a Lie algebra. We endow its exterior algebra \(E = \Lambda(L)\) with a cochain complex structure by considering a differential \(d : \Lambda^k(L) \to \Lambda^{k+1}(L)\) defined by

\[d x_i = \sum_{j < k} s_{jk}^i x_j x_k,\]

where \((x_1, x_2, \ldots, x_n)\) is a basis of \(L\), and where \(s_{jk}^i\) is the \(x_i\)-coordinate of the Lie bracket \([x_j, x_k]\).

The corresponding cohomology is the Lie algebra cohomology of \(L\).

This can also be thought of as the exterior derivative, in which case the resulting cohomology is the de Rham cohomology of a manifold whose exterior algebra of differential forms is E.

INPUT:

  • E – an exterior algebra of a vector space \(L\)
  • s_coeff – a dictionary whose keys are in \(I \times I\), where \(I\) is the index set of the basis of the vector space \(L\), and whose values can be coerced into 1-forms (degree 1 elements) in E; this dictionary will be used to define the Lie algebra structure on \(L\) (indeed, the \(i\)-th coordinate of the Lie bracket of the \(j\)-th and \(k\)-th basis vectors of \(L\) for \(j < k\) is set to be the value at the key \((j, k)\) if this key appears in s_coeff, or otherwise the negated of the value at the key \((k, j)\))

Warning

For any two distinct elements \(i\) and \(j\) of \(I\), the dictionary s_coeff must have only one of the pairs \((i, j)\) and \((j, i)\) as a key. This is not checked.

EXAMPLES:

We consider the differential coming from the Lie algebra given by the cross product \(\times\) of \(\RR^3\):

sage: E.<x,y,z> = ExteriorAlgebra(QQ)
sage: d = E.coboundary({(0,1): z, (1,2): x, (2,0): y})
sage: d(x)
y^z
sage: d(y)
-x^z
sage: d(x+y-y*z)
-x^z + y^z
sage: d(x*y)
0
sage: d(E.one())
0
sage: d(E.zero())
0

We check that \(d \circ d = 0\):

sage: d2 = d * d
sage: all(d2(b) == 0 for b in E.basis())
True

Another example: the Lie algebra \(\mathfrak{sl}_2\), which has a basis \(e,f,h\) satisfying \([h,e] = 2e\), \([h,f] = -2f\), and \([e,f] = h\):

sage: E.<e,f,h> = ExteriorAlgebra(QQ)
sage: d = E.coboundary({(0,1): h, (2,1): -2*f, (2,0): 2*e})
sage: d(E.zero())
0
sage: d(e)
-2*e^h
sage: d(f)
2*f^h
sage: d(h)
e^f
sage: d(e*f)
0
sage: d(f*h)
0
sage: d(e*h)
0
sage: C = d.chain_complex(); C
Chain complex with at most 4 nonzero terms over Rational Field
sage: ascii_art(C)
                          [ 0  0  1]       [0]
                          [-2  0  0]       [0]
            [0 0 0]       [ 0  2  0]       [0]
 0 <-- C_3 <-------- C_2 <----------- C_1 <---- C_0 <-- 0
sage: C.homology()
{0: Vector space of dimension 1 over Rational Field,
 1: Vector space of dimension 0 over Rational Field,
 2: Vector space of dimension 0 over Rational Field,
 3: Vector space of dimension 1 over Rational Field}

Over the integers:

sage: C = d.chain_complex(R=ZZ); C
Chain complex with at most 4 nonzero terms over Integer Ring
sage: ascii_art(C)
                          [ 0  0  1]       [0]
                          [-2  0  0]       [0]
            [0 0 0]       [ 0  2  0]       [0]
 0 <-- C_3 <-------- C_2 <----------- C_1 <---- C_0 <-- 0
sage: C.homology()
{0: Z, 1: 0, 2: C2 x C2, 3: Z}

REFERENCES:

sage.algebras.clifford_algebra.ExteriorAlgebraDifferential

Internal class to store the data of a boundary or coboundary of an exterior algebra \(\Lambda(L)\) defined by the structure coefficients of a Lie algebra \(L\).

See ExteriorAlgebraBoundary and ExteriorAlgebraCoboundary for the actual classes, which inherit from this.

Warning

This is not a general class for differentials on the exterior algebra.