]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
eja: drop redundant vector->superalgebra-element conversion.
authorMichael Orlitzky <michael@orlitzky.com>
Sat, 21 Nov 2020 16:44:27 +0000 (11:44 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Sat, 21 Nov 2020 16:44:27 +0000 (11:44 -0500)
mjo/eja/eja_subalgebra.py

index 292c770c8b2bb8d52ecc38c25c1170a36ded59bc..cb9631df18b5a0749dda75855682c40a689cd5b3 100644 (file)
@@ -165,19 +165,17 @@ class FiniteDimensionalEuclideanJordanSubalgebra(FiniteDimensionalEuclideanJorda
             prefix = prefixen[0]
 
         basis_vectors = [ b.to_vector() for b in basis ]
-        superalgebra_basis = [ self._superalgebra.from_vector(b)
-                               for b in basis_vectors ]
 
         # If our superalgebra is a subalgebra of something else, then
         # these vectors won't have the right coordinates for
         # V.span_of_basis() unless we use V.from_vector() on them.
         W = V.span_of_basis( V.from_vector(v) for v in basis_vectors )
 
-        n = len(superalgebra_basis)
+        n = len(basis)
         mult_table = [[W.zero() for i in range(n)] for j in range(n)]
         for i in range(n):
             for j in range(n):
-                product = superalgebra_basis[i]*superalgebra_basis[j]
+                product = basis[i]*basis[j]
                 # product.to_vector() might live in a vector subspace
                 # if our parent algebra is already a subalgebra. We
                 # use V.from_vector() to make it "the right size" in
@@ -185,8 +183,7 @@ class FiniteDimensionalEuclideanJordanSubalgebra(FiniteDimensionalEuclideanJorda
                 product_vector = V.from_vector(product.to_vector())
                 mult_table[i][j] = W.coordinate_vector(product_vector)
 
-        natural_basis = tuple( b.natural_representation()
-                               for b in superalgebra_basis )
+        natural_basis = tuple( b.natural_representation() for b in basis )
 
 
         self._vector_space = W