From: Michael Orlitzky Date: Tue, 15 Oct 2019 12:10:46 +0000 (-0400) Subject: eja: make two operator tests work in trivial algebras. X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=422c881c55305a0a6a3e72eb8f57ab6c644b4b0f;p=sage.d.git eja: make two operator tests work in trivial algebras. --- diff --git a/mjo/eja/eja_operator.py b/mjo/eja/eja_operator.py index 6e22d36..c073bc4 100644 --- a/mjo/eja/eja_operator.py +++ b/mjo/eja/eja_operator.py @@ -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 """