SETUP::
- sage: from mjo.eja.eja_algebra import HadamardEJA
+ sage: from mjo.eja.eja_algebra import (random_eja,
+ ....: HadamardEJA)
EXAMPLES:
to zero on that element::
sage: set_random_seed()
- sage: x = HadamardEJA(3).random_element()
+ sage: x = random_eja().random_element()
sage: p = x.characteristic_polynomial()
- sage: x.apply_univariate_polynomial(p)
- 0
+ sage: x.apply_univariate_polynomial(p).is_zero()
+ True
The characteristic polynomials of the zero and unit elements
should be what we think they are in a subalgebra, too::
sage: set_random_seed()
sage: d_max = RealSymmetricEJA._max_random_instance_dimension()
- sage: n = ZZ.random_element(1, d_max)
+ sage: d = ZZ.random_element(1, d_max)
+ sage: n = RealSymmetricEJA._max_random_instance_size(d)
sage: J1 = RealSymmetricEJA(n)
sage: J2 = RealSymmetricEJA(n,orthonormalize=False)
sage: X = random_matrix(AA,n)