]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
eja: replace element operator_matrix() entirely.
authorMichael Orlitzky <michael@orlitzky.com>
Sun, 28 Jul 2019 15:24:49 +0000 (11:24 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Mon, 29 Jul 2019 03:19:01 +0000 (23:19 -0400)
mjo/eja/euclidean_jordan_algebra.py

index ba2c63cf492a663dcb252ef5f49fa5b6f68e6c88..cc44f61aa5ed24934e753599557ab2210b393cf9 100644 (file)
@@ -1352,7 +1352,7 @@ class FiniteDimensionalEuclideanJordanAlgebra(FiniteDimensionalAlgebra):
 
             # We get back a symbolic polynomial in 'x' but want a real
             # polynomial in 't'.
-            p_of_x = elt.operator_matrix().minimal_polynomial()
+            p_of_x = elt.operator().matrix().minimal_polynomial()
             return p_of_x.change_variable_name('t')
 
 
@@ -1422,34 +1422,11 @@ class FiniteDimensionalEuclideanJordanAlgebra(FiniteDimensionalAlgebra):
 
             """
             P = self.parent()
+            fda_elt = FiniteDimensionalAlgebraElement(P, self)
             return FiniteDimensionalEuclideanJordanAlgebraOperator(
-                     P,P,
-                     self.operator_matrix() )
-
-
-
-        def operator_matrix(self):
-            """
-            Return the matrix that represents left- (or right-)
-            multiplication by this element in the parent algebra.
-
-            We implement this ourselves to work around the fact that
-            our parent class represents everything with row vectors.
-
-            EXAMPLES:
-
-            Ensure that our operator's ``matrix`` method agrees with
-            this implementation::
-
-                sage: set_random_seed()
-                sage: J = random_eja()
-                sage: x = J.random_element()
-                sage: x.operator().matrix() == x.operator_matrix()
-                True
-
-            """
-            fda_elt = FiniteDimensionalAlgebraElement(self.parent(), self)
-            return fda_elt.matrix().transpose()
+                     P,
+                     P,
+                     fda_elt.matrix().transpose() )
 
 
         def quadratic_representation(self, other=None):
@@ -1671,7 +1648,7 @@ class FiniteDimensionalEuclideanJordanAlgebra(FiniteDimensionalAlgebra):
             s = 0
             minimal_dim = V.dimension()
             for i in xrange(1, V.dimension()):
-                this_dim = (u**i).operator_matrix().image().dimension()
+                this_dim = (u**i).operator().matrix().image().dimension()
                 if this_dim < minimal_dim:
                     minimal_dim = this_dim
                     s = i
@@ -1688,7 +1665,7 @@ class FiniteDimensionalEuclideanJordanAlgebra(FiniteDimensionalAlgebra):
             # Beware, solve_right() means that we're using COLUMN vectors.
             # Our FiniteDimensionalAlgebraElement superclass uses rows.
             u_next = u**(s+1)
-            A = u_next.operator_matrix()
+            A = u_next.operator().matrix()
             c_coordinates = A.solve_right(u_next.vector())
 
             # Now c_coordinates is the idempotent we want, but it's in