From a767e37329435254616e13250ad11daf63158623 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Sun, 21 Jul 2019 11:35:14 -0400 Subject: [PATCH] eja: simplify is_invertible() for elements. --- mjo/eja/euclidean_jordan_algebra.py | 30 ++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/mjo/eja/euclidean_jordan_algebra.py b/mjo/eja/euclidean_jordan_algebra.py index 15ff26c..fb92a31 100644 --- a/mjo/eja/euclidean_jordan_algebra.py +++ b/mjo/eja/euclidean_jordan_algebra.py @@ -492,8 +492,36 @@ class FiniteDimensionalEuclideanJordanAlgebra(FiniteDimensionalAlgebra): We can't use the superclass method because it relies on the algebra being associative. + + ALGORITHM: + + The usual way to do this is to check if the determinant is + zero, but we need the characteristic polynomial for the + determinant. The minimal polynomial is a lot easier to get, + so we use Corollary 2 in Chapter V of Koecher to check + whether or not the paren't algebra's zero element is a root + of this element's minimal polynomial. + + TESTS: + + The identity element is always invertible:: + + sage: set_random_seed() + sage: J = random_eja() + sage: J.one().is_invertible() + True + + The zero element is never invertible:: + + sage: set_random_seed() + sage: J = random_eja() + sage: J.zero().is_invertible() + False + """ - return not self.det().is_zero() + zero = self.parent().zero() + p = self.minimal_polynomial() + return not (p(zero) == zero) def is_nilpotent(self): -- 2.44.2