From: Michael Orlitzky Date: Sat, 21 Nov 2020 02:31:54 +0000 (-0500) Subject: eja: don't compute an unused vector space for the element subalgebra. X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=8b85fd74f79fe1eb23e9f04bfd73b7d3cbf9b554;p=sage.d.git eja: don't compute an unused vector space for the element subalgebra. --- diff --git a/mjo/eja/TODO b/mjo/eja/TODO index e8a2a8d..76b9eaf 100644 --- a/mjo/eja/TODO +++ b/mjo/eja/TODO @@ -11,3 +11,10 @@ DirectSumEJA. 6. Switch to QQ in *all* algebras for _charpoly_coefficients(). + +7. Pass already_echelonized (default: False) and echelon_basis + (default: None) into the subalgebra constructor. The value of + already_echelonized can be passed to V.span_of_basis() to save + some time, and usinf e.g. FreeModule_submodule_with_basis_field + we may somehow be able to pass the echelon basis straight in to + save time. diff --git a/mjo/eja/eja_element_subalgebra.py b/mjo/eja/eja_element_subalgebra.py index 73e1cbd..a26381b 100644 --- a/mjo/eja/eja_element_subalgebra.py +++ b/mjo/eja/eja_element_subalgebra.py @@ -28,10 +28,6 @@ class FiniteDimensionalEuclideanJordanElementSubalgebra(FiniteDimensionalEuclide # Pick those out of the list of all powers. superalgebra_basis = tuple(map(powers.__getitem__, ind_rows)) - - # 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. basis_vectors = map(power_vectors.__getitem__, ind_rows) else: # If we're going to orthonormalize the basis anyway, we @@ -47,8 +43,6 @@ class FiniteDimensionalEuclideanJordanElementSubalgebra(FiniteDimensionalEuclide superalgebra_basis = [ self._superalgebra.from_vector(b) for b in basis_vectors ] - W = V.span_of_basis( V.from_vector(v) for v in basis_vectors ) - fdeja = super(FiniteDimensionalEuclideanJordanElementSubalgebra, self) fdeja.__init__(self._superalgebra, superalgebra_basis, @@ -61,7 +55,7 @@ class FiniteDimensionalEuclideanJordanElementSubalgebra(FiniteDimensionalEuclide # polynomial has the same degree as the space's dimension # (remember how we constructed the space?), so that must be # its rank too. - self.rank.set_cache(W.dimension()) + self.rank.set_cache(self.dimension()) def one(self):