]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
eja: add multiplication_table() for EJAs.
authorMichael Orlitzky <michael@orlitzky.com>
Sun, 4 Aug 2019 19:13:18 +0000 (15:13 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Sun, 4 Aug 2019 19:13:18 +0000 (15:13 -0400)
mjo/eja/eja_algebra.py

index db1494681d054887781efc14acebd2f73653beb0..76a8ce624d526b8c3bd67de6d3b169b4b866d73b 100644 (file)
@@ -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.