X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=mjo%2Feja%2Feja_element.py;h=287a217e785ff3e44109d3fc8d8fd85ed1ca4771;hb=17aee61574caf7f62a70d181840c2be69879a3e7;hp=e38012eb3bf9cda640c8cc4c4ef8d822e194ce43;hpb=78b54b562e1eedbb919dc442b2b3f6996440a1a2;p=sage.d.git diff --git a/mjo/eja/eja_element.py b/mjo/eja/eja_element.py index e38012e..287a217 100644 --- a/mjo/eja/eja_element.py +++ b/mjo/eja/eja_element.py @@ -490,7 +490,9 @@ class FiniteDimensionalEuclideanJordanAlgebraElement(IndexedFreeModuleElement): False """ - zero = self.parent().zero() + # In fact, we only need to know if the constant term is non-zero, + # so we can pass in the field's zero element instead. + zero = self.base_ring().zero() p = self.minimal_polynomial() return not (p(zero) == zero) @@ -801,10 +803,12 @@ class FiniteDimensionalEuclideanJordanAlgebraElement(IndexedFreeModuleElement): """ P = self.parent() + left_mult_by_self = lambda y: self*y + L = P.module_morphism(function=left_mult_by_self, codomain=P) return FiniteDimensionalEuclideanJordanAlgebraOperator( P, P, - self.to_matrix() ) + L.matrix() ) def quadratic_representation(self, other=None):