X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=mjo%2Feja%2Feja_element.py;h=bd45b179541487bd82e3b06768a902a77cd0899d;hb=73ba2d67c0850074e655b4da61aa021e6d9b6816;hp=2eb267727235946ed94681d973c915407c5d3dc1;hpb=04f4cf9128e6cad289e78845de177e7b1f7fca6d;p=sage.d.git diff --git a/mjo/eja/eja_element.py b/mjo/eja/eja_element.py index 2eb2677..bd45b17 100644 --- a/mjo/eja/eja_element.py +++ b/mjo/eja/eja_element.py @@ -1248,6 +1248,12 @@ class FiniteDimensionalEuclideanJordanAlgebraElement(IndexedFreeModuleElement): """ P = self.parent() r = P.rank() + + if r == 0: + # Special case for the trivial algebra where + # the trace is an empty sum. + return P.base_ring().zero() + p = P._charpoly_coeff(r-1) # The _charpoly_coeff function already adds the factor of # -1 to ensure that _charpoly_coeff(r-1) is really what