- EXAMPLES::
-
- sage: J = RealSymmetricEJA(2)
- sage: H = J.Hom(J)
- sage: H(2)
- Morphism from Euclidean Jordan algebra of degree 3 over Rational
- Field to Euclidean Jordan algebra of degree 3 over Rational Field
- given by matrix
- [2 0 0]
- [0 2 0]
- [0 0 2]
-
- """
- if x in self.base_ring():
- cols = self.domain().dimension()
- rows = self.codomain().dimension()
- x = x*identity_matrix(self.codomain().base_ring(), rows, cols)
- return FiniteDimensionalEuclideanJordanAlgebraMorphism(self, x)
-
-
- def one(self):
- """
- Return the identity morphism, but as a member of the right
- space (so that we can add it, multiply it, etc.)
- """
- cols = self.domain().dimension()
- rows = self.codomain().dimension()
- mat = identity_matrix(self.base_ring(), rows, cols)
- return FiniteDimensionalEuclideanJordanAlgebraMorphism(self, mat)
-
-
-
-class FiniteDimensionalEuclideanJordanAlgebraMorphism(FiniteDimensionalAlgebraMorphism):
- """
- A linear map between two finite-dimensional EJAs.
-
- This is a very thin wrapper around FiniteDimensionalAlgebraMorphism
- that does only a few things:
-
- 1. Avoids the ``unitary`` and ``check`` arguments to the constructor
- that will always be ``False``. This is necessary because these
- are homomorphisms with respect to ADDITION, but the SageMath
- machinery wants to check that they're homomorphisms with respect
- to (Jordan) MULTIPLICATION. That obviously doesn't work.
-
- 2. Inputs and outputs the underlying matrix with respect to COLUMN
- vectors, unlike the parent class.
-
- 3. Allows us to add, subtract, negate, multiply (compose), and
- invert morphisms in the obvious way.
-
- If this seems a bit heavyweight, it is. I would have been happy to
- use a the ring morphism that underlies the finite-dimensional
- algebra morphism, but they don't seem to be callable on elements of
- our EJA, and you can't add/multiply/etc. them.
- """
- def _add_(self, other):
- """
- Add two EJA morphisms in the obvious way.