- def matrix_space(self):
- r"""
- Return the space that our matrix basis lives in as a Cartesian
- product.
-
- We don't simply use the ``cartesian_product()`` functor here
- because it acts differently on SageMath MatrixSpaces and our
- custom MatrixAlgebras, which are CombinatorialFreeModules. We
- always want the result to be represented (and indexed) as
- an ordered tuple.
-
- SETUP::
-
- sage: from mjo.eja.eja_algebra import (ComplexHermitianEJA,
- ....: HadamardEJA,
- ....: OctonionHermitianEJA,
- ....: RealSymmetricEJA)
-
- EXAMPLES::
-
- sage: J1 = HadamardEJA(1)
- sage: J2 = RealSymmetricEJA(2)
- sage: J = cartesian_product([J1,J2])
- sage: J.matrix_space()
- The Cartesian product of (Full MatrixSpace of 1 by 1 dense
- matrices over Algebraic Real Field, Full MatrixSpace of 2
- by 2 dense matrices over Algebraic Real Field)
-
- ::
-
- sage: J1 = ComplexHermitianEJA(1)
- sage: J2 = ComplexHermitianEJA(1)
- sage: J = cartesian_product([J1,J2])
- sage: J.one().to_matrix()[0]
- +---+
- | 1 |
- +---+
- sage: J.one().to_matrix()[1]
- +---+
- | 1 |
- +---+
-
- ::
-
- sage: J1 = OctonionHermitianEJA(1)
- sage: J2 = OctonionHermitianEJA(1)
- sage: J = cartesian_product([J1,J2])
- sage: J.one().to_matrix()[0]
- +----+
- | e0 |
- +----+
- sage: J.one().to_matrix()[1]
- +----+
- | e0 |
- +----+
-
- """
- return super().matrix_space()
-