AUTHORS:
Bases: sage.combinat.free_module.CombinatorialFreeModule
The Clifford algebra of a quadratic form.
Let denote a quadratic form on a vector space
over a field
. The Clifford algebra
is defined as
where
is the tensor algebra of
and
is the
two-sided ideal generated by all elements of the form
for all
.
We abuse notation to denote the projection of a pure tensor
onto
by
.
This is motivated by the fact that
is the exterior algebra
when
(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 is given by monomials of
the form
where and where
is any
fixed basis of
. Hence
Note
The algebra is a
-graded algebra, but not
(in general)
-graded (in a reasonable way).
This construction satisfies the following universal property. Let
denote the natural inclusion (which is an
embedding). Then for every associative
-algebra
and any
-linear map
satisfying
for all , there exists a unique
-algebra
homomorphism
such that
.
This property determines the Clifford algebra uniquely up to
canonical isomorphism. The inclusion
is commonly used to
identify
with a vector subspace of
.
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 and
are two vector spaces endowed with quadratic forms, and if
is a linear map preserving the quadratic form,
then we can define an algebra morphism
by requiring that it send every
to
. Since the quadratic form
on
is uniquely determined by the quadratic form
on
(due to
the assumption that
preserves the quadratic form), this fact
can be rewritten as follows: If
is a vector space with a
quadratic form, and
is another vector space, and
is any linear map, then we obtain an algebra
morphism
where
(we consider
as a
matrix) is the quadratic form
pulled back to
. In fact, the
map
preserves the quadratic form because of
Hence we have for all
.
REFERENCES:
INPUT:
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
Warning
The Clifford algebra is not graded, but instead filtered. This will be changed once trac ticket #17096 is finished.
alias of CliffordAlgebraElement
Return the algebra generators of self.
EXAMPLES:
sage: Q = QuadraticForm(ZZ, 3, [1,2,3,4,5,6])
sage: Cl.<x,y,z> = CliffordAlgebra(Q)
sage: Cl.algebra_generators()
Finite family {'y': y, 'x': x, 'z': z}
Return a list of elements which correspond to a basis for the center of self.
This assumes that the ground ring can be used to compute the kernel of a matrix.
See also
supercenter_basis(), http://math.stackexchange.com/questions/129183/center-of-clifford-algebra-depending-on-the-parity-of-dim-v
Todo
Deprecate this in favor of a method called once
subalgebras are properly implemented in Sage.
EXAMPLES:
sage: Q = QuadraticForm(QQ, 3, [1,2,3,4,5,6])
sage: Cl.<x,y,z> = CliffordAlgebra(Q)
sage: Z = Cl.center_basis(); Z
(1, -2/5*x*y*z + x - 3/5*y + 2/5*z)
sage: all(z*b - b*z == 0 for z in Z for b in Cl.basis())
True
sage: Q = QuadraticForm(QQ, 3, [1,-2,-3, 4, 2, 1])
sage: Cl.<x,y,z> = CliffordAlgebra(Q)
sage: Z = Cl.center_basis(); Z
(1, -x*y*z + x + 3/2*y - z)
sage: all(z*b - b*z == 0 for z in Z for b in Cl.basis())
True
sage: Q = QuadraticForm(QQ, 2, [1,-2,-3])
sage: Cl.<x,y> = CliffordAlgebra(Q)
sage: Cl.center_basis()
(1,)
sage: Q = QuadraticForm(QQ, 2, [-1,1,-3])
sage: Cl.<x,y> = CliffordAlgebra(Q)
sage: Cl.center_basis()
(1,)
A degenerate case:
sage: Q = QuadraticForm(QQ, 3, [4,4,-4,1,-2,1])
sage: Cl.<x,y,z> = CliffordAlgebra(Q)
sage: Cl.center_basis()
(1, x*y*z + x - 2*y - 2*z, x*y + x*z - 2*y*z)
The most degenerate case (the exterior algebra):
sage: Q = QuadraticForm(QQ, 3)
sage: Cl.<x,y,z> = CliffordAlgebra(Q)
sage: Cl.center_basis()
(1, x*y, x*z, y*z, x*y*z)
Return the degree of the monomial indexed by m.
This degree is a nonnegative integer, and should be interpreted
as a residue class modulo , since we consider self to be
-graded (not
-graded, although there is a natural
filtration by the length of m). The degree of the monomial
m in this
-grading is defined to be the length of m
taken mod
.
EXAMPLES:
sage: Q = QuadraticForm(ZZ, 3, [1,2,3,4,5,6])
sage: Cl.<x,y,z> = CliffordAlgebra(Q)
sage: Cl.degree_on_basis((0,))
1
sage: Cl.degree_on_basis((0,1))
0
Return the rank of self as a free module.
Let be a free
-module of rank
; then,
is a
free
-module of rank
.
EXAMPLES:
sage: Q = QuadraticForm(ZZ, 3, [1,2,3,4,5,6])
sage: Cl.<x,y,z> = CliffordAlgebra(Q)
sage: Cl.dimension()
8
Return the underlying free module of self.
This is the free module on which the quadratic form that was used to construct self is defined.
EXAMPLES:
sage: Q = QuadraticForm(ZZ, 3, [1,2,3,4,5,6])
sage: Cl.<x,y,z> = CliffordAlgebra(Q)
sage: Cl.free_module()
Ambient free module of rank 3 over the principal ideal domain Integer Ring
Return the i-th standard generator of the algebra self.
This is the i-th basis vector of the vector space on which the quadratic form defining self is defined, regarded as an element of self.
EXAMPLES:
sage: Q = QuadraticForm(ZZ, 3, [1,2,3,4,5,6])
sage: Cl.<x,y,z> = CliffordAlgebra(Q)
sage: [Cl.gen(i) for i in range(3)]
[x, y, z]
Return the generators of self (as an algebra).
EXAMPLES:
sage: Q = QuadraticForm(ZZ, 3, [1,2,3,4,5,6])
sage: Cl.<x,y,z> = CliffordAlgebra(Q)
sage: Cl.gens()
(x, y, z)
Check if self is a commutative algebra.
EXAMPLES:
sage: Q = QuadraticForm(ZZ, 3, [1,2,3,4,5,6])
sage: Cl.<x,y,z> = CliffordAlgebra(Q)
sage: Cl.is_commutative()
False
Lift an invertible isometry m of the quadratric form of self to a Clifford algebra morphism.
Given an invertible linear map (here represented by
a matrix acting on column vectors), this method returns the
algebra morphism
from
to
,
where
is the Clifford algebra self and where
is the pullback of the quadratic form
to
along
the inverse map
. See the documentation of
CliffordAlgebra for how this pullback and the morphism
are defined.
INPUT:
OUTPUT:
The algebra morphism from self to
.
EXAMPLES:
sage: Q = QuadraticForm(ZZ, 3, [1,2,3,4,5,6])
sage: Cl.<x,y,z> = CliffordAlgebra(Q)
sage: m = matrix([[1,1,2],[0,1,1],[0,0,1]])
sage: phi = Cl.lift_isometry(m, 'abc')
sage: phi(x)
a
sage: phi(y)
a + b
sage: phi(x*y)
a*b + 1
sage: phi(x) * phi(y)
a*b + 1
sage: phi(z*y)
a*b - a*c - b*c
sage: phi(z) * phi(y)
a*b - a*c - b*c
sage: phi(x + z) * phi(y + z) == phi((x + z) * (y + z))
True
Lift the matrix m to an algebra morphism of Clifford algebras.
Given a linear map (here represented by a matrix
acting on column vectors), this method returns the algebra
morphism
, where
is the Clifford algebra self and where
is the pullback
of the quadratic form
to
. See the documentation
of CliffordAlgebra for how this pullback and the
morphism
are defined.
Note
This is a map into self.
INPUT:
OUTPUT:
The algebra morphism from
to self.
EXAMPLES:
sage: Q = QuadraticForm(ZZ, 3, [1,2,3,4,5,6])
sage: Cl.<x,y,z> = CliffordAlgebra(Q)
sage: m = matrix([[1,-1,-1],[0,1,-1],[1,1,1]])
sage: phi = Cl.lift_module_morphism(m, 'abc')
sage: phi
Generic morphism:
From: The Clifford algebra of the Quadratic form in 3 variables over Integer Ring with coefficients:
[ 10 17 3 ]
[ * 11 0 ]
[ * * 5 ]
To: The Clifford algebra of the Quadratic form in 3 variables over Integer Ring with coefficients:
[ 1 2 3 ]
[ * 4 5 ]
[ * * 6 ]
sage: a,b,c = phi.domain().gens()
sage: phi(a)
x + z
sage: phi(b)
-x + y + z
sage: phi(c)
-x - y + z
sage: phi(a + 3*b)
-2*x + 3*y + 4*z
sage: phi(a) + 3*phi(b)
-2*x + 3*y + 4*z
sage: phi(a*b)
x*y + 2*x*z - y*z + 7
sage: phi(b*a)
-x*y - 2*x*z + y*z + 10
sage: phi(a*b + c)
x*y + 2*x*z - y*z - x - y + z + 7
sage: phi(a*b) + phi(c)
x*y + 2*x*z - y*z - x - y + z + 7
We check that the map is an algebra morphism:
sage: phi(a)*phi(b)
x*y + 2*x*z - y*z + 7
sage: phi(a*b)
x*y + 2*x*z - y*z + 7
sage: phi(a*a)
10
sage: phi(a)*phi(a)
10
sage: phi(b*a)
-x*y - 2*x*z + y*z + 10
sage: phi(b) * phi(a)
-x*y - 2*x*z + y*z + 10
sage: phi((a + b)*(a + c)) == phi(a + b) * phi(a + c)
True
We can also lift arbitrary linear maps:
sage: m = matrix([[1,1],[0,1],[1,1]])
sage: phi = Cl.lift_module_morphism(m, 'ab')
sage: a,b = phi.domain().gens()
sage: phi(a)
x + z
sage: phi(b)
x + y + z
sage: phi(a*b)
x*y - y*z + 15
sage: phi(a)*phi(b)
x*y - y*z + 15
sage: phi(b*a)
-x*y + y*z + 12
sage: phi(b)*phi(a)
-x*y + y*z + 12
sage: m = matrix([[1,1,1,2], [0,1,1,1], [0,1,1,1]])
sage: phi = Cl.lift_module_morphism(m, 'abcd')
sage: a,b,c,d = phi.domain().gens()
sage: phi(a)
x
sage: phi(b)
x + y + z
sage: phi(c)
x + y + z
sage: phi(d)
2*x + y + z
sage: phi(a*b*c + d*a)
-x*y - x*z + 21*x + 7
sage: phi(a*b*c*d)
21*x*y + 21*x*z + 42
Return the number of algebra generators of self.
EXAMPLES:
sage: Q = QuadraticForm(ZZ, 3, [1,2,3,4,5,6])
sage: Cl.<x,y,z> = CliffordAlgebra(Q)
sage: Cl.ngens()
3
Return the basis index of the element .
EXAMPLES:
sage: Q = QuadraticForm(ZZ, 3, [1,2,3,4,5,6])
sage: Cl.<x,y,z> = CliffordAlgebra(Q)
sage: Cl.one_basis()
()
Return the unit pseudoscalar of self.
Given the basis of the underlying
-module, the unit pseudoscalar is defined as
.
This depends on the choice of basis.
EXAMPLES:
sage: Q = QuadraticForm(ZZ, 3, [1,2,3,4,5,6])
sage: Cl.<x,y,z> = CliffordAlgebra(Q)
sage: Cl.pseudoscalar()
x*y*z
sage: Q = QuadraticForm(ZZ, 0, [])
sage: Cl = CliffordAlgebra(Q)
sage: Cl.pseudoscalar()
1
REFERENCES:
Return the quadratic form of self.
This is the quadratic form used to define self. The quadratic form on self is yet to be implemented.
EXAMPLES:
sage: Q = QuadraticForm(ZZ, 3, [1,2,3,4,5,6])
sage: Cl.<x,y,z> = CliffordAlgebra(Q)
sage: Cl.quadratic_form()
Quadratic form in 3 variables over Integer Ring with coefficients:
[ 1 2 3 ]
[ * 4 5 ]
[ * * 6 ]
Return a list of elements which correspond to a basis for the supercenter of self.
This assumes that the ground ring can be used to compute the kernel of a matrix.
See also
center_basis(), http://math.stackexchange.com/questions/129183/center-of-clifford-algebra-depending-on-the-parity-of-dim-v
Todo
Deprecate this in favor of a method called once
subalgebras are properly implemented in Sage.
EXAMPLES:
sage: Q = QuadraticForm(QQ, 3, [1,2,3,4,5,6])
sage: Cl.<x,y,z> = CliffordAlgebra(Q)
sage: SZ = Cl.supercenter_basis(); SZ
(1,)
sage: all(z.supercommutator(b) == 0 for z in SZ for b in Cl.basis())
True
sage: Q = QuadraticForm(QQ, 3, [1,-2,-3, 4, 2, 1])
sage: Cl.<x,y,z> = CliffordAlgebra(Q)
sage: Cl.supercenter_basis()
(1,)
sage: Q = QuadraticForm(QQ, 2, [1,-2,-3])
sage: Cl.<x,y> = CliffordAlgebra(Q)
sage: Cl.supercenter_basis()
(1,)
sage: Q = QuadraticForm(QQ, 2, [-1,1,-3])
sage: Cl.<x,y> = CliffordAlgebra(Q)
sage: Cl.supercenter_basis()
(1,)
Singular vectors of a quadratic form generate in the supercenter:
sage: Q = QuadraticForm(QQ, 3, [1/2,-2,4,256/249,3,-185/8])
sage: Cl.<x,y,z> = CliffordAlgebra(Q)
sage: Cl.supercenter_basis()
(1, x + 249/322*y + 22/161*z)
sage: Q = QuadraticForm(QQ, 3, [4,4,-4,1,-2,1])
sage: Cl.<x,y,z> = CliffordAlgebra(Q)
sage: Cl.supercenter_basis()
(1, x + 2*z, y + z, x*y + x*z - 2*y*z)
The most degenerate case:
sage: Q = QuadraticForm(QQ, 3)
sage: Cl.<x,y,z> = CliffordAlgebra(Q)
sage: Cl.supercenter_basis()
(1, x, y, z, x*y, x*z, y*z, x*y*z)
Bases: sage.combinat.free_module.CombinatorialFreeModuleElement
An element in a Clifford algebra.
TESTS:
sage: Q = QuadraticForm(ZZ, 3, [1, 2, 3, 4, 5, 6])
sage: Cl.<x,y,z> = CliffordAlgebra(Q)
sage: elt = ((x^3-z)*x + y)^2
sage: TestSuite(elt).run()
Return the Clifford conjugate of self.
The Clifford conjugate of an element of a Clifford algebra is
defined as
where denotes the reflection
automorphism and
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
TESTS:
We check that the conjugate is an involution:
sage: Q = QuadraticForm(ZZ, 3, [1,2,3,4,5,6])
sage: Cl.<x,y,z> = CliffordAlgebra(Q)
sage: all(x.conjugate().conjugate() == x for x in Cl.basis())
True
Return the Clifford conjugate of self.
The Clifford conjugate of an element of a Clifford algebra is
defined as
where denotes the reflection
automorphism and
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
TESTS:
We check that the conjugate is an involution:
sage: Q = QuadraticForm(ZZ, 3, [1,2,3,4,5,6])
sage: Cl.<x,y,z> = CliffordAlgebra(Q)
sage: all(x.conjugate().conjugate() == x for x in Cl.basis())
True
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 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
TESTS:
We check that the reflection is an involution:
sage: Q = QuadraticForm(ZZ, 3, [1,2,3,4,5,6])
sage: Cl.<x,y,z> = CliffordAlgebra(Q)
sage: all(x.reflection().reflection() == x for x in Cl.basis())
True
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()
[((0,), 5), ((1,), 1)]
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 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
TESTS:
We check that the reflection is an involution:
sage: Q = QuadraticForm(ZZ, 3, [1,2,3,4,5,6])
sage: Cl.<x,y,z> = CliffordAlgebra(Q)
sage: all(x.reflection().reflection() == x for x in Cl.basis())
True
Return the supercommutator of self and x.
Let be a superalgebra. The supercommutator of homogeneous
elements
is defined by
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
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,)]
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
TESTS:
We check that the transpose is an involution:
sage: Q = QuadraticForm(ZZ, 3, [1,2,3,4,5,6])
sage: Cl.<x,y,z> = CliffordAlgebra(Q)
sage: all(x.transpose().transpose() == x for x in Cl.basis())
True
Zero is sent to zero:
sage: Cl.zero().transpose() == Cl.zero()
True
Bases: sage.algebras.clifford_algebra.CliffordAlgebra
An exterior algebra of a free module over a commutative ring.
Let be a module over a commutative ring
. The exterior algebra
(or Grassmann algebra)
of
is defined as the quotient
of the tensor algebra
of
modulo the two-sided ideal
generated by all tensors of the form
with
. The
multiplication on
is denoted by
(so
is the projection of
onto
) and
called the “exterior product” or “wedge product”.
If is a rank-
free
-module with a basis
, then
is the
-algebra
noncommutatively generated by the
generators
subject to the relations
for all
, and
for all
. As an
-module,
then has a basis
with
ranging over the subsets of
(where
is the wedge product of
for
running through all elements of
from smallest to largest), and
hence is free of rank
.
The exterior algebra of an -module
can also be realized
as the Clifford algebra of
for the quadratic form
given by
for all vectors
. See CliffordAlgebra
for the notion of a Clifford algebra.
The exterior algebra of an -module
is a
-graded connected
Hopf superalgebra. It is commutative in the super sense (i.e., the
odd elements anticommute and square to
).
This class implements the exterior algebra for
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!
Todo
Add a category for Hopf superalgebras (perhaps part of trac ticket #16513).
INPUT:
REFERENCES:
Bases: sage.algebras.clifford_algebra.CliffordAlgebraElement
An element of an exterior algebra.
Return the interior product (also known as antiderivation) of
self with respect to x (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:
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 by
where 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
by
INPUT:
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
REFERENCES:
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
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
(see interior_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]
Return the interior product (also known as antiderivation) of
self with respect to x (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:
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 by
where 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
by
INPUT:
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
REFERENCES:
Return the standard scalar product of self with other.
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
Return the antipode on the basis element indexed by m.
Given a basis element , the antipode is defined by
.
EXAMPLES:
sage: E.<x,y,z> = ExteriorAlgebra(QQ)
sage: E.antipode_on_basis(())
1
sage: E.antipode_on_basis((1,))
-y
sage: E.antipode_on_basis((1,2))
y^z
Return the boundary operator defined by the structure
coefficients s_coeff of a Lie algebra.
For more on the boundary operator, see ExteriorAlgebraBoundary.
INPUT:
EXAMPLES:
sage: E.<x,y,z> = ExteriorAlgebra(QQ)
sage: E.boundary({(0,1): z, (1,2): x, (2,0): y})
Boundary endomorphism of The exterior algebra of rank 3 over Rational Field
Return the coboundary operator defined by the structure
coefficients s_coeff of a Lie algebra.
For more on the coboundary operator, see ExteriorAlgebraCoboundary.
INPUT:
EXAMPLES:
sage: E.<x,y,z> = ExteriorAlgebra(QQ)
sage: E.coboundary({(0,1): z, (1,2): x, (2,0): y})
Coboundary endomorphism of The exterior algebra of rank 3 over Rational Field
Return the coproduct on the basis element indexed by a.
The coproduct is defined by
where denotes the set of all
-unshuffles
(i.e., permutations in
which are increasing on the interval
and on the interval
).
Warning
This coproduct is a homomorphism of superalgebras, not a homomorphism of algebras!
EXAMPLES:
sage: E.<x,y,z> = ExteriorAlgebra(QQ)
sage: E.coproduct_on_basis((0,))
1 # x + x # 1
sage: E.coproduct_on_basis((0,1))
1 # x^y + x # y + x^y # 1 - y # x
sage: E.coproduct_on_basis((0,1,2))
1 # x^y^z + x # y^z + x^y # z + x^y^z # 1
- x^z # y - y # x^z + y^z # x + z # x^y
Return the counit of x.
The counit of an element of the exterior algebra
is its constant coefficient.
EXAMPLES:
sage: E.<x,y,z> = ExteriorAlgebra(QQ)
sage: elt = x*y - 2*x + 3
sage: E.counit(elt)
3
Return the degree of the monomial indexed by m.
The degree of m in the -grading of self is defined
to be the length of m.
EXAMPLES:
sage: E.<x,y,z> = ExteriorAlgebra(QQ)
sage: E.degree_on_basis(())
0
sage: E.degree_on_basis((0,))
1
sage: E.degree_on_basis((0,1))
2
Return the interior product of a with respect to
b.
See interior_product() for more information.
In this method, a and b are supposed to be basis elements (see interior_product() for a method that computes interior product of arbitrary elements), and to be input as their keys.
This depends on the choice of basis of the vector space whose exterior algebra is self.
EXAMPLES:
sage: E.<x,y,z> = ExteriorAlgebra(QQ)
sage: E.interior_product_on_basis((0,), (0,))
1
sage: E.interior_product_on_basis((0,2), (0,))
z
sage: E.interior_product_on_basis((1,), (0,2))
0
sage: E.interior_product_on_basis((0,2), (1,))
0
sage: E.interior_product_on_basis((0,1,2), (0,2))
-y
Lift the matrix m to an algebra morphism of exterior algebras.
Given a linear map (here represented by a matrix
acting on column vectors over the base ring of
), this method
returns the algebra morphism
. This morphism is defined
on generators
by
.
Note
This is the map going out of self as opposed to lift_module_morphism() for general Clifford algebras.
INPUT:
OUTPUT:
The algebra morphism from self to
.
EXAMPLES:
sage: E.<x,y> = ExteriorAlgebra(QQ)
sage: phi = matrix([[0,1],[1,1],[1,2]]); phi
[0 1]
[1 1]
[1 2]
sage: L = E.lift_morphism(phi, ['a','b','c']); L
Generic morphism:
From: The exterior algebra of rank 2 over Rational Field
To: The exterior algebra of rank 3 over Rational Field
sage: L(x)
b + c
sage: L(y)
a + b + 2*c
sage: L.on_basis()((1,))
a + b + 2*c
sage: p = L(E.one()); p
1
sage: p.parent()
The exterior algebra of rank 3 over Rational Field
sage: L(x*y)
-a^b - a^c + b^c
sage: L(x)*L(y)
-a^b - a^c + b^c
sage: L(x + y)
a + 2*b + 3*c
sage: L(x) + L(y)
a + 2*b + 3*c
sage: L(1/2*x + 2)
1/2*b + 1/2*c + 2
sage: L(E(3))
3
sage: psi = matrix([[1, -3/2]]); psi
[ 1 -3/2]
sage: Lp = E.lift_morphism(psi, ['a']); Lp
Generic morphism:
From: The exterior algebra of rank 2 over Rational Field
To: The exterior algebra of rank 1 over Rational Field
sage: Lp(x)
a
sage: Lp(y)
-3/2*a
sage: Lp(x + 2*y + 3)
-2*a + 3
Return the bilinear form on the exterior algebra self
which is obtained by lifting the bilinear
form
on
given by the matrix M.
Let be a module over a commutative ring
, and let
be a bilinear form on
. Then,
a bilinear form
on
can be canonically
defined as follows: For every
,
,
,
we define
where is the
-matrix whose
-th entry is
. This bilinear form
is known as the bilinear form on
obtained by lifting the bilinear form
.
Its restriction to the
-st homogeneous component
of
is
.
The bilinear form is symmetric if
is.
INPUT:
OUTPUT:
A bivariate function which takes two elements and
of self to
.
Note
This takes a bilinear form on as matrix, and
returns a bilinear form on self as a function in
two arguments. We do not return the bilinear form as
a matrix since this matrix can be huge and one often
needs just a particular value.
Todo
Implement a class for bilinear forms and rewrite this method to use that class.
EXAMPLES:
sage: E.<x,y,z> = ExteriorAlgebra(QQ)
sage: M = Matrix(QQ, [[1, 2, 3], [2, 3, 4], [3, 4, 5]])
sage: Eform = E.lifted_bilinear_form(M)
sage: Eform
Bilinear Form from Cartesian product of The exterior algebra of rank 3 over
Rational Field, The exterior algebra of rank 3 over Rational Field to
Rational Field
sage: Eform(x*y, y*z)
-1
sage: Eform(x*y, y)
0
sage: Eform(x*(y+z), y*z)
-3
sage: Eform(x*(y+z), y*(z+x))
0
sage: N = Matrix(QQ, [[3, 1, 7], [2, 0, 4], [-1, -3, -1]])
sage: N.determinant()
-8
sage: Eform = E.lifted_bilinear_form(N)
sage: Eform(x, E.one())
0
sage: Eform(x, x*z*y)
0
sage: Eform(E.one(), E.one())
1
sage: Eform(E.zero(), E.one())
0
sage: Eform(x, y)
1
sage: Eform(z, y)
-3
sage: Eform(x*z, y*z)
20
sage: Eform(x+x*y+x*y*z, z+z*y+z*y*x)
11
TESTS:
Exterior algebra over a zero space (a border case):
sage: E = ExteriorAlgebra(QQ, 0)
sage: M = Matrix(QQ, [])
sage: Eform = E.lifted_bilinear_form(M)
sage: Eform(E.one(), E.one())
1
sage: Eform(E.zero(), E.one())
0
Todo
Another way to compute this bilinear form seems to be to
map and
to the appropriate Clifford algebra and
there compute
, then send the result back to the
exterior algebra and return its constant coefficient. Or
something like this. Once the maps to the Clifford and
back are implemented, check if this is faster.
Return the volume form of self.
Given the basis of the underlying
-module, the volume form is defined as
.
This depends on the choice of basis.
EXAMPLES:
sage: E.<x,y,z> = ExteriorAlgebra(QQ)
sage: E.volume_form()
x^y^z
Bases: sage.algebras.clifford_algebra.ExteriorAlgebraDifferential
The boundary of an exterior algebra
defined
by the structure coefficients of
.
Let be a Lie algebra. We give the exterior algebra
a chain complex structure by considering a
differential
defined by
where denotes a missing index. The corresponding homology is
the Lie algebra homology.
INPUT:
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 and
of
, the dictionary
s_coeff must have only one of the pairs
and
as a key. This is not checked.
EXAMPLES:
We consider the differential given by Lie algebra given by the cross
product of
:
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 :
sage: p2 = par * par
sage: all(p2(b) == 0 for b in E.basis())
True
Another example: the Lie algebra , which has a
basis
satisfying
,
, and
:
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:
Return the chain complex over R determined by self.
INPUT:
EXAMPLES:
sage: E.<x,y,z> = ExteriorAlgebra(QQ)
sage: par = E.boundary({(0,1): z, (1,2): x, (2,0): y})
sage: C = par.chain_complex(); C
Chain complex with at most 4 nonzero terms over Rational Field
sage: ascii_art(C)
[ 0 0 1] [0]
[ 0 -1 0] [0]
[0 0 0] [ 1 0 0] [0]
0 <-- C_0 <-------- C_1 <----------- C_2 <---- C_3 <-- 0
TESTS:
This still works in degree :
sage: E.<x> = ExteriorAlgebra(QQ)
sage: par = E.boundary({})
sage: C = par.chain_complex(); C
Chain complex with at most 2 nonzero terms over Rational Field
sage: ascii_art(C)
[0]
0 <-- C_0 <---- C_1 <-- 0
Also in degree :
sage: E = ExteriorAlgebra(QQ, 0)
sage: par = E.boundary({})
sage: C = par.chain_complex(); C
Chain complex with at most 1 nonzero terms over Rational Field
sage: ascii_art(C)
0 <-- C_0 <-- 0
Bases: sage.algebras.clifford_algebra.ExteriorAlgebraDifferential
The coboundary of an exterior algebra
defined
by the structure coefficients of a Lie algebra
.
Let be a Lie algebra. We endow its exterior algebra
with a cochain complex structure by considering a
differential
defined by
where is a basis of
, and where
is the
-coordinate of the Lie bracket
.
The corresponding cohomology is the Lie algebra cohomology of .
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:
Warning
For any two distinct elements and
of
, the dictionary
s_coeff must have only one of the pairs
and
as a key. This is not checked.
EXAMPLES:
We consider the differential coming from the Lie algebra given by the
cross product of
:
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 :
sage: d2 = d * d
sage: all(d2(b) == 0 for b in E.basis())
True
Another example: the Lie algebra , which has a
basis
satisfying
,
, and
:
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:
Return the chain complex over R determined by self.
INPUT:
EXAMPLES:
sage: E.<x,y,z> = ExteriorAlgebra(QQ)
sage: d = E.coboundary({(0,1): z, (1,2): x, (2,0): y})
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]
[ 0 -1 0] [0]
[0 0 0] [ 1 0 0] [0]
0 <-- C_3 <-------- C_2 <----------- C_1 <---- C_0 <-- 0
TESTS:
This still works in degree :
sage: E.<x> = ExteriorAlgebra(QQ)
sage: d = E.coboundary({})
sage: C = d.chain_complex(); C
Chain complex with at most 2 nonzero terms over Rational Field
sage: ascii_art(C)
[0]
0 <-- C_1 <---- C_0 <-- 0
Also in degree :
sage: E = ExteriorAlgebra(QQ, 0)
sage: d = E.coboundary({})
sage: C = d.chain_complex(); C
Chain complex with at most 1 nonzero terms over Rational Field
sage: ascii_art(C)
0 <-- C_0 <-- 0
Bases: sage.categories.modules_with_basis.ModuleMorphismByLinearity, sage.structure.unique_representation.UniqueRepresentation
Internal class to store the data of a boundary or coboundary of
an exterior algebra defined by the structure
coefficients of a Lie algebra
.
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.
Return the homology determined by self.
EXAMPLES:
sage: E.<x,y,z> = ExteriorAlgebra(QQ)
sage: par = E.boundary({(0,1): z, (1,2): x, (2,0): y})
sage: par.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}
sage: d = E.coboundary({(0,1): z, (1,2): x, (2,0): y})
sage: d.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}