X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=mjo%2Feja%2Feja_algebra.py;h=76a8ce624d526b8c3bd67de6d3b169b4b866d73b;hb=e20375c18a22ff8dd3ed114c57d63ef8eca3a209;hp=db1494681d054887781efc14acebd2f73653beb0;hpb=c8af8b316ce0f238fea8a994d24776f74dc1e271;p=sage.d.git diff --git a/mjo/eja/eja_algebra.py b/mjo/eja/eja_algebra.py index db14946..76a8ce6 100644 --- a/mjo/eja/eja_algebra.py +++ b/mjo/eja/eja_algebra.py @@ -379,6 +379,36 @@ class FiniteDimensionalEuclideanJordanAlgebra(CombinatorialFreeModule): return x.trace_inner_product(y) + def multiplication_table(self): + """ + Return a readable matrix representation of this algebra's + multiplication table. The (i,j)th entry in the matrix contains + the product of the ith basis element with the jth. + + This is not extraordinarily useful, but it overrides a superclass + method that would otherwise just crash and complain about the + algebra being infinite. + + EXAMPLES:: + + sage: J = RealCartesianProductEJA(3) + sage: J.multiplication_table() + [e0 0 0] + [ 0 e1 0] + [ 0 0 e2] + + :: + + sage: J = JordanSpinEJA(3) + sage: J.multiplication_table() + [e0 e1 e2] + [e1 e0 0] + [e2 0 e0] + + """ + return matrix(self._multiplication_table) + + def natural_basis(self): """ Return a more-natural representation of this algebra's basis.