From: Michael Orlitzky Date: Mon, 24 Jun 2019 18:05:59 +0000 (-0400) Subject: eja: implement a working minimal_polynomial(). X-Git-Url: http://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=50ea939ce86a7b67f3dc98ba2b3470b9d0dceebd;p=sage.d.git eja: implement a working minimal_polynomial(). --- diff --git a/mjo/eja/euclidean_jordan_algebra.py b/mjo/eja/euclidean_jordan_algebra.py index 097233f..d460aa0 100644 --- a/mjo/eja/euclidean_jordan_algebra.py +++ b/mjo/eja/euclidean_jordan_algebra.py @@ -141,7 +141,53 @@ class FiniteDimensionalEuclideanJordanAlgebra(FiniteDimensionalAlgebra): def minimal_polynomial(self): - return self.matrix().minimal_polynomial() + """ + EXAMPLES:: + + sage: set_random_seed() + sage: n = ZZ.random_element(1,10).abs() + sage: J = eja_rn(n) + sage: x = J.random_element() + sage: x.degree() == x.minimal_polynomial().degree() + True + + :: + + sage: set_random_seed() + sage: n = ZZ.random_element(1,10).abs() + sage: J = eja_ln(n) + sage: x = J.random_element() + sage: x.degree() == x.minimal_polynomial().degree() + True + + The minimal polynomial and the characteristic polynomial coincide + and are known (see Alizadeh, Example 11.11) for all elements of + the spin factor algebra that aren't scalar multiples of the + identity:: + + sage: set_random_seed() + sage: n = ZZ.random_element(2,10).abs() + sage: J = eja_ln(n) + sage: y = J.random_element() + sage: while y == y.coefficient(0)*J.one(): + ....: y = J.random_element() + sage: y0 = y.vector()[0] + sage: y_bar = y.vector()[1:] + sage: actual = y.minimal_polynomial() + sage: x = SR.symbol('x', domain='real') + sage: expected = x^2 - 2*y0*x + (y0^2 - norm(y_bar)^2) + sage: bool(actual == expected) + True + + """ + 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! + subalg_self = assoc_subalg(V.coordinates(self.vector())) + return subalg_self.matrix().minimal_polynomial() + def characteristic_polynomial(self): return self.matrix().characteristic_polynomial()