From: Michael Orlitzky Date: Sat, 27 Jul 2019 00:46:25 +0000 (-0400) Subject: eja: fix an erroneous test case. X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=31baec0eee0c53b0cfe379c744cdf174aa57ebd9;p=sage.d.git eja: fix an erroneous test case. --- 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)