sage: x.subalgebra_generated_by().is_associative()
True
- Squaring in the subalgebra should be the same thing as
- squaring in the superalgebra::
+ Squaring in the subalgebra should work the same as in
+ the superalgebra::
sage: set_random_seed()
sage: x = random_eja().random_element()
sage: u = x.subalgebra_generated_by().random_element()
- sage: u.operator_matrix()*u.vector() == (u**2).vector()
+ sage: u.operator()(u) == u^2
True
"""