non abelian algebra

My back-end code has been able to handle basic non-Abelian algebra since I first wrote the algebra code. But until now, it wasn't wired in. Only took like 2 minutes to wire it in, so not sure why I procrastinated so long. Anyway, a couple of examples.
-- a couple of Abelian examples:
sa: algebra(|a> + |b>,|^>,|2>)
|a*a> + 2.000|a*b> + |b*b>

sa: algebra(|a> + |b>,|^>,|3>)
|a*a*a> + 3.000|a*a*b> + 3.000|a*b*b> + |b*b*b>

-- a couple of non-Abelian examples:
sa: non-Abelian-algebra(|a> + |b>,|^>,|2>)
|a*a> + |a*b> + |b*a> + |b*b>

sa: non-Abelian-algebra(|a> + |b>,|^>,|3>)
|a*a*a> + |a*a*b> + |a*b*a> + |a*b*b> + |b*a*a> + |b*a*b> + |b*b*a> + |b*b*b>
And that is about it. Simple enough. Just wanted to mention it.

previous: tweaked pretty print table code
next: new function int coeffs to word

updated: 19/12/2016
by Garry Morrison
email: garry -at-