From e2889fbafac1462ad8a8624266c5c659a7acc15f Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Mon, 29 Jul 2019 00:36:33 -0400 Subject: [PATCH] eja: simplify and justify the implementation of is_nilpotent() for elements. --- mjo/eja/eja_algebra.py | 44 +++++++++++++++++++----------------------- 1 file changed, 20 insertions(+), 24 deletions(-) diff --git a/mjo/eja/eja_algebra.py b/mjo/eja/eja_algebra.py index f88a552..edba098 100644 --- a/mjo/eja/eja_algebra.py +++ b/mjo/eja/eja_algebra.py @@ -1011,14 +1011,26 @@ class FiniteDimensionalEuclideanJordanAlgebra(FiniteDimensionalAlgebra): """ Return whether or not some power of this element is zero. - The superclass method won't work unless we're in an - associative algebra, and we aren't. However, we generate - an assocoative subalgebra and we're nilpotent there if and - only if we're nilpotent here (probably). + ALGORITHM: + + We use Theorem 5 in Chapter III of Koecher, which says that + an element ``x`` is nilpotent if and only if ``x.operator()`` + is nilpotent. And it is a basic fact of linear algebra that + an operator on an `n`-dimensional space is nilpotent if and + only if, when raised to the `n`th power, it equals the zero + operator (for example, see Axler Corollary 8.8). SETUP:: - sage: from mjo.eja.eja_algebra import random_eja + sage: from mjo.eja.eja_algebra import (JordanSpinEJA, + ....: random_eja) + + EXAMPLES:: + + sage: J = JordanSpinEJA(3) + sage: x = sum(J.gens()) + sage: x.is_nilpotent() + False TESTS: @@ -1035,25 +1047,9 @@ class FiniteDimensionalEuclideanJordanAlgebra(FiniteDimensionalAlgebra): True """ - # The element we're going to call "is_nilpotent()" on. - # Either myself, interpreted as an element of a finite- - # dimensional algebra, or an element of an associative - # subalgebra. - elt = None - - if self.parent().is_associative(): - elt = FiniteDimensionalAlgebraElement(self.parent(), self) - else: - V = self.span_of_powers() - assoc_subalg = self.subalgebra_generated_by() - # Mis-design warning: the basis used for span_of_powers() - # and subalgebra_generated_by() must be the same, and in - # the same order! - elt = assoc_subalg(V.coordinates(self.vector())) - - # Recursive call, but should work since elt lives in an - # associative algebra. - return elt.is_nilpotent() + P = self.parent() + zero_operator = P.zero().operator() + return self.operator()**P.dimension() == zero_operator def is_regular(self): -- 2.44.2