of an element is the inverse of its left-multiplication operator
applied to the algebra's identity, when that inverse exists::
- sage: J = random_eja()
- sage: x = J.random_element()
- sage: (not x.operator().is_invertible()) or (
- ....: x.operator().inverse()(J.one()) == x.inverse() )
+ sage: J = random_eja() # long time
+ sage: x = J.random_element() # long time
+ sage: (not x.operator().is_invertible()) or ( # long time
+ ....: x.operator().inverse()(J.one()) # long time
+ ....: == # long time
+ ....: x.inverse() ) # long time
True
Check that the fast (cached) and slow algorithms give the same
The minimal polynomial should always kill its element::
- sage: x = random_eja().random_element()
- sage: p = x.minimal_polynomial()
- sage: x.apply_univariate_polynomial(p)
+ sage: x = random_eja().random_element() # long time
+ sage: p = x.minimal_polynomial() # long time
+ sage: x.apply_univariate_polynomial(p) # long time
0
The minimal polynomial is invariant under a change of basis,
works like it does in the superalgebra, even if we orthonormalize
our basis::
- sage: x = random_eja(field=AA).random_element()
- sage: A = x.subalgebra_generated_by(orthonormalize=True)
- sage: y = A.random_element()
- sage: y.operator()(A.one()) == y
+ sage: x = random_eja(field=AA).random_element() # long time
+ sage: A = x.subalgebra_generated_by(orthonormalize=True) # long time
+ sage: y = A.random_element() # long time
+ sage: y.operator()(A.one()) == y # long time
True
"""