From e55bb3635ce4f25e45c59e947c144910e03bd09b Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Tue, 15 Oct 2019 08:15:43 -0400 Subject: [PATCH] eja: fix a rank test to work on trivial algebras. --- mjo/eja/eja_algebra.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/mjo/eja/eja_algebra.py b/mjo/eja/eja_algebra.py index 6589575..56be0fa 100644 --- a/mjo/eja/eja_algebra.py +++ b/mjo/eja/eja_algebra.py @@ -686,11 +686,15 @@ class FiniteDimensionalEuclideanJordanAlgebra(CombinatorialFreeModule): TESTS: Ensure that every EJA that we know how to construct has a - positive integer rank:: + positive integer rank, unless the algebra is trivial in + which case its rank will be zero:: sage: set_random_seed() - sage: r = random_eja().rank() - sage: r in ZZ and r > 0 + sage: J = random_eja() + sage: r = J.rank() + sage: r in ZZ + True + sage: r > 0 or (r == 0 and J.is_trivial()) True """ -- 2.44.2