From: Michael Orlitzky Date: Fri, 26 Jul 2019 23:57:30 +0000 (-0400) Subject: eja: fix the element inverse() implementation and some failing tests. X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=f117a2240c2bb5e87cb82485db701a40d5dbad04;p=sage.d.git eja: fix the element inverse() implementation and some failing tests. --- diff --git a/mjo/eja/euclidean_jordan_algebra.py b/mjo/eja/euclidean_jordan_algebra.py index cc356dc..713eca5 100644 --- a/mjo/eja/euclidean_jordan_algebra.py +++ b/mjo/eja/euclidean_jordan_algebra.py @@ -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::