]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
octonions: use more generic variable names in a few places.
authorMichael Orlitzky <michael@orlitzky.com>
Tue, 2 Mar 2021 20:53:30 +0000 (15:53 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Tue, 2 Mar 2021 20:53:30 +0000 (15:53 -0500)
mjo/octonions.py

index f786fcf1228e62f605876c04a2003614d5015e64..04aa318a3d8bed7158da61c26b0bb8b25f7cab0b 100644 (file)
@@ -514,27 +514,27 @@ class OctonionMatrixAlgebra(CombinatorialFreeModule):
     """
     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,