From: Michael Orlitzky Date: Sun, 21 Feb 2021 14:06:40 +0000 (-0500) Subject: eja: add "category" argument to FiniteDimensionalEJA. X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=3ef701736879443e851c27fe108e2a5c7e15bf47;p=sage.d.git eja: add "category" argument to FiniteDimensionalEJA. --- diff --git a/mjo/eja/eja_algebra.py b/mjo/eja/eja_algebra.py index e82e741..7da2207 100644 --- a/mjo/eja/eja_algebra.py +++ b/mjo/eja/eja_algebra.py @@ -64,7 +64,8 @@ class FiniteDimensionalEJA(CombinatorialFreeModule): associative=False, check_field=True, check_axioms=True, - prefix='e'): + prefix='e', + category=None): if check_field: if not field.is_subring(RR): @@ -93,11 +94,12 @@ class FiniteDimensionalEJA(CombinatorialFreeModule): raise ValueError("inner-product is not commutative") - category = MagmaticAlgebras(field).FiniteDimensional() - category = category.WithBasis().Unital() - if associative: - # Element subalgebras can take advantage of this. - category = category.Associative() + if category is None: + category = MagmaticAlgebras(field).FiniteDimensional() + category = category.WithBasis().Unital() + if associative: + # Element subalgebras can take advantage of this. + category = category.Associative() # Call the superclass constructor so that we can use its from_vector() # method to build our multiplication table.