From 503301f75ff78f5bc545f1d78fee6690002654a0 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Sat, 29 Jun 2019 10:18:32 -0400 Subject: [PATCH] eja: de-implement characteristic_polynomial for irregular elements. --- mjo/eja/euclidean_jordan_algebra.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/mjo/eja/euclidean_jordan_algebra.py b/mjo/eja/euclidean_jordan_algebra.py index 1281a02..a55b7e3 100644 --- a/mjo/eja/euclidean_jordan_algebra.py +++ b/mjo/eja/euclidean_jordan_algebra.py @@ -127,7 +127,18 @@ class FiniteDimensionalEuclideanJordanAlgebra(FiniteDimensionalAlgebra): def characteristic_polynomial(self): - return self.matrix().characteristic_polynomial() + """ + Return my characteristic polynomial (if I'm a regular + element). + + Eventually this should be implemented in terms of the parent + algebra's characteristic polynomial that works for ALL + elements. + """ + if self.is_regular(): + return self.minimal_polynomial() + else: + return NotImplementedError('irregular element') def is_nilpotent(self): -- 2.44.2