From: Michael Orlitzky Date: Wed, 3 Mar 2021 16:27:28 +0000 (-0500) Subject: eja: fix the basis for the octonion matrix algebra. X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=3a5389fbc9ae5449e162958c0fda44de90d7e760;p=sage.d.git eja: fix the basis for the octonion matrix algebra. --- 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 )