X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=mjo%2Feja%2Feja_element.py;h=926f2bf57a612c71eab53b693daa1e3f559ad6bc;hb=884b2015690a50a12f99852ea82c399309164f22;hp=2976a38f91a986b7e5f2fafd7a24560d29411755;hpb=6d32150d3f7c175473a1d590facce1ea7c5ca77a;p=sage.d.git diff --git a/mjo/eja/eja_element.py b/mjo/eja/eja_element.py index 2976a38..926f2bf 100644 --- a/mjo/eja/eja_element.py +++ b/mjo/eja/eja_element.py @@ -386,11 +386,11 @@ class FiniteDimensionalEuclideanJordanAlgebraElement(IndexedFreeModuleElement): """ P = self.parent() r = P.rank() - p = P._charpoly_coeff(0) - # The _charpoly_coeff function already adds the factor of - # -1 to ensure that _charpoly_coeff(0) is really what - # appears in front of t^{0} in the charpoly. However, - # we want (-1)^r times THAT for the determinant. + p = P._charpoly_coefficients()[0] + # The _charpoly_coeff function already adds the factor of -1 + # to ensure that _charpoly_coefficients()[0] is really what + # appears in front of t^{0} in the charpoly. However, we want + # (-1)^r times THAT for the determinant. return ((-1)**r)*p(*self.to_vector()) @@ -1238,37 +1238,6 @@ class FiniteDimensionalEuclideanJordanAlgebraElement(IndexedFreeModuleElement): result.append( (evalue, proj(A.one()).superalgebra_element()) ) return result - def full_spectral_decomposition(self): - if self.is_zero(): - # Following the convention that the empty sum is the - # algebra's additive identity. - return [] - - A = self.subalgebra_generated_by(orthonormalize_basis=True) - if A.dimension() == 1: - # I'm a scalar multiple of the identity element - s = self.norm() / A.one().norm() - return [(s, self * ~s)] - - result = [] - for (evalue, proj) in A(self).operator().spectral_decomposition(): - c = proj(A.one()).superalgebra_element() - - # We know that "c" here is idempotent, so the only question is - # whether or not it can be decomposed further. - if c.is_primitive_idempotent(): - result.append( (evalue, c) ) - else: - for b in A.gens(): - b_decomp = b.full_spectral_decomposition() - if len(b_decomp) > 1: - for (a,y) in b_decomp: - y_sup = y.superalgebra_element() - eigenvecs = [ r[1] for r in result ] - if not y_sup in eigenvecs: - result.append( ( evalue*a, y_sup) ) - return result - def subalgebra_generated_by(self, orthonormalize_basis=False): """ Return the associative subalgebra of the parent EJA generated @@ -1431,7 +1400,7 @@ class FiniteDimensionalEuclideanJordanAlgebraElement(IndexedFreeModuleElement): # the trace is an empty sum. return P.base_ring().zero() - p = P._charpoly_coeff(r-1) + p = P._charpoly_coefficients()[r-1] # The _charpoly_coeff function already adds the factor of # -1 to ensure that _charpoly_coeff(r-1) is really what # appears in front of t^{r-1} in the charpoly. However,