From 3a5ca72aad3917ad670f5b2e918275a50a00e67c Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Thu, 18 Jul 2019 18:57:44 -0400 Subject: [PATCH] eja: add natural_representation() for elements. --- mjo/eja/euclidean_jordan_algebra.py | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/mjo/eja/euclidean_jordan_algebra.py b/mjo/eja/euclidean_jordan_algebra.py index 3124132..59e1537 100644 --- a/mjo/eja/euclidean_jordan_algebra.py +++ b/mjo/eja/euclidean_jordan_algebra.py @@ -461,6 +461,7 @@ class FiniteDimensionalEuclideanJordanAlgebra(FiniteDimensionalAlgebra): return self.span_of_powers().dimension() + def operator_matrix(self): """ Return the matrix that represents left- (or right-) @@ -528,6 +529,34 @@ class FiniteDimensionalEuclideanJordanAlgebra(FiniteDimensionalAlgebra): return fda_elt.matrix().transpose() + def natural_representation(self): + """ + Return a more-natural representation of this element. + + Every finite-dimensional Euclidean Jordan Algebra is a + direct sum of five simple algebras, four of which comprise + Hermitian matrices. This method returns the original + "natural" representation of this element as a Hermitian + matrix, if it has one. If not, you get the usual representation. + + EXAMPLES:: + + sage: J = ComplexHermitianSimpleEJA(3) + sage: J.one() + e0 + e5 + e8 + sage: J.one().natural_representation() + [1 0 0 0 0 0] + [0 1 0 0 0 0] + [0 0 1 0 0 0] + [0 0 0 1 0 0] + [0 0 0 0 1 0] + [0 0 0 0 0 1] + + """ + B = self.parent().natural_basis() + W = B[0].matrix_space() + return W.linear_combination(zip(self.vector(), B)) + def minimal_polynomial(self): """ -- 2.44.2