class FiniteDimensionalEuclideanJordanAlgebraMorphism(FiniteDimensionalAlgebraMorphism):
"""
A very thin wrapper around FiniteDimensionalAlgebraMorphism that
- does only two things:
+ does only three things:
1. Avoids the ``unitary`` and ``check`` arguments to the constructor
that will always be ``False``. This is necessary because these
2. Inputs and outputs the underlying matrix with respect to COLUMN
vectors, unlike the parent class.
+ 3. Allows us to add 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.
+ our EJA, and you can't add them.
"""
+
+ def __add__(self, other):
+ """
+ Add two EJA morphisms in the obvious way.
+
+ EXAMPLES:
+
+ sage: J = RealSymmetricEJA(3)
+ sage: x = J.zero()
+ sage: y = J.zero()
+ sage: x.operator() + y.operator()
+ Morphism from Euclidean Jordan algebra of degree 6 over Rational
+ Field to Euclidean Jordan algebra of degree 6 over Rational Field
+ given by matrix
+ [0 0 0 0 0 0]
+ [0 0 0 0 0 0]
+ [0 0 0 0 0 0]
+ [0 0 0 0 0 0]
+ [0 0 0 0 0 0]
+ [0 0 0 0 0 0]
+
+ """
+ P = self.parent()
+ if not other in P:
+ raise ValueError("summands must live in the same space")
+
+ return FiniteDimensionalEuclideanJordanAlgebraMorphism(
+ P,
+ self.matrix() + other.matrix() )
+
+
def __init__(self, parent, f):
FiniteDimensionalAlgebraMorphism.__init__(self,
parent,