This may require supporting "basis" as a list of basis vectors
(as opposed to superalgebra elements) in the subalgebra constructor.
-7. Use charpoly for inverse stuff if it's cached.
-
-8. The inner product should be an *argument* to the main EJA
+7. The inner product should be an *argument* to the main EJA
constructor. Afterwards, the basis normalization step should be
optional (and enabled by default) for ALL algebras, since any
algebra can have a nonstandard inner-product and its basis can be
whether or not the paren't algebra's zero element is a root
of this element's minimal polynomial.
+ That is... unless the coefficients of our algebra's
+ "characteristic polynomial of" function are already cached!
+ In that case, we just use the determinant (which will be fast
+ as a result).
+
Beware that we can't use the superclass method, because it
relies on the algebra being associative.
else:
return False
+ if self.parent()._charpoly_coefficients.is_in_cache():
+ # The determinant will be quicker than computing the minimal
+ # polynomial from scratch, most likely.
+ return (not self.det().is_zero())
+
# In fact, we only need to know if the constant term is non-zero,
# so we can pass in the field's zero element instead.
zero = self.base_ring().zero()