From: Michael Orlitzky Date: Tue, 15 Oct 2019 12:15:43 +0000 (-0400) Subject: eja: fix a rank test to work on trivial algebras. X-Git-Url: http://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=e55bb3635ce4f25e45c59e947c144910e03bd09b;p=sage.d.git eja: fix a rank test to work on trivial algebras. --- 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 """