]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
eja: fix the element inverse() implementation and some failing tests.
authorMichael Orlitzky <michael@orlitzky.com>
Fri, 26 Jul 2019 23:57:30 +0000 (19:57 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Mon, 29 Jul 2019 03:19:01 +0000 (23:19 -0400)
mjo/eja/euclidean_jordan_algebra.py

index cc356dc0ff7e6a94186d4d809ae937c01f0a3e6c..713eca534b1028dadddf4bb6e99953de0d6b1cd0 100644 (file)
@@ -1089,8 +1089,7 @@ class FiniteDimensionalEuclideanJordanAlgebra(FiniteDimensionalAlgebra):
             if not self.is_invertible():
                 raise ValueError("element is not invertible")
 
-            P = self.parent()
-            return P(self.quadratic_representation().inverse()*self.vector())
+            return (~self.quadratic_representation())(self)
 
 
         def is_invertible(self):
@@ -1475,7 +1474,7 @@ class FiniteDimensionalEuclideanJordanAlgebra(FiniteDimensionalAlgebra):
                 sage: D = (x0^2 - x_bar.inner_product(x_bar))*D
                 sage: D = D + 2*x_bar.tensor_product(x_bar)
                 sage: Q = block_matrix(2,2,[A,B,C,D])
-                sage: Q == x.quadratic_representation().operator_matrix()
+                sage: Q == x.quadratic_representation().matrix()
                 True
 
             Test all of the properties from Theorem 11.2 in Alizadeh::