From 2ba3bc2f1c02e4e75552a31d26cc9f77487b1d03 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Sat, 29 Jun 2019 10:07:19 -0400 Subject: [PATCH] eja: add is_regular() method on elements. --- mjo/eja/euclidean_jordan_algebra.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/mjo/eja/euclidean_jordan_algebra.py b/mjo/eja/euclidean_jordan_algebra.py index 835f763..60a7ba1 100644 --- a/mjo/eja/euclidean_jordan_algebra.py +++ b/mjo/eja/euclidean_jordan_algebra.py @@ -126,6 +126,30 @@ class FiniteDimensionalEuclideanJordanAlgebra(FiniteDimensionalAlgebra): return A.element_class(A, (self.matrix()**(n-1))*self.vector()) + def is_regular(self): + """ + Return whether or not this is a regular element. + + EXAMPLES: + + The identity element always has degree one, but any element + linearly-independent from it is regular:: + + sage: J = eja_ln(5) + sage: J.one().is_regular() + False + sage: e0, e1, e2, e3, e4 = J.gens() # e0 is the identity + sage: for x in J.gens(): + ....: (J.one() + x).is_regular() + False + True + True + True + True + + """ + return self.degree() == self.parent().rank() + def span_of_powers(self): """ Return the vector space spanned by successive powers of -- 2.44.2