From c089560955d306b4c2408b222012747c8fe3bddc Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Sat, 21 Nov 2020 11:44:27 -0500 Subject: [PATCH] eja: drop redundant vector->superalgebra-element conversion. --- mjo/eja/eja_subalgebra.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/mjo/eja/eja_subalgebra.py b/mjo/eja/eja_subalgebra.py index 292c770..cb9631d 100644 --- a/mjo/eja/eja_subalgebra.py +++ b/mjo/eja/eja_subalgebra.py @@ -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 -- 2.43.2