]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
eja: add "category" argument to FiniteDimensionalEJA.
authorMichael Orlitzky <michael@orlitzky.com>
Sun, 21 Feb 2021 14:06:40 +0000 (09:06 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Sun, 21 Feb 2021 14:06:40 +0000 (09:06 -0500)
mjo/eja/eja_algebra.py

index e82e74171f05ffd2c3a6da36fdfdb481f7945c8f..7da2207e9bce1fdf306d06586f7f8bd0ca63e648 100644 (file)
@@ -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.