From bbd022d622d9536dba19fd9ad0eabd7f0a693d2f Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Sat, 27 Jul 2019 08:54:31 -0400 Subject: [PATCH] eja: fix a busted operator inverse test. --- mjo/eja/euclidean_jordan_algebra.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/mjo/eja/euclidean_jordan_algebra.py b/mjo/eja/euclidean_jordan_algebra.py index 30d04f4..35318e8 100644 --- a/mjo/eja/euclidean_jordan_algebra.py +++ b/mjo/eja/euclidean_jordan_algebra.py @@ -184,13 +184,17 @@ class FiniteDimensionalEuclideanJordanAlgebraMorphism(FiniteDimensionalAlgebraMo [ 1 0 0] [-1/2 0 1/2] - TESTS:: + TESTS: + + Beware, ``x`` being invertible isn't sufficient for its operator + to be invertible below:: sage: set_random_seed() sage: J = random_eja() sage: x = J.random_element() - sage: not x.is_invertible() or ( - ....: (~x.operator()).matrix() == x.operator_matrix().inverse() ) + sage: id = J.Hom(J).one() + sage: not x.operator_matrix().is_invertible() or ( + ....: ~x.operator()*x.operator() == id ) True """ -- 2.44.2