From e20375c18a22ff8dd3ed114c57d63ef8eca3a209 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Sun, 4 Aug 2019 15:13:18 -0400 Subject: [PATCH] eja: add multiplication_table() for EJAs. --- mjo/eja/eja_algebra.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) 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. -- 2.44.2