]> gitweb.michael.orlitzky.com - sage.d.git/blobdiff - mjo/eja/eja_algebra.py
eja: add "category" argument to FiniteDimensionalEJA.
[sage.d.git] / 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.