From: Michael Orlitzky Date: Sun, 21 Jul 2019 15:35:14 +0000 (-0400) Subject: eja: simplify is_invertible() for elements. X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=a767e37329435254616e13250ad11daf63158623;p=sage.d.git eja: simplify is_invertible() for elements. --- 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):