From 31baec0eee0c53b0cfe379c744cdf174aa57ebd9 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Fri, 26 Jul 2019 20:46:25 -0400 Subject: [PATCH] eja: fix an erroneous test case. --- mjo/eja/euclidean_jordan_algebra.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mjo/eja/euclidean_jordan_algebra.py b/mjo/eja/euclidean_jordan_algebra.py index 0b50c23..30d04f4 100644 --- a/mjo/eja/euclidean_jordan_algebra.py +++ b/mjo/eja/euclidean_jordan_algebra.py @@ -1084,12 +1084,12 @@ class FiniteDimensionalEuclideanJordanAlgebra(FiniteDimensionalAlgebra): sage: n = ZZ.random_element(1,10) sage: J = JordanSpinEJA(n) sage: x = J.random_element() - sage: while x.is_zero(): + sage: while not x.is_invertible(): ....: x = J.random_element() sage: x_vec = x.vector() sage: x0 = x_vec[0] sage: x_bar = x_vec[1:] - sage: coeff = 1/(x0^2 - x_bar.inner_product(x_bar)) + sage: coeff = ~(x0^2 - x_bar.inner_product(x_bar)) sage: inv_vec = x_vec.parent()([x0] + (-x_bar).list()) sage: x_inverse = coeff*inv_vec sage: x.inverse() == J(x_inverse) -- 2.44.2