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-)