INPUT:
- - basis -- a tuple of basis elements in their matrix form.
+ - basis -- a tuple of basis elements in "matrix form," which
+ must be the same form as the arguments to ``jordan_product``
+ and ``inner_product``. In reality, "matrix form" can be either
+ vectors, matrices, or a Cartesian product (ordered tuple)
+ of vectors or matrices. All of these would ideally be vector
+ spaces in sage with no special-casing needed; but in reality
+ we turn vectors into column-matrices and Cartesian products
+ `(a,b)` into column matrices `(a,b)^{T}` after converting
+ `a` and `b` themselves.
- jordan_product -- function of two elements (in matrix form)
that returns their jordan product in this algebra; this will
field=AA,
orthonormalize=True,
associative=False,
+ cartesian_product=False,
check_field=True,
check_axioms=True,
- prefix='e',
- category=None):
+ prefix='e'):
if check_field:
if not field.is_subring(RR):
raise ValueError("inner-product is not commutative")
- if category is None:
- category = MagmaticAlgebras(field).FiniteDimensional()
- category = category.WithBasis().Unital()
- if associative:
- # Element subalgebras can take advantage of this.
- category = category.Associative()
+ category = MagmaticAlgebras(field).FiniteDimensional()
+ category = category.WithBasis().Unital()
+ if associative:
+ # Element subalgebras can take advantage of this.
+ category = category.Associative()
+ if cartesian_product:
+ category = category.CartesianProducts()
# Call the superclass constructor so that we can use its from_vector()
# method to build our multiplication table.
inner_product,
field=field,
orthonormalize=False,
+ cartesian_product=True,
check_field=False,
- check_axioms=False,
- category=self.category())
+ check_axioms=False)
ones = tuple(J.one() for J in modules)
self.one.set_cache(self._cartesian_product_of_elements(ones))