From 3ef701736879443e851c27fe108e2a5c7e15bf47 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Sun, 21 Feb 2021 09:06:40 -0500 Subject: [PATCH] eja: add "category" argument to FiniteDimensionalEJA. --- mjo/eja/eja_algebra.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) 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. -- 2.43.2