+ def __init__(self, superalgebra, basis, category=None, check_axioms=True):
+ self._superalgebra = superalgebra
+ V = self._superalgebra.vector_space()
+ field = self._superalgebra.base_ring()
+ if category is None:
+ category = self._superalgebra.category()
+
+ # A half-assed attempt to ensure that we don't collide with
+ # the superalgebra's prefix (ignoring the fact that there
+ # could be super-superelgrbas in scope). If possible, we
+ # try to "increment" the parent algebra's prefix, although
+ # this idea goes out the window fast because some prefixen
+ # are off-limits.
+ prefixen = [ 'f', 'g', 'h', 'a', 'b', 'c', 'd' ]
+ try:
+ prefix = prefixen[prefixen.index(self._superalgebra.prefix()) + 1]
+ except ValueError:
+ prefix = prefixen[0]
+
+ basis_vectors = [ b.to_vector() for b in basis ]
+ superalgebra_basis = [ self._superalgebra.from_vector(b)
+ for b in basis_vectors ]