Ask Your Question

Defining Clifford Algebras

asked 2013-01-11 06:29:58 -0600

Dox gravatar image

Dear all.

I'm a high energy physicist, interested in using SAGE for manipulations of Clifford algebras.

Being accustomed to the architecture of SAGE, I believe that the fundamental structures of these algebras is defined somewhere (probably as an algebra with basis).


  • How could I define the Clifford algebra structure from the basis elements?

  • Is it possible to manipulate the order of terms like $v w u \to u v w$ ?

Thank you.

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2013-01-11 21:24:28 -0600

benjaminfjones gravatar image

It should certainly be possible. One place you might start looking is the implementation of Quaternion algebras in Sage. This is in the sage.algebras.quatalgpackage:

edit flag offensive delete link more


@benjaminfjones : I have a doubt with the QuaternionAlgebra. The basis is form by `i,j,k` and the definition of what `i` and `j` are, is related with the values of `arg1` and `arg2`. But I still don't get how and when the base `k` is defined. Also, where in the code is imposed that `i` and `j` anticommute? Thank you!

Dox gravatar imageDox ( 2013-01-17 03:32:34 -0600 )edit

For a basis over a field K you also need a vector representing 1. I think the reason `i` and `j` are there but not `k` is that you only need 2 of the 3 to generate the quaternions as an algebra (recall `k = i * j`). To see where the multiplicative structure on the algebra is defined look at the ring multiplication for generic elements (see the code starting with `cpdef RingElement _mul_(self, RingElement _right):` in `quaternion_algebra_element.pyx`.

benjaminfjones gravatar imagebenjaminfjones ( 2013-01-21 09:15:40 -0600 )edit

answered 2013-01-12 11:41:21 -0600

GiNaC, the C++ library used as the backend for symbolic expressions in Sage, supports Clifford algebras. See this article for more details. Using this implementation might be easier than starting from scratch in Python/Cython. I expect the performance of GiNaC to be quite competitive, thanks to Pynac we can also use arbitrary coefficient domains from Sage.

After a brief look at the article mentioned above, I can say that it would be fairly straightforward to wrap those C++ functions and provide access to these data structures from Sage. I would be happy to do this and create a prototype implementation if somebody is willing to take over the polish. :)

edit flag offensive delete link more


That sounds interesting. I'd certainly be willing to help polish.

benjaminfjones gravatar imagebenjaminfjones ( 2013-01-14 05:48:04 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2013-01-11 06:29:58 -0600

Seen: 360 times

Last updated: Jan 12 '13