return tr.coefficient_tuple()[0]
-class RealSymmetricEJA(MatrixEuclideanJordanAlgebra):
+class RealMatrixEuclideanJordanAlgebra(MatrixEuclideanJordanAlgebra):
+ @staticmethod
+ def real_embed(M):
+ """
+ Embed the matrix ``M`` into a space of real matrices.
+
+ The matrix ``M`` can have entries in any field at the moment:
+ the real numbers, complex numbers, or quaternions. And although
+ they are not a field, we can probably support octonions at some
+ point, too. This function returns a real matrix that "acts like"
+ the original with respect to matrix multiplication; i.e.
+
+ real_embed(M*N) = real_embed(M)*real_embed(N)
+
+ """
+ return M
+
+
+ @staticmethod
+ def real_unembed(M):
+ """
+ The inverse of :meth:`real_embed`.
+ """
+ return M
+
+
+class RealSymmetricEJA(RealMatrixEuclideanJordanAlgebra):
"""
The rank-n simple EJA consisting of real symmetric n-by-n
matrices, the usual symmetric Jordan product, and the trace inner
def _max_test_case_size():
return 5 # Dimension 10
- @staticmethod
- def real_embed(M):
- """
- Embed the matrix ``M`` into a space of real matrices.
-
- The matrix ``M`` can have entries in any field at the moment:
- the real numbers, complex numbers, or quaternions. And although
- they are not a field, we can probably support octonions at some
- point, too. This function returns a real matrix that "acts like"
- the original with respect to matrix multiplication; i.e.
-
- real_embed(M*N) = real_embed(M)*real_embed(N)
-
- """
- return M
-
-
- @staticmethod
- def real_unembed(M):
- """
- The inverse of :meth:`real_embed`.
- """
- return M
-
class ComplexMatrixEuclideanJordanAlgebra(MatrixEuclideanJordanAlgebra):