From 9f91faac758f0ef3a1ea7b1ad1cb506e73735d89 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Sun, 10 Nov 2019 10:47:42 -0500 Subject: [PATCH] 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. --- mjo/eja/eja_element.py | 3 +++ 1 file changed, 3 insertions(+) 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!") -- 2.43.2