F = domain_eja.base_ring()
if not (F == codomain_eja.base_ring()):
raise ValueError("domain and codomain must have the same base ring")
+ if not (F == mat.base_ring()):
+ raise ValueError("domain and matrix must have the same base ring")
# We need to supply something here to avoid getting the
# default Homset of the parent FiniteDimensionalAlgebra class,
different EJAs, that should blow up::
sage: J1 = RealSymmetricEJA(2)
+ sage: id1 = identity_matrix(J1.base_ring(), 3)
sage: J2 = JordanSpinEJA(3)
- sage: id = identity_matrix(QQ, 3)
- sage: f = FiniteDimensionalEuclideanJordanAlgebraOperator(J1,J1,id)
- sage: g = FiniteDimensionalEuclideanJordanAlgebraOperator(J2,J2,id)
+ sage: id2 = identity_matrix(J2.base_ring(), 3)
+ sage: f = FiniteDimensionalEuclideanJordanAlgebraOperator(J1,J1,id1)
+ sage: g = FiniteDimensionalEuclideanJordanAlgebraOperator(J2,J2,id2)
sage: f + g
Traceback (most recent call last):
...