]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
eja: make two operator tests work in trivial algebras.
authorMichael Orlitzky <michael@orlitzky.com>
Tue, 15 Oct 2019 12:10:46 +0000 (08:10 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Tue, 15 Oct 2019 12:10:46 +0000 (08:10 -0400)
mjo/eja/eja_operator.py

index 6e22d367c6faa55a4f1461925ce62b04aaedfef1..c073bc41ad85d73fd942efe4e20f8e6f90bd1781 100644 (file)
@@ -420,14 +420,13 @@ class FiniteDimensionalEuclideanJordanAlgebraOperator(Map):
             sage: idJ.inverse() == idJ
             True
 
-        The zero operator is never invertible::
+        The inverse of the inverse is the operator we started with::
 
             sage: set_random_seed()
-            sage: J = random_eja()
-            sage: J.zero().operator().inverse()
-            Traceback (most recent call last):
-            ...
-            ZeroDivisionError: input matrix must be nonsingular
+            sage: x = random_eja().random_element()
+            sage: L = x.operator()
+            sage: not L.is_invertible() or (L.inverse().inverse() == L)
+            True
 
         """
         return ~self
@@ -463,11 +462,11 @@ class FiniteDimensionalEuclideanJordanAlgebraOperator(Map):
             sage: J.one().operator().is_invertible()
             True
 
-        The zero operator is never invertible::
+        The zero operator is never invertible in a nontrivial algebra::
 
             sage: set_random_seed()
             sage: J = random_eja()
-            sage: J.zero().operator().is_invertible()
+            sage: not J.is_trivial() and J.zero().operator().is_invertible()
             False
 
         """