"""
Element = OctonionMatrix
- def __init__(self, n, field=AA, prefix="E", **kwargs):
+ def __init__(self, n, scalars=AA, prefix="E", **kwargs):
# Not associative, not commutative
- category = MagmaticAlgebras(field).FiniteDimensional()
+ category = MagmaticAlgebras(scalars).FiniteDimensional()
category = category.WithBasis().Unital()
self._nrows = n
- # Since the scalar field is real but the entries are octonion,
+ # Since the scalar ring is real but the entries are not,
# sticking a "1" in each position doesn't give us a basis for
- # the space. We actually need to stick each of e0, e1, ..., e7
- # (a basis for the Octonions themselves) into each position.
+ # the space. We actually need to stick each of e0, e1, ... (a
+ # basis for the entry algebra itself) into each position.
from sage.sets.finite_enumerated_set import FiniteEnumeratedSet
from sage.categories.sets_cat import cartesian_product
I = FiniteEnumeratedSet(range(n))
J = FiniteEnumeratedSet(range(n))
- self._entry_algebra = Octonions(field=field)
+ self._entry_algebra = Octonions(field=scalars)
entry_basis = self._entry_algebra.gens()
basis_indices = cartesian_product([I,J,entry_basis])
- super().__init__(field,
+ super().__init__(scalars,
basis_indices,
category=category,
prefix=prefix,