# Clifford Algebra - Inheritance and Categories

We need to decide which categories to inherit from, in such a way to avoid constraints on the way that we can use the algebra and to try to simplify the relationships to related algebras.

We want the algebra to be a module over algebras with multiplication which is:

• associative.
• possibly commutative or non-commutative.

Also we may want to have a module over an algebra with multiple multiplications, such as Grassmann/Clifford algebra itself, so we need a way to choose the multiplication which forms the module.

In addition to these requirements we can't take this algebra family in isolation but they need to interwork with related algebra families, I think these algebra families need to appear on the category and domain graph here:

http://www.axiom-developer.org/axiom-website/dotabb.html

I think this graph needs to be made a lot more complicated.

## Relationship to Other Algebras

Since there are many accidental and not so accidental isomorphisms between Clifford algebras and Cayley-Dickson (complex, quaternion and octonion), spinor, Hopf and tensor Algebras, for instance: see tables in [Pertti Lounesto, Clifford Algebras and Spinors, Second Edition].

Do we need lots of coerce functions? Or can we represent some of these by choosing a suitable category hierarchy?

Are there common functions between these algebras that could be separated out into categories?

## How to Choose a Hierarchy

How do we go about designing a category hierarchy structure? How does this relate to the way that algebras are created in mathematics?

### By applying constraints?

We could start with tensor algebra and represent these as a subalgebra by applying some constraint (like Pauli matrices). Is there a way to get a subalgebra in SPAD by applying constraints?

There is already an issue with working with sparse Clifford algebras (see requirements here) and this approach would seem to make the issue of efficient coding even worse.

Also this would seem to go away from point of having a separate Clifford algebra implementation and so I don't think this approach is really practical?

### By using isomorphisms?

As explained already there are lots of isomorphisms between the algebra families, is it practical to treat say complex numbers or quaternions as special cases of a Clifford algebra? Probably not as complex numbers

### Generating using semidirect product and so on?

Since it does not seem very efficient to use the category hierarchy to create subalgebras from more general algebras, can we do the reverse and build up more complex algebras from simpler ones?

For instance could we generate the quaternions from complex numbers whose elements were themselves complex numbers? Or could we generate quaternions from a semidirect product of two complex number algebras?

As SPAD stands at the moment I can't see how this is possible?

```(1) -> a:= complex(complex(1,2),complex(3,4))
There are 1 exposed and 0 unexposed library operations named complex
having 2 argument(s) but none was determined to be applicable.
Use HyperDoc Browse, or issue
)display op complex
package-calling the operation or using coercions on the arguments
will allow you to apply the operation.

Cannot find a definition or applicable library operation named
complex with argument type(s)
Complex(Integer)
Complex(Integer)

Perhaps you should use "@" to indicate the required return type,
or "\$" to specify which version of the function you need.
(1) -> ```

What seems to be required is a way to allow the inner and outer complex numbers to define a different imaginary operator and to define how they interact:

a: Quaternion := complex(%i,complex(%j,1,2),complex(%j,3,4), %k=%i*%j)

Anyhow, at this stage I cannot see how to generate algebras in this way?

## Common Functions on these Algebras

Although I can't see how to how to design a category hierarchy to usefully relate these algebra families I can think of some common functions that could be applied to these algebras.

This does not concern operarations on instances of elements of these algebras but operations on the whole algebras, the sort of things that I would like to be able to do is:

• Create a Type consisting of a complex number whose elements are complex numbers whose elements are complex numbers, run a function to check if this algebra is associative.
• run a function to check if the above algebra is isomorphic to octonions.
• Start with a Clifford algebra based on 3 dimensional space, add another dimension that squares to +ve, add another dimension that squares to -ve, in the plane of these extra dimensions rotate by 45 degrees.
• Orthogonalise a basis.
• Take a semidirect product of two complex number algebras, check if this is isomorphic to quaternions.
• Take an even subalgebra of a Clifford algebra based on 3D Euclidean space, check if this is isomorphic to quaternions.
• Convert to reciprocol basis
• Convert between Clifford and Grassmann basis.

So none of these operations involves creating an element (a representation) in these algebras, they are all functions which operate on the algebra (Type) as a whole. So what I was thinking of is an interface (category) that could be applied to many algebras (domains) to provide a common set of functions like:

• isAssociative?()
• isIsomorphic?(Type)
• rotateDimensions(plane)
• directProduct(Type,Type)
• semidirectProduct(Type,Type,function)
• evenSubalgebra()
• constrainToOrthogonal()

In the case of Clifford algebras these functions would be implemented to operate purely on the bilinear form, in the case of other algebras they would be implemented to operate on what determines that algebra.