EXAMPLES:
sage: set_random_seed()
- sage: J = eja_ln(5)
- sage: x = J.random_element()
+ sage: x = random_eja().random_element()
sage: x.matrix()*x.vector() == (x**2).vector()
True
The identity element is never nilpotent::
sage: set_random_seed()
- sage: n = ZZ.random_element(2,10).abs()
- sage: J = eja_rn(n)
- sage: J.one().is_nilpotent()
- False
- sage: J = eja_ln(n)
- sage: J.one().is_nilpotent()
+ sage: random_eja().one().is_nilpotent()
False
The additive identity is always nilpotent::
sage: set_random_seed()
- sage: n = ZZ.random_element(2,10).abs()
- sage: J = eja_rn(n)
- sage: J.zero().is_nilpotent()
- True
- sage: J = eja_ln(n)
- sage: J.zero().is_nilpotent()
+ sage: random_eja().zero().is_nilpotent()
True
"""
EXAMPLES::
sage: set_random_seed()
- sage: n = ZZ.random_element(1,10).abs()
- sage: J = eja_rn(n)
- sage: x = J.random_element()
+ sage: x = random_eja().random_element()
sage: x.degree() == x.minimal_polynomial().degree()
True
::
sage: set_random_seed()
- sage: n = ZZ.random_element(1,10).abs()
- sage: J = eja_ln(n)
- sage: x = J.random_element()
+ sage: x = random_eja().random_element()
sage: x.degree() == x.minimal_polynomial().degree()
True
TESTS::
sage: set_random_seed()
- sage: n = ZZ.random_element(1,10).abs()
- sage: J = eja_rn(n)
- sage: x = J.random_element()
- sage: x.subalgebra_generated_by().is_associative()
- True
- sage: J = eja_ln(n)
- sage: x = J.random_element()
+ sage: x = random_eja().random_element()
sage: x.subalgebra_generated_by().is_associative()
True
squaring in the superalgebra::
sage: set_random_seed()
- sage: J = eja_ln(5)
- sage: x = J.random_element()
+ sage: x = random_eja().random_element()
sage: u = x.subalgebra_generated_by().random_element()
sage: u.matrix()*u.vector() == (u**2).vector()
True