"""
from mjo.octonions import OctonionMatrixAlgebra
- MS = OctonionMatrixAlgebra(n, field=field)
+ MS = OctonionMatrixAlgebra(n, scalars=field)
es = MS.entry_algebra().gens()
basis = []
else:
for e in es:
E_ij = MS.monomial( (i,j,e) )
- E_ij += MS.monomial( (j,i,e.conjugate()) )
+ ec = e.conjugate()
+ # If the conjugate has a negative sign in front
+ # of it, (j,i,ec) won't be a monomial!
+ if (j,i,ec) in MS.indices():
+ E_ij += MS.monomial( (j,i,ec) )
+ else:
+ E_ij -= MS.monomial( (j,i,-ec) )
basis.append(E_ij)
return tuple( basis )