From: Michael Orlitzky Date: Fri, 26 Jul 2019 16:13:14 +0000 (-0400) Subject: eja: add new operator() method for elements that returns a morphism. X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=5cb6fb61b78292f5bc19d37ac753125693dd7f2e;p=sage.d.git eja: add new operator() method for elements that returns a morphism. --- 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-)