return A.element_class(A, (self.matrix()**(n-1))*self.vector())
+ def is_regular(self):
+ """
+ Return whether or not this is a regular element.
+
+ EXAMPLES:
+
+ The identity element always has degree one, but any element
+ linearly-independent from it is regular::
+
+ sage: J = eja_ln(5)
+ sage: J.one().is_regular()
+ False
+ sage: e0, e1, e2, e3, e4 = J.gens() # e0 is the identity
+ sage: for x in J.gens():
+ ....: (J.one() + x).is_regular()
+ False
+ True
+ True
+ True
+ True
+
+ """
+ return self.degree() == self.parent().rank()
+
def span_of_powers(self):
"""
Return the vector space spanned by successive powers of