From 3a5389fbc9ae5449e162958c0fda44de90d7e760 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Wed, 3 Mar 2021 11:27:28 -0500 Subject: [PATCH] eja: fix the basis for the octonion matrix algebra. --- mjo/eja/eja_algebra.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mjo/eja/eja_algebra.py b/mjo/eja/eja_algebra.py index d7010bc..18138f4 100644 --- a/mjo/eja/eja_algebra.py +++ b/mjo/eja/eja_algebra.py @@ -2641,7 +2641,13 @@ class OctonionHermitianEJA(FiniteDimensionalEJA, MatrixEJA): 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 ) -- 2.44.2