]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
eja: de-implement characteristic_polynomial for irregular elements.
authorMichael Orlitzky <michael@orlitzky.com>
Sat, 29 Jun 2019 14:18:32 +0000 (10:18 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Sat, 29 Jun 2019 14:18:32 +0000 (10:18 -0400)
mjo/eja/euclidean_jordan_algebra.py

index 1281a029a8f5c4557d9d35ee50342caecdc51054..a55b7e39ff43cd0607284ee272e077d972f3ce71 100644 (file)
@@ -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):