From: Michael Orlitzky Date: Sun, 4 Aug 2019 19:13:18 +0000 (-0400) Subject: eja: add multiplication_table() for EJAs. X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=e20375c18a22ff8dd3ed114c57d63ef8eca3a209;p=sage.d.git eja: add multiplication_table() for EJAs. --- 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.