]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
eja: remove redundant subalgebra stuff out of element subalgebras.
authorMichael Orlitzky <michael@orlitzky.com>
Sun, 10 Nov 2019 14:20:59 +0000 (09:20 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Sun, 10 Nov 2019 14:20:59 +0000 (09:20 -0500)
These were simply remnants of a copy/paste refactoring.

mjo/eja/eja_element_subalgebra.py

index 7cf3f3702adb5832a7ef4bb86a80b24431d87a54..c058613e1b650a3c3007ad8700d1c36d0b2567c9 100644 (file)
@@ -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
-