From: Michael Orlitzky Date: Sun, 10 Nov 2019 14:20:59 +0000 (-0500) Subject: eja: remove redundant subalgebra stuff out of element subalgebras. X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=f9690e43873907af4da7a9ccd6d74c6937b7cdf8;p=sage.d.git eja: remove redundant subalgebra stuff out of element subalgebras. These were simply remnants of a copy/paste refactoring. --- diff --git a/mjo/eja/eja_element_subalgebra.py b/mjo/eja/eja_element_subalgebra.py index 7cf3f37..c058613 100644 --- a/mjo/eja/eja_element_subalgebra.py +++ b/mjo/eja/eja_element_subalgebra.py @@ -88,40 +88,6 @@ class FiniteDimensionalEuclideanJordanElementSubalgebra(FiniteDimensionalEuclide return self.monomial(1) - def _element_constructor_(self, elt): - """ - Construct an element of this subalgebra from the given one. - The only valid arguments are elements of the parent algebra - that happen to live in this subalgebra. - - SETUP:: - - sage: from mjo.eja.eja_algebra import RealSymmetricEJA - sage: from mjo.eja.eja_element_subalgebra import FiniteDimensionalEuclideanJordanElementSubalgebra - - EXAMPLES:: - - sage: J = RealSymmetricEJA(3) - sage: x = sum( i*J.gens()[i] for i in range(6) ) - sage: K = FiniteDimensionalEuclideanJordanElementSubalgebra(x,False) - sage: [ K(x^k) for k in range(J.rank()) ] - [f0, f1, f2] - - :: - - """ - if elt == 0: - # Just as in the superalgebra class, we need to hack - # this special case to ensure that random_element() can - # coerce a ring zero into the algebra. - return self.zero() - - if elt in self.superalgebra(): - coords = self.vector_space().coordinate_vector(elt.to_vector()) - return self.from_vector(coords) - - - def one(self): """ Return the multiplicative identity element of this algebra. @@ -199,52 +165,3 @@ class FiniteDimensionalEuclideanJordanElementSubalgebra(FiniteDimensionalEuclide sa_one = self.superalgebra().one().to_vector() sa_coords = self.vector_space().coordinate_vector(sa_one) return self.from_vector(sa_coords) - - - def natural_basis_space(self): - """ - Return the natural basis space of this algebra, which is identical - to that of its superalgebra. - - This is correct "by definition," and avoids a mismatch when the - subalgebra is trivial (with no natural basis to infer anything - from) and the parent is not. - """ - return self.superalgebra().natural_basis_space() - - - def superalgebra(self): - """ - Return the superalgebra that this algebra was generated from. - """ - return self._superalgebra - - - def vector_space(self): - """ - SETUP:: - - sage: from mjo.eja.eja_algebra import RealSymmetricEJA - sage: from mjo.eja.eja_element_subalgebra import FiniteDimensionalEuclideanJordanElementSubalgebra - - EXAMPLES:: - - sage: J = RealSymmetricEJA(3) - sage: x = J.monomial(0) + 2*J.monomial(2) + 5*J.monomial(5) - sage: K = FiniteDimensionalEuclideanJordanElementSubalgebra(x,False) - sage: K.vector_space() - Vector space of degree 6 and dimension 3 over... - User basis matrix: - [ 1 0 1 0 0 1] - [ 1 0 2 0 0 5] - [ 1 0 4 0 0 25] - sage: (x^0).to_vector() - (1, 0, 1, 0, 0, 1) - sage: (x^1).to_vector() - (1, 0, 2, 0, 0, 5) - sage: (x^2).to_vector() - (1, 0, 4, 0, 0, 25) - - """ - return self._vector_space -