From 5cb6fb61b78292f5bc19d37ac753125693dd7f2e Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Fri, 26 Jul 2019 12:13:14 -0400 Subject: [PATCH] eja: add new operator() method for elements that returns a morphism. --- mjo/eja/euclidean_jordan_algebra.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/mjo/eja/euclidean_jordan_algebra.py b/mjo/eja/euclidean_jordan_algebra.py index fcaf100..72e167e 100644 --- a/mjo/eja/euclidean_jordan_algebra.py +++ b/mjo/eja/euclidean_jordan_algebra.py @@ -1074,6 +1074,30 @@ class FiniteDimensionalEuclideanJordanAlgebra(FiniteDimensionalAlgebra): return W.linear_combination(zip(self.vector(), B)) + def operator(self): + """ + Return the left-multiplication-by-this-element + operator on the ambient algebra. + + TESTS:: + + sage: set_random_seed() + sage: J = random_eja() + sage: x = J.random_element() + sage: y = J.random_element() + sage: x.operator()(y) == x*y + True + sage: y.operator()(x) == x*y + True + + """ + P = self.parent() + return FiniteDimensionalEuclideanJordanAlgebraMorphism( + Hom(P,P), + self.operator_matrix() ) + + + def operator_matrix(self): """ Return the matrix that represents left- (or right-) -- 2.44.2