TESTS:
- Ensure that we can convert any element of the two non-matrix
- simple algebras (whose matrix representations are columns)
- back and forth faithfully::
+ Ensure that we can convert any element back and forth
+ faithfully between its matrix and algebra representations::
sage: set_random_seed()
- sage: J = HadamardEJA.random_instance()
- sage: x = J.random_element()
- sage: J(x.to_vector().column()) == x
- True
- sage: J = JordanSpinEJA.random_instance()
+ sage: J = random_eja()
sage: x = J.random_element()
- sage: J(x.to_vector().column()) == x
+ sage: J(x.to_matrix()) == x
True
We cannot coerce elements between algebras just because their
Traceback (most recent call last):
...
ValueError: not an element of this algebra
-
"""
msg = "not an element of this algebra"
if elt in self.base_ring():