From d3e40bda3f50a2101103192b91b2ab2a911c0311 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Sat, 7 Nov 2020 14:45:54 -0500 Subject: [PATCH] eja: add "of" to the algebra characteristic_polynomial() method name. --- mjo/eja/TODO | 3 --- mjo/eja/eja_algebra.py | 12 +++++++----- mjo/eja/eja_element.py | 2 +- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/mjo/eja/TODO b/mjo/eja/TODO index 8d212e1..e02257f 100644 --- a/mjo/eja/TODO +++ b/mjo/eja/TODO @@ -10,6 +10,3 @@ 5. Factor out the unit-norm basis (and operator symmetry) tests once all of the algebras pass. - -6. Rename the algebra "characteristic polynomial" method to - "characteristic polynomial of." diff --git a/mjo/eja/eja_algebra.py b/mjo/eja/eja_algebra.py index 4e66b2d..9aa40ee 100644 --- a/mjo/eja/eja_algebra.py +++ b/mjo/eja/eja_algebra.py @@ -236,10 +236,12 @@ class FiniteDimensionalEuclideanJordanAlgebra(CombinatorialFreeModule): return self._multiplication_table[i][j] @cached_method - def characteristic_polynomial(self): + def characteristic_polynomial_of(self): """ - Return a characteristic polynomial that works for all elements - of this algebra. + Return the algebra's "characteristic polynomial of" function, + which is itself a multivariate polynomial that, when evaluated + at the coordinates of some algebra element, returns that + element's characteristic polynomial. The resulting polynomial has `n+1` variables, where `n` is the dimension of this algebra. The first `n` variables correspond to @@ -259,7 +261,7 @@ class FiniteDimensionalEuclideanJordanAlgebra(CombinatorialFreeModule): Alizadeh, Example 11.11:: sage: J = JordanSpinEJA(3) - sage: p = J.characteristic_polynomial(); p + sage: p = J.characteristic_polynomial_of(); p X1^2 - X2^2 - X3^2 + (-2*t)*X1 + t^2 sage: xvec = J.one().to_vector() sage: p(*xvec) @@ -272,7 +274,7 @@ class FiniteDimensionalEuclideanJordanAlgebra(CombinatorialFreeModule): any argument:: sage: J = TrivialEJA() - sage: J.characteristic_polynomial() + sage: J.characteristic_polynomial_of() 1 """ diff --git a/mjo/eja/eja_element.py b/mjo/eja/eja_element.py index a6230a4..0be0032 100644 --- a/mjo/eja/eja_element.py +++ b/mjo/eja/eja_element.py @@ -181,7 +181,7 @@ class FiniteDimensionalEuclideanJordanAlgebraElement(IndexedFreeModuleElement): True """ - p = self.parent().characteristic_polynomial() + p = self.parent().characteristic_polynomial_of() return p(*self.to_vector()) -- 2.44.2