From: Michael Orlitzky Date: Sun, 28 Jul 2019 15:35:08 +0000 (-0400) Subject: eja: add minimal_polynomial() for operators. X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=f0a0a2fff13ba15d844494ef6125326639d60e4b;p=sage.d.git eja: add minimal_polynomial() for operators. --- diff --git a/mjo/eja/euclidean_jordan_algebra.py b/mjo/eja/euclidean_jordan_algebra.py index cc44f61..9a20160 100644 --- a/mjo/eja/euclidean_jordan_algebra.py +++ b/mjo/eja/euclidean_jordan_algebra.py @@ -351,6 +351,22 @@ class FiniteDimensionalEuclideanJordanAlgebraOperator(Map): return self._matrix + def minimal_polynomial(self): + """ + Return the minimal polynomial of this linear operator, + in the variable ``t``. + + EXAMPLES:: + + sage: J = RealSymmetricEJA(3) + sage: J.one().operator().minimal_polynomial() + t - 1 + + """ + # The matrix method returns a polynomial in 'x' but want one in 't'. + return self.matrix().minimal_polynomial().change_variable_name('t') + + class FiniteDimensionalEuclideanJordanAlgebra(FiniteDimensionalAlgebra): @staticmethod def __classcall_private__(cls, @@ -1349,11 +1365,8 @@ class FiniteDimensionalEuclideanJordanAlgebra(FiniteDimensionalAlgebra): # and subalgebra_generated_by() must be the same, and in # the same order! elt = assoc_subalg(V.coordinates(self.vector())) + return elt.operator().minimal_polynomial() - # We get back a symbolic polynomial in 'x' but want a real - # polynomial in 't'. - p_of_x = elt.operator().matrix().minimal_polynomial() - return p_of_x.change_variable_name('t') def natural_representation(self):