X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=mjo%2Feja%2Feuclidean_jordan_algebra.py;h=4a2979248fc5e7b90938a0c18b8a7545bb780e97;hb=8d6b8dda3e10443b04ff8354424771d409a596c1;hp=fb92a310c2edaa27cd9b9cab35dd86d908790469;hpb=a767e37329435254616e13250ad11daf63158623;p=sage.d.git diff --git a/mjo/eja/euclidean_jordan_algebra.py b/mjo/eja/euclidean_jordan_algebra.py index fb92a31..4a29792 100644 --- a/mjo/eja/euclidean_jordan_algebra.py +++ b/mjo/eja/euclidean_jordan_algebra.py @@ -626,6 +626,13 @@ class FiniteDimensionalEuclideanJordanAlgebra(FiniteDimensionalAlgebra): def minimal_polynomial(self): """ + ALGORITHM: + + We restrict ourselves to the associative subalgebra + generated by this element, and then return the minimal + polynomial of this element's operator matrix (in that + subalgebra). This works by Baes Proposition 2.3.16. + EXAMPLES:: sage: set_random_seed() @@ -660,25 +667,13 @@ class FiniteDimensionalEuclideanJordanAlgebra(FiniteDimensionalAlgebra): True """ - # The element we're going to call "minimal_polynomial()" 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.minimal_polynomial() + 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())) + return elt.operator_matrix().minimal_polynomial() def natural_representation(self): @@ -881,7 +876,10 @@ class FiniteDimensionalEuclideanJordanAlgebra(FiniteDimensionalAlgebra): # The dimension of the subalgebra can't be greater than # the big algebra, so just put everything into a list # and let span() get rid of the excess. - V = self.vector().parent() + # + # We do the extra ambient_vector_space() in case we're messing + # with polynomials and the direct parent is a module. + V = self.vector().parent().ambient_vector_space() return V.span( (self**d).vector() for d in xrange(V.dimension()) )