X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=mjo%2Feja%2Feja_algebra.py;h=af7d059631b1706227e59d54952cfec552ddabb1;hb=47671d4a72c9eaed822c066f05a26f63c7301526;hp=e79b0e8048debc968629fbd2ad5ada522829b3d6;hpb=d6b4042f69335c3f1ad86c0918d28a3d15775e07;p=sage.d.git diff --git a/mjo/eja/eja_algebra.py b/mjo/eja/eja_algebra.py index e79b0e8..af7d059 100644 --- a/mjo/eja/eja_algebra.py +++ b/mjo/eja/eja_algebra.py @@ -423,6 +423,18 @@ class FiniteDimensionalEJA(CombinatorialFreeModule): """ return "Associative" in self.category().axioms() + def _is_commutative(self): + r""" + Whether or not this algebra's multiplication table is commutative. + + This method should of course always return ``True``, unless + this algebra was constructed with ``check_axioms=False`` and + passed an invalid multiplication table. + """ + return all( self.product_on_basis(i,j) == self.product_on_basis(i,j) + for i in range(self.dimension()) + for j in range(self.dimension()) ) + def _is_jordanian(self): r""" Whether or not this algebra's multiplication table respects the @@ -430,7 +442,7 @@ class FiniteDimensionalEJA(CombinatorialFreeModule): We only check one arrangement of `x` and `y`, so for a ``True`` result to be truly true, you should also check - :meth:`is_commutative`. This method should of course always + :meth:`_is_commutative`. This method should of course always return ``True``, unless this algebra was constructed with ``check_axioms=False`` and passed an invalid multiplication table. """