From: Michael Orlitzky Date: Sun, 10 Nov 2019 15:47:42 +0000 (-0500) Subject: eja: allow subalgebra_idempotent() to work in trivial EJAs. X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=9f91faac758f0ef3a1ea7b1ad1cb506e73735d89;p=sage.d.git eja: allow subalgebra_idempotent() to work in trivial EJAs. Every element is nilpotent in a trivial EJA, but we also know the only idempotent element in such an algebra: its sole occupant. So return it. --- diff --git a/mjo/eja/eja_element.py b/mjo/eja/eja_element.py index 3491b69..f44bee1 100644 --- a/mjo/eja/eja_element.py +++ b/mjo/eja/eja_element.py @@ -1285,6 +1285,9 @@ class FiniteDimensionalEuclideanJordanAlgebraElement(IndexedFreeModuleElement): True """ + if self.parent().is_trivial(): + return self + if self.is_nilpotent(): raise ValueError("this only works with non-nilpotent elements!")